diff --git a/.librarian/state.yaml b/.librarian/state.yaml index fd1e46649047..c3107dfbd3f7 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1167,7 +1167,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-compute-v1beta version: 0.4.0 - last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd + last_generated_commit: 136a2c43b38a67cfe07317031764dd1ca1043fc6 apis: - path: google/cloud/compute/v1beta service_config: compute_v1beta.yaml diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst new file mode 100644 index 000000000000..f25d9060bd11 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/global_vm_extension_policies.rst @@ -0,0 +1,10 @@ +GlobalVmExtensionPolicies +------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.global_vm_extension_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst new file mode 100644 index 000000000000..6a48ef5a240a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_backend_buckets.rst @@ -0,0 +1,10 @@ +RegionBackendBuckets +-------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_backend_buckets + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_backend_buckets.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst new file mode 100644 index 000000000000..3a98448c3863 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_composite_health_checks.rst @@ -0,0 +1,10 @@ +RegionCompositeHealthChecks +--------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_composite_health_checks + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_composite_health_checks.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst new file mode 100644 index 000000000000..615a74ff8f0a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/region_health_aggregation_policies.rst @@ -0,0 +1,10 @@ +RegionHealthAggregationPolicies +------------------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.region_health_aggregation_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollout_plans.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollout_plans.rst new file mode 100644 index 000000000000..8ec54a0cbd42 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollout_plans.rst @@ -0,0 +1,10 @@ +RolloutPlans +------------------------------ + +.. automodule:: google.cloud.compute_v1beta.services.rollout_plans + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.rollout_plans.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollouts.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollouts.rst new file mode 100644 index 000000000000..80fdad782c11 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/rollouts.rst @@ -0,0 +1,10 @@ +Rollouts +-------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.rollouts + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.rollouts.pagers + :members: + :inherited-members: diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst index f0a2044680b5..796d41813acc 100644 --- a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/services_.rst @@ -24,6 +24,7 @@ Services for Google Cloud Compute v1beta API global_operations global_organization_operations global_public_delegated_prefixes + global_vm_extension_policies health_checks image_family_views images @@ -60,11 +61,14 @@ Services for Google Cloud Compute v1beta API public_advertised_prefixes public_delegated_prefixes region_autoscalers + region_backend_buckets region_backend_services region_commitments + region_composite_health_checks region_disks region_disk_settings region_disk_types + region_health_aggregation_policies region_health_checks region_health_check_services region_health_sources @@ -95,6 +99,8 @@ Services for Google Cloud Compute v1beta API reservations reservation_sub_blocks resource_policies + rollout_plans + rollouts routers routes security_policies @@ -120,3 +126,4 @@ Services for Google Cloud Compute v1beta API wire_groups zone_operations zones + zone_vm_extension_policies diff --git a/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst new file mode 100644 index 000000000000..16f27561d3e8 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/docs/compute_v1beta/zone_vm_extension_policies.rst @@ -0,0 +1,10 @@ +ZoneVmExtensionPolicies +----------------------------------------- + +.. automodule:: google.cloud.compute_v1beta.services.zone_vm_extension_policies + :members: + :inherited-members: + +.. automodule:: google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers + :members: + :inherited-members: 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 1fc325fc46cb..fae6f41a6265 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 @@ -51,6 +51,7 @@ from .services.global_public_delegated_prefixes import ( GlobalPublicDelegatedPrefixesClient, ) +from .services.global_vm_extension_policies import GlobalVmExtensionPoliciesClient from .services.health_checks import HealthChecksClient from .services.image_family_views import ImageFamilyViewsClient from .services.images import ImagesClient @@ -89,11 +90,16 @@ from .services.public_advertised_prefixes import PublicAdvertisedPrefixesClient from .services.public_delegated_prefixes import PublicDelegatedPrefixesClient from .services.region_autoscalers import RegionAutoscalersClient +from .services.region_backend_buckets import RegionBackendBucketsClient from .services.region_backend_services import RegionBackendServicesClient from .services.region_commitments import RegionCommitmentsClient +from .services.region_composite_health_checks import RegionCompositeHealthChecksClient from .services.region_disk_settings import RegionDiskSettingsClient from .services.region_disk_types import RegionDiskTypesClient from .services.region_disks import RegionDisksClient +from .services.region_health_aggregation_policies import ( + RegionHealthAggregationPoliciesClient, +) from .services.region_health_check_services import RegionHealthCheckServicesClient from .services.region_health_checks import RegionHealthChecksClient from .services.region_health_sources import RegionHealthSourcesClient @@ -128,6 +134,8 @@ from .services.reservation_sub_blocks import ReservationSubBlocksClient from .services.reservations import ReservationsClient from .services.resource_policies import ResourcePoliciesClient +from .services.rollout_plans import RolloutPlansClient +from .services.rollouts import RolloutsClient from .services.routers import RoutersClient from .services.routes import RoutesClient from .services.security_policies import SecurityPoliciesClient @@ -152,12 +160,16 @@ from .services.vpn_tunnels import VpnTunnelsClient from .services.wire_groups import WireGroupsClient from .services.zone_operations import ZoneOperationsClient +from .services.zone_vm_extension_policies import ZoneVmExtensionPoliciesClient from .services.zones import ZonesClient from .types.compute import ( AbandonInstancesInstanceGroupManagerRequest, AbandonInstancesRegionInstanceGroupManagerRequest, AcceleratorConfig, Accelerators, + AcceleratorTopologiesInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState, AcceleratorType, AcceleratorTypeAggregatedList, AcceleratorTypeList, @@ -193,16 +205,19 @@ AddSignedUrlKeyBackendBucketRequest, AddSignedUrlKeyBackendServiceRequest, AddTrafficClassificationRuleRegionNetworkPolicyRequest, + AdoptInstancesRegionInstanceGroupManagerRequest, AdvancedMachineFeatures, AggregatedListAcceleratorTypesRequest, AggregatedListAddressesRequest, AggregatedListAutoscalersRequest, + AggregatedListBackendBucketsRequest, AggregatedListBackendServicesRequest, AggregatedListDisksRequest, AggregatedListDiskTypesRequest, AggregatedListForwardingRulesRequest, AggregatedListFutureReservationsRequest, AggregatedListGlobalOperationsRequest, + AggregatedListGlobalVmExtensionPoliciesRequest, AggregatedListHealthChecksRequest, AggregatedListInstanceGroupManagersRequest, AggregatedListInstanceGroupsRequest, @@ -221,6 +236,8 @@ AggregatedListPacketMirroringsRequest, AggregatedListPublicDelegatedPrefixesRequest, AggregatedListRegionCommitmentsRequest, + AggregatedListRegionCompositeHealthChecksRequest, + AggregatedListRegionHealthAggregationPoliciesRequest, AggregatedListRegionHealthSourcesRequest, AggregatedListRegionNetworkPoliciesRequest, AggregatedListReservationsRequest, @@ -282,6 +299,7 @@ AWSV4Signature, Backend, BackendBucket, + BackendBucketAggregatedList, BackendBucketCdnPolicy, BackendBucketCdnPolicyBypassCacheOnRequestHeader, BackendBucketCdnPolicyCacheKeyPolicy, @@ -289,6 +307,7 @@ BackendBucketList, BackendBucketListUsable, BackendBucketParams, + BackendBucketsScopedList, BackendBucketUsedBy, BackendCustomMetric, BackendService, @@ -350,6 +369,8 @@ CancelFutureReservationRequest, CancelInstanceGroupManagerResizeRequestRequest, CancelRegionInstanceGroupManagerResizeRequestRequest, + CancelRequestRemovePeeringNetworkRequest, + CancelRolloutRequest, CircuitBreakers, CloneRulesFirewallPolicyRequest, CloneRulesNetworkFirewallPolicyRequest, @@ -359,6 +380,10 @@ CommitmentList, CommitmentResourceStatus, CommitmentsScopedList, + CompositeHealthCheck, + CompositeHealthCheckAggregatedList, + CompositeHealthCheckList, + CompositeHealthChecksScopedList, ConfidentialInstanceConfig, ConnectionDraining, ConsistentHashLoadBalancerSettings, @@ -398,6 +423,7 @@ DeleteGlobalOrganizationOperationRequest, DeleteGlobalOrganizationOperationResponse, DeleteGlobalPublicDelegatedPrefixeRequest, + DeleteGlobalVmExtensionPolicyRequest, DeleteHealthCheckRequest, DeleteImageRequest, DeleteInstanceGroupManagerRequest, @@ -430,8 +456,11 @@ DeletePublicAdvertisedPrefixeRequest, DeletePublicDelegatedPrefixeRequest, DeleteRegionAutoscalerRequest, + DeleteRegionBackendBucketRequest, DeleteRegionBackendServiceRequest, + DeleteRegionCompositeHealthCheckRequest, DeleteRegionDiskRequest, + DeleteRegionHealthAggregationPolicyRequest, DeleteRegionHealthCheckRequest, DeleteRegionHealthCheckServiceRequest, DeleteRegionHealthSourceRequest, @@ -456,6 +485,8 @@ DeleteRegionUrlMapRequest, DeleteReservationRequest, DeleteResourcePolicyRequest, + DeleteRolloutPlanRequest, + DeleteRolloutRequest, DeleteRoutePolicyRouterRequest, DeleteRouteRequest, DeleteRouterRequest, @@ -482,6 +513,7 @@ DeleteWireGroupRequest, DeleteZoneOperationRequest, DeleteZoneOperationResponse, + DeleteZoneVmExtensionPolicyRequest, Denied, DeprecateImageRequest, DeprecationStatus, @@ -582,6 +614,7 @@ GetAssociationRegionNetworkFirewallPolicyRequest, GetAssociationRegionNetworkPolicyRequest, GetAutoscalerRequest, + GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, GetBackendBucketRequest, GetBackendServiceRequest, GetCrossSiteNetworkRequest, @@ -605,6 +638,7 @@ GetGlobalOperationRequest, GetGlobalOrganizationOperationRequest, GetGlobalPublicDelegatedPrefixeRequest, + GetGlobalVmExtensionPolicyRequest, GetGuestAttributesInstanceRequest, GetHealthBackendServiceRequest, GetHealthCheckRequest, @@ -626,12 +660,15 @@ GetIamPolicyNetworkFirewallPolicyRequest, GetIamPolicyNodeGroupRequest, GetIamPolicyNodeTemplateRequest, + GetIamPolicyRegionBackendBucketRequest, GetIamPolicyRegionBackendServiceRequest, GetIamPolicyRegionDiskRequest, GetIamPolicyRegionInstantSnapshotRequest, GetIamPolicyRegionNetworkFirewallPolicyRequest, GetIamPolicyRegionSnapshotRequest, + GetIamPolicyReservationBlockRequest, GetIamPolicyReservationRequest, + GetIamPolicyReservationSubBlockRequest, GetIamPolicyResourcePolicyRequest, GetIamPolicyServiceAttachmentRequest, GetIamPolicySnapshotRequest, @@ -680,11 +717,14 @@ GetPublicAdvertisedPrefixeRequest, GetPublicDelegatedPrefixeRequest, GetRegionAutoscalerRequest, + GetRegionBackendBucketRequest, GetRegionBackendServiceRequest, GetRegionCommitmentRequest, + GetRegionCompositeHealthCheckRequest, GetRegionDiskRequest, GetRegionDiskSettingRequest, GetRegionDiskTypeRequest, + GetRegionHealthAggregationPolicyRequest, GetRegionHealthCheckRequest, GetRegionHealthCheckServiceRequest, GetRegionHealthSourceRequest, @@ -713,6 +753,8 @@ GetReservationRequest, GetReservationSubBlockRequest, GetResourcePolicyRequest, + GetRolloutPlanRequest, + GetRolloutRequest, GetRoutePolicyRouterRequest, GetRouteRequest, GetRouterRequest, @@ -754,12 +796,22 @@ GetXpnResourcesProjectsRequest, GetZoneOperationRequest, GetZoneRequest, + GetZoneVmExtensionPolicyRequest, GlobalAddressesMoveRequest, GlobalNetworkEndpointGroupsAttachEndpointsRequest, GlobalNetworkEndpointGroupsDetachEndpointsRequest, GlobalOrganizationSetPolicyRequest, GlobalSetLabelsRequest, GlobalSetPolicyRequest, + GlobalVmExtensionPolicy, + GlobalVmExtensionPolicyExtensionPolicy, + GlobalVmExtensionPolicyInstanceSelector, + GlobalVmExtensionPolicyLabelSelector, + GlobalVmExtensionPolicyList, + GlobalVmExtensionPolicyRolloutOperation, + GlobalVmExtensionPolicyRolloutOperationRolloutInput, + GlobalVmExtensionPolicyRolloutOperationRolloutStatus, + GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata, GroupMaintenanceInfo, GRPCHealthCheck, GRPCTLSHealthCheck, @@ -767,6 +819,10 @@ GuestAttributesEntry, GuestAttributesValue, GuestOsFeature, + HealthAggregationPoliciesScopedList, + HealthAggregationPolicy, + HealthAggregationPolicyAggregatedList, + HealthAggregationPolicyList, HealthCheck, HealthCheckList, HealthCheckLogConfig, @@ -821,6 +877,7 @@ InsertGlobalForwardingRuleRequest, InsertGlobalNetworkEndpointGroupRequest, InsertGlobalPublicDelegatedPrefixeRequest, + InsertGlobalVmExtensionPolicyRequest, InsertHealthCheckRequest, InsertImageRequest, InsertInstanceGroupManagerRequest, @@ -847,9 +904,12 @@ InsertPublicAdvertisedPrefixeRequest, InsertPublicDelegatedPrefixeRequest, InsertRegionAutoscalerRequest, + InsertRegionBackendBucketRequest, InsertRegionBackendServiceRequest, InsertRegionCommitmentRequest, + InsertRegionCompositeHealthCheckRequest, InsertRegionDiskRequest, + InsertRegionHealthAggregationPolicyRequest, InsertRegionHealthCheckRequest, InsertRegionHealthCheckServiceRequest, InsertRegionHealthSourceRequest, @@ -872,6 +932,7 @@ InsertRegionUrlMapRequest, InsertReservationRequest, InsertResourcePolicyRequest, + InsertRolloutPlanRequest, InsertRouteRequest, InsertRouterRequest, InsertSecurityPolicyRequest, @@ -893,6 +954,7 @@ InsertVpnGatewayRequest, InsertVpnTunnelRequest, InsertWireGroupRequest, + InsertZoneVmExtensionPolicyRequest, Instance, InstanceAggregatedList, InstanceConsumptionData, @@ -922,6 +984,8 @@ InstanceGroupManagersCreateInstancesRequest, InstanceGroupManagersDeleteInstancesRequest, InstanceGroupManagersDeletePerInstanceConfigsReq, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo, InstanceGroupManagersListErrorsResponse, InstanceGroupManagersListManagedInstancesResponse, InstanceGroupManagersListPerInstanceConfigsResp, @@ -1019,7 +1083,12 @@ InterconnectAttachmentGroupsListResponse, InterconnectAttachmentGroupsOperationalStatus, InterconnectAttachmentGroupsOperationalStatusAttachmentStatus, + InterconnectAttachmentL2Forwarding, + InterconnectAttachmentL2ForwardingApplianceMapping, + InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping, + InterconnectAttachmentL2ForwardingGeneveHeader, InterconnectAttachmentList, + InterconnectAttachmentParams, InterconnectAttachmentPartnerMetadata, InterconnectAttachmentPrivateInfo, InterconnectAttachmentsScopedList, @@ -1057,6 +1126,7 @@ InterconnectMacsecConfigPreSharedKey, InterconnectMacsecPreSharedKey, InterconnectOutageNotification, + InterconnectParams, InterconnectRemoteLocation, InterconnectRemoteLocationConstraints, InterconnectRemoteLocationConstraintsSubnetLengthRange, @@ -1100,6 +1170,7 @@ ListGlobalOperationsRequest, ListGlobalOrganizationOperationsRequest, ListGlobalPublicDelegatedPrefixesRequest, + ListGlobalVmExtensionPoliciesRequest, ListHealthChecksRequest, ListImagesRequest, ListInstanceGroupManagerResizeRequestsRequest, @@ -1145,10 +1216,13 @@ ListPublicDelegatedPrefixesRequest, ListReferrersInstancesRequest, ListRegionAutoscalersRequest, + ListRegionBackendBucketsRequest, ListRegionBackendServicesRequest, ListRegionCommitmentsRequest, + ListRegionCompositeHealthChecksRequest, ListRegionDisksRequest, ListRegionDiskTypesRequest, + ListRegionHealthAggregationPoliciesRequest, ListRegionHealthCheckServicesRequest, ListRegionHealthChecksRequest, ListRegionHealthSourcesRequest, @@ -1177,6 +1251,8 @@ ListReservationsRequest, ListReservationSubBlocksRequest, ListResourcePoliciesRequest, + ListRolloutPlansRequest, + ListRolloutsRequest, ListRoutePoliciesRoutersRequest, ListRoutersRequest, ListRoutesRequest, @@ -1199,6 +1275,7 @@ ListUrlMapsRequest, ListUsableBackendBucketsRequest, ListUsableBackendServicesRequest, + ListUsableRegionBackendBucketsRequest, ListUsableRegionBackendServicesRequest, ListUsableSubnetworksRequest, ListVpnGatewaysRequest, @@ -1207,6 +1284,7 @@ ListXpnHostsProjectsRequest, ListZoneOperationsRequest, ListZonesRequest, + ListZoneVmExtensionPoliciesRequest, LocalDisk, LocalizedMessage, LocationPolicy, @@ -1297,6 +1375,7 @@ NetworkProfilesListResponse, NetworkRoutingConfig, NetworksAddPeeringRequest, + NetworksCancelRequestRemovePeeringRequest, NetworksGetEffectiveFirewallsResponse, NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy, NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy, @@ -1380,8 +1459,11 @@ PatchPublicAdvertisedPrefixeRequest, PatchPublicDelegatedPrefixeRequest, PatchRegionAutoscalerRequest, + PatchRegionBackendBucketRequest, PatchRegionBackendServiceRequest, + PatchRegionCompositeHealthCheckRequest, PatchRegionDiskSettingRequest, + PatchRegionHealthAggregationPolicyRequest, PatchRegionHealthCheckRequest, PatchRegionHealthCheckServiceRequest, PatchRegionHealthSourceRequest, @@ -1472,6 +1554,7 @@ RegionInstanceGroupManagerPatchInstanceConfigReq, RegionInstanceGroupManagerResizeRequestsListResponse, RegionInstanceGroupManagersAbandonInstancesRequest, + RegionInstanceGroupManagersAdoptInstancesRequest, RegionInstanceGroupManagersApplyUpdatesRequest, RegionInstanceGroupManagersCreateInstancesRequest, RegionInstanceGroupManagersDeleteInstancesRequest, @@ -1580,12 +1663,29 @@ ResourceStatus, ResourceStatusEffectiveInstanceMetadata, ResourceStatusPhysicalHostTopology, + ResourceStatusReservationConsumptionInfo, ResourceStatusScheduling, ResourceStatusShutdownDetails, ResumeInstanceRequest, ResumeInstancesInstanceGroupManagerRequest, ResumeInstancesRegionInstanceGroupManagerRequest, + Rollout, + RolloutPlan, + RolloutPlansListResponse, + RolloutPlanWave, + RolloutPlanWaveOrchestrationOptions, + RolloutPlanWaveOrchestrationOptionsDelay, + RolloutPlanWaveSelector, + RolloutPlanWaveSelectorLocationSelector, + RolloutPlanWaveSelectorResourceHierarchySelector, + RolloutPlanWaveValidation, + RolloutPlanWaveValidationTimeBasedValidationMetadata, RolloutPolicy, + RolloutRolloutEntity, + RolloutRolloutEntityOrchestratedEntity, + RolloutsListResponse, + RolloutWaveDetails, + RolloutWaveDetailsOrchestratedWaveDetails, Route, RouteAsPath, RouteList, @@ -1707,12 +1807,15 @@ SetIamPolicyNetworkFirewallPolicyRequest, SetIamPolicyNodeGroupRequest, SetIamPolicyNodeTemplateRequest, + SetIamPolicyRegionBackendBucketRequest, SetIamPolicyRegionBackendServiceRequest, SetIamPolicyRegionDiskRequest, SetIamPolicyRegionInstantSnapshotRequest, SetIamPolicyRegionNetworkFirewallPolicyRequest, SetIamPolicyRegionSnapshotRequest, + SetIamPolicyReservationBlockRequest, SetIamPolicyReservationRequest, + SetIamPolicyReservationSubBlockRequest, SetIamPolicyResourcePolicyRequest, SetIamPolicyServiceAttachmentRequest, SetIamPolicySnapshotRequest, @@ -1838,6 +1941,7 @@ StoragePool, StoragePoolAggregatedList, StoragePoolDisk, + StoragePoolExapoolProvisionedCapacityGb, StoragePoolList, StoragePoolListDisks, StoragePoolResourceStatus, @@ -1944,9 +2048,12 @@ TestIamPermissionsNodeTemplateRequest, TestIamPermissionsPacketMirroringRequest, TestIamPermissionsRegionAutoscalerRequest, + TestIamPermissionsRegionBackendBucketRequest, TestIamPermissionsRegionBackendServiceRequest, TestIamPermissionsRegionCommitmentRequest, + TestIamPermissionsRegionCompositeHealthCheckRequest, TestIamPermissionsRegionDiskRequest, + TestIamPermissionsRegionHealthAggregationPolicyRequest, TestIamPermissionsRegionHealthCheckRequest, TestIamPermissionsRegionHealthCheckServiceRequest, TestIamPermissionsRegionHealthSourceRequest, @@ -1962,7 +2069,9 @@ TestIamPermissionsRegionTargetHttpsProxyRequest, TestIamPermissionsRegionTargetTcpProxyRequest, TestIamPermissionsRegionUrlMapRequest, + TestIamPermissionsReservationBlockRequest, TestIamPermissionsReservationRequest, + TestIamPermissionsReservationSubBlockRequest, TestIamPermissionsResourcePolicyRequest, TestIamPermissionsRouteRequest, TestIamPermissionsRouterRequest, @@ -1996,6 +2105,7 @@ UpdateDisplayDeviceInstanceRequest, UpdateFirewallRequest, UpdateFutureReservationRequest, + UpdateGlobalVmExtensionPolicyRequest, UpdateHealthCheckRequest, UpdateInstanceGroupManagerRequest, UpdateInstanceRequest, @@ -2020,6 +2130,7 @@ UpdateShieldedVmConfigInstanceRequest, UpdateStoragePoolRequest, UpdateUrlMapRequest, + UpdateZoneVmExtensionPolicyRequest, UrlMap, UrlMapList, UrlMapReference, @@ -2041,6 +2152,13 @@ VmEndpointNatMappingsInterfaceNatMappings, VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, VmEndpointNatMappingsList, + VmExtensionPoliciesScopedList, + VmExtensionPolicy, + VmExtensionPolicyAggregatedListResponse, + VmExtensionPolicyExtensionPolicy, + VmExtensionPolicyInstanceSelector, + VmExtensionPolicyLabelSelector, + VmExtensionPolicyList, VpnGateway, VpnGatewayAggregatedList, VpnGatewayList, @@ -2083,6 +2201,7 @@ Zone, ZoneList, ZoneSetLabelsRequest, + ZoneSetNestedPolicyRequest, ZoneSetPolicyRequest, ) @@ -2185,6 +2304,9 @@ def _get_version(dependency_name): "AbandonInstancesInstanceGroupManagerRequest", "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -2223,17 +2345,20 @@ def _get_version(dependency_name): "AddressList", "AddressesClient", "AddressesScopedList", + "AdoptInstancesRegionInstanceGroupManagerRequest", "AdvancedMachineFeatures", "AdviceClient", "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDiskTypesRequest", "AggregatedListDisksRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -2252,6 +2377,8 @@ def _get_version(dependency_name): "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -2313,6 +2440,7 @@ def _get_version(dependency_name): "AutoscalingPolicyScalingSchedule", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -2322,6 +2450,7 @@ def _get_version(dependency_name): "BackendBucketParams", "BackendBucketUsedBy", "BackendBucketsClient", + "BackendBucketsScopedList", "BackendCustomMetric", "BackendService", "BackendServiceAggregatedList", @@ -2383,6 +2512,8 @@ def _get_version(dependency_name): "CancelFutureReservationRequest", "CancelInstanceGroupManagerResizeRequestRequest", "CancelRegionInstanceGroupManagerResizeRequestRequest", + "CancelRequestRemovePeeringNetworkRequest", + "CancelRolloutRequest", "CircuitBreakers", "CloneRulesFirewallPolicyRequest", "CloneRulesNetworkFirewallPolicyRequest", @@ -2392,6 +2523,10 @@ def _get_version(dependency_name): "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -2432,6 +2567,7 @@ def _get_version(dependency_name): "DeleteGlobalOrganizationOperationRequest", "DeleteGlobalOrganizationOperationResponse", "DeleteGlobalPublicDelegatedPrefixeRequest", + "DeleteGlobalVmExtensionPolicyRequest", "DeleteHealthCheckRequest", "DeleteImageRequest", "DeleteInstanceGroupManagerRequest", @@ -2464,8 +2600,11 @@ def _get_version(dependency_name): "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -2490,6 +2629,8 @@ def _get_version(dependency_name): "DeleteRegionUrlMapRequest", "DeleteReservationRequest", "DeleteResourcePolicyRequest", + "DeleteRolloutPlanRequest", + "DeleteRolloutRequest", "DeleteRoutePolicyRouterRequest", "DeleteRouteRequest", "DeleteRouterRequest", @@ -2516,6 +2657,7 @@ def _get_version(dependency_name): "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -2626,6 +2768,7 @@ def _get_version(dependency_name): "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -2649,6 +2792,7 @@ def _get_version(dependency_name): "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -2670,12 +2814,15 @@ def _get_version(dependency_name): "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -2724,11 +2871,14 @@ def _get_version(dependency_name): "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -2757,6 +2907,8 @@ def _get_version(dependency_name): "GetReservationRequest", "GetReservationSubBlockRequest", "GetResourcePolicyRequest", + "GetRolloutPlanRequest", + "GetRolloutRequest", "GetRoutePolicyRouterRequest", "GetRouteRequest", "GetRouterRequest", @@ -2798,6 +2950,7 @@ def _get_version(dependency_name): "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesClient", "GlobalAddressesMoveRequest", "GlobalForwardingRulesClient", @@ -2810,6 +2963,16 @@ def _get_version(dependency_name): "GlobalPublicDelegatedPrefixesClient", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPoliciesClient", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyList", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GuestAttributes", "GuestAttributesEntry", @@ -2818,6 +2981,10 @@ def _get_version(dependency_name): "HTTP2HealthCheck", "HTTPHealthCheck", "HTTPSHealthCheck", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -2872,6 +3039,7 @@ def _get_version(dependency_name): "InsertGlobalForwardingRuleRequest", "InsertGlobalNetworkEndpointGroupRequest", "InsertGlobalPublicDelegatedPrefixeRequest", + "InsertGlobalVmExtensionPolicyRequest", "InsertHealthCheckRequest", "InsertImageRequest", "InsertInstanceGroupManagerRequest", @@ -2898,9 +3066,12 @@ def _get_version(dependency_name): "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -2923,6 +3094,7 @@ def _get_version(dependency_name): "InsertRegionUrlMapRequest", "InsertReservationRequest", "InsertResourcePolicyRequest", + "InsertRolloutPlanRequest", "InsertRouteRequest", "InsertRouterRequest", "InsertSecurityPolicyRequest", @@ -2944,6 +3116,7 @@ def _get_version(dependency_name): "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -2986,6 +3159,8 @@ def _get_version(dependency_name): "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -3078,7 +3253,12 @@ def _get_version(dependency_name): "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsClient", @@ -3119,6 +3299,7 @@ def _get_version(dependency_name): "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -3166,6 +3347,7 @@ def _get_version(dependency_name): "ListGlobalOperationsRequest", "ListGlobalOrganizationOperationsRequest", "ListGlobalPublicDelegatedPrefixesRequest", + "ListGlobalVmExtensionPoliciesRequest", "ListHealthChecksRequest", "ListImagesRequest", "ListInstanceGroupManagerResizeRequestsRequest", @@ -3211,10 +3393,13 @@ def _get_version(dependency_name): "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDiskTypesRequest", "ListRegionDisksRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -3243,6 +3428,8 @@ def _get_version(dependency_name): "ListReservationSubBlocksRequest", "ListReservationsRequest", "ListResourcePoliciesRequest", + "ListRolloutPlansRequest", + "ListRolloutsRequest", "ListRoutePoliciesRoutersRequest", "ListRoutersRequest", "ListRoutesRequest", @@ -3265,6 +3452,7 @@ def _get_version(dependency_name): "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -3272,6 +3460,7 @@ def _get_version(dependency_name): "ListWireGroupsRequest", "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", + "ListZoneVmExtensionPoliciesRequest", "ListZonesRequest", "LocalDisk", "LocalizedMessage", @@ -3370,6 +3559,7 @@ def _get_version(dependency_name): "NetworkProfilesListResponse", "NetworkRoutingConfig", "NetworksAddPeeringRequest", + "NetworksCancelRequestRemovePeeringRequest", "NetworksClient", "NetworksGetEffectiveFirewallsResponse", "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", @@ -3459,8 +3649,11 @@ def _get_version(dependency_name): "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -3544,9 +3737,11 @@ def _get_version(dependency_name): "RegionAddressesMoveRequest", "RegionAutoscalerList", "RegionAutoscalersClient", + "RegionBackendBucketsClient", "RegionBackendServicesClient", "RegionCommitmentsClient", "RegionCommitmentsUpdateReservationsRequest", + "RegionCompositeHealthChecksClient", "RegionDiskSettingsClient", "RegionDiskTypeList", "RegionDiskTypesClient", @@ -3555,6 +3750,7 @@ def _get_version(dependency_name): "RegionDisksRemoveResourcePoliciesRequest", "RegionDisksResizeRequest", "RegionDisksStartAsyncReplicationRequest", + "RegionHealthAggregationPoliciesClient", "RegionHealthCheckServicesClient", "RegionHealthChecksClient", "RegionHealthSourcesClient", @@ -3566,6 +3762,7 @@ def _get_version(dependency_name): "RegionInstanceGroupManagerResizeRequestsListResponse", "RegionInstanceGroupManagerUpdateInstanceConfigReq", "RegionInstanceGroupManagersAbandonInstancesRequest", + "RegionInstanceGroupManagersAdoptInstancesRequest", "RegionInstanceGroupManagersApplyUpdatesRequest", "RegionInstanceGroupManagersClient", "RegionInstanceGroupManagersCreateInstancesRequest", @@ -3699,12 +3896,31 @@ def _get_version(dependency_name): "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", "ResumeInstancesInstanceGroupManagerRequest", "ResumeInstancesRegionInstanceGroupManagerRequest", + "Rollout", + "RolloutPlan", + "RolloutPlanWave", + "RolloutPlanWaveOrchestrationOptions", + "RolloutPlanWaveOrchestrationOptionsDelay", + "RolloutPlanWaveSelector", + "RolloutPlanWaveSelectorLocationSelector", + "RolloutPlanWaveSelectorResourceHierarchySelector", + "RolloutPlanWaveValidation", + "RolloutPlanWaveValidationTimeBasedValidationMetadata", + "RolloutPlansClient", + "RolloutPlansListResponse", "RolloutPolicy", + "RolloutRolloutEntity", + "RolloutRolloutEntityOrchestratedEntity", + "RolloutWaveDetails", + "RolloutWaveDetailsOrchestratedWaveDetails", + "RolloutsClient", + "RolloutsListResponse", "Route", "RouteAsPath", "RouteList", @@ -3831,12 +4047,15 @@ def _get_version(dependency_name): "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -3965,6 +4184,7 @@ def _get_version(dependency_name): "StoragePool", "StoragePoolAggregatedList", "StoragePoolDisk", + "StoragePoolExapoolProvisionedCapacityGb", "StoragePoolList", "StoragePoolListDisks", "StoragePoolResourceStatus", @@ -4082,9 +4302,12 @@ def _get_version(dependency_name): "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -4100,7 +4323,9 @@ def _get_version(dependency_name): "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -4134,6 +4359,7 @@ def _get_version(dependency_name): "UpdateDisplayDeviceInstanceRequest", "UpdateFirewallRequest", "UpdateFutureReservationRequest", + "UpdateGlobalVmExtensionPolicyRequest", "UpdateHealthCheckRequest", "UpdateInstanceGroupManagerRequest", "UpdateInstanceRequest", @@ -4158,6 +4384,7 @@ def _get_version(dependency_name): "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -4180,6 +4407,13 @@ def _get_version(dependency_name): "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -4226,6 +4460,8 @@ def _get_version(dependency_name): "ZoneList", "ZoneOperationsClient", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", + "ZoneVmExtensionPoliciesClient", "ZonesClient", ) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json index 3e84ca8ad475..16545765b573 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_metadata.json @@ -151,6 +151,11 @@ "add_signed_url_key" ] }, + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, "Delete": { "methods": [ "delete" @@ -1019,6 +1024,45 @@ } } }, + "GlobalVmExtensionPolicies": { + "clients": { + "rest": { + "libraryClient": "GlobalVmExtensionPoliciesClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, "HealthChecks": { "clients": { "rest": { @@ -1225,6 +1269,11 @@ "get" ] }, + "GetAvailableAcceleratorTopologies": { + "methods": [ + "get_available_accelerator_topologies" + ] + }, "Insert": { "methods": [ "insert" @@ -2479,6 +2528,11 @@ "add_peering" ] }, + "CancelRequestRemovePeering": { + "methods": [ + "cancel_request_remove_peering" + ] + }, "Delete": { "methods": [ "delete" @@ -3078,6 +3132,60 @@ } } }, + "RegionBackendBuckets": { + "clients": { + "rest": { + "libraryClient": "RegionBackendBucketsClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "ListUsable": { + "methods": [ + "list_usable" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionBackendServices": { "clients": { "rest": { @@ -3191,6 +3299,50 @@ } } }, + "RegionCompositeHealthChecks": { + "clients": { + "rest": { + "libraryClient": "RegionCompositeHealthChecksClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionDiskSettings": { "clients": { "rest": { @@ -3323,6 +3475,50 @@ } } }, + "RegionHealthAggregationPolicies": { + "clients": { + "rest": { + "libraryClient": "RegionHealthAggregationPoliciesClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregated_list" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + }, "RegionHealthCheckServices": { "clients": { "rest": { @@ -3494,6 +3690,11 @@ "abandon_instances" ] }, + "AdoptInstances": { + "methods": [ + "adopt_instances" + ] + }, "ApplyUpdatesToInstances": { "methods": [ "apply_updates_to_instances" @@ -4487,6 +4688,11 @@ "get" ] }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, "List": { "methods": [ "list" @@ -4496,6 +4702,16 @@ "methods": [ "perform_maintenance" ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] } } } @@ -4511,6 +4727,11 @@ "get" ] }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, "List": { "methods": [ "list" @@ -4525,6 +4746,16 @@ "methods": [ "report_faulty" ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] } } } @@ -4648,6 +4879,64 @@ } } }, + "RolloutPlans": { + "clients": { + "rest": { + "libraryClient": "RolloutPlansClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "Rollouts": { + "clients": { + "rest": { + "libraryClient": "RolloutsClient", + "rpcs": { + "Cancel": { + "methods": [ + "cancel" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, "Routers": { "clients": { "rest": { @@ -5864,6 +6153,40 @@ } } }, + "ZoneVmExtensionPolicies": { + "clients": { + "rest": { + "libraryClient": "ZoneVmExtensionPoliciesClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, "Zones": { "clients": { "rest": { diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py index 350d5babb916..308529af4b05 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py @@ -722,8 +722,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of accelerator types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of accelerator types. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -911,13 +912,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.AcceleratorType: Represents an Accelerator Type - resource. Google Cloud Platform provides - graphics processing units (accelerators) - that you can add to VM instances to - improve or accelerate performance when - working with intensive workloads. For - more information, read GPUs on Compute - Engine. + resource. + Google Cloud Platform provides graphics + processing units (accelerators) that you + can add to VM instances to improve or + accelerate performance when working with + intensive workloads. For more + information, readGPUs on Compute Engine. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py index 6eb3e7a069b5..4c3b54ce90fd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py @@ -541,13 +541,13 @@ def __call__( Returns: ~.compute.AcceleratorType: Represents an Accelerator Type - resource. Google Cloud Platform provides - graphics processing units (accelerators) - that you can add to VM instances to - improve or accelerate performance when - working with intensive workloads. For - more information, read GPUs on Compute - Engine. + resource. + Google Cloud Platform provides graphics + processing units (accelerators) that you + can add to VM instances to improve or + accelerate performance when working with + intensive workloads. For more + information, readGPUs on Compute Engine. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py index 6d7cf0a2994f..de86910171fc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py @@ -712,9 +712,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of addresses. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of addresses. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1188,13 +1189,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* [Global (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) - \* [Regional (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) - For more information, see Reserving a static external IP - address. + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + \* [Global (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) + \* [Regional (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) + + For more information, see Reserving a static external + IP address. """ # Create or coerce a protobuf request object. @@ -1548,8 +1553,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of addresses contained within the - specified region. + r"""Retrieves a list of addresses contained within + the specified region. .. code-block:: python @@ -2012,7 +2017,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an Address. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2163,7 +2168,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Address. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py index 28cc01f4fd18..8a820df751d3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py @@ -800,21 +800,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -962,11 +973,15 @@ def __call__( Returns: ~.compute.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -1112,21 +1127,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1421,21 +1447,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1586,21 +1623,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py index 1620701f01da..f8ccb0a74026 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py @@ -712,9 +712,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of autoscalers. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of autoscalers. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1183,18 +1184,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - [Zonal](/compute/docs/reference/rest/beta/autoscalers) - \* - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) - Use autoscalers to automatically add or delete instances - from a managed instance group according to your defined - autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - [Zonal](/compute/docs/reference/rest/beta/autoscalers) + - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) + + Use autoscalers to automatically add or delete + instances from a managed instance group according to + your defined autoscaling policy. For more + information, read Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ # Create or coerce a protobuf request object. @@ -1548,8 +1554,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of autoscalers contained within the - specified zone. + r"""Retrieves a list of autoscalers contained within + the specified zone. .. code-block:: python @@ -1687,9 +1693,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1819,9 +1825,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py index 9b83ecf5fb94..0d95cbbc7bd2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py @@ -805,21 +805,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -968,18 +979,23 @@ def __call__( Returns: ~.compute.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - `Zonal `__ - \* - `Regional `__ + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - `Zonal `__ + - `Regional `__ + Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ @@ -1125,21 +1141,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1440,21 +1467,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1763,21 +1801,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py index 76b900b1ddf4..4a0d31ca2a26 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py @@ -1004,6 +1004,134 @@ def error_code(self): # Done; return the response. return response + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListBackendBucketsRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all BackendBucket resources, regional and + global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.BackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListBackendBucketsRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest, dict]): + The request object. A request message for + BackendBuckets.AggregatedList. See the + method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.backend_buckets.pagers.AggregatedListPager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.AggregatedListBackendBucketsRequest): + request = compute.AggregatedListBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def delete_unary( self, request: Optional[Union[compute.DeleteBackendBucketRequest, dict]] = None, @@ -1643,10 +1771,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendBucket: Represents a Cloud Storage Bucket - resource. This Cloud Storage bucket - resource is referenced by a URL map of a - load balancer. For more information, - read Backend Buckets. + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. """ # Create or coerce a protobuf request object. @@ -1769,28 +1898,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2358,9 +2495,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified BackendBucket resource with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2492,9 +2629,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendBucket resource with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -3015,28 +3152,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py index b027a8958024..af86b8d652c7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/pagers.py @@ -41,6 +41,85 @@ from google.cloud.compute_v1beta.types import compute +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketAggregatedList], + request: compute.AggregatedListBackendBucketsRequest, + response: compute.BackendBucketAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.BackendBucketsScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.BackendBucketsScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + class ListPager: """A pager for iterating through ``list`` requests. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py index 18e2cf2465a2..e8aea4a4b0ce 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), self.delete: gapic_v1.method.wrap_method( self.delete, default_timeout=None, @@ -223,6 +228,18 @@ def add_signed_url_key( ]: raise NotImplementedError() + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListBackendBucketsRequest], + Union[ + compute.BackendBucketAggregatedList, + Awaitable[compute.BackendBucketAggregatedList], + ], + ]: + raise NotImplementedError() + @property def delete( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py index 9bf3d0a957c3..7cb4592f96d2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py @@ -80,6 +80,14 @@ def post_add_signed_url_key(self, response): logging.log(f"Received response: {response}") return response + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + def pre_delete(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -229,6 +237,57 @@ def post_add_signed_url_key_with_metadata( """ return response, metadata + def pre_aggregated_list( + self, + request: compute.AggregatedListBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListBackendBucketsRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the BackendBuckets server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.BackendBucketAggregatedList + ) -> compute.BackendBucketAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the BackendBuckets server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.BackendBucketAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.BackendBucketAggregatedList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the BackendBuckets server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + def pre_delete( self, request: compute.DeleteBackendBucketRequest, @@ -946,21 +1005,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1063,6 +1133,154 @@ def __call__( ) return resp + class _AggregatedList( + _BaseBackendBucketsRestTransport._BaseAggregatedList, BackendBucketsRestStub + ): + def __hash__(self): + return hash("BackendBucketsRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListBackendBucketsRequest): + The request object. A request message for + BackendBuckets.AggregatedList. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketAggregatedList: + + """ + + http_options = ( + _BaseBackendBucketsRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseBackendBucketsRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseBackendBucketsRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.BackendBucketsClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.BackendBuckets", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = BackendBucketsRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketAggregatedList() + pb_resp = compute.BackendBucketAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketAggregatedList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.BackendBucketsClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.BackendBuckets", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _Delete(_BaseBackendBucketsRestTransport._BaseDelete, BackendBucketsRestStub): def __hash__(self): return hash("BackendBucketsRestTransport.Delete") @@ -1114,21 +1332,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1281,21 +1510,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1445,10 +1685,11 @@ def __call__( Returns: ~.compute.BackendBucket: Represents a Cloud Storage Bucket - resource. This Cloud Storage bucket - resource is referenced by a URL map of a - load balancer. For more information, - read Backend Buckets. + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. """ @@ -1596,26 +1837,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1763,21 +2055,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2230,21 +2533,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2404,21 +2718,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2576,26 +2901,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2902,21 +3278,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3029,6 +3416,17 @@ def add_signed_url_key( # In C++ this would require a dynamic_cast return self._AddSignedUrlKey(self._session, self._host, self._interceptor) # type: ignore + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListBackendBucketsRequest], + compute.BackendBucketAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + @property def delete( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py index c9b38f4f04ee..93e17e73326d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py @@ -143,6 +143,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/backendBuckets", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseBackendBucketsRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseDelete: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py index f6e8b46cad0c..4950bf885a49 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py @@ -1018,9 +1018,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all BackendService resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1773,21 +1774,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be + either regionally or globally scoped. + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) + + For more information, seeBackend Services. """ # Create or coerce a protobuf request object. @@ -1985,7 +1990,12 @@ def get_health( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.BackendServiceGroupHealth: r"""Gets the most recent health check results for this - BackendService. Example request body: { "group": + BackendService. + + Example request body: + + { + "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" } .. code-block:: python @@ -2175,28 +2185,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2264,7 +2282,7 @@ def insert_unary( ) -> compute.Operation: r"""Creates a BackendService resource in the specified project using the data included in the request. For more - information, see Backend services overview . + information, see Backend services overview. .. code-block:: python @@ -2381,7 +2399,7 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Creates a BackendService resource in the specified project using the data included in the request. For more - information, see Backend services overview . + information, see Backend services overview. .. code-block:: python @@ -2769,9 +2787,9 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + see Backend services overview. This method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2904,9 +2922,9 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + see Backend services overview. This method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -3439,28 +3457,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3536,8 +3562,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3680,8 +3706,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3981,7 +4007,7 @@ def update_unary( ) -> compute.Operation: r"""Updates the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. + seeBackend services overview. .. code-block:: python @@ -4114,7 +4140,7 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendService resource with the data included in the request. For more information, - see Backend services overview. + seeBackend services overview. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py index af9512246a61..cc49150d3549 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py @@ -1181,21 +1181,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1501,21 +1512,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1669,21 +1691,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1832,21 +1865,25 @@ def __call__( Returns: ~.compute.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be either + regionally or globally scoped. + + - `Global `__ + - `Regional `__ + + For more information, seeBackend Services. """ @@ -2311,26 +2348,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2480,21 +2568,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2949,21 +3048,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3123,21 +3233,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3297,26 +3418,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3472,21 +3644,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3798,21 +3981,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py index 95fe76c34d2a..6d2dd1c4cb65 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py @@ -1053,10 +1053,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.CrossSiteNetwork: A resource that represents a - cross-site network. You can use - cross-site networks to connect your - on-premises networks to each other - through Interconnect connections. + cross-site network. + You can use cross-site networks to + connect your on-premises networks to + each other through Interconnect + connections. """ # Create or coerce a protobuf request object. @@ -1505,9 +1506,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified cross-site network with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1639,9 +1640,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified cross-site network with the - data included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py index 3b50d0535eac..8de2d9283b44 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py @@ -495,21 +495,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -661,10 +672,11 @@ def __call__( Returns: ~.compute.CrossSiteNetwork: A resource that represents a - cross-site network. You can use - cross-site networks to connect your - on-premises networks to each other - through Interconnect connections. + cross-site network. + You can use cross-site networks to + connect your on-premises networks to + each other through Interconnect + connections. """ @@ -814,21 +826,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,21 +1162,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py index 157877e3526b..7cb81958ee4f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py @@ -478,21 +478,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py index b4c073cfa83a..b674c280e0d7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py @@ -709,9 +709,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of disk types. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of disk types. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -894,17 +895,24 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) - \* [Zonal](/compute/docs/reference/rest/beta/diskTypes) - You can choose from a variety of disk types based on - your needs. For more information, read Storage options. - The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) + - [Zonal](/compute/docs/reference/rest/beta/diskTypes) + + You can choose from a variety of disk types based on + your needs. For more information, readStorage + options. + + The diskTypes resource represents disk types for a + zonal persistent disk. For more information, + readZonal persistent disks. + + The regionDiskTypes resource represents disk types + for a regional persistent disk. For more information, + read Regional persistent disks. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py index ebc3d9d6fb10..e6f69fd98e7b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py @@ -530,18 +530,23 @@ def __call__( Returns: ~.compute.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - `Regional `__ - \* - `Zonal `__ + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + You can choose from a variety of disk types based on - your needs. For more information, read Storage options. + your needs. For more information, readStorage options. + The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + persistent disk. For more information, readZonal + persistent disks. + + The regionDiskTypes resource represents disk types for a + regional persistent disk. For more information, read + Regional persistent disks. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py index 35b5353be2ab..a05822fa6d08 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py @@ -1041,8 +1041,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of persistent disks. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of persistent disks. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1463,7 +1464,7 @@ def bulk_set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on many disks at once. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1599,7 +1600,7 @@ def bulk_set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on many disks at once. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -2079,8 +2080,8 @@ def delete_unary( r"""Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots - previously made from the disk. You must separately - delete snapshots. + previously made from the disk. You must separatelydelete + snapshots. .. code-block:: python @@ -2217,8 +2218,8 @@ def delete( r"""Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots - previously made from the disk. You must separately - delete snapshots. + previously made from the disk. You must separatelydelete + snapshots. .. code-block:: python @@ -2440,18 +2441,26 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - [Zonal](/compute/docs/reference/rest/beta/disks) \* - [Regional](/compute/docs/reference/rest/beta/regionDisks) - Persistent disks are required for running your VM - instances. Create both boot and non-boot (data) - persistent disks. For more information, read Persistent - Disks. For more storage options, read Storage options. - The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - [Zonal](/compute/docs/reference/rest/beta/disks) + - [Regional](/compute/docs/reference/rest/beta/regionDisks) + + Persistent disks are required for running your VM + instances. Create both boot and non-boot (data) + persistent disks. For more information, read + Persistent Disks. For more storage options, read + Storage options. + + The disks resource represents a zonal persistent + disk. For more information, readZonal persistent + disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ # Create or coerce a protobuf request object. @@ -2586,28 +2595,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2679,8 +2696,8 @@ def insert_unary( ) -> compute.Operation: r"""Creates a persistent disk in the specified project using the data in the request. You can create a disk - from a source (sourceImage, sourceSnapshot, or - sourceDisk) or create an empty 500 GB data disk by + from a source (sourceImage, sourceSnapshot, + orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. @@ -2815,8 +2832,8 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Creates a persistent disk in the specified project using the data in the request. You can create a disk - from a source (sourceImage, sourceSnapshot, or - sourceDisk) or create an empty 500 GB data disk by + from a source (sourceImage, sourceSnapshot, + orsourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. @@ -3442,8 +3459,8 @@ def resize_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Resizes the specified persistent disk. You can only - increase the size of the disk. + r"""Resizes the specified persistent disk. + You can only increase the size of the disk. .. code-block:: python @@ -3583,8 +3600,8 @@ def resize( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Resizes the specified persistent disk. You can only - increase the size of the disk. + r"""Resizes the specified persistent disk. + You can only increase the size of the disk. .. code-block:: python @@ -3819,28 +3836,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3916,7 +3941,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a disk. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -4062,7 +4087,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a disk. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -4234,8 +4259,8 @@ def start_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4385,8 +4410,8 @@ def start_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4558,8 +4583,9 @@ def stop_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python @@ -4692,8 +4718,9 @@ def stop_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py index d43b3c08912d..407fcf457a8a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py @@ -1251,21 +1251,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1572,21 +1583,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1741,21 +1763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1912,21 +1945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2081,21 +2125,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2241,18 +2296,24 @@ def __call__( Returns: ~.compute.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - `Zonal `__ \* - `Regional `__ + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options. + The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + For more information, readZonal persistent disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ @@ -2396,26 +2457,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2564,21 +2676,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2874,21 +2997,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3042,21 +3176,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3210,26 +3355,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3384,21 +3580,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3555,21 +3762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3725,21 +3943,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3892,21 +4121,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4220,21 +4460,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py index 8d7a4eaccaa9..47897c442401 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py @@ -1052,19 +1052,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ExternalVpnGateway: Represents an external VPN gateway. + External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to - your Google Cloud VPN gateway. To create - a highly available VPN from Google Cloud - Platform to your VPN gateway or another - cloud provider's VPN gateway, you must - create a external VPN gateway resource - with information about the other - gateway. For more information about - using external VPN gateways, see - Creating an HA VPN gateway and tunnel - pair to a peer VPN. + your Google Cloud VPN gateway. + + To create a highly available VPN from + Google Cloud Platform to your VPN + gateway or another cloud provider's VPN + gateway, you must create a external VPN + gateway resource with information about + the other gateway. + + For more information about using + external VPN gateways, see Creating an + HA VPN gateway and tunnel pair to a peer + VPN. """ # Create or coerce a protobuf request object. @@ -1515,8 +1519,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an ExternalVpnGateway. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -1654,8 +1658,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an ExternalVpnGateway. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py index 84e1b6c06c7b..151dd1ba4f14 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py @@ -557,21 +557,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -721,19 +732,23 @@ def __call__( Returns: ~.compute.ExternalVpnGateway: Represents an external VPN gateway. + External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to - your Google Cloud VPN gateway. To create - a highly available VPN from Google Cloud - Platform to your VPN gateway or another - cloud provider's VPN gateway, you must - create a external VPN gateway resource - with information about the other - gateway. For more information about - using external VPN gateways, see - Creating an HA VPN gateway and tunnel - pair to a peer VPN. + your Google Cloud VPN gateway. + + To create a highly available VPN from + Google Cloud Platform to your VPN + gateway or another cloud provider's VPN + gateway, you must create a external VPN + gateway resource with information about + the other gateway. + + For more information about using + external VPN gateways, see Creating an + HA VPN gateway and tunnel pair to a peer + VPN. """ @@ -883,21 +898,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1203,21 +1229,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py index f9b50e9dc6eb..97c8a696161a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py @@ -2290,28 +2290,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4910,28 +4918,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py index 1c107d13deb8..8aa92b0c61dd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py @@ -1448,21 +1448,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1618,21 +1629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1791,21 +1813,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1965,21 +1998,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2128,21 +2172,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2592,26 +2647,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3070,21 +3176,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3541,21 +3658,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3707,21 +3835,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3882,21 +4021,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4055,21 +4205,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4224,21 +4385,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4391,21 +4563,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4558,21 +4741,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4723,26 +4917,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py index 1b0f8ba8b63f..638deeebc330 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py @@ -1033,10 +1033,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Firewall: Represents a Firewall Rule resource. + Firewall rules allow or deny ingress traffic to, and egress traffic from your - instances. For more information, read - Firewall rules. + instances. For more information, + readFirewall rules. """ # Create or coerce a protobuf request object. @@ -1482,9 +1483,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1614,9 +1615,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1906,10 +1907,10 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data - included in the request. Note that all fields will be - updated if using PUT, even fields that are not - specified. To update individual fields, please use PATCH - instead. + included in the request. + Note that all fields will be updated if using PUT, even + fields that are not specified. To update individual + fields, please use PATCH instead. .. code-block:: python @@ -2039,10 +2040,10 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data - included in the request. Note that all fields will be - updated if using PUT, even fields that are not - specified. To update individual fields, please use PATCH - instead. + included in the request. + Note that all fields will be updated if using PUT, even + fields that are not specified. To update individual + fields, please use PATCH instead. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py index 4cf33d8d8164..708645e2e59f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py @@ -592,21 +592,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -755,10 +766,11 @@ def __call__( Returns: ~.compute.Firewall: Represents a Firewall Rule resource. + Firewall rules allow or deny ingress traffic to, and egress traffic from your - instances. For more information, read - Firewall rules. + instances. For more information, + readFirewall rules. """ @@ -902,21 +914,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1212,21 +1235,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1535,21 +1569,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py index f9ebaae78734..a2887849d40a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py @@ -721,8 +721,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of forwarding rules. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of forwarding rules. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1204,18 +1205,22 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) - A forwarding rule and its corresponding IP address - represent the frontend configuration of a Google Cloud - load balancer. Forwarding rules can also reference - target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be + either regional or global in scope: + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) + + A forwarding rule and its corresponding IP address + represent the frontend configuration of a Google + Cloud load balancer. Forwarding rules can also + reference target instances and Cloud VPN Classic + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts + and Using protocol forwarding. """ # Create or coerce a protobuf request object. @@ -1717,9 +1722,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1863,9 +1868,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -2036,8 +2041,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the + Labeling Resources documentation. .. code-block:: python @@ -2188,8 +2193,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling Resources - documentation. + more about labels, read the + Labeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py index ea8e3323c33f..82d2cf4ef00c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py @@ -869,21 +869,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1034,18 +1045,22 @@ def __call__( Returns: ~.compute.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - `Global `__ - \* - `Regional `__ + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either + regional or global in scope: + + - `Global `__ + - `Regional `__ + A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + (targetVpnGateway). + + For more information, read Forwarding rule concepts and + Using protocol forwarding. """ @@ -1195,21 +1210,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1514,21 +1540,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1687,21 +1724,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1860,21 +1908,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py index a6f167cafa74..296ffb9d655b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py @@ -724,8 +724,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of future reservations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of future reservations. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py index 9cc54dcd44af..3e645a0a2ce2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py @@ -766,21 +766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -931,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1245,21 +1267,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1568,21 +1601,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py index c8d465ae319d..b7e050d62888 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py @@ -1046,13 +1046,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* [Global (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) - \* [Regional (external and - internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) - For more information, see Reserving a static external IP - address. + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + \* [Global (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) + \* [Regional (external and + internal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses) + + For more information, see Reserving a static external + IP address. """ # Create or coerce a protobuf request object. @@ -1796,7 +1800,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a GlobalAddress. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1932,7 +1936,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a GlobalAddress. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py index e5746c2b7714..597d14e696e0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py @@ -606,21 +606,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -771,11 +782,15 @@ def __call__( Returns: ~.compute.Address: - Represents an IP Address resource. Google Compute Engine - has two IP Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -927,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1244,21 +1270,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1415,21 +1452,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py index 96253c60918a..47232efc2b2c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py @@ -1057,18 +1057,22 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) - A forwarding rule and its corresponding IP address - represent the frontend configuration of a Google Cloud - load balancer. Forwarding rules can also reference - target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be + either regional or global in scope: + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) + + A forwarding rule and its corresponding IP address + represent the frontend configuration of a Google + Cloud load balancer. Forwarding rules can also + reference target instances and Cloud VPN Classic + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts + and Using protocol forwarding. """ # Create or coerce a protobuf request object. @@ -1521,9 +1525,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1655,9 +1659,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in - the request. This method supports PATCH semantics and uses the - JSON merge patch format and processing rules. Currently, you can - only patch the network_tier field. + the request. This method supportsPATCH semantics and uses + theJSON merge patch format and processing rules. Currently, you + can only patch the network_tier field. .. code-block:: python @@ -1817,8 +1821,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling resources - documentation. + more about labels, read the + Labeling resources documentation. .. code-block:: python @@ -1956,8 +1960,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn - more about labels, read the Labeling resources - documentation. + more about labels, read the + Labeling resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py index 8f4300c49107..7edded39f26a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py @@ -669,21 +669,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -832,18 +843,22 @@ def __call__( Returns: ~.compute.ForwardingRule: - Represents a Forwarding Rule resource. Forwarding rule - resources in Google Cloud can be either regional or - global in scope: \* - `Global `__ - \* - `Regional `__ + Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either + regional or global in scope: + + - `Global `__ + - `Regional `__ + A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways - (targetVpnGateway). For more information, read - Forwarding rule concepts and Using protocol forwarding. + (targetVpnGateway). + + For more information, read Forwarding rule concepts and + Using protocol forwarding. """ @@ -992,21 +1007,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1308,21 +1334,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1478,21 +1515,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1648,21 +1696,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py index 2abf0edf6dce..768da19eb5e6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py @@ -1722,13 +1722,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py index f678ea50337a..7bec90ba00ba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py @@ -629,21 +629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -800,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -967,21 +989,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,13 +1172,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1292,21 +1326,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py index 479a761675dd..dc94d24ca2f6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py @@ -719,8 +719,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of all operations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of all operations. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1024,23 +1025,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1235,13 +1243,17 @@ def wait( from the ``GET`` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be ``DONE`` or still in progress. - This method is called on a best-effort basis. Specifically: - In - uncommon cases, when the server is overloaded, the request might - return before the default deadline is reached, or might return - after zero seconds. - If the default deadline is reached, there - is no guarantee that the operation is actually done when the - method returns. Be prepared to retry if the operation is not - ``DONE``. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1298,23 +1310,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py index 8426cb9e8db7..3f9a55fe133e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py @@ -801,21 +801,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1112,21 +1123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py index af98317d3745..981f2bcb4d01 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py @@ -902,23 +902,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py index d3816786a34a..90675a853a5e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py @@ -550,21 +550,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py index 96bd7e5bbc44..f5190d0fdf95 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py @@ -1546,7 +1546,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supportsPATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1690,7 +1690,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supportsPATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py index 1d01039446d0..e902b3da73b1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py @@ -509,21 +509,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -828,21 +839,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1145,21 +1167,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py new file mode 100644 index 000000000000..92899be015fe --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import GlobalVmExtensionPoliciesClient + +__all__ = ("GlobalVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py new file mode 100644 index 000000000000..2aaf1b9b6741 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/client.py @@ -0,0 +1,2020 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.global_vm_extension_policies import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalVmExtensionPoliciesTransport +from .transports.rest import GlobalVmExtensionPoliciesRestTransport + + +class GlobalVmExtensionPoliciesClientMeta(type): + """Metaclass for the GlobalVmExtensionPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[GlobalVmExtensionPoliciesTransport]] + _transport_registry["rest"] = GlobalVmExtensionPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[GlobalVmExtensionPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class GlobalVmExtensionPoliciesClient(metaclass=GlobalVmExtensionPoliciesClientMeta): + """The GlobalVmExtensionPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + GlobalVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + GlobalVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> GlobalVmExtensionPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + GlobalVmExtensionPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = GlobalVmExtensionPoliciesClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = GlobalVmExtensionPoliciesClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + GlobalVmExtensionPoliciesTransport, + Callable[..., GlobalVmExtensionPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the global vm extension policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,GlobalVmExtensionPoliciesTransport,Callable[..., GlobalVmExtensionPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the GlobalVmExtensionPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = GlobalVmExtensionPoliciesClient._read_environment_variables() + self._client_cert_source = ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = GlobalVmExtensionPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, GlobalVmExtensionPoliciesTransport) + if transport_provided: + # transport is a GlobalVmExtensionPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(GlobalVmExtensionPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or GlobalVmExtensionPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[GlobalVmExtensionPoliciesTransport], + Callable[..., GlobalVmExtensionPoliciesTransport], + ] = ( + GlobalVmExtensionPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., GlobalVmExtensionPoliciesTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListGlobalVmExtensionPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all VM Extension Policy resources + available to the specified project. + + To prevent failure, it's recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.AggregatedListPager: + Response for the aggregated list of + VM extension policies. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListGlobalVmExtensionPoliciesRequest + ): + request = compute.AggregatedListGlobalVmExtensionPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + global_vm_extension_policy_rollout_operation_rollout_input_resource: Optional[ + compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Purge scoped resources (zonal policies) from a global + VM extension policy, and then delete the global VM + extension policy. Purge of the scoped resources is a + pre-condition of the global VM extension policy + deletion. The deletion of the global VM extension policy + happens after the purge rollout is done, so it's not a + part of the LRO. It's an automatic process that triggers + in the backend. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the global VM extension + policy to purge scoped resources for. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_rollout_operation_rollout_input_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_rollout_operation_rollout_input_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + global_vm_extension_policy, + global_vm_extension_policy_rollout_operation_rollout_input_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteGlobalVmExtensionPolicyRequest): + request = compute.DeleteGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + if ( + global_vm_extension_policy_rollout_operation_rollout_input_resource + is not None + ): + request.global_vm_extension_policy_rollout_operation_rollout_input_resource = ( + global_vm_extension_policy_rollout_operation_rollout_input_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + global_vm_extension_policy_rollout_operation_rollout_input_resource: Optional[ + compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Purge scoped resources (zonal policies) from a global + VM extension policy, and then delete the global VM + extension policy. Purge of the scoped resources is a + pre-condition of the global VM extension policy + deletion. The deletion of the global VM extension policy + happens after the purge rollout is done, so it's not a + part of the LRO. It's an automatic process that triggers + in the backend. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the global VM extension + policy to purge scoped resources for. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_rollout_operation_rollout_input_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_rollout_operation_rollout_input_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + global_vm_extension_policy, + global_vm_extension_policy_rollout_operation_rollout_input_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteGlobalVmExtensionPolicyRequest): + request = compute.DeleteGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + if ( + global_vm_extension_policy_rollout_operation_rollout_input_resource + is not None + ): + request.global_vm_extension_policy_rollout_operation_rollout_input_resource = ( + global_vm_extension_policy_rollout_operation_rollout_input_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.GlobalVmExtensionPolicy: + r"""Gets details of a global VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the GlobalVmExtensionPolicy + resource to return. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy: + Message describing + GlobalVmExtensionPolicy object. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, global_vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetGlobalVmExtensionPolicyRequest): + request = compute.GetGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy_resource: Optional[ + compute.GlobalVmExtensionPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a new project level GlobalVmExtensionPolicy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertGlobalVmExtensionPolicyRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, global_vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertGlobalVmExtensionPolicyRequest): + request = compute.InsertGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy_resource is not None: + request.global_vm_extension_policy_resource = ( + global_vm_extension_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy_resource: Optional[ + compute.GlobalVmExtensionPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a new project level GlobalVmExtensionPolicy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertGlobalVmExtensionPolicyRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, global_vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertGlobalVmExtensionPolicyRequest): + request = compute.InsertGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy_resource is not None: + request.global_vm_extension_policy_resource = ( + global_vm_extension_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListGlobalVmExtensionPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists global VM extension policies. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListGlobalVmExtensionPoliciesRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.List. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.ListPager: + Response to list global VM extension + policy resources. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListGlobalVmExtensionPoliciesRequest): + request = compute.ListGlobalVmExtensionPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update_unary( + self, + request: Optional[ + Union[compute.UpdateGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + global_vm_extension_policy_resource: Optional[ + compute.GlobalVmExtensionPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates a global VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Update. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the global VM extension + policy to update. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + global_vm_extension_policy, + global_vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateGlobalVmExtensionPolicyRequest): + request = compute.UpdateGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + if global_vm_extension_policy_resource is not None: + request.global_vm_extension_policy_resource = ( + global_vm_extension_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update( + self, + request: Optional[ + Union[compute.UpdateGlobalVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + global_vm_extension_policy: Optional[str] = None, + global_vm_extension_policy_resource: Optional[ + compute.GlobalVmExtensionPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates a global VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateGlobalVmExtensionPolicyRequest, dict]): + The request object. A request message for + GlobalVmExtensionPolicies.Update. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy (str): + Name of the global VM extension + policy to update. + + This corresponds to the ``global_vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request + This corresponds to the ``global_vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + global_vm_extension_policy, + global_vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateGlobalVmExtensionPolicyRequest): + request = compute.UpdateGlobalVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if global_vm_extension_policy is not None: + request.global_vm_extension_policy = global_vm_extension_policy + if global_vm_extension_policy_resource is not None: + request.global_vm_extension_policy_resource = ( + global_vm_extension_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("global_vm_extension_policy", request.global_vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def __enter__(self) -> "GlobalVmExtensionPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("GlobalVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py new file mode 100644 index 000000000000..d691606078d5 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/pagers.py @@ -0,0 +1,196 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.VmExtensionPolicyAggregatedListResponse], + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + response: compute.VmExtensionPolicyAggregatedListResponse, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.VmExtensionPolicyAggregatedListResponse): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListGlobalVmExtensionPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.VmExtensionPolicyAggregatedListResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.VmExtensionPoliciesScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.VmExtensionPoliciesScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.GlobalVmExtensionPolicyList], + request: compute.ListGlobalVmExtensionPoliciesRequest, + response: compute.GlobalVmExtensionPolicyList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListGlobalVmExtensionPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListGlobalVmExtensionPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.GlobalVmExtensionPolicyList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.GlobalVmExtensionPolicy]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst new file mode 100644 index 000000000000..9218325d008a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`GlobalVmExtensionPoliciesTransport` is the ABC for all transports. +- public child `GlobalVmExtensionPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `GlobalVmExtensionPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseGlobalVmExtensionPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `GlobalVmExtensionPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py new file mode 100644 index 000000000000..6cecd5a5368a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import GlobalVmExtensionPoliciesTransport +from .rest import ( + GlobalVmExtensionPoliciesRestInterceptor, + GlobalVmExtensionPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[GlobalVmExtensionPoliciesTransport]] +_transport_registry["rest"] = GlobalVmExtensionPoliciesRestTransport + +__all__ = ( + "GlobalVmExtensionPoliciesTransport", + "GlobalVmExtensionPoliciesRestTransport", + "GlobalVmExtensionPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py new file mode 100644 index 000000000000..0da571bd639e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/base.py @@ -0,0 +1,261 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import global_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class GlobalVmExtensionPoliciesTransport(abc.ABC): + """Abstract transport class for GlobalVmExtensionPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.update: gapic_v1.method.wrap_method( + self.update, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListGlobalVmExtensionPoliciesRequest], + Union[ + compute.VmExtensionPolicyAggregatedListResponse, + Awaitable[compute.VmExtensionPolicyAggregatedListResponse], + ], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteGlobalVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetGlobalVmExtensionPolicyRequest], + Union[ + compute.GlobalVmExtensionPolicy, Awaitable[compute.GlobalVmExtensionPolicy] + ], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertGlobalVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListGlobalVmExtensionPoliciesRequest], + Union[ + compute.GlobalVmExtensionPolicyList, + Awaitable[compute.GlobalVmExtensionPolicyList], + ], + ]: + raise NotImplementedError() + + @property + def update( + self, + ) -> Callable[ + [compute.UpdateGlobalVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _global_operations_client(self) -> global_operations.GlobalOperationsClient: + ex_op_service = self._extended_operations_services.get("global_operations") + if not ex_op_service: + ex_op_service = global_operations.GlobalOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["global_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("GlobalVmExtensionPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py new file mode 100644 index 000000000000..45abd123e868 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest.py @@ -0,0 +1,1576 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseGlobalVmExtensionPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class GlobalVmExtensionPoliciesRestInterceptor: + """Interceptor for GlobalVmExtensionPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the GlobalVmExtensionPoliciesRestTransport. + + .. code-block:: python + class MyCustomGlobalVmExtensionPoliciesInterceptor(GlobalVmExtensionPoliciesRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_update(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_update(self, response): + logging.log(f"Received response: {response}") + return response + + transport = GlobalVmExtensionPoliciesRestTransport(interceptor=MyCustomGlobalVmExtensionPoliciesInterceptor()) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListGlobalVmExtensionPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.VmExtensionPolicyAggregatedListResponse + ) -> compute.VmExtensionPolicyAggregatedListResponse: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.VmExtensionPolicyAggregatedListResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.VmExtensionPolicyAggregatedListResponse, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteGlobalVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteGlobalVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetGlobalVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetGlobalVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.GlobalVmExtensionPolicy + ) -> compute.GlobalVmExtensionPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.GlobalVmExtensionPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GlobalVmExtensionPolicy, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertGlobalVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertGlobalVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListGlobalVmExtensionPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListGlobalVmExtensionPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_list( + self, response: compute.GlobalVmExtensionPolicyList + ) -> compute.GlobalVmExtensionPolicyList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.GlobalVmExtensionPolicyList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GlobalVmExtensionPolicyList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_update( + self, + request: compute.UpdateGlobalVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.UpdateGlobalVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for update + + Override in a subclass to manipulate the request or metadata + before they are sent to the GlobalVmExtensionPolicies server. + """ + return request, metadata + + def post_update(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for update + + DEPRECATED. Please use the `post_update_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the GlobalVmExtensionPolicies server but before + it is returned to user code. This `post_update` interceptor runs + before the `post_update_with_metadata` interceptor. + """ + return response + + def post_update_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for update + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the GlobalVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_update_with_metadata` + interceptor in new development instead of the `post_update` interceptor. + When both interceptors are used, this `post_update_with_metadata` interceptor runs after the + `post_update` interceptor. The (possibly modified) response returned by + `post_update` will be passed to + `post_update_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class GlobalVmExtensionPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: GlobalVmExtensionPoliciesRestInterceptor + + +class GlobalVmExtensionPoliciesRestTransport( + _BaseGlobalVmExtensionPoliciesRestTransport +): + """REST backend synchronous transport for GlobalVmExtensionPolicies. + + The GlobalVmExtensionPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[GlobalVmExtensionPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or GlobalVmExtensionPoliciesRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListGlobalVmExtensionPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicyAggregatedListResponse: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListGlobalVmExtensionPoliciesRequest): + The request object. A request message for + GlobalVmExtensionPolicies.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicyAggregatedListResponse: + Response for the aggregated list of + VM extension policies. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + GlobalVmExtensionPoliciesRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicyAggregatedListResponse() + pb_resp = compute.VmExtensionPolicyAggregatedListResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.VmExtensionPolicyAggregatedListResponse.to_json( + response + ) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.DeleteGlobalVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteGlobalVmExtensionPolicyRequest): + The request object. A request message for + GlobalVmExtensionPolicies.Delete. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + body = _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetGlobalVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.GlobalVmExtensionPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetGlobalVmExtensionPolicyRequest): + The request object. A request message for + GlobalVmExtensionPolicies.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.GlobalVmExtensionPolicy: + Message describing + GlobalVmExtensionPolicy object. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.GlobalVmExtensionPolicy() + pb_resp = compute.GlobalVmExtensionPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.GlobalVmExtensionPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertGlobalVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertGlobalVmExtensionPolicyRequest): + The request object. A request message for + GlobalVmExtensionPolicies.Insert. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseList, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListGlobalVmExtensionPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.GlobalVmExtensionPolicyList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListGlobalVmExtensionPoliciesRequest): + The request object. A request message for + GlobalVmExtensionPolicies.List. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.GlobalVmExtensionPolicyList: + Response to list global VM extension + policy resources. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.GlobalVmExtensionPolicyList() + pb_resp = compute.GlobalVmExtensionPolicyList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.GlobalVmExtensionPolicyList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate, + GlobalVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("GlobalVmExtensionPoliciesRestTransport.Update") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.UpdateGlobalVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the update method over HTTP. + + Args: + request (~.compute.UpdateGlobalVmExtensionPolicyRequest): + The request object. A request message for + GlobalVmExtensionPolicies.Update. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate._get_http_options() + ) + + request, metadata = self._interceptor.pre_update(request, metadata) + transcoded_request = _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate._get_transcoded_request( + http_options, request + ) + + body = _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.Update", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Update", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = GlobalVmExtensionPoliciesRestTransport._Update._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_update(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_update_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.update", + extra={ + "serviceName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "rpcName": "Update", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListGlobalVmExtensionPoliciesRequest], + compute.VmExtensionPolicyAggregatedListResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete( + self, + ) -> Callable[[compute.DeleteGlobalVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetGlobalVmExtensionPolicyRequest], compute.GlobalVmExtensionPolicy + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertGlobalVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListGlobalVmExtensionPoliciesRequest], + compute.GlobalVmExtensionPolicyList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def update( + self, + ) -> Callable[[compute.UpdateGlobalVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Update(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("GlobalVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py new file mode 100644 index 000000000000..dab7de3011e7 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_vm_extension_policies/transports/rest_base.py @@ -0,0 +1,399 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, GlobalVmExtensionPoliciesTransport + + +class _BaseGlobalVmExtensionPoliciesRestTransport(GlobalVmExtensionPoliciesTransport): + """Base REST backend transport for GlobalVmExtensionPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/vmExtensionPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListGlobalVmExtensionPoliciesRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}/delete", + "body": "global_vm_extension_policy_rollout_operation_rollout_input_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteGlobalVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetGlobalVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies", + "body": "global_vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertGlobalVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListGlobalVmExtensionPoliciesRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseUpdate: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}", + "body": "global_vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.UpdateGlobalVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseGlobalVmExtensionPoliciesRestTransport._BaseUpdate._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseGlobalVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py index 8d82ded4cf58..0e57173201ad 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py @@ -715,9 +715,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all HealthCheck resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1166,23 +1167,33 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) - \* - [Global](/compute/docs/reference/rest/beta/healthChecks) - These health check resources can be used for load - balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding - backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) + - [Global](/compute/docs/reference/rest/beta/healthChecks) + + These health check resources can be used for load + balancing and for autohealing VMs in a managed + instance group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type + of load balancer. For details about the type of + health check supported for each load balancer and + corresponding backend type, see Health checks + overview: Load balancer guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in + a MIG can be either regional or global. For more + information, see Set up an application health check + and autohealing. + + For more information, seeHealth checks overview. """ # Create or coerce a protobuf request object. @@ -1630,7 +1641,7 @@ def patch_unary( ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1764,7 +1775,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py index 49c90091ba5c..9514e722ba56 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py @@ -809,21 +809,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -974,23 +985,33 @@ def __call__( Returns: ~.compute.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - `Regional `__ - \* - `Global `__ + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - `Regional `__ + - `Global `__ + These health check resources can be used for load balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding + group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type of + load balancer. For details about the type of health + check supported for each load balancer and corresponding backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in a + MIG can be either regional or global. For more + information, see Set up an application health check and + autohealing. + + For more information, seeHealth checks overview. """ @@ -1136,21 +1157,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1453,21 +1485,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1776,21 +1819,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py index c8910ff7928f..327882761ad2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py @@ -978,9 +978,10 @@ def deprecate_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets the deprecation status of an image. If an empty - request body is given, clears the deprecation status - instead. + r"""Sets the deprecation status of an image. + + If an empty request body is given, clears the + deprecation status instead. .. code-block:: python @@ -1109,9 +1110,10 @@ def deprecate( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets the deprecation status of an image. If an empty - request body is given, clears the deprecation status - instead. + r"""Sets the deprecation status of an image. + + If an empty request body is given, clears the + deprecation status instead. .. code-block:: python @@ -1316,10 +1318,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ # Create or coerce a protobuf request object. @@ -1387,7 +1390,7 @@ def get_from_family( ) -> compute.Image: r"""Returns the latest image that is part of an image family and is not deprecated. For more information on - image families, see Public image families documentation. + image families, seePublic image families documentation. .. code-block:: python @@ -1447,10 +1450,11 @@ def sample_get_from_family(): Returns: google.cloud.compute_v1beta.types.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ # Create or coerce a protobuf request object. @@ -1573,28 +1577,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1913,14 +1925,15 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves the list of custom images available to the - specified project. Custom images are images you create - that belong to your project. This method does not get - any images that belong to other projects, including - publicly-available images, like Debian 8. If you want to - get a list of publicly-available images, use this method - to make a request to the respective image project, such - as debian-cloud or windows-cloud. + r"""Retrieves the list of custom images + available to the specified project. Custom images are + images you create that belong to your project. This + method does not get any images that belong to other + projects, including publicly-available images, like + Debian 8. If you want to get a list of + publicly-available images, use this method to make a + request to the respective image project, such as + debian-cloud or windows-cloud. .. code-block:: python @@ -2391,28 +2404,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2486,7 +2507,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an image. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2622,7 +2643,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an image. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py index 6071e46c54ee..bd34c04c5eb5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py @@ -800,21 +800,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -962,21 +973,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1129,10 +1151,11 @@ def __call__( Returns: ~.compute.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ @@ -1275,10 +1298,11 @@ def __call__( Returns: ~.compute.Image: - Represents an Image resource. You can - use images to create boot disks for your - VM instances. For more information, read - Images. + Represents an Image resource. + + You can use images to create boot disks + for your VM instances. For more + information, read Images. """ @@ -1428,26 +1452,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1598,21 +1673,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1905,21 +1991,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2073,26 +2170,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2249,21 +2397,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py index 1ab8d633a2a5..f348b7b9ca43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py @@ -798,9 +798,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -955,9 +955,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1137,9 +1137,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1294,9 +1294,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1491,8 +1491,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. resize_request (str): - The name of the resize request. Name - should conform to RFC1035 or be a + The name of the resize request. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``resize_request`` field @@ -1635,10 +1635,10 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located and - where the resize request will be - created. Name should conform to RFC1035. + The name of thezone where the managed + instance group is located and where the + resize request will be created. Name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1796,10 +1796,10 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located and - where the resize request will be - created. Name should conform to RFC1035. + The name of thezone where the managed + instance group is located and where the + resize request will be created. Name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1980,9 +1980,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. The - name should conform to RFC1035. + The name of thezone where the managed + instance group is located. The name + should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py index fa0e8fcbde0e..44820c267f53 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py @@ -513,21 +513,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -679,21 +690,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1003,21 +1025,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py index 1afc405e436b..8093f885ff67 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py @@ -735,18 +735,22 @@ def abandon_instances_unary( managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed - instance group. This method reduces the targetSize of - the managed instance group by the number of instances - that you abandon. This operation is marked as DONE when - the action is scheduled even if the instances have not - yet been removed from the group. You must separately - verify the status of the abandoning action with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. You can specify a maximum of 1000 instances - with this method per request. + instance group. This method reduces thetargetSize of the + managed instance group by the number of instances that + you abandon. This operation is marked asDONE when the + action is scheduled even if the instances have not yet + been removed from the group. You must separately verify + the status of the abandoning action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -787,8 +791,8 @@ def sample_abandon_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -904,18 +908,22 @@ def abandon_instances( managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed - instance group. This method reduces the targetSize of - the managed instance group by the number of instances - that you abandon. This operation is marked as DONE when - the action is scheduled even if the instances have not - yet been removed from the group. You must separately - verify the status of the abandoning action with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. You can specify a maximum of 1000 instances - with this method per request. + instance group. This method reduces thetargetSize of the + managed instance group by the number of instances that + you abandon. This operation is marked asDONE when the + action is scheduled even if the instances have not yet + been removed from the group. You must separately verify + the status of the abandoning action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -956,8 +964,8 @@ def sample_abandon_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1090,7 +1098,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of managed instance groups and groups them by - zone. To prevent failure, Google recommends that you set the + zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1261,9 +1271,9 @@ def sample_apply_updates_to_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. - Should conform to RFC1035. + The name of thezone + where the managed instance group is + located. Should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1424,9 +1434,9 @@ def sample_apply_updates_to_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. - Should conform to RFC1035. + The name of thezone + where the managed instance group is + located. Should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1571,11 +1581,11 @@ def create_instances_unary( ) -> compute.Operation: r"""Creates instances with per-instance configurations in this managed instance group. Instances are created using - the current instance template. The create instances - operation is marked DONE if the createInstances request + the current instance template. Thecreate instances + operation is marked DONE if thecreateInstances request is successful. The underlying actions take additional - time. You must separately verify the status of the - creating or actions with the listmanagedinstances + time. You must separately verify the status of + thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1617,9 +1627,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1733,11 +1743,11 @@ def create_instances( ) -> extended_operation.ExtendedOperation: r"""Creates instances with per-instance configurations in this managed instance group. Instances are created using - the current instance template. The create instances - operation is marked DONE if the createInstances request + the current instance template. Thecreate instances + operation is marked DONE if thecreateInstances request is successful. The underlying actions take additional - time. You must separately verify the status of the - creating or actions with the listmanagedinstances + time. You must separately verify the status of + thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1779,9 +1789,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1959,8 +1969,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2099,8 +2109,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2226,16 +2236,20 @@ def delete_instances_unary( r"""Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. This operation is marked as DONE when the - action is scheduled even if the instances are still - being deleted. You must separately verify the status of - the deleting action with the listmanagedinstances - method. If the group is part of a backend service that - has enabled connection draining, it can take up to 60 - seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. This operation is marked as DONE when the action + is scheduled even if the instances are still being + deleted. You must separately verify the status of the + deleting action with thelistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -2278,8 +2292,8 @@ def sample_delete_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2394,16 +2408,20 @@ def delete_instances( r"""Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. This operation is marked as DONE when the - action is scheduled even if the instances are still - being deleted. You must separately verify the status of - the deleting action with the listmanagedinstances - method. If the group is part of a backend service that - has enabled connection draining, it can take up to 60 - seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. This operation is marked as DONE when the action + is scheduled even if the instances are still being + deleted. You must separately verify the status of the + deleting action with thelistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -2446,8 +2464,8 @@ def sample_delete_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2626,9 +2644,10 @@ def sample_delete_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2791,9 +2810,10 @@ def sample_delete_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2976,8 +2996,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3000,14 +3020,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ # Create or coerce a protobuf request object. @@ -3066,6 +3089,158 @@ def sample_get(): # Done; return the response. return response + def get_available_accelerator_topologies( + self, + request: Optional[ + Union[ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + dict, + ] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + resource_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + r"""Returns information about available accelerator + topologies for a given MIG. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get_available_accelerator_topologies(): + # Create a client + client = compute_v1beta.InstanceGroupManagersClient() + + # Initialize request argument(s) + request = compute_v1beta.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + project="project_value", + resource_id="resource_id_value", + zone="zone_value", + ) + + # Make the request + response = client.get_available_accelerator_topologies(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, dict]): + The request object. A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. + See the method description for details. + project (str): + Required. Project ID for this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Required. The name of thezone where + the managed instance group is located. + Name should conform to RFC1035. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource_id (str): + Required. The name of the managed + instance group. It should conform to + RFC1035. + + This corresponds to the ``resource_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, resource_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + ): + request = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + request + ) + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if resource_id is not None: + request.resource_id = resource_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.get_available_accelerator_topologies + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("resource_id", request.resource_id), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def insert_unary( self, request: Optional[ @@ -3082,14 +3257,16 @@ def insert_unary( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - managed instance group can have up to 1000 VM instances - per group. Please contact Cloud Support if you need an - increase in this limit. + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A managed instance group can have up to 1000 VM + instances per group. Please contact Cloud Support if you + need an increase in this limit. .. code-block:: python @@ -3129,8 +3306,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3227,14 +3405,16 @@ def insert( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - managed instance group can have up to 1000 VM instances - per group. Please contact Cloud Support if you need an - increase in this limit. + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A managed instance group can have up to 1000 VM + instances per group. Please contact Cloud Support if you + need an increase in this limit. .. code-block:: python @@ -3274,8 +3454,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3433,8 +3614,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3576,9 +3757,9 @@ def sample_list_errors(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone where the managed + instance group is located. + It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3737,8 +3918,8 @@ def sample_list_managed_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -3891,9 +4072,9 @@ def sample_list_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4006,19 +4187,22 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listManagedInstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with + thelistManagedInstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4059,8 +4243,9 @@ def sample_patch(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone where + you want to create the managed instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4169,19 +4354,22 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listManagedInstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with + thelistManagedInstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4222,8 +4410,9 @@ def sample_patch(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone where + you want to create the managed instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4404,9 +4593,9 @@ def sample_patch_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4571,9 +4760,9 @@ def sample_patch_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4725,12 +4914,16 @@ def recreate_instances_unary( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4773,8 +4966,8 @@ def sample_recreate_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -4894,12 +5087,16 @@ def recreate_instances( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4942,8 +5139,8 @@ def sample_recreate_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5083,23 +5280,32 @@ def resize_unary( r"""Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the - group deletes instances. The resize operation is marked - DONE when the resize actions are scheduled even if the - group has not yet added or deleted any instances. You - must separately verify the status of the creating or - deleting actions with the listmanagedinstances method. + group deletes instances. The resize operation is + markedDONE when the resize actions are scheduled even if + the group has not yet added or deleted any instances. + You must separately verify the status of the creating or + deleting + actions with thelistmanagedinstances + method. + When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the - selection including: + The status of the VM instance. + - The health of the VM instance. + The instance template - version the VM is based on. + For regional managed - instance groups, the location of the VM instance. This - list is subject to change. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + selection including: + + + The status of the VM instance. + + The health of the VM instance. + + The instance template version the VM is based on. + + For regional managed instance groups, the location of + the VM instance. + + This list is subject to change. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5141,8 +5347,8 @@ def sample_resize(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5254,23 +5460,32 @@ def resize( r"""Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the - group deletes instances. The resize operation is marked - DONE when the resize actions are scheduled even if the - group has not yet added or deleted any instances. You - must separately verify the status of the creating or - deleting actions with the listmanagedinstances method. + group deletes instances. The resize operation is + markedDONE when the resize actions are scheduled even if + the group has not yet added or deleted any instances. + You must separately verify the status of the creating or + deleting + actions with thelistmanagedinstances + method. + When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the - selection including: + The status of the VM instance. + - The health of the VM instance. + The instance template - version the VM is based on. + For regional managed - instance groups, the location of the VM instance. This - list is subject to change. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + selection including: + + + The status of the VM instance. + + The health of the VM instance. + + The instance template version the VM is based on. + + For regional managed instance groups, the location of + the VM instance. + + This list is subject to change. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5312,8 +5527,8 @@ def sample_resize(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5451,20 +5666,25 @@ def resize_advanced_unary( ) -> compute.Operation: r"""Resizes the managed instance group with advanced configuration options like disabling creation retries. - This is an extended version of the resize method. If you - increase the size of the instance group, the group - creates new instances using the current instance + This is an extended version of theresize method. + + If you increase the size of the instance group, the + group creates new instances using the current instance template. If you decrease the size, the group deletes - instances. The resize operation is marked DONE when the + instances. The resize operation is markedDONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately - verify the status of the creating, - creatingWithoutRetries, or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + verify the status of the + creating,creatingWithoutRetries, or deleting actions + with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5505,8 +5725,8 @@ def sample_resize_advanced(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5620,20 +5840,25 @@ def resize_advanced( ) -> extended_operation.ExtendedOperation: r"""Resizes the managed instance group with advanced configuration options like disabling creation retries. - This is an extended version of the resize method. If you - increase the size of the instance group, the group - creates new instances using the current instance + This is an extended version of theresize method. + + If you increase the size of the instance group, the + group creates new instances using the current instance template. If you decrease the size, the group deletes - instances. The resize operation is marked DONE when the + instances. The resize operation is markedDONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately - verify the status of the creating, - creatingWithoutRetries, or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + verify the status of the + creating,creatingWithoutRetries, or deleting actions + with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5674,8 +5899,8 @@ def sample_resize_advanced(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5813,22 +6038,26 @@ def resume_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -5869,8 +6098,8 @@ def sample_resume_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -5983,22 +6212,26 @@ def resume_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -6039,8 +6272,8 @@ def sample_resume_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6179,7 +6412,7 @@ def set_auto_healing_policies_unary( ) -> compute.Operation: r"""Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use instanceGroupManagers.patch instead. + UseinstanceGroupManagers.patch instead. .. code-block:: python @@ -6220,8 +6453,8 @@ def sample_set_auto_healing_policies(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6339,7 +6572,7 @@ def set_auto_healing_policies( ) -> extended_operation.ExtendedOperation: r"""Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use instanceGroupManagers.patch instead. + UseinstanceGroupManagers.patch instead. .. code-block:: python @@ -6380,8 +6613,8 @@ def sample_set_auto_healing_policies(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6525,8 +6758,8 @@ def set_instance_template_unary( r"""Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run - recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE. + recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE. .. code-block:: python @@ -6567,8 +6800,8 @@ def sample_set_instance_template(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6688,8 +6921,8 @@ def set_instance_template( r"""Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run - recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE. + recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE. .. code-block:: python @@ -6730,8 +6963,8 @@ def sample_set_instance_template(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -6876,7 +7109,7 @@ def set_target_pools_unary( r"""Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the - managed instance group. This operation is marked DONE + managed instance group. This operation is markedDONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the @@ -6921,8 +7154,8 @@ def sample_set_target_pools(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7037,7 +7270,7 @@ def set_target_pools( r"""Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the - managed instance group. This operation is marked DONE + managed instance group. This operation is markedDONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the @@ -7082,8 +7315,8 @@ def sample_set_target_pools(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7221,22 +7454,26 @@ def start_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7277,8 +7514,8 @@ def sample_start_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7391,22 +7628,26 @@ def start_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7447,8 +7688,8 @@ def sample_start_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7588,27 +7829,36 @@ def stop_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7649,8 +7899,8 @@ def sample_stop_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7765,27 +8015,36 @@ def stop_instances( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7826,8 +8085,8 @@ def sample_stop_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -7967,29 +8226,36 @@ def suspend_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8030,8 +8296,8 @@ def sample_suspend_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8146,29 +8412,36 @@ def suspend_instances( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8209,8 +8482,8 @@ def sample_suspend_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. + The name of thezone where the managed + instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8496,17 +8769,19 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listManagedInstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistManagedInstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8547,8 +8822,9 @@ def sample_update(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8659,17 +8935,19 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listManagedInstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistManagedInstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8710,8 +8988,9 @@ def sample_update(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the managed instance group. + The name of the zone + where you want to create the managed + instance group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -8892,9 +9171,9 @@ def sample_update_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -9059,9 +9338,9 @@ def sample_update_per_instance_configs(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - managed instance group is located. It - should conform to RFC1035. + The name of thezone + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py index 7aa89f143fc1..6e6cd4cc5b7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/base.py @@ -178,6 +178,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_available_accelerator_topologies: gapic_v1.method.wrap_method( + self.get_available_accelerator_topologies, + default_timeout=None, + client_info=client_info, + ), self.insert: gapic_v1.method.wrap_method( self.insert, default_timeout=None, @@ -364,6 +369,20 @@ def get( ]: raise NotImplementedError() + @property + def get_available_accelerator_topologies( + self, + ) -> Callable[ + [compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest], + Union[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + Awaitable[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse + ], + ], + ]: + raise NotImplementedError() + @property def insert( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py index 00bdf5251e23..c8642f42bbc1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py @@ -136,6 +136,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_available_accelerator_topologies(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_available_accelerator_topologies(self, response): + logging.log(f"Received response: {response}") + return response + def pre_insert(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -688,6 +696,59 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_available_accelerator_topologies( + self, + request: compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_available_accelerator_topologies + + Override in a subclass to manipulate the request or metadata + before they are sent to the InstanceGroupManagers server. + """ + return request, metadata + + def post_get_available_accelerator_topologies( + self, + response: compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + """Post-rpc interceptor for get_available_accelerator_topologies + + DEPRECATED. Please use the `post_get_available_accelerator_topologies_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the InstanceGroupManagers server but before + it is returned to user code. This `post_get_available_accelerator_topologies` interceptor runs + before the `post_get_available_accelerator_topologies_with_metadata` interceptor. + """ + return response + + def post_get_available_accelerator_topologies_with_metadata( + self, + response: compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for get_available_accelerator_topologies + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the InstanceGroupManagers server but before it is returned to user code. + + We recommend only using this `post_get_available_accelerator_topologies_with_metadata` + interceptor in new development instead of the `post_get_available_accelerator_topologies` interceptor. + When both interceptors are used, this `post_get_available_accelerator_topologies_with_metadata` interceptor runs after the + `post_get_available_accelerator_topologies` interceptor. The (possibly modified) response returned by + `post_get_available_accelerator_topologies` will be passed to + `post_get_available_accelerator_topologies_with_metadata`. + """ + return response, metadata + def pre_insert( self, request: compute.InsertInstanceGroupManagerRequest, @@ -1806,21 +1867,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2130,21 +2202,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2302,21 +2385,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2475,21 +2569,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2640,21 +2745,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2815,21 +2931,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2986,14 +3113,17 @@ def __call__( Returns: ~.compute.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ @@ -3087,6 +3217,170 @@ def __call__( ) return resp + class _GetAvailableAcceleratorTopologies( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies, + InstanceGroupManagersRestStub, + ): + def __hash__(self): + return hash( + "InstanceGroupManagersRestTransport.GetAvailableAcceleratorTopologies" + ) + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + r"""Call the get available accelerator + topologies method over HTTP. + + Args: + request (~.compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest): + The request object. A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse: + + """ + + http_options = ( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_http_options() + ) + + ( + request, + metadata, + ) = self._interceptor.pre_get_available_accelerator_topologies( + request, metadata + ) + transcoded_request = _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.InstanceGroupManagersClient.GetAvailableAcceleratorTopologies", + extra={ + "serviceName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "rpcName": "GetAvailableAcceleratorTopologies", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = InstanceGroupManagersRestTransport._GetAvailableAcceleratorTopologies._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + pb_resp = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + resp + ) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_available_accelerator_topologies(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + ( + resp, + _, + ) = self._interceptor.post_get_available_accelerator_topologies_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.InstanceGroupManagersClient.get_available_accelerator_topologies", + extra={ + "serviceName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "rpcName": "GetAvailableAcceleratorTopologies", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _Insert( _BaseInstanceGroupManagersRestTransport._BaseInsert, InstanceGroupManagersRestStub, @@ -3142,21 +3436,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3915,21 +4220,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4086,21 +4402,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4258,21 +4585,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4431,21 +4769,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4596,21 +4945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4766,21 +5126,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4940,21 +5311,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5112,21 +5494,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5286,21 +5679,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5458,21 +5862,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5628,21 +6043,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5798,21 +6224,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6129,21 +6566,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6300,21 +6748,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6496,6 +6955,17 @@ def get( # In C++ this would require a dynamic_cast return self._Get(self._session, self._host, self._interceptor) # type: ignore + @property + def get_available_accelerator_topologies( + self, + ) -> Callable[ + [compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest], + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetAvailableAcceleratorTopologies(self._session, self._host, self._interceptor) # type: ignore + @property def insert( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py index d4ced53d4543..2b75eb34d1ad 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py @@ -509,6 +509,56 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetAvailableAcceleratorTopologies: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/instanceGroupManagers/{resource_id}/getAvailableAcceleratorTopologies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest.pb( + request + ) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseInstanceGroupManagersRestTransport._BaseGetAvailableAcceleratorTopologies._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseInsert: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py index 0c07d092e2af..c89d8e442abe 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py @@ -723,9 +723,9 @@ def add_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Adds a list of instances to the specified instance - group. All of the instances in the instance group must - be in the same network/subnetwork. Read Adding instances - for more information. + group. All of the instances in the instance group must + be in the same network/subnetwork. Read + Adding instances for more information. .. code-block:: python @@ -766,8 +766,8 @@ def sample_add_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -878,9 +878,9 @@ def add_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a list of instances to the specified instance - group. All of the instances in the instance group must - be in the same network/subnetwork. Read Adding instances - for more information. + group. All of the instances in the instance group must + be in the same network/subnetwork. Read + Adding instances for more information. .. code-block:: python @@ -921,8 +921,8 @@ def sample_add_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1054,8 +1054,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves the list of instance groups and sorts them by zone. To - prevent failure, Google recommends that you set the + r"""Retrieves the list of instance groups and sorts them by zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1180,8 +1181,8 @@ def delete_unary( ) -> compute.Operation: r"""Deletes the specified instance group. The instances in the group are not deleted. Note that instance group - must not belong to a backend service. Read Deleting an - instance group for more information. + must not belong to a backend service. Read + Deleting an instance group for more information. .. code-block:: python @@ -1222,8 +1223,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1318,8 +1319,8 @@ def delete( ) -> extended_operation.ExtendedOperation: r"""Deletes the specified instance group. The instances in the group are not deleted. Note that instance group - must not belong to a backend service. Read Deleting an - instance group for more information. + must not belong to a backend service. Read + Deleting an instance group for more information. .. code-block:: python @@ -1360,8 +1361,8 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1481,8 +1482,10 @@ def get( ) -> compute.InstanceGroup: r"""Returns the specified zonal instance group. Get a list of available zonal instance groups by making a - list() request. For managed instance groups, use the - instanceGroupManagers or regionInstanceGroupManagers + list() request. + + For managed instance groups, use + theinstanceGroupManagers or regionInstanceGroupManagers methods instead. .. code-block:: python @@ -1524,8 +1527,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1546,19 +1549,28 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ # Create or coerce a protobuf request object. @@ -1669,8 +1681,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the instance group. + The name of the zone + where you want to create the instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1801,8 +1814,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the instance group. + The name of the zone + where you want to create the instance + group. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1917,9 +1931,11 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""Retrieves the list of zonal instance group resources - contained within the specified zone. For managed - instance groups, use the instanceGroupManagers or - regionInstanceGroupManagers methods instead. + contained within the specified zone. + + For managed instance groups, use + theinstanceGroupManagers or regionInstanceGroupManagers + methods instead. .. code-block:: python @@ -1960,8 +1976,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of thezone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2108,8 +2124,8 @@ def sample_list_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2235,8 +2251,10 @@ def remove_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Removes one or more instances from the specified - instance group, but does not delete those instances. If - the group is part of a backend service that has enabled + instance group, but does not delete those instances. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. @@ -2280,8 +2298,8 @@ def sample_remove_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2394,8 +2412,10 @@ def remove_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes one or more instances from the specified - instance group, but does not delete those instances. If - the group is part of a backend service that has enabled + instance group, but does not delete those instances. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. @@ -2439,8 +2459,8 @@ def sample_remove_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2619,8 +2639,8 @@ def sample_set_named_ports(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2774,8 +2794,8 @@ def sample_set_named_ports(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - instance group is located. + The name of the zone + where the instance group is located. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py index 4c27d1860a11..17b3d11ecdb9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py @@ -784,21 +784,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1098,21 +1109,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1264,19 +1286,28 @@ def __call__( Returns: ~.compute.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ @@ -1422,21 +1453,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1895,21 +1937,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2066,21 +2119,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py index 5a29cb1542c6..76e16e8bb6b9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py @@ -485,21 +485,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py index 25380f389a2d..21055379d7a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py @@ -725,8 +725,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all InstanceTemplates resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1182,19 +1183,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - [Global](/compute/docs/reference/rest/beta/instanceTemplates) - \* - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) - You can reuse a global instance template in different - regions whereas you can use a regional instance template - in a specified region only. If you want to reduce - cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - [Global](/compute/docs/reference/rest/beta/instanceTemplates) + - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) + + You can reuse a global instance template in different + regions whereas you can use a regional instance + template in a specified region only. If you want to + reduce cross-region dependency or achieve data + residency, use a regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ # Create or coerce a protobuf request object. @@ -1319,28 +1326,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1860,28 +1875,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py index 9238e620ad31..d6855d794c8d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py @@ -820,21 +820,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -985,19 +996,25 @@ def __call__( Returns: ~.compute.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - `Global `__ - \* - `Regional `__ + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - `Global `__ + - `Regional `__ + You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ @@ -1147,26 +1164,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1316,21 +1384,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1640,26 +1719,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py index 56d4cdb4d8bd..ecc0109447d1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py @@ -1708,11 +1708,14 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all of the instances in your - project across all regions and zones. The performance of this - method degrades when a filter is specified on a project that has - a very large number of instances. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + project across all regions and zones. + + The performance of this method degrades when a filter is + specified on a project that has a very large number of + instances. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1838,8 +1841,8 @@ def attach_disk_unary( r"""Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the - same time. For more information, read Adding a - persistent disk to your instance. + same time. For more information, readAdding a persistent + disk to your instance. .. code-block:: python @@ -1983,8 +1986,8 @@ def attach_disk( r"""Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the - same time. For more information, read Adding a - persistent disk to your instance. + same time. For more information, readAdding a persistent + disk to your instance. .. code-block:: python @@ -2152,8 +2155,8 @@ def bulk_insert_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Creates multiple instances. Count specifies the - number of instances to create. For more information, see - About bulk creation of VMs. + number of instances to create. For more information, + seeAbout bulk creation of VMs. .. code-block:: python @@ -2289,8 +2292,8 @@ def bulk_insert( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates multiple instances. Count specifies the - number of instances to create. For more information, see - About bulk creation of VMs. + number of instances to create. For more information, + seeAbout bulk creation of VMs. .. code-block:: python @@ -2449,7 +2452,7 @@ def delete_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes the specified Instance resource. For more - information, see Deleting an instance. + information, seeDeleting an instance. .. code-block:: python @@ -2585,7 +2588,7 @@ def delete( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Instance resource. For more - information, see Deleting an instance. + information, seeDeleting an instance. .. code-block:: python @@ -3086,10 +3089,12 @@ def delete_network_interface_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes one dynamic network interface from an active instance. - InstancesDeleteNetworkInterfaceRequest indicates: - instance - from which to delete, using project+zone+resource_id fields; - - dynamic network interface to be deleted, using - network_interface_name field; + InstancesDeleteNetworkInterfaceRequest indicates: + + - instance from which to delete, using project+zone+resource_id + fields; + - dynamic network interface to be deleted, using + network_interface_name field; .. code-block:: python @@ -3240,10 +3245,12 @@ def delete_network_interface( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes one dynamic network interface from an active instance. - InstancesDeleteNetworkInterfaceRequest indicates: - instance - from which to delete, using project+zone+resource_id fields; - - dynamic network interface to be deleted, using - network_interface_name field; + InstancesDeleteNetworkInterfaceRequest indicates: + + - instance from which to delete, using project+zone+resource_id + fields; + - dynamic network interface to be deleted, using + network_interface_name field; .. code-block:: python @@ -3795,10 +3802,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Instance: - Represents an Instance resource. An - instance is a virtual machine that is + Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud Platform. For - more information, read Virtual Machine + more information, readVirtual Machine Instances. """ @@ -4216,28 +4224,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4374,9 +4390,10 @@ def sample_get_partner_metadata(): Returns: google.cloud.compute_v1beta.types.PartnerMetadata: - Model definition of partner_metadata field. To be used - in dedicated Partner Metadata methods and to be inlined - in the Instance and InstanceTemplate resources. + Model definition of partner_metadata field. + To be used in dedicated Partner Metadata methods and + to be inlined in the Instance and InstanceTemplate + resources. """ # Create or coerce a protobuf request object. @@ -5275,8 +5292,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves the list of instances contained within the - specified zone. + r"""Retrieves the list of instances contained within + the specified zone. .. code-block:: python @@ -5418,8 +5435,8 @@ def list_referrers( instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. - For more information, read Viewing referrers to VM - instances. + For more information, readViewing + referrers to VM instances. .. code-block:: python @@ -6851,7 +6868,7 @@ def reset_unary( ) -> compute.Operation: r"""Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more - information, see Resetting an instance. + information, seeResetting an instance. .. code-block:: python @@ -6988,7 +7005,7 @@ def reset( ) -> extended_operation.ExtendedOperation: r"""Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more - information, see Resetting an instance. + information, seeResetting an instance. .. code-block:: python @@ -7148,8 +7165,8 @@ def resume_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Resumes an instance that was suspended using the - instances().suspend method. + r"""Resumes an instance that was suspended using + theinstances().suspend method. .. code-block:: python @@ -7284,8 +7301,8 @@ def resume( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Resumes an instance that was suspended using the - instances().suspend method. + r"""Resumes an instance that was suspended using + theinstances().suspend method. .. code-block:: python @@ -8296,28 +8313,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -8394,8 +8419,8 @@ def set_labels_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets labels on an instance. To learn more about - labels, read the Labeling Resources documentation. + r"""Sets labels on an instance. To learn more about + labels, read theLabeling Resources documentation. .. code-block:: python @@ -8547,8 +8572,8 @@ def set_labels( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets labels on an instance. To learn more about - labels, read the Labeling Resources documentation. + r"""Sets labels on an instance. To learn more about + labels, read theLabeling Resources documentation. .. code-block:: python @@ -9705,9 +9730,9 @@ def set_min_cpu_platform_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Changes the minimum CPU platform that this instance - should use. This method can only be called on a stopped - instance. For more information, read Specifying a - Minimum CPU Platform. + should use. This method can only + be called on a stopped instance. For more information, + readSpecifying a Minimum CPU Platform. .. code-block:: python @@ -9860,9 +9885,9 @@ def set_min_cpu_platform( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the minimum CPU platform that this instance - should use. This method can only be called on a stopped - instance. For more information, read Specifying a - Minimum CPU Platform. + should use. This method can only + be called on a stopped instance. For more information, + readSpecifying a Minimum CPU Platform. .. code-block:: python @@ -10363,11 +10388,11 @@ def set_scheduling_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets an instance's scheduling options. You can only call this - method on a stopped instance, that is, a VM instance that is in - a ``TERMINATED`` state. See Instance Life Cycle for more + method on astopped instance, that is, a VM instance that is in a + ``TERMINATED`` state. SeeInstance Life Cycle for more information on the possible instance states. For more - information about setting scheduling options for a VM, see Set - VM host maintenance policy. + information about setting scheduling options for a VM, seeSet VM + host maintenance policy. .. code-block:: python @@ -10509,11 +10534,11 @@ def set_scheduling( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets an instance's scheduling options. You can only call this - method on a stopped instance, that is, a VM instance that is in - a ``TERMINATED`` state. See Instance Life Cycle for more + method on astopped instance, that is, a VM instance that is in a + ``TERMINATED`` state. SeeInstance Life Cycle for more information on the possible instance states. For more - information about setting scheduling options for a VM, see Set - VM host maintenance policy. + information about setting scheduling options for a VM, seeSet VM + host maintenance policy. .. code-block:: python @@ -10682,7 +10707,7 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified instance. For more information, see Google + specified instance. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -10837,7 +10862,7 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified instance. For more information, see Google + specified instance. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -11017,8 +11042,8 @@ def set_service_account_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the service account on the instance. For more - information, read Changing the service account and - access scopes for an instance. + information, readChanging + the service account and access scopes for an instance. .. code-block:: python @@ -11171,8 +11196,8 @@ def set_service_account( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the service account on the instance. For more - information, read Changing the service account and - access scopes for an instance. + information, readChanging + the service account and access scopes for an instance. .. code-block:: python @@ -12037,8 +12062,9 @@ def set_tags_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Sets network tags for the specified instance to the - data included in the request. + r"""Sets network tags + for the specified instance to the data included in the + request. .. code-block:: python @@ -12181,8 +12207,9 @@ def set_tags( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Sets network tags for the specified instance to the - data included in the request. + r"""Sets network tags + for the specified instance to the data included in the + request. .. code-block:: python @@ -12654,9 +12681,9 @@ def start_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -12791,9 +12818,9 @@ def start( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -12958,9 +12985,9 @@ def start_with_encryption_key_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -13116,9 +13143,9 @@ def start_with_encryption_key( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts an instance that was stopped using the - instances().stop method. For more information, see - Restart an instance. + r"""Starts an instance that was stopped using + theinstances().stop method. For more information, + seeRestart an instance. .. code-block:: python @@ -13300,7 +13327,7 @@ def stop_unary( they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For - more information, see Stopping an instance. + more information, seeStopping an instance. .. code-block:: python @@ -13440,7 +13467,7 @@ def stop( they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For - more information, see Stopping an instance. + more information, seeStopping an instance. .. code-block:: python @@ -13607,7 +13634,8 @@ def suspend_unary( charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more - information, see Suspending and resuming an instance. + information, see + Suspending and resuming an instance. .. code-block:: python @@ -13750,7 +13778,8 @@ def suspend( charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more - information, see Suspending and resuming an instance. + information, see + Suspending and resuming an instance. .. code-block:: python @@ -14381,8 +14410,9 @@ def update_access_config_unary( ) -> compute.Operation: r"""Updates the specified access config from an instance's network interface with the data included in - the request. This method supports PATCH semantics and - uses the JSON merge patch format and processing rules. + the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -14544,8 +14574,9 @@ def update_access_config( ) -> extended_operation.ExtendedOperation: r"""Updates the specified access config from an instance's network interface with the data included in - the request. This method supports PATCH semantics and - uses the JSON merge patch format and processing rules. + the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -14731,7 +14762,7 @@ def update_display_device_unary( ) -> compute.Operation: r"""Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -14879,7 +14910,7 @@ def update_display_device( ) -> extended_operation.ExtendedOperation: r"""Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15055,9 +15086,9 @@ def update_network_interface_unary( can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP - ranges. See Migrating a VM between networks for - instructions on migrating an interface. This method - follows PATCH semantics. + ranges. See Migrating + a VM between networks for instructions on migrating an + interface. This method follows PATCH semantics. .. code-block:: python @@ -15221,9 +15252,9 @@ def update_network_interface( can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP - ranges. See Migrating a VM between networks for - instructions on migrating an interface. This method - follows PATCH semantics. + ranges. See Migrating + a VM between networks for instructions on migrating an + interface. This method follows PATCH semantics. .. code-block:: python @@ -15411,7 +15442,7 @@ def update_shielded_instance_config_unary( ) -> compute.Operation: r"""Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15565,7 +15596,7 @@ def update_shielded_instance_config( ) -> extended_operation.ExtendedOperation: r"""Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15742,7 +15773,7 @@ def update_shielded_vm_config_unary( ) -> compute.Operation: r"""Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -15892,7 +15923,7 @@ def update_shielded_vm_config( ) -> extended_operation.ExtendedOperation: r"""Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py index 09c1ee231378..a12c958746fc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py @@ -3331,21 +3331,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3506,21 +3517,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3677,21 +3699,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3996,21 +4029,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4167,21 +4211,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4337,21 +4392,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4502,21 +4568,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4667,21 +4744,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4830,21 +4918,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4994,10 +5093,11 @@ def __call__( Returns: ~.compute.Instance: - Represents an Instance resource. An - instance is a virtual machine that is + Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud Platform. For - more information, read Virtual Machine + more information, readVirtual Machine Instances. """ @@ -5442,26 +5542,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -6366,21 +6517,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6830,21 +6992,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7000,21 +7173,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7166,21 +7350,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7337,21 +7532,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7505,21 +7711,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7669,21 +7886,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -7994,21 +8222,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8159,21 +8398,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8326,26 +8576,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -8502,21 +8803,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8675,21 +8987,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -8846,21 +9169,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9021,21 +9355,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9194,21 +9539,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9363,21 +9719,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9534,21 +9901,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9709,21 +10087,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -9880,21 +10269,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10053,21 +10453,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10231,21 +10642,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10405,21 +10827,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10576,21 +11009,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10739,21 +11183,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -10905,21 +11360,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11072,21 +11538,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11231,21 +11708,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11549,21 +12037,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11720,21 +12219,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -11891,21 +12401,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12062,21 +12583,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12234,21 +12766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -12410,21 +12953,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py index 6c2d0072482f..aef392e9585b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py @@ -722,8 +722,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of instantSnapshots. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of instantSnapshots. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -852,7 +853,9 @@ def delete_unary( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -994,7 +997,9 @@ def delete( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -1221,8 +1226,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ # Create or coerce a protobuf request object. @@ -1359,28 +1365,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1945,28 +1959,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py index 18b88bbfd1e1..aa8602d47a3b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py @@ -871,21 +871,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1037,8 +1048,9 @@ def __call__( Returns: ~.compute.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ @@ -1188,26 +1200,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1357,21 +1420,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1681,26 +1755,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1855,21 +1980,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py index 882c1ba25021..9d32cef1946d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py @@ -1212,28 +1212,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1835,7 +1843,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified InterconnectAttachmentGroup resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1983,7 +1991,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified InterconnectAttachmentGroup resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -2215,28 +2223,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py index 1457cd56cac7..7fb3997b7d4e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py @@ -739,21 +739,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1055,26 +1066,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1386,21 +1448,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1705,21 +1778,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1876,26 +1960,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py index 9a52cfc07a8d..b222e1e46a7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py @@ -728,8 +728,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of interconnect attachments. To - prevent failure, Google recommends that you set the + r"""Retrieves an aggregated list of interconnect attachments. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1212,13 +1213,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectAttachment: Represents an Interconnect Attachment - (VLAN) resource. You can use - Interconnect attachments (VLANS) to - connect your Virtual Private Cloud - networks to your on-premises networks - through an Interconnect. For more - information, read Creating VLAN - Attachments. + (VLAN) resource. + You can use Interconnect attachments + (VLANS) to connect your Virtual Private + Cloud networks to your on-premises + networks through an Interconnect. For + more information, read + Creating VLAN Attachments. """ # Create or coerce a protobuf request object. @@ -1644,9 +1645,11 @@ def sample_list(): google.cloud.compute_v1beta.services.interconnect_attachments.pagers.ListPager: Response to the list request, and contains a list of interconnect - attachments. Iterating over this object - will yield results and resolve - additional pages automatically. + attachments. + + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1730,9 +1733,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified interconnect attachment with - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1887,9 +1890,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified interconnect attachment with - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2069,8 +2072,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an InterconnectAttachment. To - learn more about labels, read the Labeling Resources - documentation. + learn more about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -2223,8 +2226,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an InterconnectAttachment. To - learn more about labels, read the Labeling Resources - documentation. + learn more about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py index 5c6459a30e39..90bda28a9121 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py @@ -830,21 +830,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -995,13 +1006,13 @@ def __call__( Returns: ~.compute.InterconnectAttachment: Represents an Interconnect Attachment - (VLAN) resource. You can use - Interconnect attachments (VLANS) to - connect your Virtual Private Cloud - networks to your on-premises networks - through an Interconnect. For more - information, read Creating VLAN - Attachments. + (VLAN) resource. + You can use Interconnect attachments + (VLANS) to connect your Virtual Private + Cloud networks to your on-premises + networks through an Interconnect. For + more information, read + Creating VLAN Attachments. """ @@ -1148,21 +1159,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1468,21 +1490,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1638,21 +1671,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py index f5953ad7e6db..0083361d2edd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py @@ -1487,28 +1487,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2084,8 +2092,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified InterconnectGroup resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2218,8 +2226,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified InterconnectGroup resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2440,28 +2448,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py index eef74c148399..19ada5c7c71d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py @@ -785,21 +785,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -953,21 +964,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1271,26 +1293,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1597,21 +1670,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1920,21 +2004,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2097,26 +2192,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py index 70dfa134ce71..6600f4d6583b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py @@ -781,12 +781,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectLocation: Represents an Interconnect Attachment - (VLAN) Location resource. You can use - this resource to find location details - about an Interconnect attachment (VLAN). - For more information about interconnect - attachments, read Creating VLAN - Attachments. + (VLAN) Location resource. + You can use this resource to find + location details about an Interconnect + attachment (VLAN). For more information + about interconnect attachments, read + Creating VLAN Attachments. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py index 89e288917d0c..f9b412e84534 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py @@ -339,12 +339,12 @@ def __call__( Returns: ~.compute.InterconnectLocation: Represents an Interconnect Attachment - (VLAN) Location resource. You can use - this resource to find location details - about an Interconnect attachment (VLAN). - For more information about interconnect - attachments, read Creating VLAN - Attachments. + (VLAN) Location resource. + You can use this resource to find + location details about an Interconnect + attachment (VLAN). For more information + about interconnect attachments, read + Creating VLAN Attachments. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py index 4dbd43660e08..54a40c468138 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py @@ -732,7 +732,7 @@ def get( ) -> compute.InterconnectRemoteLocation: r"""Returns the details for the specified interconnect remote location. Gets a list of available interconnect - remote locations by making a list() request. + remote locations by making alist() request. .. code-block:: python @@ -789,10 +789,10 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect - Remote Location resource. You can use - this resource to find remote location - details about an Interconnect attachment - (VLAN). + Remote Location resource. + You can use this resource to find remote + location details about an Interconnect + attachment (VLAN). """ # Create or coerce a protobuf request object. @@ -914,9 +914,11 @@ def sample_list(): google.cloud.compute_v1beta.services.interconnect_remote_locations.pagers.ListPager: Response to the list request, and contains a list of interconnect remote - locations. Iterating over this object - will yield results and resolve - additional pages automatically. + locations. + + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py index c5b7e1573fef..d1d7fa94bcd3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py @@ -345,10 +345,10 @@ def __call__( Returns: ~.compute.InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect - Remote Location resource. You can use - this resource to find remote location - details about an Interconnect attachment - (VLAN). + Remote Location resource. + You can use this resource to find remote + location details about an Interconnect + attachment (VLAN). """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py index fdab7a4c76c4..a9e1c3638964 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py @@ -1038,6 +1038,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Interconnect: Represents an Interconnect resource. + An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. @@ -1111,12 +1112,15 @@ def get_diagnostics( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.InterconnectsGetDiagnosticsResponse: r"""Returns the interconnectDiagnostics for the specified - Interconnect. In the event of a global outage, do not - use this API to make decisions about where to redirect - your network traffic. Unlike a VLAN attachment, which is - regional, a Cloud Interconnect connection is a global - resource. A global outage can prevent this API from - functioning properly. + Interconnect. + + In the event of a + global outage, do not use this API to make decisions + about where to redirect your network traffic. + + Unlike a VLAN attachment, which is regional, a Cloud + Interconnect connection is a global resource. A global + outage can prevent this API from functioning properly. .. code-block:: python @@ -1746,9 +1750,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified Interconnect with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1878,9 +1882,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified Interconnect with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2036,7 +2040,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on an Interconnect. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling + Resources documentation. .. code-block:: python @@ -2172,7 +2177,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Interconnect. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling + Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py index cfa76b86ca96..c05b574c6703 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py @@ -722,21 +722,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -888,6 +899,7 @@ def __call__( Returns: ~.compute.Interconnect: Represents an Interconnect resource. + An Interconnect resource is a dedicated connection between the Google Cloud network and your on-premises network. @@ -1340,21 +1352,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1657,21 +1680,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1830,21 +1864,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py index 30ecc25362dd..7f513c7c994a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py @@ -712,7 +712,7 @@ def get( r"""Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace images. + third-party partners who are creatingCloud Marketplace images. .. code-block:: python @@ -768,11 +768,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.LicenseCode: - Represents a License Code resource. A License Code is a - unique identifier used to represent a license resource. - *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace - images. + Represents a License Code resource. + + A License Code is a unique identifier used to + represent alicense resource. *Caution* This resource + is intended for use only by third-party partners who + are creatingCloud Marketplace images. """ # Create or coerce a protobuf request object. @@ -845,7 +846,7 @@ def test_iam_permissions( ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party - partners who are creating Cloud Marketplace images. + partners who are creatingCloud Marketplace images. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py index 4b8cf173f205..f12c9d32eb65 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py @@ -332,11 +332,12 @@ def __call__( Returns: ~.compute.LicenseCode: - Represents a License Code resource. A License Code is a - unique identifier used to represent a license resource. - *Caution* This resource is intended for use only by - third-party partners who are creating Cloud Marketplace - images. + Represents a License Code resource. + + A License Code is a unique identifier used to represent + alicense resource. *Caution* This resource is intended + for use only by third-party partners who are + creatingCloud Marketplace images. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py index 23195d8d6905..f32c809789dc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py @@ -714,8 +714,8 @@ def delete_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Deletes the specified license. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -839,8 +839,8 @@ def delete( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified license. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -989,7 +989,7 @@ def get( ) -> compute.License: r"""Returns the specified License resource. *Caution* This resource is intended for use only by third-party partners who are - creating Cloud Marketplace images. + creatingCloud Marketplace images. .. code-block:: python @@ -1044,11 +1044,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.License: - Represents a License resource. A License represents - billing and aggregate usage data for public and - marketplace images. *Caution* This resource is intended - for use only by third-party partners who are creating - Cloud Marketplace images. + Represents a License resource. + + A License represents billing and aggregate usage data forpublic andmarketplace images. + *Caution* This resource is intended for + + use only by third-party partners who are + creatingCloud Marketplace images. """ # Create or coerce a protobuf request object. @@ -1116,8 +1118,8 @@ def get_iam_policy( ) -> compute.Policy: r"""Gets the access control policy for a resource. May be empty if no such policy or resource exists. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -1173,28 +1175,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1262,7 +1272,7 @@ def insert_unary( ) -> compute.Operation: r"""Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -1379,7 +1389,7 @@ def insert( ) -> extended_operation.ExtendedOperation: r"""Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -1522,9 +1532,9 @@ def list( other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a - request to the respective image project, such as debian-cloud or - windows-cloud. *Caution* This resource is intended for use only - by third-party partners who are creating Cloud Marketplace + request to the respective image project, such as debian-cloud + orwindows-cloud. *Caution* This resource is intended for use + only by third-party partners who are creatingCloud Marketplace images. .. code-block:: python @@ -1650,8 +1660,8 @@ def set_iam_policy( ) -> compute.Policy: r"""Sets the access control policy on the specified resource. Replaces any existing policy. *Caution* This resource is - intended for use only by third-party partners who are creating - Cloud Marketplace images. + intended for use only by third-party partners who are + creatingCloud Marketplace images. .. code-block:: python @@ -1712,28 +1722,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1808,7 +1826,7 @@ def test_iam_permissions( ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party - partners who are creating Cloud Marketplace images. + partners who are creatingCloud Marketplace images. .. code-block:: python @@ -1941,7 +1959,7 @@ def update_unary( ) -> compute.Operation: r"""Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python @@ -2072,7 +2090,7 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners - who are creating Cloud Marketplace images. + who are creatingCloud Marketplace images. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py index f95021054483..6071edd278b9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py @@ -650,21 +650,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -812,11 +823,12 @@ def __call__( Returns: ~.compute.License: - Represents a License resource. A License represents - billing and aggregate usage data for public and - marketplace images. *Caution* This resource is intended - for use only by third-party partners who are creating - Cloud Marketplace images. + Represents a License resource. + + A License represents billing and aggregate usage data + forpublic andmarketplace images. *Caution* This resource + is intended for use only by third-party partners who are + creatingCloud Marketplace images. """ @@ -960,26 +972,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1131,21 +1194,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1442,26 +1516,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1772,21 +1897,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py index 209beb022462..c8bb6d57b5ec 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py @@ -1043,13 +1043,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.MachineImage: Represents a machine image resource. + A machine image is a Compute Engine resource that stores all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) - instance. For more information, see - Machine images. + instance. For more information, + seeMachine images. """ # Create or coerce a protobuf request object. @@ -1172,28 +1173,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1711,28 +1720,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1806,7 +1823,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a machine image. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1942,7 +1959,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a machine image. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py index 24fc10bed737..fd52ad6840d7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py @@ -656,21 +656,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -822,13 +833,14 @@ def __call__( Returns: ~.compute.MachineImage: Represents a machine image resource. + A machine image is a Compute Engine resource that stores all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) - instance. For more information, see - Machine images. + instance. For more information, + seeMachine images. """ @@ -976,26 +988,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1143,21 +1206,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1461,26 +1535,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1635,21 +1760,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py index 06442e9f2c5a..bcc8dfe42b04 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py @@ -711,8 +711,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of machine types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of machine types. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -898,10 +899,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.MachineType: Represents a Machine Type resource. + You can use specific machine types for your VM instances based on performance and pricing requirements. For more - information, read Machine Types. + information, readMachine Types. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py index 08dc58a1708a..8bd92f75b9f3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py @@ -535,10 +535,11 @@ def __call__( Returns: ~.compute.MachineType: Represents a Machine Type resource. + You can use specific machine types for your VM instances based on performance and pricing requirements. For more - information, read Machine Types. + information, readMachine Types. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py index 8b06135d1973..0f013bb5de83 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py @@ -725,8 +725,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all NetworkAttachment resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1207,8 +1208,8 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkAttachment: - NetworkAttachments A network - attachment resource ... + NetworkAttachments + A network attachment resource ... """ # Create or coerce a protobuf request object. @@ -1345,28 +1346,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1861,8 +1870,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified NetworkAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2010,8 +2019,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified NetworkAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2256,28 +2265,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py index 792211bcafd4..2e79457f508a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py @@ -876,21 +876,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1041,8 +1052,8 @@ def __call__( Returns: ~.compute.NetworkAttachment: - NetworkAttachments A network - attachment resource ... + NetworkAttachments + A network attachment resource ... """ @@ -1193,26 +1204,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1362,21 +1424,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1683,21 +1756,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1860,26 +1944,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py index 86555176e616..59f8e985888b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py @@ -733,9 +733,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all NetworkEdgeSecurityService resources - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py index b0a289f68fd7..d919373a4ec9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py @@ -663,21 +663,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -977,21 +988,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1147,21 +1169,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py index 69340119a333..3c997ebc3283 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py @@ -727,7 +727,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of network endpoint groups and sorts them by - zone. To prevent failure, Google recommends that you set the + zone. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -897,9 +899,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1057,9 +1059,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1242,9 +1244,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1385,9 +1387,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1553,9 +1555,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1713,9 +1715,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1892,9 +1894,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -1917,13 +1919,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. @@ -2037,9 +2040,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the zone where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2175,9 +2178,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the zone where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2335,9 +2338,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of thezone + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this @@ -2480,9 +2483,9 @@ def sample_list_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. zone (str): - The name of the zone where the - network endpoint group is located. It - should comply with RFC1035. + The name of the zone where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``zone`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py index d82706df7149..51d6ae1d2b18 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py @@ -892,21 +892,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1063,21 +1074,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1228,21 +1250,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1399,13 +1432,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1554,21 +1588,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py index 447a8d0cabbd..da2fabe9da0f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py @@ -1632,8 +1632,9 @@ def aggregated_list( ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of network firewall policies, listing network firewall policies from all applicable scopes - (global and regional) and grouping the results per scope. To - prevent failure, Google recommends that you set the + (global and regional) and grouping the results per scope. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -2608,28 +2609,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -5134,28 +5143,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py index a77b1e407678..2169bf16addf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py @@ -1404,21 +1404,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1576,21 +1587,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1748,21 +1770,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2068,21 +2101,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2232,21 +2276,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2695,26 +2750,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3169,21 +3275,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3484,21 +3601,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3655,21 +3783,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3827,21 +3966,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3996,21 +4146,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4167,21 +4328,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4333,21 +4505,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4499,26 +4682,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py index 1e815d1ab420..701c50b9b1a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py @@ -997,6 +997,322 @@ def error_code(self): # Done; return the response. return response + def cancel_request_remove_peering_unary( + self, + request: Optional[ + Union[compute.CancelRequestRemovePeeringNetworkRequest, dict] + ] = None, + *, + project: Optional[str] = None, + network: Optional[str] = None, + networks_cancel_request_remove_peering_request_resource: Optional[ + compute.NetworksCancelRequestRemovePeeringRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Cancel requests to remove a peering from the specified network. + Applicable only for PeeringConnection with + update_strategy=CONSENSUS. Cancels a request to remove a peering + from the specified network. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_cancel_request_remove_peering(): + # Create a client + client = compute_v1beta.NetworksClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRequestRemovePeeringNetworkRequest( + network="network_value", + project="project_value", + ) + + # Make the request + response = client.cancel_request_remove_peering(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.CancelRequestRemovePeeringNetworkRequest, dict]): + The request object. A request message for + Networks.CancelRequestRemovePeering. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + network (str): + Name of the network resource to + remove peering from. + + This corresponds to the ``network`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + networks_cancel_request_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksCancelRequestRemovePeeringRequest): + The body resource for this request + This corresponds to the ``networks_cancel_request_remove_peering_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + network, + networks_cancel_request_remove_peering_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.CancelRequestRemovePeeringNetworkRequest): + request = compute.CancelRequestRemovePeeringNetworkRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if network is not None: + request.network = network + if networks_cancel_request_remove_peering_request_resource is not None: + request.networks_cancel_request_remove_peering_request_resource = ( + networks_cancel_request_remove_peering_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.cancel_request_remove_peering + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("network", request.network), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def cancel_request_remove_peering( + self, + request: Optional[ + Union[compute.CancelRequestRemovePeeringNetworkRequest, dict] + ] = None, + *, + project: Optional[str] = None, + network: Optional[str] = None, + networks_cancel_request_remove_peering_request_resource: Optional[ + compute.NetworksCancelRequestRemovePeeringRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Cancel requests to remove a peering from the specified network. + Applicable only for PeeringConnection with + update_strategy=CONSENSUS. Cancels a request to remove a peering + from the specified network. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_cancel_request_remove_peering(): + # Create a client + client = compute_v1beta.NetworksClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRequestRemovePeeringNetworkRequest( + network="network_value", + project="project_value", + ) + + # Make the request + response = client.cancel_request_remove_peering(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.CancelRequestRemovePeeringNetworkRequest, dict]): + The request object. A request message for + Networks.CancelRequestRemovePeering. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + network (str): + Name of the network resource to + remove peering from. + + This corresponds to the ``network`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + networks_cancel_request_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksCancelRequestRemovePeeringRequest): + The body resource for this request + This corresponds to the ``networks_cancel_request_remove_peering_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + network, + networks_cancel_request_remove_peering_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.CancelRequestRemovePeeringNetworkRequest): + request = compute.CancelRequestRemovePeeringNetworkRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if network is not None: + request.network = network + if networks_cancel_request_remove_peering_request_resource is not None: + request.networks_cancel_request_remove_peering_request_resource = ( + networks_cancel_request_remove_peering_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.cancel_request_remove_peering + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("network", request.network), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + def delete_unary( self, request: Optional[Union[compute.DeleteNetworkRequest, dict]] = None, @@ -1327,9 +1643,10 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Network: Represents a VPC Network resource. + Networks connect resources to each other and to the internet. For more - information, read Virtual Private Cloud + information, readVirtual Private Cloud (VPC) Network. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/base.py index 33b8df369eba..7e549e62e350 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.cancel_request_remove_peering: gapic_v1.method.wrap_method( + self.cancel_request_remove_peering, + default_timeout=None, + client_info=client_info, + ), self.delete: gapic_v1.method.wrap_method( self.delete, default_timeout=None, @@ -223,6 +228,15 @@ def add_peering( ]: raise NotImplementedError() + @property + def cancel_request_remove_peering( + self, + ) -> Callable[ + [compute.CancelRequestRemovePeeringNetworkRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + @property def delete( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py index 010b88bfd14a..def25e9ac2af 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py @@ -80,6 +80,14 @@ def post_add_peering(self, response): logging.log(f"Received response: {response}") return response + def pre_cancel_request_remove_peering(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_cancel_request_remove_peering(self, response): + logging.log(f"Received response: {response}") + return response + def pre_delete(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -228,6 +236,55 @@ def post_add_peering_with_metadata( """ return response, metadata + def pre_cancel_request_remove_peering( + self, + request: compute.CancelRequestRemovePeeringNetworkRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.CancelRequestRemovePeeringNetworkRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for cancel_request_remove_peering + + Override in a subclass to manipulate the request or metadata + before they are sent to the Networks server. + """ + return request, metadata + + def post_cancel_request_remove_peering( + self, response: compute.Operation + ) -> compute.Operation: + """Post-rpc interceptor for cancel_request_remove_peering + + DEPRECATED. Please use the `post_cancel_request_remove_peering_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the Networks server but before + it is returned to user code. This `post_cancel_request_remove_peering` interceptor runs + before the `post_cancel_request_remove_peering_with_metadata` interceptor. + """ + return response + + def post_cancel_request_remove_peering_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for cancel_request_remove_peering + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the Networks server but before it is returned to user code. + + We recommend only using this `post_cancel_request_remove_peering_with_metadata` + interceptor in new development instead of the `post_cancel_request_remove_peering` interceptor. + When both interceptors are used, this `post_cancel_request_remove_peering_with_metadata` interceptor runs after the + `post_cancel_request_remove_peering` interceptor. The (possibly modified) response returned by + `post_cancel_request_remove_peering` will be passed to + `post_cancel_request_remove_peering_with_metadata`. + """ + return response, metadata + def pre_delete( self, request: compute.DeleteNetworkRequest, @@ -936,21 +993,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1055,6 +1123,192 @@ def __call__( ) return resp + class _CancelRequestRemovePeering( + _BaseNetworksRestTransport._BaseCancelRequestRemovePeering, NetworksRestStub + ): + def __hash__(self): + return hash("NetworksRestTransport.CancelRequestRemovePeering") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.CancelRequestRemovePeeringNetworkRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the cancel request remove + peering method over HTTP. + + Args: + request (~.compute.CancelRequestRemovePeeringNetworkRequest): + The request object. A request message for + Networks.CancelRequestRemovePeering. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseNetworksRestTransport._BaseCancelRequestRemovePeering._get_http_options() + ) + + request, metadata = self._interceptor.pre_cancel_request_remove_peering( + request, metadata + ) + transcoded_request = _BaseNetworksRestTransport._BaseCancelRequestRemovePeering._get_transcoded_request( + http_options, request + ) + + body = _BaseNetworksRestTransport._BaseCancelRequestRemovePeering._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseNetworksRestTransport._BaseCancelRequestRemovePeering._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.NetworksClient.CancelRequestRemovePeering", + extra={ + "serviceName": "google.cloud.compute.v1beta.Networks", + "rpcName": "CancelRequestRemovePeering", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = NetworksRestTransport._CancelRequestRemovePeering._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_cancel_request_remove_peering(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + ( + resp, + _, + ) = self._interceptor.post_cancel_request_remove_peering_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.NetworksClient.cancel_request_remove_peering", + extra={ + "serviceName": "google.cloud.compute.v1beta.Networks", + "rpcName": "CancelRequestRemovePeering", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _Delete(_BaseNetworksRestTransport._BaseDelete, NetworksRestStub): def __hash__(self): return hash("NetworksRestTransport.Delete") @@ -1106,21 +1360,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1269,9 +1534,10 @@ def __call__( Returns: ~.compute.Network: Represents a VPC Network resource. + Networks connect resources to each other and to the internet. For more - information, read Virtual Private Cloud + information, readVirtual Private Cloud (VPC) Network. """ @@ -1566,21 +1832,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2025,21 +2302,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2194,21 +2482,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2367,21 +2666,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2537,21 +2847,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2857,21 +3178,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2984,6 +3316,16 @@ def add_peering( # In C++ this would require a dynamic_cast return self._AddPeering(self._session, self._host, self._interceptor) # type: ignore + @property + def cancel_request_remove_peering( + self, + ) -> Callable[ + [compute.CancelRequestRemovePeeringNetworkRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._CancelRequestRemovePeering(self._session, self._host, self._interceptor) # type: ignore + @property def delete(self) -> Callable[[compute.DeleteNetworkRequest], compute.Operation]: # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py index 147dd5ef3212..b3fcf5f88539 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py @@ -143,6 +143,62 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseCancelRequestRemovePeering: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/global/networks/{network}/cancelRequestRemovePeering", + "body": "networks_cancel_request_remove_peering_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.CancelRequestRemovePeeringNetworkRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseNetworksRestTransport._BaseCancelRequestRemovePeering._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseDelete: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py index 028579bfc650..48954628642e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py @@ -1038,8 +1038,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of node groups. Note: use - nodeGroups.listNodes for more details about each group. To - prevent failure, Google recommends that you set the + nodeGroups.listNodes for more details about each group. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1851,16 +1852,16 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeGroup: Represents a sole-tenant Node Group - resource. A sole-tenant node is a - physical server that is dedicated to - hosting VM instances only for your - specific project. Use sole-tenant nodes - to keep your instances physically - separated from instances in other - projects, or to group your instances - together on the same host hardware. For - more information, read Sole-tenant - nodes. + resource. + A sole-tenant node is a physical server + that is dedicated to hosting VM + instances only for your specific + project. Use sole-tenant nodes to keep + your instances physically separated from + instances in other projects, or to group + your instances together on the same host + hardware. For more information, + readSole-tenant nodes. """ # Create or coerce a protobuf request object. @@ -1995,28 +1996,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3402,28 +3411,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py index bb922b43b567..7453702b4e6e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py @@ -1039,21 +1039,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1357,21 +1368,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1523,21 +1545,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1693,16 +1726,16 @@ def __call__( Returns: ~.compute.NodeGroup: Represents a sole-tenant Node Group - resource. A sole-tenant node is a - physical server that is dedicated to - hosting VM instances only for your - specific project. Use sole-tenant nodes - to keep your instances physically - separated from instances in other - projects, or to group your instances - together on the same host hardware. For - more information, read Sole-tenant - nodes. + resource. + A sole-tenant node is a physical server + that is dedicated to hosting VM + instances only for your specific + project. Use sole-tenant nodes to keep + your instances physically separated from + instances in other projects, or to group + your instances together on the same host + hardware. For more information, + readSole-tenant nodes. """ @@ -1848,26 +1881,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2019,21 +2103,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2480,21 +2575,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2651,21 +2757,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2823,26 +2940,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -3003,21 +3171,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3175,21 +3354,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py index a3e150e50d58..4a38bb47afdb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py @@ -717,8 +717,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of node templates. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of node templates. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1199,10 +1200,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeTemplate: Represent a sole-tenant Node Template - resource. You can use a template to - define properties for nodes in a node - group. For more information, read - Creating node groups and instances. + resource. + You can use a template to define + properties for nodes in a node group. + For more information, readCreating node + groups and instances. """ # Create or coerce a protobuf request object. @@ -1337,28 +1339,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1929,28 +1939,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py index 3aee96f1e245..c46ba011aa39 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py @@ -809,21 +809,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -975,10 +986,11 @@ def __call__( Returns: ~.compute.NodeTemplate: Represent a sole-tenant Node Template - resource. You can use a template to - define properties for nodes in a node - group. For more information, read - Creating node groups and instances. + resource. + You can use a template to define + properties for nodes in a node group. + For more information, readCreating node + groups and instances. """ @@ -1126,26 +1138,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1293,21 +1356,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1611,26 +1685,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py index ab45b8c022d1..8cd82e939d77 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py @@ -709,9 +709,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of node types. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of node types. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -895,15 +896,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NodeType: Represent a sole-tenant Node Type - resource. Each node within a node group - must have a node type. A node type - specifies the total amount of cores and - memory for that node. Currently, the - only available node type is - n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in - multiple zones. For more information - read Node types. + resource. + Each node within a node group must have + a node type. A node type specifies the + total amount of cores and memory for + that node. Currently, the only available + node type is n1-node-96-624 node type + that has 96 vCPUs and 624 GB of memory, + available in multiple zones. For more + information readNode types. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py index a78f73b343da..4e29ed299a51 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py @@ -531,15 +531,15 @@ def __call__( Returns: ~.compute.NodeType: Represent a sole-tenant Node Type - resource. Each node within a node group - must have a node type. A node type - specifies the total amount of cores and - memory for that node. Currently, the - only available node type is - n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in - multiple zones. For more information - read Node types. + resource. + Each node within a node group must have + a node type. A node type specifies the + total amount of cores and memory for + that node. Currently, the only available + node type is n1-node-96-624 node type + that has 96 vCPUs and 624 GB of memory, + available in multiple zones. For more + information readNode types. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py index 110d6807e2f7..88cad6b1c4c6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py @@ -742,12 +742,17 @@ def add_association_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Inserts an association for the specified security - policy. This has billing implications. Projects in the + policy. + This has billing implications. Projects in the hierarchy with effective hierarchical security policies will be automatically enrolled into Cloud Armor - Enterprise if not already enrolled. Use of this API to - modify firewall policies is deprecated. Use - firewallPolicies.addAssociation instead if possible. + Enterprise if not already enrolled. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.addAssociation + instead. .. code-block:: python @@ -875,12 +880,17 @@ def add_association( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts an association for the specified security - policy. This has billing implications. Projects in the + policy. + This has billing implications. Projects in the hierarchy with effective hierarchical security policies will be automatically enrolled into Cloud Armor - Enterprise if not already enrolled. Use of this API to - modify firewall policies is deprecated. Use - firewallPolicies.addAssociation instead if possible. + Enterprise if not already enrolled. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.addAssociation + instead. .. code-block:: python @@ -1030,6 +1040,11 @@ def add_rule_unary( ) -> compute.Operation: r"""Inserts a rule into a security policy. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.addRule instead. + .. code-block:: python # This snippet has been automatically generated and should be regarded as a @@ -1151,6 +1166,11 @@ def add_rule( ) -> extended_operation.ExtendedOperation: r"""Inserts a rule into a security policy. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.addRule instead. + .. code-block:: python # This snippet has been automatically generated and should be regarded as a @@ -1292,9 +1312,12 @@ def copy_rules_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Copies rules to the specified security policy. Use of - this API to modify firewall policies is deprecated. Use - firewallPolicies.copyRules instead. + r"""Copies rules to the specified security policy. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.cloneRules instead. .. code-block:: python @@ -1407,9 +1430,12 @@ def copy_rules( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Copies rules to the specified security policy. Use of - this API to modify firewall policies is deprecated. Use - firewallPolicies.copyRules instead. + r"""Copies rules to the specified security policy. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.cloneRules instead. .. code-block:: python @@ -1545,9 +1571,12 @@ def delete_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Deletes the specified policy. Use of this API to - remove firewall policies is deprecated. Use - firewallPolicies.delete instead. + r"""Deletes the specified policy. + + Use this API to remove Cloud Armor policies. Previously, + alpha and beta versions of this API were used to remove + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.delete instead. .. code-block:: python @@ -1660,9 +1689,12 @@ def delete( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Deletes the specified policy. Use of this API to - remove firewall policies is deprecated. Use - firewallPolicies.delete instead. + r"""Deletes the specified policy. + + Use this API to remove Cloud Armor policies. Previously, + alpha and beta versions of this API were used to remove + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.delete instead. .. code-block:: python @@ -1799,9 +1831,11 @@ def get( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicy: r"""List all of the ordered rules present in a single - specified policy. Use of this API to read firewall - policies is deprecated. Use firewallPolicies.get - instead. + specified policy. + Use this API to read Cloud Armor policies. Previously, + alpha and beta versions of this API were used to read + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.get instead. .. code-block:: python @@ -1850,11 +1884,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -1916,9 +1950,13 @@ def get_association( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicyAssociation: - r"""Gets an association with the specified name. Use of - this API to read firewall policies is deprecated. Use - firewallPolicies.getAssociation instead if possible. + r"""Gets an association with the specified name. + + Use this API to read Cloud Armor policies. Previously, + alpha and beta versions of this API were used to read + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.getAssociation + instead. .. code-block:: python @@ -2031,9 +2069,12 @@ def get_rule( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.SecurityPolicyRule: - r"""Gets a rule at the specified priority. Use of this - API to read firewall policies is deprecated. Use - firewallPolicies.getRule instead. + r"""Gets a rule at the specified priority. + + Use this API to read Cloud Armor policies. Previously, + alpha and beta versions of this API were used to read + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.getRule instead. .. code-block:: python @@ -2148,10 +2189,13 @@ def insert_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Creates a new policy in the specified project using - the data included in the request. Use of this API to - insert firewall policies is deprecated. Use - firewallPolicies.insert instead. + r"""Creates a new policy in the specified organization + using the data included in the request. + + Use this API to add Cloud Armor policies. Previously, + alpha and beta versions of this API were used to add + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.insert instead. .. code-block:: python @@ -2253,10 +2297,13 @@ def insert( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Creates a new policy in the specified project using - the data included in the request. Use of this API to - insert firewall policies is deprecated. Use - firewallPolicies.insert instead. + r"""Creates a new policy in the specified organization + using the data included in the request. + + Use this API to add Cloud Armor policies. Previously, + alpha and beta versions of this API were used to add + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.insert instead. .. code-block:: python @@ -2382,9 +2429,12 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""List all the policies that have been configured for - the specified project. Use of this API to read firewall - policies is deprecated. Use firewallPolicies.list - instead. + the specified organization. + + Use this API to read Cloud Armor policies. Previously, + alpha and beta versions of this API were used to read + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.list instead. .. code-block:: python @@ -2478,9 +2528,12 @@ def list_associations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.OrganizationSecurityPoliciesListAssociationsResponse: r"""Lists associations of a specified target, i.e., - organization or folder. Use of this API to read firewall - policies is deprecated. Use - firewallPolicies.listAssociations instead if possible. + organization or folder. + Use this API to read Cloud Armor policies. Previously, + alpha and beta versions of this API were used to read + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.listAssociations + instead. .. code-block:: python @@ -2650,9 +2703,12 @@ def move_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Moves the specified security policy. Use of this API - to modify firewall policies is deprecated. Use - firewallPolicies.move instead. + r"""Moves the specified security policy. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.move instead. .. code-block:: python @@ -2765,9 +2821,12 @@ def move( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Moves the specified security policy. Use of this API - to modify firewall policies is deprecated. Use - firewallPolicies.move instead. + r"""Moves the specified security policy. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.move instead. .. code-block:: python @@ -2906,9 +2965,11 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included - in the request. Use of this API to modify firewall - policies is deprecated. Use firewallPolicies.patch - instead. + in the request. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.patch instead. .. code-block:: python @@ -3030,9 +3091,11 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included - in the request. Use of this API to modify firewall - policies is deprecated. Use firewallPolicies.patch - instead. + in the request. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.patch instead. .. code-block:: python @@ -3176,9 +3239,12 @@ def patch_rule_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Patches a rule at the specified priority. Use of this - API to modify firewall policies is deprecated. Use - firewallPolicies.patchRule instead. + r"""Patches a rule at the specified priority. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.patchRule instead. .. code-block:: python @@ -3299,9 +3365,12 @@ def patch_rule( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Patches a rule at the specified priority. Use of this - API to modify firewall policies is deprecated. Use - firewallPolicies.patchRule instead. + r"""Patches a rule at the specified priority. + + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.patchRule instead. .. code-block:: python @@ -3445,9 +3514,12 @@ def remove_association_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Removes an association for the specified security - policy. Use of this API to modify firewall policies is - deprecated. Use firewallPolicies.removeAssociation - instead if possible. + policy. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.removeAssociation + instead. .. code-block:: python @@ -3565,9 +3637,12 @@ def remove_association( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes an association for the specified security - policy. Use of this API to modify firewall policies is - deprecated. Use firewallPolicies.removeAssociation - instead if possible. + policy. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.removeAssociation + instead. .. code-block:: python @@ -3709,6 +3784,11 @@ def remove_rule_unary( ) -> compute.Operation: r"""Deletes a rule at the specified priority. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.removeRule instead. + .. code-block:: python # This snippet has been automatically generated and should be regarded as a @@ -3822,6 +3902,11 @@ def remove_rule( ) -> extended_operation.ExtendedOperation: r"""Deletes a rule at the specified priority. + Use this API to modify Cloud Armor policies. Previously, + alpha and beta versions of this API were used to modify + firewall policies. This usage is now disabled for most + organizations. Use firewallPolicies.removeRule instead. + .. code-block:: python # This snippet has been automatically generated and should be regarded as a diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py index 44139876590b..1b718cf895d5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py @@ -1125,21 +1125,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1297,21 +1308,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1466,21 +1488,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1632,21 +1665,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1797,11 +1841,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -2250,21 +2294,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2879,21 +2934,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3042,21 +3108,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3212,21 +3289,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3383,21 +3471,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3549,21 +3648,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py index bb04db75a6f0..4d9b98c162f7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py @@ -722,8 +722,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of packetMirrorings. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of packetMirrorings. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1202,15 +1203,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.PacketMirroring: Represents a Packet Mirroring - resource. Packet Mirroring clones the - traffic of specified instances in your - Virtual Private Cloud (VPC) network and - forwards it to a collector destination, - such as an instance group of an internal - TCP/UDP load balancer, for analysis or - examination. For more information about - setting up Packet Mirroring, see Using - Packet Mirroring. + resource. + Packet Mirroring clones the traffic of + specified instances in your Virtual + Private Cloud (VPC) network and forwards + it to a collector destination, such as + an instance group of an internal TCP/UDP + load balancer, for analysis or + examination. + For more information about setting up + Packet Mirroring, seeUsing Packet + Mirroring. """ # Create or coerce a protobuf request object. @@ -1706,9 +1709,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified PacketMirroring resource with - the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1855,9 +1858,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified PacketMirroring resource with - the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py index 0aa3e3b71b0e..2ef71134ce71 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py @@ -761,21 +761,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -927,15 +938,17 @@ def __call__( Returns: ~.compute.PacketMirroring: Represents a Packet Mirroring - resource. Packet Mirroring clones the - traffic of specified instances in your - Virtual Private Cloud (VPC) network and - forwards it to a collector destination, - such as an instance group of an internal - TCP/UDP load balancer, for analysis or - examination. For more information about - setting up Packet Mirroring, see Using - Packet Mirroring. + resource. + Packet Mirroring clones the traffic of + specified instances in your Virtual + Private Cloud (VPC) network and forwards + it to a collector destination, such as + an instance group of an internal TCP/UDP + load balancer, for analysis or + examination. + For more information about setting up + Packet Mirroring, seeUsing Packet + Mirroring. """ @@ -1085,21 +1098,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1408,21 +1432,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py index 5a7099cb866a..1d5ae7f5f5f9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py @@ -682,21 +682,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py index de30cb3649d3..02d2d759c544 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py @@ -1718,14 +1718,15 @@ def get( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Project: - r"""Returns the specified Project resource. To decrease latency for - this method, you can optionally omit any unneeded information - from the response by using a field mask. This practice is - especially recommended for unused quota information (the - ``quotas`` field). To exclude one or more fields, set your - request's ``fields`` query parameter to only include the fields - you need. For example, to only include the ``id`` and - ``selfLink`` fields, add the query parameter + r"""Returns the specified Project resource. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter ``?fields=id,selfLink`` to your request. .. code-block:: python @@ -1773,10 +1774,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -1884,10 +1886,11 @@ def sample_get_xpn_host(): Returns: google.cloud.compute_v1beta.types.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -2201,15 +2204,21 @@ def move_disk_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starting September 29, 2025, you can't use the moveDisk API on + r"""Moves a persistent disk from one zone to another. *Note*: The + moveDisk API will be deprecated on September 29, 2026. + + Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in `Change the location of a - disk `__. + disk `__. + Projects that already use the moveDisk API can continue usage - until September 29, 2026. Starting November 1, 2025, API - responses will include a warning message in the response body - about the upcoming deprecation. You can skip the message to - continue using the service without interruption. + until September 29, 2026. + + Starting November 1, 2025, API responses will include a warning + message in the response body about the upcoming deprecation. You + can skip the message to continue using the service without + interruption. .. code-block:: python @@ -2324,15 +2333,21 @@ def move_disk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starting September 29, 2025, you can't use the moveDisk API on + r"""Moves a persistent disk from one zone to another. *Note*: The + moveDisk API will be deprecated on September 29, 2026. + + Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in `Change the location of a - disk `__. + disk `__. + Projects that already use the moveDisk API can continue usage - until September 29, 2026. Starting November 1, 2025, API - responses will include a warning message in the response body - about the upcoming deprecation. You can skip the message to - continue using the service without interruption. + until September 29, 2026. + + Starting November 1, 2025, API responses will include a warning + message in the response body about the upcoming deprecation. You + can skip the message to continue using the service without + interruption. .. code-block:: python @@ -2746,8 +2761,8 @@ def set_cloud_armor_tier_unary( r"""Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See - Subscribing to Cloud Armor Enterprise for more - information. + Subscribing + to Cloud Armor Enterprise for more information. .. code-block:: python @@ -2869,8 +2884,8 @@ def set_cloud_armor_tier( r"""Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See - Subscribing to Cloud Armor Enterprise for more - information. + Subscribing + to Cloud Armor Enterprise for more information. .. code-block:: python @@ -3556,8 +3571,8 @@ def set_managed_protection_tier_unary( r"""Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set PLUS or above the billing account of the project must be subscribed to Managed Protection - Plus. See Subscribing to Managed Protection Plus for - more information. + Plus. See Subscribing + to Managed Protection Plus for more information. .. code-block:: python @@ -3686,8 +3701,8 @@ def set_managed_protection_tier( r"""Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set PLUS or above the billing account of the project must be subscribed to Managed Protection - Plus. See Subscribing to Managed Protection Plus for - more information. + Plus. See Subscribing + to Managed Protection Plus for more information. .. code-block:: python @@ -3835,7 +3850,7 @@ def set_usage_export_bucket_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Enables the usage export feature and sets the usage + r"""Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. @@ -3955,7 +3970,7 @@ def set_usage_export_bucket( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Enables the usage export feature and sets the usage + r"""Enables the usage export feature and sets theusage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py index f3eab97404d4..653c7057eb9f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py @@ -1052,21 +1052,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1222,21 +1233,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1392,21 +1414,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1560,21 +1593,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1727,10 +1771,11 @@ def __call__( Returns: ~.compute.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -1874,10 +1919,11 @@ def __call__( Returns: ~.compute.Project: - Represents a Project resource. A - project is used to organize resources in - a Google Cloud Platform environment. For - more information, read about the + Represents a Project resource. + + A project is used to organize resources + in a Google Cloud Platform environment. + For more information, read about the Resource Hierarchy. """ @@ -2334,21 +2380,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2503,21 +2560,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2676,21 +2744,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2848,21 +2927,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3019,21 +3109,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3191,21 +3292,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3362,21 +3474,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py index 5b50262867ad..781af6ed6117 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py @@ -1803,9 +1803,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1947,9 +1947,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py index 843f3f2d2742..fdb90b26a73f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py @@ -615,21 +615,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -779,21 +790,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1095,21 +1117,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1412,21 +1445,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1581,21 +1625,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py index 73c14c5b6bed..8db50ed3631a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py @@ -729,8 +729,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Lists all PublicDelegatedPrefix resources owned by the specific - project across all scopes. To prevent failure, Google recommends - that you set the ``returnPartialSuccess`` parameter to ``true``. + project across all scopes. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -900,9 +902,9 @@ def sample_announce(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1039,9 +1041,9 @@ def sample_announce(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2040,8 +2042,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method - supports PATCH semantics and uses JSON merge patch - format and processing rules. + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2195,8 +2197,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method - supports PATCH semantics and uses JSON merge patch - format and processing rules. + supportsPATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2412,9 +2414,9 @@ def sample_withdraw(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2551,9 +2553,9 @@ def sample_withdraw(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - public delegated prefix is located. It - should comply with RFC1035. + The name of theregion where + the public delegated prefix is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py index dc610082b45c..98e3bb5f5556 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py @@ -826,21 +826,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -990,21 +1001,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1309,21 +1331,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1626,21 +1659,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1795,21 +1839,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py index 84eaab0dd9af..537123174cd9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py @@ -1077,18 +1077,23 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - [Zonal](/compute/docs/reference/rest/beta/autoscalers) - \* - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) - Use autoscalers to automatically add or delete instances - from a managed instance group according to your defined - autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - [Zonal](/compute/docs/reference/rest/beta/autoscalers) + - [Regional](/compute/docs/reference/rest/beta/regionAutoscalers) + + Use autoscalers to automatically add or delete + instances from a managed instance group according to + your defined autoscaling policy. For more + information, read Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ # Create or coerce a protobuf request object. @@ -1446,8 +1451,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of autoscalers contained within the - specified region. + r"""Retrieves a list of autoscalers contained within + the specified region. .. code-block:: python @@ -1587,9 +1592,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1721,9 +1726,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using - the data included in the request. This method supports - PATCH semantics and uses the JSON merge patch format and - processing rules. + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py index a83e2275a4ab..088ef49f729b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py @@ -608,21 +608,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -773,18 +784,23 @@ def __call__( Returns: ~.compute.Autoscaler: - Represents an Autoscaler resource. Google Compute Engine - has two Autoscaler resources: \* - `Zonal `__ - \* - `Regional `__ + Represents an Autoscaler resource. + + Google Compute Engine has two Autoscaler resources: + + - `Zonal `__ + - `Regional `__ + Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read - Autoscaling Groups of Instances. For zonal managed - instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the - regionAutoscalers resource. + Autoscaling Groups of Instances. + + For zonal managed instance groups resource, use the + autoscaler resource. + + For regional managed instance groups, use + theregionAutoscalers resource. """ @@ -934,21 +950,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1257,21 +1284,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1587,21 +1625,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py new file mode 100644 index 000000000000..2cea388ac68e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionBackendBucketsClient + +__all__ = ("RegionBackendBucketsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py new file mode 100644 index 000000000000..f714b85f215b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/client.py @@ -0,0 +1,2559 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_backend_buckets import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RegionBackendBucketsTransport +from .transports.rest import RegionBackendBucketsRestTransport + + +class RegionBackendBucketsClientMeta(type): + """Metaclass for the RegionBackendBuckets client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionBackendBucketsTransport]] + _transport_registry["rest"] = RegionBackendBucketsRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionBackendBucketsTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionBackendBucketsClient(metaclass=RegionBackendBucketsClientMeta): + """The RegionBackendBuckets API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionBackendBucketsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionBackendBucketsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionBackendBucketsTransport: + """Returns the transport used by the client instance. + + Returns: + RegionBackendBucketsTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = RegionBackendBucketsClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = RegionBackendBucketsClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionBackendBucketsClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionBackendBucketsTransport, + Callable[..., RegionBackendBucketsTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region backend buckets client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionBackendBucketsTransport,Callable[..., RegionBackendBucketsTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionBackendBucketsTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionBackendBucketsClient._read_environment_variables() + self._client_cert_source = RegionBackendBucketsClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + self._universe_domain = RegionBackendBucketsClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RegionBackendBucketsTransport) + if transport_provided: + # transport is a RegionBackendBucketsTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionBackendBucketsTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionBackendBucketsClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionBackendBucketsTransport], + Callable[..., RegionBackendBucketsTransport], + ] = ( + RegionBackendBucketsClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., RegionBackendBucketsTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionBackendBucketsClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "credentialsType": None, + }, + ) + + def delete_unary( + self, + request: Optional[Union[compute.DeleteRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified regional BackendBucket + resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + delete. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionBackendBucketRequest): + request = compute.DeleteRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[Union[compute.DeleteRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified regional BackendBucket + resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + delete. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionBackendBucketRequest): + request = compute.DeleteRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucket: + r"""Returns the specified regional BackendBucket + resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Get. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + return. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.BackendBucket: + Represents a Cloud Storage Bucket + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionBackendBucketRequest): + request = compute.GetRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.GetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyRegionBackendBucketRequest): + request = compute.GetIamPolicyRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[Union[compute.InsertRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a RegionBackendBucket in the specified + project in the given scope using the parameters that are + included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionBackendBucketRequest): + request = compute.InsertRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[Union[compute.InsertRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a RegionBackendBucket in the specified + project in the given scope using the parameters that are + included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionBackendBucketRequest): + request = compute.InsertRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[Union[compute.ListRegionBackendBucketsRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Retrieves the list of BackendBucket resources + available to the specified project in the given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest, dict]): + The request object. A request message for + RegionBackendBuckets.List. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region of this request. + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListPager: + Contains a list of BackendBucket + resources. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionBackendBucketsRequest): + request = compute.ListRegionBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def list_usable( + self, + request: Optional[ + Union[compute.ListUsableRegionBackendBucketsRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListUsablePager: + r"""Retrieves a list of all usable backend buckets in the + specified project in the given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list_usable(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListUsableRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list_usable(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest, dict]): + The request object. A request message for + RegionBackendBuckets.ListUsable. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. It must be a string that meets + the requirements in RFC1035. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListUsablePager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListUsableRegionBackendBucketsRequest): + request = compute.ListUsableRegionBackendBucketsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list_usable] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListUsablePager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[Union[compute.PatchRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified BackendBucket resource with + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + patch. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionBackendBucketRequest): + request = compute.PatchRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[Union[compute.PatchRegionBackendBucketRequest, dict]] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified BackendBucket resource with + the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket (str): + Name of the BackendBucket resource to + patch. + + This corresponds to the ``backend_bucket`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + This corresponds to the ``backend_bucket_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, backend_bucket, backend_bucket_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionBackendBucketRequest): + request = compute.PatchRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if backend_bucket is not None: + request.backend_bucket = backend_bucket + if backend_bucket_resource is not None: + request.backend_bucket_resource = backend_bucket_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("backend_bucket", request.backend_bucket), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_policy_request_resource: Optional[ + compute.RegionSetPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.SetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): + The body resource for this request + This corresponds to the ``region_set_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + resource, + region_set_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyRegionBackendBucketRequest): + request = compute.SetIamPolicyRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if region_set_policy_request_resource is not None: + request.region_set_policy_request_resource = ( + region_set_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionBackendBucketRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendBucketRequest, dict]): + The request object. A request message for + RegionBackendBuckets.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionBackendBucketRequest + ): + request = compute.TestIamPermissionsRegionBackendBucketRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionBackendBucketsClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionBackendBucketsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py new file mode 100644 index 000000000000..ba57b38f423e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/pagers.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketList], + request: compute.ListRegionBackendBucketsRequest, + response: compute.BackendBucketList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.BackendBucket]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListUsablePager: + """A pager for iterating through ``list_usable`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.BackendBucketListUsable` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``ListUsable`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.BackendBucketListUsable` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.BackendBucketListUsable], + request: compute.ListUsableRegionBackendBucketsRequest, + response: compute.BackendBucketListUsable, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.BackendBucketListUsable): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListUsableRegionBackendBucketsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.BackendBucketListUsable]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.BackendBucket]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst new file mode 100644 index 000000000000..a2c52d83d838 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionBackendBucketsTransport` is the ABC for all transports. +- public child `RegionBackendBucketsGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionBackendBucketsGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionBackendBucketsRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionBackendBucketsRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py new file mode 100644 index 000000000000..d7bffabc6226 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionBackendBucketsTransport +from .rest import RegionBackendBucketsRestInterceptor, RegionBackendBucketsRestTransport + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionBackendBucketsTransport]] +_transport_registry["rest"] = RegionBackendBucketsRestTransport + +__all__ = ( + "RegionBackendBucketsTransport", + "RegionBackendBucketsRestTransport", + "RegionBackendBucketsRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py new file mode 100644 index 000000000000..2044874d091e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/base.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionBackendBucketsTransport(abc.ABC): + """Abstract transport class for RegionBackendBuckets.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.list_usable: gapic_v1.method.wrap_method( + self.list_usable, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionBackendBucketRequest], + Union[compute.BackendBucket, Awaitable[compute.BackendBucket]], + ]: + raise NotImplementedError() + + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyRegionBackendBucketRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionBackendBucketsRequest], + Union[compute.BackendBucketList, Awaitable[compute.BackendBucketList]], + ]: + raise NotImplementedError() + + @property + def list_usable( + self, + ) -> Callable[ + [compute.ListUsableRegionBackendBucketsRequest], + Union[ + compute.BackendBucketListUsable, Awaitable[compute.BackendBucketListUsable] + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionBackendBucketRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyRegionBackendBucketRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionBackendBucketRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionBackendBucketsTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py new file mode 100644 index 000000000000..66e511d6d1b4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest.py @@ -0,0 +1,2348 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionBackendBucketsRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionBackendBucketsRestInterceptor: + """Interceptor for RegionBackendBuckets. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionBackendBucketsRestTransport. + + .. code-block:: python + class MyCustomRegionBackendBucketsInterceptor(RegionBackendBucketsRestInterceptor): + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list_usable(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list_usable(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionBackendBucketsRestTransport(interceptor=MyCustomRegionBackendBucketsInterceptor()) + client = RegionBackendBucketsClient(transport=transport) + + + """ + + def pre_delete( + self, + request: compute.DeleteRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionBackendBucketRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_get(self, response: compute.BackendBucket) -> compute.BackendBucket: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.BackendBucket, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.BackendBucket, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionBackendBucketsRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_list( + self, response: compute.BackendBucketList + ) -> compute.BackendBucketList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.BackendBucketList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.BackendBucketList, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_list_usable( + self, + request: compute.ListUsableRegionBackendBucketsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListUsableRegionBackendBucketsRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list_usable + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_list_usable( + self, response: compute.BackendBucketListUsable + ) -> compute.BackendBucketListUsable: + """Post-rpc interceptor for list_usable + + DEPRECATED. Please use the `post_list_usable_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_list_usable` interceptor runs + before the `post_list_usable_with_metadata` interceptor. + """ + return response + + def post_list_usable_with_metadata( + self, + response: compute.BackendBucketListUsable, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.BackendBucketListUsable, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list_usable + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_list_usable_with_metadata` + interceptor in new development instead of the `post_list_usable` interceptor. + When both interceptors are used, this `post_list_usable_with_metadata` interceptor runs after the + `post_list_usable` interceptor. The (possibly modified) response returned by + `post_list_usable` will be passed to + `post_list_usable_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionBackendBucketRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionBackendBucketRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionBackendBucketRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionBackendBuckets server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionBackendBuckets server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionBackendBuckets server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionBackendBucketsRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionBackendBucketsRestInterceptor + + +class RegionBackendBucketsRestTransport(_BaseRegionBackendBucketsRestTransport): + """REST backend synchronous transport for RegionBackendBuckets. + + The RegionBackendBuckets API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionBackendBucketsRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RegionBackendBucketsRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Delete( + _BaseRegionBackendBucketsRestTransport._BaseDelete, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Delete. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionBackendBucketsRestTransport._BaseGet, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucket: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Get. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucket: + Represents a Cloud Storage Bucket + resource. + This Cloud Storage bucket resource is + referenced by a URL map of a load + balancer. For more information, + readBackend Buckets. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucket() + pb_resp = compute.BackendBucket.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucket.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _GetIamPolicy( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.GetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionBackendBucketsRestTransport._BaseInsert, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Insert. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionBackendBucketsRestTransport._BaseList, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionBackendBucketsRequest): + The request object. A request message for + RegionBackendBuckets.List. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketList: + Contains a list of BackendBucket + resources. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = ( + _BaseRegionBackendBucketsRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketList() + pb_resp = compute.BackendBucketList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketList.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _ListUsable( + _BaseRegionBackendBucketsRestTransport._BaseListUsable, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.ListUsable") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListUsableRegionBackendBucketsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.BackendBucketListUsable: + r"""Call the list usable method over HTTP. + + Args: + request (~.compute.ListUsableRegionBackendBucketsRequest): + The request object. A request message for + RegionBackendBuckets.ListUsable. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.BackendBucketListUsable: + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_http_options() + ) + + request, metadata = self._interceptor.pre_list_usable(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.ListUsable", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "ListUsable", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._ListUsable._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.BackendBucketListUsable() + pb_resp = compute.BackendBucketListUsable.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list_usable(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_usable_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.BackendBucketListUsable.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.list_usable", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "ListUsable", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionBackendBucketsRestTransport._BasePatch, RegionBackendBucketsRestStub + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.Patch. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _SetIamPolicy( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.SetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionBackendBucketsRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions, + RegionBackendBucketsRestStub, + ): + def __hash__(self): + return hash("RegionBackendBucketsRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionBackendBucketRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionBackendBucketRequest): + The request object. A request message for + RegionBackendBuckets.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionBackendBucketsClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionBackendBucketsRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionBackendBucketsClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def delete( + self, + ) -> Callable[[compute.DeleteRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[[compute.GetRegionBackendBucketRequest], compute.BackendBucket]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyRegionBackendBucketRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[[compute.ListRegionBackendBucketsRequest], compute.BackendBucketList]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def list_usable( + self, + ) -> Callable[ + [compute.ListUsableRegionBackendBucketsRequest], compute.BackendBucketListUsable + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._ListUsable(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[[compute.PatchRegionBackendBucketRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyRegionBackendBucketRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionBackendBucketRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionBackendBucketsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py new file mode 100644 index 000000000000..dd51bc4429f3 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_buckets/transports/rest_base.py @@ -0,0 +1,547 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionBackendBucketsTransport + + +class _BaseRegionBackendBucketsRestTransport(RegionBackendBucketsTransport): + """Base REST backend transport for RegionBackendBuckets. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets", + "body": "backend_bucket_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseListUsable: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/listUsable", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListUsableRegionBackendBucketsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseListUsable._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}", + "body": "backend_bucket_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", + "body": "region_set_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyRegionBackendBucketRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsRegionBackendBucketRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionBackendBucketsRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionBackendBucketsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py index b68cfd631b1f..5e3c5e5c8b1c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py @@ -1092,21 +1092,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) - \* - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be + either regionally or globally scoped. + + - [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) + - [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) + + For more information, seeBackend Services. """ # Create or coerce a protobuf request object. @@ -1396,28 +1400,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2070,8 +2082,9 @@ def patch_unary( r"""Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This - method supports PATCH semantics and uses the JSON merge - patch format and processing rules. + method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2217,8 +2230,9 @@ def patch( r"""Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This - method supports PATCH semantics and uses the JSON merge - patch format and processing rules. + method + supports PATCH semantics and uses the JSON merge patch + format and processing rules. .. code-block:: python @@ -2460,28 +2474,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2566,8 +2588,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -2725,8 +2747,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified backend service. For more information, see - Google Cloud Armor Overview + specified backend service. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -3063,7 +3085,8 @@ def update_unary( ) -> compute.Operation: r"""Updates the specified regional BackendService resource with the data included in the request. For more - information, see Backend services overview . + information, see + Backend services overview. .. code-block:: python @@ -3210,7 +3233,8 @@ def update( ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional BackendService resource with the data included in the request. For more - information, see Backend services overview . + information, see + Backend services overview. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py index 014f891c7e1a..569a584ecbd1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py @@ -899,21 +899,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1062,21 +1073,25 @@ def __call__( Returns: ~.compute.BackendService: - Represents a Backend Service resource. A backend service - defines how Google Cloud load balancers distribute - traffic. The backend service configuration contains a - set of values, such as the protocol used to connect to - backends, various distribution and session settings, - health checks, and timeouts. These settings provide - fine-grained control over how your load balancer - behaves. Most of the settings have default values that - allow for easy configuration if you need to get started - quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. + Represents a Backend Service resource. + + A backend service defines how Google Cloud load + balancers distribute traffic. The backend service + configuration contains a set of values, such as the + protocol used to connect to backends, various + distribution and session settings, health checks, and + timeouts. These settings provide fine-grained control + over how your load balancer behaves. Most of the + settings have default values that allow for easy + configuration if you need to get started quickly. + + Backend services in Google Compute Engine can be either + regionally or globally scoped. + + - `Global `__ + - `Regional `__ + + For more information, seeBackend Services. """ @@ -1380,26 +1395,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1550,21 +1616,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2017,21 +2094,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2188,26 +2276,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2363,21 +2502,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2694,21 +2844,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py index c55a0d75eaf7..e9808eb6bacb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py @@ -724,8 +724,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of commitments by region. To - prevent failure, Google recommends that you set the + r"""Retrieves an aggregated list of commitments by region. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -909,15 +910,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Commitment: Represents a regional resource-based - commitment resource. Creating this - commitment resource means that you are - purchasing a resource-based committed - use contract, with an explicit start and - end time. You can purchase + commitment resource. + Creating this commitment resource means + that you are purchasing a resource-based + committed use contract, with an explicit + start and end time. You can purchase resource-based commitments for both hardware and software resources. For - more information, read Resource-based - committed use discounts + more information, read + Resource-based committed use discounts """ # Create or coerce a protobuf request object. @@ -1271,8 +1272,8 @@ def list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: - r"""Retrieves a list of commitments contained within the - specified region. + r"""Retrieves a list of commitments contained within + the specified region. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py index b3925cdbfeac..197bf1747e3a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py @@ -762,15 +762,15 @@ def __call__( Returns: ~.compute.Commitment: Represents a regional resource-based - commitment resource. Creating this - commitment resource means that you are - purchasing a resource-based committed - use contract, with an explicit start and - end time. You can purchase + commitment resource. + Creating this commitment resource means + that you are purchasing a resource-based + committed use contract, with an explicit + start and end time. You can purchase resource-based commitments for both hardware and software resources. For - more information, read Resource-based - committed use discounts + more information, read + Resource-based committed use discounts """ @@ -920,21 +920,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1400,21 +1411,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1576,21 +1598,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py new file mode 100644 index 000000000000..badc82228c79 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionCompositeHealthChecksClient + +__all__ = ("RegionCompositeHealthChecksClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py new file mode 100644 index 000000000000..39d80ee36b03 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/client.py @@ -0,0 +1,2254 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_composite_health_checks import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RegionCompositeHealthChecksTransport +from .transports.rest import RegionCompositeHealthChecksRestTransport + + +class RegionCompositeHealthChecksClientMeta(type): + """Metaclass for the RegionCompositeHealthChecks client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionCompositeHealthChecksTransport]] + _transport_registry["rest"] = RegionCompositeHealthChecksRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionCompositeHealthChecksTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionCompositeHealthChecksClient( + metaclass=RegionCompositeHealthChecksClientMeta +): + """The RegionCompositeHealthChecks API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionCompositeHealthChecksClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionCompositeHealthChecksClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionCompositeHealthChecksTransport: + """Returns the transport used by the client instance. + + Returns: + RegionCompositeHealthChecksTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = RegionCompositeHealthChecksClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = RegionCompositeHealthChecksClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionCompositeHealthChecksTransport, + Callable[..., RegionCompositeHealthChecksTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region composite health checks client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionCompositeHealthChecksTransport,Callable[..., RegionCompositeHealthChecksTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionCompositeHealthChecksTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionCompositeHealthChecksClient._read_environment_variables() + self._client_cert_source = ( + RegionCompositeHealthChecksClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = RegionCompositeHealthChecksClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RegionCompositeHealthChecksTransport) + if transport_provided: + # transport is a RegionCompositeHealthChecksTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionCompositeHealthChecksTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionCompositeHealthChecksClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionCompositeHealthChecksTransport], + Callable[..., RegionCompositeHealthChecksTransport], + ] = ( + RegionCompositeHealthChecksClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast( + Callable[..., RegionCompositeHealthChecksTransport], transport + ) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionCompositeHealthChecksClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListRegionCompositeHealthChecksRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all CompositeHealthCheck resources (all + regional) available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionCompositeHealthChecksRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.AggregatedListPager: + Contains a list of + CompositeHealthChecksScopedList. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListRegionCompositeHealthChecksRequest + ): + request = compute.AggregatedListRegionCompositeHealthChecksRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified CompositeHealthCheck in the + given region + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to delete. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionCompositeHealthCheckRequest): + request = compute.DeleteRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified CompositeHealthCheck in the + given region + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to delete. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionCompositeHealthCheckRequest): + request = compute.DeleteRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheck: + r"""Returns the specified CompositeHealthCheck resource + in the given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck + resource to return. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.CompositeHealthCheck: + Represents a composite health check. + + A composite health check resource + specifies the health source resources + and the health destination resource to + which the aggregated health result from + the health source resources is + delivered. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, composite_health_check] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionCompositeHealthCheckRequest): + request = compute.GetRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Create a CompositeHealthCheck in the specified + project in the given region using the parameters that + are included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, composite_health_check_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionCompositeHealthCheckRequest): + request = compute.InsertRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Create a CompositeHealthCheck in the specified + project in the given region using the parameters that + are included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, composite_health_check_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionCompositeHealthCheckRequest): + request = compute.InsertRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListRegionCompositeHealthChecksRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists the CompositeHealthChecks for a project in the + given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionCompositeHealthChecksRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.List. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.ListPager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionCompositeHealthChecksRequest): + request = compute.ListRegionCompositeHealthChecksRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[ + Union[compute.PatchRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified regional CompositeHealthCheck + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck to + update. The name must be 1-63 characters + long, and comply with RFC1035. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + composite_health_check, + composite_health_check_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionCompositeHealthCheckRequest): + request = compute.PatchRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[ + Union[compute.PatchRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + composite_health_check: Optional[str] = None, + composite_health_check_resource: Optional[compute.CompositeHealthCheck] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified regional CompositeHealthCheck + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check (str): + Name of the CompositeHealthCheck to + update. The name must be 1-63 characters + long, and comply with RFC1035. + + This corresponds to the ``composite_health_check`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + This corresponds to the ``composite_health_check_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + composite_health_check, + composite_health_check_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionCompositeHealthCheckRequest): + request = compute.PatchRegionCompositeHealthCheckRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if composite_health_check is not None: + request.composite_health_check = composite_health_check + if composite_health_check_resource is not None: + request.composite_health_check_resource = ( + composite_health_check_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("composite_health_check", request.composite_health_check), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionCompositeHealthCheckRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionCompositeHealthCheckRequest, dict]): + The request object. A request message for + RegionCompositeHealthChecks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionCompositeHealthCheckRequest + ): + request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionCompositeHealthChecksClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionCompositeHealthChecksClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py new file mode 100644 index 000000000000..c712f01450f2 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/pagers.py @@ -0,0 +1,198 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.CompositeHealthCheckAggregatedList], + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + response: compute.CompositeHealthCheckAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.CompositeHealthCheckAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListRegionCompositeHealthChecksRequest( + request + ) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.CompositeHealthCheckAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[Tuple[str, compute.CompositeHealthChecksScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.CompositeHealthChecksScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.CompositeHealthCheckList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.CompositeHealthCheckList], + request: compute.ListRegionCompositeHealthChecksRequest, + response: compute.CompositeHealthCheckList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.CompositeHealthCheckList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionCompositeHealthChecksRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.CompositeHealthCheckList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.CompositeHealthCheck]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst new file mode 100644 index 000000000000..97612e7c69fa --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionCompositeHealthChecksTransport` is the ABC for all transports. +- public child `RegionCompositeHealthChecksGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionCompositeHealthChecksGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionCompositeHealthChecksRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionCompositeHealthChecksRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py new file mode 100644 index 000000000000..3fffc275301e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionCompositeHealthChecksTransport +from .rest import ( + RegionCompositeHealthChecksRestInterceptor, + RegionCompositeHealthChecksRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionCompositeHealthChecksTransport]] +_transport_registry["rest"] = RegionCompositeHealthChecksRestTransport + +__all__ = ( + "RegionCompositeHealthChecksTransport", + "RegionCompositeHealthChecksRestTransport", + "RegionCompositeHealthChecksRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py new file mode 100644 index 000000000000..8d33992fe960 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/base.py @@ -0,0 +1,275 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionCompositeHealthChecksTransport(abc.ABC): + """Abstract transport class for RegionCompositeHealthChecks.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionCompositeHealthChecksRequest], + Union[ + compute.CompositeHealthCheckAggregatedList, + Awaitable[compute.CompositeHealthCheckAggregatedList], + ], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionCompositeHealthCheckRequest], + Union[compute.CompositeHealthCheck, Awaitable[compute.CompositeHealthCheck]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionCompositeHealthChecksRequest], + Union[ + compute.CompositeHealthCheckList, + Awaitable[compute.CompositeHealthCheckList], + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionCompositeHealthCheckRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionCompositeHealthCheckRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionCompositeHealthChecksTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py new file mode 100644 index 000000000000..4100ac193d8b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest.py @@ -0,0 +1,1795 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionCompositeHealthChecksRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionCompositeHealthChecksRestInterceptor: + """Interceptor for RegionCompositeHealthChecks. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionCompositeHealthChecksRestTransport. + + .. code-block:: python + class MyCustomRegionCompositeHealthChecksInterceptor(RegionCompositeHealthChecksRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionCompositeHealthChecksRestTransport(interceptor=MyCustomRegionCompositeHealthChecksInterceptor()) + client = RegionCompositeHealthChecksClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListRegionCompositeHealthChecksRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.CompositeHealthCheckAggregatedList + ) -> compute.CompositeHealthCheckAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.CompositeHealthCheckAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.CompositeHealthCheckAggregatedList, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_get( + self, response: compute.CompositeHealthCheck + ) -> compute.CompositeHealthCheck: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.CompositeHealthCheck, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.CompositeHealthCheck, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionCompositeHealthChecksRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionCompositeHealthChecksRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_list( + self, response: compute.CompositeHealthCheckList + ) -> compute.CompositeHealthCheckList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.CompositeHealthCheckList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.CompositeHealthCheckList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionCompositeHealthChecks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionCompositeHealthChecks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionCompositeHealthChecks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionCompositeHealthChecksRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionCompositeHealthChecksRestInterceptor + + +class RegionCompositeHealthChecksRestTransport( + _BaseRegionCompositeHealthChecksRestTransport +): + """REST backend synchronous transport for RegionCompositeHealthChecks. + + The RegionCompositeHealthChecks API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionCompositeHealthChecksRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RegionCompositeHealthChecksRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListRegionCompositeHealthChecksRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheckAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListRegionCompositeHealthChecksRequest): + The request object. A request message for + RegionCompositeHealthChecks.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheckAggregatedList: + Contains a list of + CompositeHealthChecksScopedList. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionCompositeHealthChecksRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheckAggregatedList() + pb_resp = compute.CompositeHealthCheckAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.CompositeHealthCheckAggregatedList.to_json(response) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Delete. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheck: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheck: + Represents a composite health check. + + A composite health check resource + specifies the health source resources + and the health destination resource to + which the aggregated health result from + the health source resources is + delivered. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheck() + pb_resp = compute.CompositeHealthCheck.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.CompositeHealthCheck.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Insert. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionCompositeHealthChecksRestTransport._BaseList, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionCompositeHealthChecksRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.CompositeHealthCheckList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionCompositeHealthChecksRequest): + The request object. A request message for + RegionCompositeHealthChecks.List. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.CompositeHealthCheckList: + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.CompositeHealthCheckList() + pb_resp = compute.CompositeHealthCheckList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.CompositeHealthCheckList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.Patch. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions, + RegionCompositeHealthChecksRestStub, + ): + def __hash__(self): + return hash("RegionCompositeHealthChecksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionCompositeHealthCheckRequest): + The request object. A request message for + RegionCompositeHealthChecks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionCompositeHealthChecksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionCompositeHealthChecksRequest], + compute.CompositeHealthCheckAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete( + self, + ) -> Callable[[compute.DeleteRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionCompositeHealthCheckRequest], compute.CompositeHealthCheck + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionCompositeHealthChecksRequest], + compute.CompositeHealthCheckList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[[compute.PatchRegionCompositeHealthCheckRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionCompositeHealthCheckRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionCompositeHealthChecksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py new file mode 100644 index 000000000000..fcda0bb6524a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_composite_health_checks/transports/rest_base.py @@ -0,0 +1,449 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionCompositeHealthChecksTransport + + +class _BaseRegionCompositeHealthChecksRestTransport( + RegionCompositeHealthChecksTransport +): + """Base REST backend transport for RegionCompositeHealthChecks. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/compositeHealthChecks", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AggregatedListRegionCompositeHealthChecksRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks", + "body": "composite_health_check_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionCompositeHealthChecksRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}", + "body": "composite_health_check_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionCompositeHealthCheckRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionCompositeHealthChecksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionCompositeHealthChecksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py index 882808e17d5a..7ed5ccb9edb3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py @@ -480,21 +480,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py index d866da6b83ad..1c50d86b9ffb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py @@ -780,17 +780,24 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) - \* [Zonal](/compute/docs/reference/rest/beta/diskTypes) - You can choose from a variety of disk types based on - your needs. For more information, read Storage options. - The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - [Regional](/compute/docs/reference/rest/beta/regionDiskTypes) + - [Zonal](/compute/docs/reference/rest/beta/diskTypes) + + You can choose from a variety of disk types based on + your needs. For more information, readStorage + options. + + The diskTypes resource represents disk types for a + zonal persistent disk. For more information, + readZonal persistent disks. + + The regionDiskTypes resource represents disk types + for a regional persistent disk. For more information, + read Regional persistent disks. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py index c31fbacff674..fc234d722f5c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py @@ -331,18 +331,23 @@ def __call__( Returns: ~.compute.DiskType: - Represents a Disk Type resource. Google Compute Engine - has two Disk Type resources: \* - `Regional `__ - \* - `Zonal `__ + Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + You can choose from a variety of disk types based on - your needs. For more information, read Storage options. + your needs. For more information, readStorage options. + The diskTypes resource represents disk types for a zonal - persistent disk. For more information, read Zonal - persistent disks. The regionDiskTypes resource - represents disk types for a regional persistent disk. - For more information, read Regional persistent disks. + persistent disk. For more information, readZonal + persistent disks. + + The regionDiskTypes resource represents disk types for a + regional persistent disk. For more information, read + Regional persistent disks. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py index c51ad82cf0a2..c2438de46513 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py @@ -1660,8 +1660,8 @@ def delete_unary( r"""Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting - a disk does not delete any snapshots previously made - from the disk. You must separately delete snapshots. + a disk does not delete anysnapshots previously made from + the disk. You must separatelydelete snapshots. .. code-block:: python @@ -1797,8 +1797,8 @@ def delete( r"""Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting - a disk does not delete any snapshots previously made - from the disk. You must separately delete snapshots. + a disk does not delete anysnapshots previously made from + the disk. You must separatelydelete snapshots. .. code-block:: python @@ -2018,18 +2018,26 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - [Zonal](/compute/docs/reference/rest/beta/disks) \* - [Regional](/compute/docs/reference/rest/beta/regionDisks) - Persistent disks are required for running your VM - instances. Create both boot and non-boot (data) - persistent disks. For more information, read Persistent - Disks. For more storage options, read Storage options. - The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - [Zonal](/compute/docs/reference/rest/beta/disks) + - [Regional](/compute/docs/reference/rest/beta/regionDisks) + + Persistent disks are required for running your VM + instances. Create both boot and non-boot (data) + persistent disks. For more information, read + Persistent Disks. For more storage options, read + Storage options. + + The disks resource represents a zonal persistent + disk. For more information, readZonal persistent + disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ # Create or coerce a protobuf request object. @@ -2164,28 +2172,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3390,28 +3406,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -3820,8 +3844,8 @@ def start_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -3973,8 +3997,8 @@ def start_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Starts asynchronous replication. Must be invoked on - the primary disk. + r"""Starts asynchronous replication. + Must be invoked on the primary disk. .. code-block:: python @@ -4148,8 +4172,9 @@ def stop_async_replication_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python @@ -4284,8 +4309,9 @@ def stop_async_replication( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Stops asynchronous replication. Can be invoked either - on the primary or on the secondary disk. + r"""Stops asynchronous replication. + Can be invoked either on the primary or on the secondary + disk. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py index 4bdff65853ea..6f94aaa160dd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py @@ -1156,21 +1156,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1327,21 +1338,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1500,21 +1522,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1666,21 +1699,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1829,18 +1873,24 @@ def __call__( Returns: ~.compute.Disk: - Represents a Persistent Disk resource. Google Compute - Engine has two Disk resources: \* - `Zonal `__ \* - `Regional `__ + Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options. + The disks resource represents a zonal persistent disk. - For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent - disk. For more information, read Regional resources. + For more information, readZonal persistent disks. + + The regionDisks resource represents a regional + persistent disk. For more information, read Regional + resources. """ @@ -1988,26 +2038,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2159,21 +2260,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2474,21 +2586,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2643,21 +2766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2815,26 +2949,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2993,21 +3178,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3166,21 +3362,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3336,21 +3543,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3504,21 +3722,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3829,21 +4058,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py new file mode 100644 index 000000000000..ea97331d9412 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RegionHealthAggregationPoliciesClient + +__all__ = ("RegionHealthAggregationPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py new file mode 100644 index 000000000000..cc3cb988c1de --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/client.py @@ -0,0 +1,2280 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.region_health_aggregation_policies import ( + pagers, +) +from google.cloud.compute_v1beta.types import compute + +from .transports.base import ( + DEFAULT_CLIENT_INFO, + RegionHealthAggregationPoliciesTransport, +) +from .transports.rest import RegionHealthAggregationPoliciesRestTransport + + +class RegionHealthAggregationPoliciesClientMeta(type): + """Metaclass for the RegionHealthAggregationPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[RegionHealthAggregationPoliciesTransport]] + _transport_registry["rest"] = RegionHealthAggregationPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RegionHealthAggregationPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RegionHealthAggregationPoliciesClient( + metaclass=RegionHealthAggregationPoliciesClientMeta +): + """The RegionHealthAggregationPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionHealthAggregationPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RegionHealthAggregationPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RegionHealthAggregationPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + RegionHealthAggregationPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + ) + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + ) + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + RegionHealthAggregationPoliciesTransport, + Callable[..., RegionHealthAggregationPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the region health aggregation policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RegionHealthAggregationPoliciesTransport,Callable[..., RegionHealthAggregationPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RegionHealthAggregationPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RegionHealthAggregationPoliciesClient._read_environment_variables() + self._client_cert_source = ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance( + transport, RegionHealthAggregationPoliciesTransport + ) + if transport_provided: + # transport is a RegionHealthAggregationPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RegionHealthAggregationPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or RegionHealthAggregationPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RegionHealthAggregationPoliciesTransport], + Callable[..., RegionHealthAggregationPoliciesTransport], + ] = ( + RegionHealthAggregationPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast( + Callable[..., RegionHealthAggregationPoliciesTransport], transport + ) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "credentialsType": None, + }, + ) + + def aggregated_list( + self, + request: Optional[ + Union[compute.AggregatedListRegionHealthAggregationPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.AggregatedListPager: + r"""Retrieves the list of all HealthAggregationPolicy resources, + regional and global, available to the specified project. + + To prevent failure, it is recommended that you set the + ``returnPartialSuccess`` parameter to ``true``. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionHealthAggregationPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.AggregatedList. + See the method description for details. + project (str): + Name of the project scoping this + request. + + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.AggregatedListPager: + Contains a list of + HealthAggregationPoliciesScopedList. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AggregatedListRegionHealthAggregationPoliciesRequest + ): + request = compute.AggregatedListRegionHealthAggregationPoliciesRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.aggregated_list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.AggregatedListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes the specified HealthAggregationPolicy in the + given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to delete. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionHealthAggregationPolicyRequest): + request = compute.DeleteRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes the specified HealthAggregationPolicy in the + given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to delete. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRegionHealthAggregationPolicyRequest): + request = compute.DeleteRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[ + Union[compute.GetRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicy: + r"""Returns the specified HealthAggregationPolicy + resource in the given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Get. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + resource to return. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.HealthAggregationPolicy: + Represents a health aggregation + policy. + A health aggregation policy resource + defines a policy to aggregate health. + + For more information, see + Health checks overview. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, health_aggregation_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRegionHealthAggregationPolicyRequest): + request = compute.GetRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Create a HealthAggregationPolicy in the specified + project in the given region using the parameters that + are included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, health_aggregation_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionHealthAggregationPolicyRequest): + request = compute.InsertRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Create a HealthAggregationPolicy in the specified + project in the given region using the parameters that + are included in the request. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region, health_aggregation_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRegionHealthAggregationPolicyRequest): + request = compute.InsertRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListRegionHealthAggregationPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists the HealthAggregationPolicies for a project in + the given region. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionHealthAggregationPoliciesRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.List. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.ListPager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, region] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRegionHealthAggregationPoliciesRequest): + request = compute.ListRegionHealthAggregationPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch_unary( + self, + request: Optional[ + Union[compute.PatchRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Updates the specified regional + HealthAggregationPolicy resource with the data included + in the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + to update. The name must be 1-63 + characters long, and comply with + RFC1035. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + health_aggregation_policy, + health_aggregation_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionHealthAggregationPolicyRequest): + request = compute.PatchRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def patch( + self, + request: Optional[ + Union[compute.PatchRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + health_aggregation_policy: Optional[str] = None, + health_aggregation_policy_resource: Optional[ + compute.HealthAggregationPolicy + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Updates the specified regional + HealthAggregationPolicy resource with the data included + in the request. This method supportsPATCH semantics and + uses theJSON merge + patch format and processing rules. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy + to update. The name must be 1-63 + characters long, and comply with + RFC1035. + + This corresponds to the ``health_aggregation_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + This corresponds to the ``health_aggregation_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + health_aggregation_policy, + health_aggregation_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.PatchRegionHealthAggregationPolicyRequest): + request = compute.PatchRegionHealthAggregationPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if health_aggregation_policy is not None: + request.health_aggregation_policy = health_aggregation_policy + if health_aggregation_policy_resource is not None: + request.health_aggregation_policy_resource = ( + health_aggregation_policy_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.patch] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("health_aggregation_policy", request.health_aggregation_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthAggregationPolicyRequest, dict]): + The request object. A request message for + RegionHealthAggregationPolicies.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + The name of the region for this + request. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsRegionHealthAggregationPolicyRequest + ): + request = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest( + request + ) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RegionHealthAggregationPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RegionHealthAggregationPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py new file mode 100644 index 000000000000..55862d8b7170 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/pagers.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class AggregatedListPager: + """A pager for iterating through ``aggregated_list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``AggregatedList`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.HealthAggregationPolicyAggregatedList], + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + response: compute.HealthAggregationPolicyAggregatedList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.HealthAggregationPolicyAggregatedList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.AggregatedListRegionHealthAggregationPoliciesRequest( + request + ) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.HealthAggregationPolicyAggregatedList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__( + self, + ) -> Iterator[Tuple[str, compute.HealthAggregationPoliciesScopedList]]: + for page in self.pages: + yield from page.items.items() + + def get(self, key: str) -> Optional[compute.HealthAggregationPoliciesScopedList]: + return self._response.items.get(key) + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.HealthAggregationPolicyList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.HealthAggregationPolicyList], + request: compute.ListRegionHealthAggregationPoliciesRequest, + response: compute.HealthAggregationPolicyList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.HealthAggregationPolicyList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRegionHealthAggregationPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.HealthAggregationPolicyList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.HealthAggregationPolicy]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst new file mode 100644 index 000000000000..09c62d1c2230 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RegionHealthAggregationPoliciesTransport` is the ABC for all transports. +- public child `RegionHealthAggregationPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RegionHealthAggregationPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRegionHealthAggregationPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RegionHealthAggregationPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py new file mode 100644 index 000000000000..278ca78ce726 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RegionHealthAggregationPoliciesTransport +from .rest import ( + RegionHealthAggregationPoliciesRestInterceptor, + RegionHealthAggregationPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[RegionHealthAggregationPoliciesTransport]] +_transport_registry["rest"] = RegionHealthAggregationPoliciesRestTransport + +__all__ = ( + "RegionHealthAggregationPoliciesTransport", + "RegionHealthAggregationPoliciesRestTransport", + "RegionHealthAggregationPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py new file mode 100644 index 000000000000..608139124067 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/base.py @@ -0,0 +1,277 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import region_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionHealthAggregationPoliciesTransport(abc.ABC): + """Abstract transport class for RegionHealthAggregationPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.aggregated_list: gapic_v1.method.wrap_method( + self.aggregated_list, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.patch: gapic_v1.method.wrap_method( + self.patch, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionHealthAggregationPoliciesRequest], + Union[ + compute.HealthAggregationPolicyAggregatedList, + Awaitable[compute.HealthAggregationPolicyAggregatedList], + ], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionHealthAggregationPolicyRequest], + Union[ + compute.HealthAggregationPolicy, Awaitable[compute.HealthAggregationPolicy] + ], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionHealthAggregationPoliciesRequest], + Union[ + compute.HealthAggregationPolicyList, + Awaitable[compute.HealthAggregationPolicyList], + ], + ]: + raise NotImplementedError() + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionHealthAggregationPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionHealthAggregationPolicyRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _region_operations_client(self) -> region_operations.RegionOperationsClient: + ex_op_service = self._extended_operations_services.get("region_operations") + if not ex_op_service: + ex_op_service = region_operations.RegionOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["region_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RegionHealthAggregationPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py new file mode 100644 index 000000000000..652d0fba9b71 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest.py @@ -0,0 +1,1811 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRegionHealthAggregationPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RegionHealthAggregationPoliciesRestInterceptor: + """Interceptor for RegionHealthAggregationPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RegionHealthAggregationPoliciesRestTransport. + + .. code-block:: python + class MyCustomRegionHealthAggregationPoliciesInterceptor(RegionHealthAggregationPoliciesRestInterceptor): + def pre_aggregated_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_aggregated_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_patch(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_patch(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RegionHealthAggregationPoliciesRestTransport(interceptor=MyCustomRegionHealthAggregationPoliciesInterceptor()) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + + """ + + def pre_aggregated_list( + self, + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AggregatedListRegionHealthAggregationPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for aggregated_list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_aggregated_list( + self, response: compute.HealthAggregationPolicyAggregatedList + ) -> compute.HealthAggregationPolicyAggregatedList: + """Post-rpc interceptor for aggregated_list + + DEPRECATED. Please use the `post_aggregated_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_aggregated_list` interceptor runs + before the `post_aggregated_list_with_metadata` interceptor. + """ + return response + + def post_aggregated_list_with_metadata( + self, + response: compute.HealthAggregationPolicyAggregatedList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicyAggregatedList, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Post-rpc interceptor for aggregated_list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_aggregated_list_with_metadata` + interceptor in new development instead of the `post_aggregated_list` interceptor. + When both interceptors are used, this `post_aggregated_list_with_metadata` interceptor runs after the + `post_aggregated_list` interceptor. The (possibly modified) response returned by + `post_aggregated_list` will be passed to + `post_aggregated_list_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.HealthAggregationPolicy + ) -> compute.HealthAggregationPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.HealthAggregationPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicy, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRegionHealthAggregationPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRegionHealthAggregationPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_list( + self, response: compute.HealthAggregationPolicyList + ) -> compute.HealthAggregationPolicyList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.HealthAggregationPolicyList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.HealthAggregationPolicyList, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_patch( + self, + request: compute.PatchRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.PatchRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for patch + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_patch(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for patch + + DEPRECATED. Please use the `post_patch_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_patch` interceptor runs + before the `post_patch_with_metadata` interceptor. + """ + return response + + def post_patch_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for patch + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_patch_with_metadata` + interceptor in new development instead of the `post_patch` interceptor. + When both interceptors are used, this `post_patch_with_metadata` interceptor runs after the + `post_patch` interceptor. The (possibly modified) response returned by + `post_patch` will be passed to + `post_patch_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionHealthAggregationPolicies server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionHealthAggregationPolicies server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionHealthAggregationPolicies server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RegionHealthAggregationPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RegionHealthAggregationPoliciesRestInterceptor + + +class RegionHealthAggregationPoliciesRestTransport( + _BaseRegionHealthAggregationPoliciesRestTransport +): + """REST backend synchronous transport for RegionHealthAggregationPolicies. + + The RegionHealthAggregationPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RegionHealthAggregationPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = ( + interceptor or RegionHealthAggregationPoliciesRestInterceptor() + ) + self._prep_wrapped_messages(client_info) + + class _AggregatedList( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.AggregatedList") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.AggregatedListRegionHealthAggregationPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicyAggregatedList: + r"""Call the aggregated list method over HTTP. + + Args: + request (~.compute.AggregatedListRegionHealthAggregationPoliciesRequest): + The request object. A request message for + RegionHealthAggregationPolicies.AggregatedList. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicyAggregatedList: + Contains a list of + HealthAggregationPoliciesScopedList. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_http_options() + ) + + request, metadata = self._interceptor.pre_aggregated_list(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.AggregatedList", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "AggregatedList", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._AggregatedList._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicyAggregatedList() + pb_resp = compute.HealthAggregationPolicyAggregatedList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_aggregated_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_aggregated_list_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = ( + compute.HealthAggregationPolicyAggregatedList.to_json(response) + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.aggregated_list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "AggregatedList", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Delete. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Get. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicy: + Represents a health aggregation + policy. + A health aggregation policy resource + defines a policy to aggregate health. + + For more information, see + Health checks overview. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicy() + pb_resp = compute.HealthAggregationPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.HealthAggregationPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Insert. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRegionHealthAggregationPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.HealthAggregationPolicyList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRegionHealthAggregationPoliciesRequest): + The request object. A request message for + RegionHealthAggregationPolicies.List. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.HealthAggregationPolicyList: + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.HealthAggregationPolicyList() + pb_resp = compute.HealthAggregationPolicyList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.HealthAggregationPolicyList.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Patch( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash("RegionHealthAggregationPoliciesRestTransport.Patch") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.PatchRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the patch method over HTTP. + + Args: + request (~.compute.PatchRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.Patch. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_http_options() + ) + + request, metadata = self._interceptor.pre_patch(request, metadata) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.Patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Patch", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionHealthAggregationPoliciesRestTransport._Patch._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_patch(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_patch_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.patch", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "Patch", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions, + RegionHealthAggregationPoliciesRestStub, + ): + def __hash__(self): + return hash( + "RegionHealthAggregationPoliciesRestTransport.TestIamPermissions" + ) + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsRegionHealthAggregationPolicyRequest): + The request object. A request message for + RegionHealthAggregationPolicies.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RegionHealthAggregationPoliciesRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def aggregated_list( + self, + ) -> Callable[ + [compute.AggregatedListRegionHealthAggregationPoliciesRequest], + compute.HealthAggregationPolicyAggregatedList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AggregatedList(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[ + [compute.GetRegionHealthAggregationPolicyRequest], + compute.HealthAggregationPolicy, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListRegionHealthAggregationPoliciesRequest], + compute.HealthAggregationPolicyList, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def patch( + self, + ) -> Callable[ + [compute.PatchRegionHealthAggregationPolicyRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Patch(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsRegionHealthAggregationPolicyRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RegionHealthAggregationPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py new file mode 100644 index 000000000000..5a5155b99d2f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_aggregation_policies/transports/rest_base.py @@ -0,0 +1,451 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RegionHealthAggregationPoliciesTransport + + +class _BaseRegionHealthAggregationPoliciesRestTransport( + RegionHealthAggregationPoliciesTransport +): + """Base REST backend transport for RegionHealthAggregationPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseAggregatedList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/aggregated/healthAggregationPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.AggregatedListRegionHealthAggregationPoliciesRequest.pb(request) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseAggregatedList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies", + "body": "health_aggregation_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRegionHealthAggregationPoliciesRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BasePatch: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}", + "body": "health_aggregation_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.PatchRegionHealthAggregationPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BasePatch._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = ( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.pb( + request + ) + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionHealthAggregationPoliciesRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRegionHealthAggregationPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py index bc2db8306935..2566ce08ad43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py @@ -1607,8 +1607,8 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified regional HealthCheckService - resource with the data included in the request. This - method supports PATCH semantics and uses the JSON merge + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1761,8 +1761,8 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional HealthCheckService - resource with the data included in the request. This - method supports PATCH semantics and uses the JSON merge + resource with the data included in the request. This + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py index 0976512c912f..ab380925a2d3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py @@ -566,21 +566,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -878,21 +889,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1193,21 +1215,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py index d04891fdc924..f83df433feba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py @@ -1083,23 +1083,33 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) - \* - [Global](/compute/docs/reference/rest/beta/healthChecks) - These health check resources can be used for load - balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding - backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - [Regional](/compute/docs/reference/rest/beta/regionHealthChecks) + - [Global](/compute/docs/reference/rest/beta/healthChecks) + + These health check resources can be used for load + balancing and for autohealing VMs in a managed + instance group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type + of load balancer. For details about the type of + health check supported for each load balancer and + corresponding backend type, see Health checks + overview: Load balancer guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in + a MIG can be either regional or global. For more + information, see Set up an application health check + and autohealing. + + For more information, seeHealth checks overview. """ # Create or coerce a protobuf request object. @@ -1600,7 +1610,7 @@ def patch_unary( ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python @@ -1746,7 +1756,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified project using the data included in the request. This - method supports PATCH semantics and uses the JSON merge + method supportsPATCH semantics and uses theJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py index 09f14c2d6493..11d7e7d06e09 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py @@ -606,21 +606,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -771,23 +782,33 @@ def __call__( Returns: ~.compute.HealthCheck: - Represents a health check resource. Google Compute - Engine has two health check resources: \* - `Regional `__ - \* - `Global `__ + Represents a health check resource. + + Google Compute Engine has two health check resources: + + - `Regional `__ + - `Global `__ + These health check resources can be used for load balancing and for autohealing VMs in a managed instance - group (MIG). **Load balancing** Health check - requirements vary depending on the type of load - balancer. For details about the type of health check - supported for each load balancer and corresponding + group (MIG). + + **Load balancing** + + Health check requirements vary depending on the type of + load balancer. For details about the type of health + check supported for each load balancer and corresponding backend type, see Health checks overview: Load balancer - guide. **Autohealing in MIGs** The health checks that - you use for autohealing VMs in a MIG can be either - regional or global. For more information, see Set up an - application health check and autohealing. For more - information, see Health checks overview. + guide. + + **Autohealing in MIGs** + + The health checks that you use for autohealing VMs in a + MIG can be either regional or global. For more + information, see Set up an application health check and + autohealing. + + For more information, seeHealth checks overview. """ @@ -937,21 +958,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1260,21 +1292,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1592,21 +1635,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py index 429a43088f90..7a8becd1799c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/client.py @@ -725,9 +725,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all HealthSource resources (all regional) - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1215,12 +1216,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.HealthSource: - Represents a health source. A health - source resource specifies the source - resources and the health aggregation - policy applied to the source resources - to determine the aggregated health - status. + Represents a health source. + + A health source resource specifies the + source resources and the health + aggregation policy applied to the source + resources to determine the aggregated + health status. """ # Create or coerce a protobuf request object. @@ -1720,9 +1722,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified regional HealthSource resource - with the data included in the request. This method - supports PATCH semantics and uses the JSON merge patch - format and processing rules. + with the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -1867,9 +1869,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional HealthSource resource - with the data included in the request. This method - supports PATCH semantics and uses the JSON merge patch - format and processing rules. + with the data included in the request. This method + supportsPATCH semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py index 267369c2aecc..d28f2fe3ea18 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_sources/transports/rest.py @@ -762,21 +762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -925,12 +936,13 @@ def __call__( Returns: ~.compute.HealthSource: - Represents a health source. A health - source resource specifies the source - resources and the health aggregation - policy applied to the source resources - to determine the aggregated health - status. + Represents a health source. + + A health source resource specifies the + source resources and the health + aggregation policy applied to the source + resources to determine the aggregated + health status. """ @@ -1080,21 +1092,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1397,21 +1420,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py index 9f314f2bb88d..eac833404d8a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py @@ -757,10 +757,10 @@ def cancel_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Cancels the specified resize request. Cancelled - resize request no longer waits for the resources to be - provisioned. Cancel is only possible for requests that - are in accepted state. + r"""Cancels the specified resize request. + Cancelled resize request no longer waits for the + resources to be provisioned. Cancel is only possible for + requests that are in accepted state. .. code-block:: python @@ -802,8 +802,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -915,10 +916,10 @@ def cancel( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Cancels the specified resize request. Cancelled - resize request no longer waits for the resources to be - provisioned. Cancel is only possible for requests that - are in accepted state. + r"""Cancels the specified resize request. + Cancelled resize request no longer waits for the + resources to be provisioned. Cancel is only possible for + requests that are in accepted state. .. code-block:: python @@ -960,8 +961,9 @@ def sample_cancel(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1143,8 +1145,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1301,8 +1304,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1482,8 +1486,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region scoping this - request. Name should conform to RFC1035. + The name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1497,8 +1502,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. resize_request (str): - The name of the resize request. Name - should conform to RFC1035 or be a + The name of the resize request. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``resize_request`` field @@ -1643,8 +1648,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1804,8 +1810,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1988,8 +1995,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - Name of the region scoping this - request. Name should conform to RFC1035. + Name of the region + scoping this request. Name should + conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py index 95ee9db44e2b..f42a7db11e1f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py @@ -515,21 +515,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -679,21 +690,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -999,21 +1021,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py index 6a196ffc2d82..39c26af0e1a3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py @@ -742,17 +742,21 @@ def abandon_instances_unary( instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method - reduces the targetSize of the managed instance group by + reduces thetargetSize of the managed instance group by the number of instances that you abandon. This operation - is marked as DONE when the action is scheduled even if + is marked asDONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning - action with the listmanagedinstances method. If the - group is part of a backend service that has enabled + action with thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the - VM instance is removed or deleted. You can specify a - maximum of 1000 instances with this method per request. + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -914,17 +918,21 @@ def abandon_instances( instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method - reduces the targetSize of the managed instance group by + reduces thetargetSize of the managed instance group by the number of instances that you abandon. This operation - is marked as DONE when the action is scheduled even if + is marked asDONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning - action with the listmanagedinstances method. If the - group is part of a backend service that has enabled + action with thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the - VM instance is removed or deleted. You can specify a - maximum of 1000 instances with this method per request. + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -1090,6 +1098,371 @@ def error_code(self): # Done; return the response. return response + def adopt_instances_unary( + self, + request: Optional[ + Union[compute.AdoptInstancesRegionInstanceGroupManagerRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_adopt_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersAdoptInstancesRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Flags the specified instances to be adopted to the + managed instance group. Adopting an instance does not + change the instance status, but it adds the instance to + any target pools that are applied by the managed + instance group. This method increases the targetSize of + the managed instance group by the number of instances + that you adopt. This operation is marked as DONE when + the action is scheduled even if the instances have not + been adopted to the group yet. You must separately + verify the status of the adopting action with the + listManagedInstances method. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_adopt_instances(): + # Create a client + client = compute_v1beta.RegionInstanceGroupManagersClient() + + # Initialize request argument(s) + request = compute_v1beta.AdoptInstancesRegionInstanceGroupManagerRequest( + instance_group_manager="instance_group_manager_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.adopt_instances(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AdoptInstancesRegionInstanceGroupManagerRequest, dict]): + The request object. A request message for + RegionInstanceGroupManagers.AdoptInstances. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. It should conform to RFC1035. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + instance_group_manager (str): + Name of the managed instance group. + It should conform to RFC1035 or be a + resource ID. + + This corresponds to the ``instance_group_manager`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region_instance_group_managers_adopt_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAdoptInstancesRequest): + The body resource for this request + This corresponds to the ``region_instance_group_managers_adopt_instances_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + instance_group_manager, + region_instance_group_managers_adopt_instances_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AdoptInstancesRegionInstanceGroupManagerRequest + ): + request = compute.AdoptInstancesRegionInstanceGroupManagerRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if instance_group_manager is not None: + request.instance_group_manager = instance_group_manager + if ( + region_instance_group_managers_adopt_instances_request_resource + is not None + ): + request.region_instance_group_managers_adopt_instances_request_resource = ( + region_instance_group_managers_adopt_instances_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.adopt_instances] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("instance_group_manager", request.instance_group_manager), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def adopt_instances( + self, + request: Optional[ + Union[compute.AdoptInstancesRegionInstanceGroupManagerRequest, dict] + ] = None, + *, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_adopt_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersAdoptInstancesRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Flags the specified instances to be adopted to the + managed instance group. Adopting an instance does not + change the instance status, but it adds the instance to + any target pools that are applied by the managed + instance group. This method increases the targetSize of + the managed instance group by the number of instances + that you adopt. This operation is marked as DONE when + the action is scheduled even if the instances have not + been adopted to the group yet. You must separately + verify the status of the adopting action with the + listManagedInstances method. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_adopt_instances(): + # Create a client + client = compute_v1beta.RegionInstanceGroupManagersClient() + + # Initialize request argument(s) + request = compute_v1beta.AdoptInstancesRegionInstanceGroupManagerRequest( + instance_group_manager="instance_group_manager_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.adopt_instances(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.AdoptInstancesRegionInstanceGroupManagerRequest, dict]): + The request object. A request message for + RegionInstanceGroupManagers.AdoptInstances. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region (str): + Name of the region scoping this + request. It should conform to RFC1035. + + This corresponds to the ``region`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + instance_group_manager (str): + Name of the managed instance group. + It should conform to RFC1035 or be a + resource ID. + + This corresponds to the ``instance_group_manager`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + region_instance_group_managers_adopt_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAdoptInstancesRequest): + The body resource for this request + This corresponds to the ``region_instance_group_managers_adopt_instances_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + region, + instance_group_manager, + region_instance_group_managers_adopt_instances_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.AdoptInstancesRegionInstanceGroupManagerRequest + ): + request = compute.AdoptInstancesRegionInstanceGroupManagerRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if region is not None: + request.region = region + if instance_group_manager is not None: + request.instance_group_manager = instance_group_manager + if ( + region_instance_group_managers_adopt_instances_request_resource + is not None + ): + request.region_instance_group_managers_adopt_instances_request_resource = ( + region_instance_group_managers_adopt_instances_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.adopt_instances] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("region", request.region), + ("instance_group_manager", request.instance_group_manager), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._region_operations_client + operation_request = compute.GetRegionOperationRequest() + operation_request.project = request.project + operation_request.region = request.region + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + def apply_updates_to_instances_unary( self, request: Optional[ @@ -1469,7 +1842,7 @@ def create_instances_unary( instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the creating or actions with the + the status of thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1511,9 +1884,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - managed instance group is located. It - should conform to RFC1035. + The name of theregion + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1636,7 +2009,7 @@ def create_instances( instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the creating or actions with the + the status of thecreating or actions with the listmanagedinstances method. .. code-block:: python @@ -1678,9 +2051,9 @@ def sample_create_instances(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - managed instance group is located. It - should conform to RFC1035. + The name of theregion + where the managed instance group is + located. It should conform to RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2126,18 +2499,23 @@ def delete_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. The deleteInstances operation is marked DONE - if the deleteInstances request is successful. The + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. + The deleteInstances operation is marked DONE if + the deleteInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the deleting action with - the listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. You can specify a maximum of 1000 - instances with this method per request. + separately verify the status of thedeleting action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -2297,18 +2675,23 @@ def delete_instances( r"""Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a - member. This method reduces the targetSize of the - managed instance group by the number of instances that - you delete. The deleteInstances operation is marked DONE - if the deleteInstances request is successful. The + member. This method reduces thetargetSize of the managed + instance group by the number of instances that you + delete. + The deleteInstances operation is marked DONE if + the deleteInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the deleting action with - the listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. You can specify a maximum of 1000 - instances with this method per request. + separately verify the status of thedeleting action with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -2910,14 +3293,17 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ # Create or coerce a protobuf request object. @@ -2992,12 +3378,14 @@ def insert_unary( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - regional managed instance group can contain up to 2000 + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A regional managed instance group can contain up to 2000 instances. .. code-block:: python @@ -3136,12 +3524,14 @@ def insert( r"""Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created - using the specified instance template. This operation is - marked as DONE when the group is created even if the - instances in the group have not yet been created. You - must separately verify the status of the individual - instances with the listmanagedinstances method. A - regional managed instance group can contain up to 2000 + using the specified instance template. + This operation is marked as DONE when the group is + created even if the instances in the group have not yet + been created. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + A regional managed instance group can contain up to 2000 instances. .. code-block:: python @@ -3444,8 +3834,8 @@ def list_errors( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListErrorsPager: r"""Lists all errors thrown by actions on instances for a - given regional managed instance group. The filter and - orderBy query parameters are not supported. + given regional managed instance group. The filter + andorderBy query parameters are not supported. .. code-block:: python @@ -3920,19 +4310,22 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listmanagedinstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with the + listmanagedinstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4085,19 +4478,22 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is patched - even if the instances in the group are still in the - process of being patched. You must separately verify the - status of the individual instances with the - listmanagedinstances method. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. If you update your group to specify a - new template or instance configuration, it's possible - that your intended specification for each VM in the - group is different from the current state of that VM. To - learn how to apply an updated configuration to the VMs - in a MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + patched even if the instances in the group are still in + the process of being patched. You must separately verify + the status of the individual instances with the + listmanagedinstances + method. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -4643,12 +5039,16 @@ def recreate_instances_unary( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -4812,12 +5212,16 @@ def recreate_instances( configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each - instance by checking its currentAction field; for more + instance by checking itscurrentAction field; for more information, see Checking the status of managed - instances. If the group is part of a backend service - that has enabled connection draining, it can take up to - 60 seconds after the connection draining duration has - elapsed before the VM instance is removed or deleted. + instances. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. + You can specify a maximum of 1000 instances with this method per request. @@ -5002,15 +5406,19 @@ def resize_unary( group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5160,15 +5568,19 @@ def resize( group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the - listmanagedinstances method. If the group is part of a - backend service that has enabled connection draining, it - can take up to 60 seconds after the connection draining - duration has elapsed before the VM instance is removed - or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with + thelistmanagedinstances method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5343,19 +5755,26 @@ def resize_advanced_unary( ) -> compute.Operation: r"""Resizes the regional managed instance group with advanced configuration options like disabling creation - retries. This is an extended version of the resize - method. If you increase the size, the group creates new + retries. This is an extended version of theresize + method. + + If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5518,19 +5937,26 @@ def resize_advanced( ) -> extended_operation.ExtendedOperation: r"""Resizes the regional managed instance group with advanced configuration options like disabling creation - retries. This is an extended version of the resize - method. If you increase the size, the group creates new + retries. This is an extended version of theresize + method. + + If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more - instances. The resize operation is marked DONE if the - resize request is successful. The underlying actions - take additional time. You must separately verify the - status of the creating or deleting actions with the get - or listmanagedinstances method. If the group is part of - a backend service that has enabled connection draining, - it can take up to 60 seconds after the connection - draining duration has elapsed before the VM instance is - removed or deleted. + instances. + + The resize operation is marked DONE if theresize request + is successful. The underlying actions take additional + time. You must separately verify the status of + thecreating or deleting actions with the get + orlistmanagedinstances + method. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is removed or deleted. .. code-block:: python @@ -5717,22 +6143,26 @@ def resume_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -5890,22 +6320,26 @@ def resume_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be resumed. This method increases the - targetSize and decreases the targetSuspendedSize of the - managed instance group by the number of instances that - you resume. The resumeInstances operation is marked DONE - if the resumeInstances request is successful. The + group to be resumed. This method increases thetargetSize + and decreases the targetSuspendedSize of the managed + instance group by the number of instances that you + resume. The resumeInstances operation is marked DONE if + the resumeInstances request is successful. The underlying actions take additional time. You must - separately verify the status of the RESUMING action with - the listmanagedinstances method. In this request, you - can only specify instances that are suspended. For - example, if an instance was previously suspended using - the suspendInstances method, it can be resumed using the - resumeInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are resumed. You can - specify a maximum of 1000 instances with this method per - request. + separately verify the status of theRESUMING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + suspended. For example, if an instance was previously + suspended using the suspendInstances method, it can be + resumed using the resumeInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are resumed. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -6089,7 +6523,7 @@ def set_auto_healing_policies_unary( ) -> compute.Operation: r"""Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use regionInstanceGroupManagers.patch instead. + UseregionInstanceGroupManagers.patch instead. .. code-block:: python @@ -6252,7 +6686,7 @@ def set_auto_healing_policies( ) -> extended_operation.ExtendedOperation: r"""Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. - Use regionInstanceGroupManagers.patch instead. + UseregionInstanceGroupManagers.patch instead. .. code-block:: python @@ -7127,22 +7561,26 @@ def start_instances_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7300,22 +7738,26 @@ def start_instances( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance - group to be started. This method increases the - targetSize and decreases the targetStoppedSize of the - managed instance group by the number of instances that - you start. The startInstances operation is marked DONE - if the startInstances request is successful. The - underlying actions take additional time. You must - separately verify the status of the STARTING action with - the listmanagedinstances method. In this request, you - can only specify instances that are stopped. For - example, if an instance was previously stopped using the - stopInstances method, it can be started using the - startInstances method. If a health check is attached to - the managed instance group, the specified instances will - be verified as healthy after they are started. You can - specify a maximum of 1000 instances with this method per - request. + group to be started. This method increases thetargetSize + and decreases the targetStoppedSize of the managed + instance group by the number of instances that you + start. The startInstances operation is marked DONE if + the startInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTARTING action with + thelistmanagedinstances method. + + In this request, you can only specify instances that are + stopped. For example, if an instance was previously + stopped using the stopInstances method, it can be + started using the startInstances method. + + If a health check is attached to the managed instance + group, the specified instances will be verified as + healthy after they are started. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7500,27 +7942,36 @@ def stop_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7682,27 +8133,36 @@ def stop_instances( r"""Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances - operation is marked DONE if the stopInstances request is - successful. The underlying actions take additional time. - You must separately verify the status of the STOPPING - action with the listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays stopping the instances until initialDelaySec have - passed from instance.creationTimestamp (that is, when - the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is stopped. Stopped instances can be started - using the startInstances method. You can specify a - maximum of 1000 instances with this method per request. + operation is marked DONE if + the stopInstances request is successful. The underlying + actions take additional time. You must separately verify + the status of theSTOPPING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays stopping the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is stopped. + + Stopped instances can be started using the + startInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -7889,29 +8349,36 @@ def suspend_instances_unary( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8071,29 +8538,36 @@ def suspend_instances( r"""Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method - reduces the targetSize and increases the + reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify - the status of the SUSPENDING action with the - listmanagedinstances method. If the - standbyPolicy.initialDelaySec field is set, the group - delays suspension of the instances until initialDelaySec - have passed from instance.creationTimestamp (that is, - when the instance was created). This delay gives your - application time to set itself up and initialize on the - instance. If more than initialDelaySec seconds have - passed since instance.creationTimestamp when this method - is called, there will be zero delay. If the group is - part of a backend service that has enabled connection - draining, it can take up to 60 seconds after the - connection draining duration has elapsed before the VM - instance is suspended. Suspended instances can be - resumed using the resumeInstances method. You can - specify a maximum of 1000 instances with this method per - request. + the status of theSUSPENDING action with + thelistmanagedinstances method. + + If the standbyPolicy.initialDelaySec field is set, the + group delays suspension of the instances until + initialDelaySec have passed from + instance.creationTimestamp (that is, when the instance + was created). This delay gives your application time to + set itself up and initialize on the instance. If more + thaninitialDelaySec seconds have passed + sinceinstance.creationTimestamp when this method is + called, there will be zero delay. + + If the group is part of a backend + service that has enabled + connection draining, it can take up to 60 seconds after + the connection draining duration has elapsed before the + VM instance is suspended. + + Suspended instances can be resumed using the + resumeInstances method. + + You can specify a maximum of 1000 instances with this + method per request. .. code-block:: python @@ -8431,17 +8905,19 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listmanagedinstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python @@ -8594,17 +9070,19 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the - information that you specify in the request. This - operation is marked as DONE when the group is updated - even if the instances in the group have not yet been - updated. You must separately verify the status of the - individual instances with the listmanagedinstances - method. If you update your group to specify a new - template or instance configuration, it's possible that - your intended specification for each VM in the group is - different from the current state of that VM. To learn - how to apply an updated configuration to the VMs in a - MIG, see Updating instances in a MIG. + information that you specify in the request. + This operation is marked as DONE when the group is + updated even if the instances in the group have not yet + been updated. You must separately verify the status of + the individual instances with thelistmanagedinstances + method. + + If you update your group to specify a new template or + instance configuration, it's possible that your intended + specification for each VM in the group is different from + the current state of that VM. To learn how to apply an + updated configuration to the VMs in a MIG, seeUpdating + instances in a MIG. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/base.py index 359d4f3ecf50..506ee1b62114 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.adopt_instances: gapic_v1.method.wrap_method( + self.adopt_instances, + default_timeout=None, + client_info=client_info, + ), self.apply_updates_to_instances: gapic_v1.method.wrap_method( self.apply_updates_to_instances, default_timeout=None, @@ -293,6 +298,15 @@ def abandon_instances( ]: raise NotImplementedError() + @property + def adopt_instances( + self, + ) -> Callable[ + [compute.AdoptInstancesRegionInstanceGroupManagerRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + @property def apply_updates_to_instances( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py index f117aad7da01..cd1bdc8eaac0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py @@ -80,6 +80,14 @@ def post_abandon_instances(self, response): logging.log(f"Received response: {response}") return response + def pre_adopt_instances(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_adopt_instances(self, response): + logging.log(f"Received response: {response}") + return response + def pre_apply_updates_to_instances(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -341,6 +349,53 @@ def post_abandon_instances_with_metadata( """ return response, metadata + def pre_adopt_instances( + self, + request: compute.AdoptInstancesRegionInstanceGroupManagerRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.AdoptInstancesRegionInstanceGroupManagerRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for adopt_instances + + Override in a subclass to manipulate the request or metadata + before they are sent to the RegionInstanceGroupManagers server. + """ + return request, metadata + + def post_adopt_instances(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for adopt_instances + + DEPRECATED. Please use the `post_adopt_instances_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RegionInstanceGroupManagers server but before + it is returned to user code. This `post_adopt_instances` interceptor runs + before the `post_adopt_instances_with_metadata` interceptor. + """ + return response + + def post_adopt_instances_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for adopt_instances + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RegionInstanceGroupManagers server but before it is returned to user code. + + We recommend only using this `post_adopt_instances_with_metadata` + interceptor in new development instead of the `post_adopt_instances` interceptor. + When both interceptors are used, this `post_adopt_instances_with_metadata` interceptor runs after the + `post_adopt_instances` interceptor. The (possibly modified) response returned by + `post_adopt_instances` will be passed to + `post_adopt_instances_with_metadata`. + """ + return response, metadata + def pre_apply_updates_to_instances( self, request: compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, @@ -1749,21 +1804,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1866,6 +1932,189 @@ def __call__( ) return resp + class _AdoptInstances( + _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances, + RegionInstanceGroupManagersRestStub, + ): + def __hash__(self): + return hash("RegionInstanceGroupManagersRestTransport.AdoptInstances") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.AdoptInstancesRegionInstanceGroupManagerRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the adopt instances method over HTTP. + + Args: + request (~.compute.AdoptInstancesRegionInstanceGroupManagerRequest): + The request object. A request message for + RegionInstanceGroupManagers.AdoptInstances. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances._get_http_options() + ) + + request, metadata = self._interceptor.pre_adopt_instances(request, metadata) + transcoded_request = _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances._get_transcoded_request( + http_options, request + ) + + body = _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.AdoptInstances", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "rpcName": "AdoptInstances", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + RegionInstanceGroupManagersRestTransport._AdoptInstances._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_adopt_instances(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_adopt_instances_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.adopt_instances", + extra={ + "serviceName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "rpcName": "AdoptInstances", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _ApplyUpdatesToInstances( _BaseRegionInstanceGroupManagersRestTransport._BaseApplyUpdatesToInstances, RegionInstanceGroupManagersRestStub, @@ -1924,21 +2173,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2096,21 +2356,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2269,21 +2540,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2434,21 +2716,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2611,21 +2904,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2783,14 +3087,17 @@ def __call__( Returns: ~.compute.InstanceGroupManager: Represents a Managed Instance Group - resource. An instance group is a - collection of VM instances that you can - manage as a single entity. For more - information, read Instance groups. For - zonal Managed Instance Group, use the - instanceGroupManagers resource. For - regional Managed Instance Group, use the - regionInstanceGroupManagers resource. + resource. + An instance group is a collection of VM + instances that you can manage as a + single entity. For more information, + readInstance groups. + + For zonal Managed Instance Group, use + the instanceGroupManagers resource. + + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. """ @@ -2937,21 +3244,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3715,21 +4033,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3888,21 +4217,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4060,21 +4400,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4231,21 +4582,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4396,21 +4758,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4568,21 +4941,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4744,21 +5128,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -4916,21 +5311,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5088,21 +5494,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5262,21 +5679,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5434,21 +5862,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5606,21 +6045,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -5933,21 +6383,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6106,21 +6567,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -6233,6 +6705,16 @@ def abandon_instances( # In C++ this would require a dynamic_cast return self._AbandonInstances(self._session, self._host, self._interceptor) # type: ignore + @property + def adopt_instances( + self, + ) -> Callable[ + [compute.AdoptInstancesRegionInstanceGroupManagerRequest], compute.Operation + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._AdoptInstances(self._session, self._host, self._interceptor) # type: ignore + @property def apply_updates_to_instances( self, diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py index 02bdb7f2f9f8..12ec0f41d75f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py @@ -147,6 +147,64 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseAdoptInstances: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/adoptInstances", + "body": "region_instance_group_managers_adopt_instances_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.AdoptInstancesRegionInstanceGroupManagerRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRegionInstanceGroupManagersRestTransport._BaseAdoptInstances._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseApplyUpdatesToInstances: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py index 458964cbdcc0..47343557e925 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py @@ -789,19 +789,28 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py index 0d15d6bbc9fd..1860f127dfcc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py @@ -510,19 +510,28 @@ def __call__( Returns: ~.compute.InstanceGroup: Represents an Instance Group - resource. Instance Groups can be used to - configure a target for load balancing. + resource. + Instance Groups can be used to configure + a target forload balancing. + Instance groups can either be managed or - unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource - instead. Use zonal unmanaged instance - groups if you need to apply load - balancing to groups of heterogeneous - instances or if you need to manage the - instances yourself. You cannot create - regional unmanaged instance groups. For - more information, read Instance groups. + unmanaged. + + To create + managed instance groups, use the + instanceGroupManager + orregionInstanceGroupManager resource + instead. + + Use zonal unmanaged instance groups if + you need to applyload balancing to + groups of heterogeneous instances or if + you need to manage the instances + yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. """ @@ -976,21 +985,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py index fe794bf3f533..e23928d03338 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py @@ -1091,19 +1091,25 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - [Global](/compute/docs/reference/rest/beta/instanceTemplates) - \* - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) - You can reuse a global instance template in different - regions whereas you can use a regional instance template - in a specified region only. If you want to reduce - cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - [Global](/compute/docs/reference/rest/beta/instanceTemplates) + - [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates) + + You can reuse a global instance template in different + regions whereas you can use a regional instance + template in a specified region only. If you want to + reduce cross-region dependency or achieve data + residency, use a regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py index a8f2eb388cd8..aa5d635caf7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py @@ -446,21 +446,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -610,19 +621,25 @@ def __call__( Returns: ~.compute.InstanceTemplate: - Represents an Instance Template resource. Google Compute - Engine has two Instance Template resources: \* - `Global `__ - \* - `Regional `__ + Represents an Instance Template resource. + + Google Compute Engine has two Instance Template + resources: + + - `Global `__ + - `Regional `__ + You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a - regional instance template. To create VMs, managed - instance groups, and reservations, you can use either - global or regional instance templates. For more - information, read Instance Templates. + regional instance template. + + To create VMs, managed instance groups, and + reservations, you can use either global or regional + instance templates. + + For more information, readInstance Templates. """ @@ -769,21 +786,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py index 84f2126f6610..cd16e36170c7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py @@ -278,21 +278,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py index 267df77f53c6..84883b888133 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py @@ -734,7 +734,9 @@ def delete_unary( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -878,7 +880,9 @@ def delete( If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding - instantSnapshot. For more information, see Deleting + instantSnapshot. + + For more information, seeDeleting instantSnapshots. .. code-block:: python @@ -1105,8 +1109,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ # Create or coerce a protobuf request object. @@ -1243,28 +1248,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1837,28 +1850,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py index 322d3dbf2ac5..af62a9392ce8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py @@ -669,21 +669,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -834,8 +845,9 @@ def __call__( Returns: ~.compute.InstantSnapshot: Represents a InstantSnapshot - resource. You can use instant snapshots - to create disk rollback points quickly.. + resource. + You can use instant snapshots to create + disk rollback points quickly.. """ @@ -982,26 +994,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1152,21 +1215,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1470,26 +1544,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1645,21 +1770,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py index 8940facd995a..43b50c2c55e0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py @@ -439,21 +439,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -755,21 +766,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py index c4f07aa56aa5..d66028610aa6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py @@ -779,9 +779,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -944,9 +944,9 @@ def sample_attach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1132,9 +1132,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1273,9 +1273,9 @@ def sample_delete(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1441,9 +1441,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1606,9 +1606,9 @@ def sample_detach_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1792,9 +1792,9 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of the region where + the network endpoint group is located. + It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -1817,13 +1817,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ # Create or coerce a protobuf request object. @@ -1937,9 +1938,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2075,9 +2076,9 @@ def sample_insert(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where you want - to create the network endpoint group. It - should comply with RFC1035. + The name of the region where + you want to create the network endpoint + group. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2238,9 +2239,9 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of theregion + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this @@ -2380,9 +2381,9 @@ def sample_list_network_endpoints(): on the ``request`` instance; if ``request`` is provided, this should not be set. region (str): - The name of the region where the - network endpoint group is located. It - should comply with RFC1035. + The name of theregion + where the network endpoint group is + located. It should comply with RFC1035. This corresponds to the ``region`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py index 980763bb1ece..be51849c59a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py @@ -629,21 +629,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -800,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -967,21 +989,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,13 +1172,14 @@ def __call__( Returns: ~.compute.NetworkEndpointGroup: Represents a collection of network - endpoints. A network endpoint group - (NEG) defines how a set of endpoints - should be reached, whether they are - reachable, and where they are located. - For more information about using NEGs - for different use cases, see Network - endpoint groups overview. + endpoints. + A network endpoint group (NEG) defines + how a set of endpoints should be + reached, whether they are reachable, and + where they are located. For more + information about using NEGs for + different use cases, seeNetwork endpoint + groups overview. """ @@ -1292,21 +1326,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py index ccba627a2900..eb77c21f7a7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py @@ -2483,28 +2483,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -4818,28 +4826,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py index 11a49b583de3..b281f281392a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py @@ -1237,21 +1237,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1407,21 +1418,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1578,21 +1600,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1744,21 +1777,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2362,26 +2406,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2687,21 +2782,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3002,21 +3108,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3172,21 +3289,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3344,21 +3472,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3515,21 +3654,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3681,21 +3831,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3849,26 +4010,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py index f06328e0d2e0..ec5c9f2acea4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/client.py @@ -1398,8 +1398,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of network policies. To prevent - failure, it's recommended that you set the + r"""Retrieves an aggregated list of network policies. + + To prevent failure, it's recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py index 5d24432bbb11..1b5efe483c7d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_policies/transports/rest.py @@ -959,21 +959,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1132,21 +1143,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1455,21 +1477,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2077,21 +2110,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2391,21 +2435,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2564,21 +2619,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2738,21 +2804,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2909,21 +2986,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py index b4d363d191f3..839ce94aadea 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py @@ -1100,13 +1100,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.NotificationEndpoint: - Represents a notification endpoint. A - notification endpoint resource defines + Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive notifications when there are status changes detected by the associated health check service. - For more information, see Health checks - overview. + + For more information, see + Health checks overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py index 82a8d3a598f3..b74dc5430cc4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py @@ -511,21 +511,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -675,13 +686,15 @@ def __call__( Returns: ~.compute.NotificationEndpoint: - Represents a notification endpoint. A - notification endpoint resource defines + Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive notifications when there are status changes detected by the associated health check service. - For more information, see Health checks - overview. + + For more information, see + Health checks overview. """ @@ -828,21 +841,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py index 8c259bee4f58..dcaa42271f15 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py @@ -919,23 +919,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1148,13 +1155,17 @@ def wait( from the ``GET`` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be ``DONE`` or still in progress. - This method is called on a best-effort basis. Specifically: - In - uncommon cases, when the server is overloaded, the request might - return before the default deadline is reached, or might return - after zero seconds. - If the default deadline is reached, there - is no guarantee that the operation is actually done when the - method returns. Be prepared to retry if the operation is not - ``DONE``. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1217,23 +1228,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py index bb3e0769fbda..fc3128e6ffbf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py @@ -596,21 +596,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -907,21 +918,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py index 15ff26b0c0bc..475543495d43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py @@ -1414,11 +1414,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -3014,7 +3014,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -3167,7 +3168,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py index 91b6f8db2bf6..707a190ef1e9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py @@ -778,21 +778,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -947,21 +958,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1112,11 +1134,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -1414,21 +1436,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1729,21 +1762,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1899,21 +1943,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2068,21 +2123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2233,21 +2299,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py index ff282bca188d..d20d54407e77 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py @@ -479,21 +479,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py index cefb770f1989..32cd9ed39a69 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py @@ -726,8 +726,10 @@ def delete_unary( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -867,8 +869,10 @@ def delete( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -1091,10 +1095,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ # Create or coerce a protobuf request object. @@ -1231,28 +1236,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1819,28 +1832,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1923,7 +1944,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a regional snapshot. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -2074,7 +2096,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a regional snapshot. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py index 3a8e57c293ee..396acbda6640 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py @@ -662,21 +662,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -828,10 +839,11 @@ def __call__( Returns: ~.compute.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ @@ -981,26 +993,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1150,21 +1213,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1472,26 +1546,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1646,21 +1771,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py index 8618400544ce..0a0f314a36b5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py @@ -1093,26 +1093,36 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - [Global](/compute/docs/reference/rest/beta/sslCertificates) - \* - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) - The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate + resources: + + - [Global](/compute/docs/reference/rest/beta/sslCertificates) + - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) + + The global SSL certificates (sslCertificates) are + used by: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL + proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use + SSL keys and certificates to secure connections to a + load balancer. For more information, read Creating + and using SSL certificates,SSL certificates quotas + and limits, and Troubleshooting SSL certificates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py index 76e6d437c0da..78bfd70d9d38 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py @@ -504,21 +504,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -667,26 +678,38 @@ def __call__( Returns: ~.compute.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - `Global `__ - \* - `Regional `__ + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use SSL + keys and certificates to secure connections to a load + balancer. For more information, read Creating and using + SSL certificates,SSL certificates quotas and limits, and + Troubleshooting SSL certificates. """ @@ -835,21 +858,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py index 43bc85cf7a59..07b6a424fb40 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py @@ -1092,6 +1092,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py index ff9791e54943..7ba2e6bb1dc1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py @@ -612,21 +612,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -778,6 +789,7 @@ def __call__( Returns: ~.compute.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application @@ -933,21 +945,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1411,21 +1434,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py index 029a609e0a7d..63819fc00b18 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py @@ -1092,22 +1092,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) - A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) + + A target HTTP proxy is a component of Google Cloud + HTTP load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py index 300948fb50ff..12fb8efb856c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py @@ -559,21 +559,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -723,22 +734,29 @@ def __call__( Returns: ~.compute.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -885,21 +903,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1200,21 +1229,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py index a154f0aa5dd6..53be61826ec0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py @@ -1092,22 +1092,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) - A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) + + A target HTTPS proxy is a component of Google Cloud + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1619,7 +1626,7 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified regional TargetHttpsProxy resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python @@ -1770,7 +1777,7 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified regional TargetHttpsProxy resource with the data included in the request. This - method supports PATCH semantics and uses JSON merge + method supports PATCH semantics and usesJSON merge patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py index a7f0b71ec773..27c9b3153561 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py @@ -672,21 +672,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -836,22 +847,29 @@ def __call__( Returns: ~.compute.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -998,21 +1016,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1315,21 +1344,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1485,21 +1525,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1659,21 +1710,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py index fed70dde1333..5ffce42cc74a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py @@ -1090,13 +1090,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py index 46ef820e4fd2..89f099417e7a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py @@ -504,21 +504,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -669,13 +680,14 @@ def __call__( Returns: ~.compute.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -822,21 +834,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py index d972a270337d..9e40d996cacd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py @@ -1076,31 +1076,43 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - [Global](/compute/docs/reference/rest/beta/urlMaps) \* - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) - A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more - information, read URL Map Concepts. + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - [Global](/compute/docs/reference/rest/beta/urlMaps) + - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) + + A URL map resource is a component of certain types of + cloud load balancers and Traffic Director: + + \* urlMaps are used by global external Application + Load Balancers, classic Application Load Balancers, + and cross-region internal Application Load Balancers. + \* regionUrlMaps are used by internal Application + Load Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: + Routing and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing + and traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend + bucket. + + To use the global urlMaps resource, the backend + service must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. + To use the regionUrlMaps resource, the backend + service must have aloadBalancingScheme of + INTERNAL_MANAGED. For more information, read URL Map + Concepts. """ # Create or coerce a protobuf request object. @@ -1465,8 +1477,9 @@ def invalidate_cache_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1617,8 +1630,9 @@ def invalidate_cache( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1929,9 +1943,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2073,9 +2087,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py index c392a8d58537..6b32b1443f94 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py @@ -715,21 +715,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -880,31 +891,40 @@ def __call__( Returns: ~.compute.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - `Global `__ - \* - `Regional `__ + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more + cloud load balancers and Traffic Director: + + - urlMaps are used by global external Application Load + Balancers, classic Application Load Balancers, and + cross-region internal Application Load Balancers. + - regionUrlMaps are used by internal Application Load + Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: Routing + and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing and + traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service + must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To + use the regionUrlMaps resource, the backend service must + have aloadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts. """ @@ -1051,21 +1071,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1224,21 +1255,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1537,21 +1579,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1862,21 +1915,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py index f6ede29fdac9..ce156f9816ba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py @@ -710,17 +710,19 @@ def get( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Region: - r"""Returns the specified Region resource. To decrease latency for - this method, you can optionally omit any unneeded information - from the response by using a field mask. This practice is - especially recommended for unused quota information (the - ``quotas`` field). To exclude one or more fields, set your - request's ``fields`` query parameter to only include the fields - you need. For example, to only include the ``id`` and - ``selfLink`` fields, add the query parameter - ``?fields=id,selfLink`` to your request. This method fails if - the quota information is unavailable for the region and if the - organization policy constraint + r"""Returns the specified Region resource. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter + ``?fields=id,selfLink`` to your request. + + This method fails if the quota information is unavailable for + the region and if the organization policy constraint compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the fail-open behaviour when quota information (the ``items.quotas`` field) is unavailable @@ -781,10 +783,12 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Region: - Represents a Region resource. A - region is a geographical area where a + Represents a Region resource. + + A region is a geographical area where a resource is located. For more - information, read Regions and Zones. + information, readRegions + and Zones. """ # Create or coerce a protobuf request object. @@ -850,16 +854,19 @@ def list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListPager: r"""Retrieves the list of region resources available to the - specified project. To decrease latency for this method, you can - optionally omit any unneeded information from the response by - using a field mask. This practice is especially recommended for - unused quota information (the ``items.quotas`` field). To - exclude one or more fields, set your request's ``fields`` query - parameter to only include the fields you need. For example, to - only include the ``id`` and ``selfLink`` fields, add the query - parameter ``?fields=id,selfLink`` to your request. This method - fails if the quota information is unavailable for the region and - if the organization policy constraint + specified project. + + To decrease latency for this method, you can optionally omit any + unneeded information from the response by using a field mask. + This practice is especially recommended for unused quota + information (the ``items.quotas`` field). To exclude one or more + fields, set your request's ``fields`` query parameter to only + include the fields you need. For example, to only include the + ``id`` and ``selfLink`` fields, add the query parameter + ``?fields=id,selfLink`` to your request. + + This method fails if the quota information is unavailable for + the region and if the organization policy constraint compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the fail-open behaviour when quota information (the ``items.quotas`` field) is unavailable diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py index 2aad88796b8b..9af8b178836f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py @@ -324,10 +324,12 @@ def __call__( Returns: ~.compute.Region: - Represents a Region resource. A - region is a geographical area where a + Represents a Region resource. + + A region is a geographical area where a resource is located. For more - information, read Regions and Zones. + information, readRegions + and Zones. """ diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py index c20ee182b419..aff363a67e92 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py @@ -775,8 +775,8 @@ def sample_get(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -861,6 +861,184 @@ def sample_get(): # Done; return the response. return response + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.GetIamPolicy. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, parent_resource, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyReservationBlockRequest): + request = compute.GetIamPolicyReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def list( self, request: Optional[Union[compute.ListReservationBlocksRequest, dict]] = None, @@ -922,8 +1100,8 @@ def sample_list(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1080,8 +1258,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1250,8 +1428,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -1378,6 +1556,368 @@ def error_code(self): # Done; return the response. return response + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + zone_set_nested_policy_request_resource: Optional[ + compute.ZoneSetNestedPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.SetIamPolicy. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + This corresponds to the ``zone_set_nested_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + parent_resource, + resource, + zone_set_nested_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyReservationBlockRequest): + request = compute.SetIamPolicyReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if zone_set_nested_policy_request_resource is not None: + request.zone_set_nested_policy_request_resource = ( + zone_set_nested_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsReservationBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsReservationBlockRequest, dict]): + The request object. A request message for + ReservationBlocks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + parent_resource, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.TestIamPermissionsReservationBlockRequest): + request = compute.TestIamPermissionsReservationBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "ReservationBlocksClient": return self diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py index 2491ce616a60..56675ee0a65a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), self.list: gapic_v1.method.wrap_method( self.list, default_timeout=None, @@ -153,6 +158,16 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), } def close(self): @@ -176,6 +191,15 @@ def get( ]: raise NotImplementedError() + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyReservationBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + @property def list( self, @@ -197,6 +221,26 @@ def perform_maintenance( ]: raise NotImplementedError() + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyReservationBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationBlockRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + @property def kind(self) -> str: raise NotImplementedError() diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py index d3fcc59b7f91..992febf04609 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py @@ -80,6 +80,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + def pre_list(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -96,6 +104,22 @@ def post_perform_maintenance(self, response): logging.log(f"Received response: {response}") return response + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + transport = ReservationBlocksRestTransport(interceptor=MyCustomReservationBlocksInterceptor()) client = ReservationBlocksClient(transport=transport) @@ -152,6 +176,53 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + def pre_list( self, request: compute.ListReservationBlocksRequest, @@ -251,6 +322,104 @@ def post_perform_maintenance_with_metadata( """ return response, metadata + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsReservationBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsReservationBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationBlocks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationBlocks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationBlocks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + @dataclasses.dataclass class ReservationBlocksRestStub: @@ -491,6 +660,226 @@ def __call__( ) return resp + class _GetIamPolicy( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy, ReservationBlocksRestStub + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyReservationBlockRequest): + The request object. A request message for + ReservationBlocks.GetIamPolicy. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _List( _BaseReservationBlocksRestTransport._BaseList, ReservationBlocksRestStub ): @@ -698,21 +1087,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -815,6 +1215,387 @@ def __call__( ) return resp + class _SetIamPolicy( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy, ReservationBlocksRestStub + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyReservationBlockRequest): + The request object. A request message for + ReservationBlocks.SetIamPolicy. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions, + ReservationBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationBlocksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsReservationBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsReservationBlockRequest): + The request object. A request message for + ReservationBlocks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationBlocksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationBlocksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationBlocksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationBlocks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + @property def get( self, @@ -825,6 +1606,14 @@ def get( # In C++ this would require a dynamic_cast return self._Get(self._session, self._host, self._interceptor) # type: ignore + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyReservationBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + @property def list( self, @@ -845,6 +1634,25 @@ def perform_maintenance( # In C++ this would require a dynamic_cast return self._PerformMaintenance(self._session, self._host, self._interceptor) # type: ignore + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyReservationBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationBlockRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + @property def kind(self) -> str: return "rest" diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py index 85ee107d8cd2..38749b044e9f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py @@ -133,6 +133,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseList: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") @@ -235,5 +281,117 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/setIamPolicy", + "body": "zone_set_nested_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsReservationBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationBlocksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + __all__ = ("_BaseReservationBlocksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py index b6218fd496e2..7a6d57f8b284 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py @@ -861,6 +861,184 @@ def sample_get(): # Done; return the response. return response + def get_iam_policy( + self, + request: Optional[ + Union[compute.GetIamPolicyReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Gets the access control policy for a resource. May be + empty if no such policy or resource exists. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetIamPolicyReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.GetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, parent_resource, resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetIamPolicyReservationSubBlockRequest): + request = compute.GetIamPolicyReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def list( self, request: Optional[Union[compute.ListReservationSubBlocksRequest, dict]] = None, @@ -1709,6 +1887,370 @@ def error_code(self): # Done; return the response. return response + def set_iam_policy( + self, + request: Optional[ + Union[compute.SetIamPolicyReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + zone_set_nested_policy_request_resource: Optional[ + compute.ZoneSetNestedPolicyRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Sets the access control policy on the specified + resource. Replaces any existing policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.SetIamPolicyReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.SetIamPolicy. See + the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + This corresponds to the ``zone_set_nested_policy_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Policy: + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + parent_resource, + resource, + zone_set_nested_policy_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.SetIamPolicyReservationSubBlockRequest): + request = compute.SetIamPolicyReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if zone_set_nested_policy_request_resource is not None: + request.zone_set_nested_policy_request_resource = ( + zone_set_nested_policy_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.set_iam_policy] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def test_iam_permissions( + self, + request: Optional[ + Union[compute.TestIamPermissionsReservationSubBlockRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + parent_resource: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Returns permissions that a caller has on the + specified resource. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.TestIamPermissionsReservationSubBlockRequest, dict]): + The request object. A request message for + ReservationSubBlocks.TestIamPermissions. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + The name of the zone for this + request. + + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + parent_resource (str): + Name or id of parent resource of the + resource for this request. + + This corresponds to the ``parent_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + resource (str): + Name or id of the resource for this + request. + + This corresponds to the ``resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + This corresponds to the ``test_permissions_request_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.TestPermissionsResponse: + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + parent_resource, + resource, + test_permissions_request_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance( + request, compute.TestIamPermissionsReservationSubBlockRequest + ): + request = compute.TestIamPermissionsReservationSubBlockRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if parent_resource is not None: + request.parent_resource = parent_resource + if resource is not None: + request.resource = resource + if test_permissions_request_resource is not None: + request.test_permissions_request_resource = ( + test_permissions_request_resource + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.test_iam_permissions] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("parent_resource", request.parent_resource), + ("resource", request.resource), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "ReservationSubBlocksClient": return self diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py index 54130a98e961..802196d4e8b1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/base.py @@ -143,6 +143,11 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_iam_policy: gapic_v1.method.wrap_method( + self.get_iam_policy, + default_timeout=None, + client_info=client_info, + ), self.list: gapic_v1.method.wrap_method( self.list, default_timeout=None, @@ -158,6 +163,16 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.set_iam_policy: gapic_v1.method.wrap_method( + self.set_iam_policy, + default_timeout=None, + client_info=client_info, + ), + self.test_iam_permissions: gapic_v1.method.wrap_method( + self.test_iam_permissions, + default_timeout=None, + client_info=client_info, + ), } def close(self): @@ -181,6 +196,15 @@ def get( ]: raise NotImplementedError() + @property + def get_iam_policy( + self, + ) -> Callable[ + [compute.GetIamPolicyReservationSubBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + @property def list( self, @@ -211,6 +235,26 @@ def report_faulty( ]: raise NotImplementedError() + @property + def set_iam_policy( + self, + ) -> Callable[ + [compute.SetIamPolicyReservationSubBlockRequest], + Union[compute.Policy, Awaitable[compute.Policy]], + ]: + raise NotImplementedError() + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationSubBlockRequest], + Union[ + compute.TestPermissionsResponse, Awaitable[compute.TestPermissionsResponse] + ], + ]: + raise NotImplementedError() + @property def kind(self) -> str: raise NotImplementedError() diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py index 02d99ef25e08..0b259f1a26bf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py @@ -80,6 +80,14 @@ def post_get(self, response): logging.log(f"Received response: {response}") return response + def pre_get_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + def pre_list(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -104,6 +112,22 @@ def post_report_faulty(self, response): logging.log(f"Received response: {response}") return response + def pre_set_iam_policy(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_set_iam_policy(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_test_iam_permissions(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_test_iam_permissions(self, response): + logging.log(f"Received response: {response}") + return response + transport = ReservationSubBlocksRestTransport(interceptor=MyCustomReservationSubBlocksInterceptor()) client = ReservationSubBlocksClient(transport=transport) @@ -160,6 +184,53 @@ def post_get_with_metadata( """ return response, metadata + def pre_get_iam_policy( + self, + request: compute.GetIamPolicyReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetIamPolicyReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for get_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_get_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for get_iam_policy + + DEPRECATED. Please use the `post_get_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_get_iam_policy` interceptor runs + before the `post_get_iam_policy_with_metadata` interceptor. + """ + return response + + def post_get_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_get_iam_policy_with_metadata` + interceptor in new development instead of the `post_get_iam_policy` interceptor. + When both interceptors are used, this `post_get_iam_policy_with_metadata` interceptor runs after the + `post_get_iam_policy` interceptor. The (possibly modified) response returned by + `post_get_iam_policy` will be passed to + `post_get_iam_policy_with_metadata`. + """ + return response, metadata + def pre_list( self, request: compute.ListReservationSubBlocksRequest, @@ -307,6 +378,104 @@ def post_report_faulty_with_metadata( """ return response, metadata + def pre_set_iam_policy( + self, + request: compute.SetIamPolicyReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.SetIamPolicyReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for set_iam_policy + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_set_iam_policy(self, response: compute.Policy) -> compute.Policy: + """Post-rpc interceptor for set_iam_policy + + DEPRECATED. Please use the `post_set_iam_policy_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_set_iam_policy` interceptor runs + before the `post_set_iam_policy_with_metadata` interceptor. + """ + return response + + def post_set_iam_policy_with_metadata( + self, + response: compute.Policy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Policy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for set_iam_policy + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_set_iam_policy_with_metadata` + interceptor in new development instead of the `post_set_iam_policy` interceptor. + When both interceptors are used, this `post_set_iam_policy_with_metadata` interceptor runs after the + `post_set_iam_policy` interceptor. The (possibly modified) response returned by + `post_set_iam_policy` will be passed to + `post_set_iam_policy_with_metadata`. + """ + return response, metadata + + def pre_test_iam_permissions( + self, + request: compute.TestIamPermissionsReservationSubBlockRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestIamPermissionsReservationSubBlockRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for test_iam_permissions + + Override in a subclass to manipulate the request or metadata + before they are sent to the ReservationSubBlocks server. + """ + return request, metadata + + def post_test_iam_permissions( + self, response: compute.TestPermissionsResponse + ) -> compute.TestPermissionsResponse: + """Post-rpc interceptor for test_iam_permissions + + DEPRECATED. Please use the `post_test_iam_permissions_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ReservationSubBlocks server but before + it is returned to user code. This `post_test_iam_permissions` interceptor runs + before the `post_test_iam_permissions_with_metadata` interceptor. + """ + return response + + def post_test_iam_permissions_with_metadata( + self, + response: compute.TestPermissionsResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.TestPermissionsResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for test_iam_permissions + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ReservationSubBlocks server but before it is returned to user code. + + We recommend only using this `post_test_iam_permissions_with_metadata` + interceptor in new development instead of the `post_test_iam_permissions` interceptor. + When both interceptors are used, this `post_test_iam_permissions_with_metadata` interceptor runs after the + `post_test_iam_permissions` interceptor. The (possibly modified) response returned by + `post_test_iam_permissions` will be passed to + `post_test_iam_permissions_with_metadata`. + """ + return response, metadata + @dataclasses.dataclass class ReservationSubBlocksRestStub: @@ -549,6 +718,227 @@ def __call__( ) return resp + class _GetIamPolicy( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.GetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetIamPolicyReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the get iam policy method over HTTP. + + Args: + request (~.compute.GetIamPolicyReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.GetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_get_iam_policy(request, metadata) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.GetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "GetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationSubBlocksRestTransport._GetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.get_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "GetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _List( _BaseReservationSubBlocksRestTransport._BaseList, ReservationSubBlocksRestStub ): @@ -753,21 +1143,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -922,21 +1323,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1037,15 +1449,407 @@ def __call__( ) return resp - @property - def get( - self, - ) -> Callable[ - [compute.GetReservationSubBlockRequest], compute.ReservationSubBlocksGetResponse - ]: - # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. - # In C++ this would require a dynamic_cast - return self._Get(self._session, self._host, self._interceptor) # type: ignore + class _SetIamPolicy( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.SetIamPolicy") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.SetIamPolicyReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Policy: + r"""Call the set iam policy method over HTTP. + + Args: + request (~.compute.SetIamPolicyReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.SetIamPolicy. See + the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Policy: + An Identity and Access Management (IAM) policy, which + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A + ``binding`` binds one or more ``members``, or + principals, to a single ``role``. Principals can be user + accounts, service accounts, Google groups, and domains + (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM + documentation `__. + + **JSON example:** + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + + **YAML example:** + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + + For a description of IAM and its features, see the `IAM + documentation `__. + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_http_options() + ) + + request, metadata = self._interceptor.pre_set_iam_policy(request, metadata) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.SetIamPolicy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "SetIamPolicy", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ReservationSubBlocksRestTransport._SetIamPolicy._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Policy() + pb_resp = compute.Policy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_set_iam_policy(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_set_iam_policy_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Policy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.set_iam_policy", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "SetIamPolicy", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _TestIamPermissions( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions, + ReservationSubBlocksRestStub, + ): + def __hash__(self): + return hash("ReservationSubBlocksRestTransport.TestIamPermissions") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.TestIamPermissionsReservationSubBlockRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.TestPermissionsResponse: + r"""Call the test iam permissions method over HTTP. + + Args: + request (~.compute.TestIamPermissionsReservationSubBlockRequest): + The request object. A request message for + ReservationSubBlocks.TestIamPermissions. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.TestPermissionsResponse: + + """ + + http_options = ( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_http_options() + ) + + request, metadata = self._interceptor.pre_test_iam_permissions( + request, metadata + ) + transcoded_request = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_transcoded_request( + http_options, request + ) + + body = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ReservationSubBlocksClient.TestIamPermissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "TestIamPermissions", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ( + ReservationSubBlocksRestTransport._TestIamPermissions._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.TestPermissionsResponse() + pb_resp = compute.TestPermissionsResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_test_iam_permissions(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_test_iam_permissions_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.TestPermissionsResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ReservationSubBlocksClient.test_iam_permissions", + extra={ + "serviceName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "rpcName": "TestIamPermissions", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def get( + self, + ) -> Callable[ + [compute.GetReservationSubBlockRequest], compute.ReservationSubBlocksGetResponse + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def get_iam_policy( + self, + ) -> Callable[[compute.GetIamPolicyReservationSubBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._GetIamPolicy(self._session, self._host, self._interceptor) # type: ignore @property def list( @@ -1076,6 +1880,25 @@ def report_faulty( # In C++ this would require a dynamic_cast return self._ReportFaulty(self._session, self._host, self._interceptor) # type: ignore + @property + def set_iam_policy( + self, + ) -> Callable[[compute.SetIamPolicyReservationSubBlockRequest], compute.Policy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._SetIamPolicy(self._session, self._host, self._interceptor) # type: ignore + + @property + def test_iam_permissions( + self, + ) -> Callable[ + [compute.TestIamPermissionsReservationSubBlockRequest], + compute.TestPermissionsResponse, + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._TestIamPermissions(self._session, self._host, self._interceptor) # type: ignore + @property def kind(self) -> str: return "rest" diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py index 3d24818c8d2b..bd9688fea116 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py @@ -133,6 +133,52 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseGetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/getIamPolicy", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetIamPolicyReservationSubBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseGetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + class _BaseList: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") @@ -283,5 +329,119 @@ def _get_query_params_json(transcoded_request): return query_params + class _BaseSetIamPolicy: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/setIamPolicy", + "body": "zone_set_nested_policy_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.SetIamPolicyReservationSubBlockRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseSetIamPolicy._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseTestIamPermissions: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/testIamPermissions", + "body": "test_permissions_request_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.TestIamPermissionsReservationSubBlockRequest.pb( + request + ) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseReservationSubBlocksRestTransport._BaseTestIamPermissions._get_unset_required_fields( + query_params + ) + ) + + return query_params + __all__ = ("_BaseReservationSubBlocksRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py index ab8392fe5270..a1d86fbfec31 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py @@ -714,8 +714,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of reservations. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of reservations. + + To prevent failure, it is recommended that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1188,11 +1189,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Reservation: - Represents a reservation resource. A + Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more - information, read Reserving zonal + information, read Reserving zonal resources. """ @@ -1328,28 +1329,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1419,8 +1428,8 @@ def insert_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Creates a new reservation. For more information, read - Reserving zonal resources. + r"""Creates a new reservation. For more information, + readReserving zonal resources. .. code-block:: python @@ -1549,8 +1558,8 @@ def insert( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Creates a new reservation. For more information, read - Reserving zonal resources. + r"""Creates a new reservation. For more information, + readReserving zonal resources. .. code-block:: python @@ -1892,8 +1901,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -2047,8 +2056,8 @@ def sample_perform_maintenance(): on the ``request`` instance; if ``request`` is provided, this should not be set. reservation (str): - The name of the reservation. Name - should conform to RFC1035 or be a + The name of the reservation. + Name should conform to RFC1035 or be a resource ID. This corresponds to the ``reservation`` field @@ -2178,7 +2187,7 @@ def resize_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Resizes the reservation (applicable to standalone - reservations only). For more information, read Modifying + reservations only). For more information, readModifying reservations. .. code-block:: python @@ -2328,7 +2337,7 @@ def resize( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the reservation (applicable to standalone - reservations only). For more information, read Modifying + reservations only). For more information, readModifying reservations. .. code-block:: python @@ -2570,28 +2579,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py index e16bf1966e62..22c4eeaf142f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py @@ -974,21 +974,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1139,11 +1150,11 @@ def __call__( Returns: ~.compute.Reservation: - Represents a reservation resource. A + Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more - information, read Reserving zonal + information, read Reserving zonal resources. """ @@ -1292,26 +1303,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1461,21 +1523,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1778,21 +1851,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1947,21 +2031,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2121,26 +2216,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2451,21 +2597,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py index da2c4a8b44aa..3a4cd1e48ec7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py @@ -722,8 +722,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of resource policies. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of resource policies. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1206,7 +1207,7 @@ def sample_get(): resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can - use them to schedule persistent disk + use them toschedule persistent disk snapshots. """ @@ -1344,28 +1345,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2232,28 +2241,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py index 08cf0b97f39b..3da68170caaf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py @@ -871,21 +871,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1040,7 +1051,7 @@ def __call__( resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can - use them to schedule persistent disk + use them toschedule persistent disk snapshots. """ @@ -1191,26 +1202,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1360,21 +1422,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1681,21 +1754,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1855,26 +1939,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/__init__.py new file mode 100644 index 000000000000..fdc47e0313c6 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RolloutPlansClient + +__all__ = ("RolloutPlansClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/client.py new file mode 100644 index 000000000000..218ae1bc5e1a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/client.py @@ -0,0 +1,1505 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.rollout_plans import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RolloutPlansTransport +from .transports.rest import RolloutPlansRestTransport + + +class RolloutPlansClientMeta(type): + """Metaclass for the RolloutPlans client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = OrderedDict() # type: Dict[str, Type[RolloutPlansTransport]] + _transport_registry["rest"] = RolloutPlansRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RolloutPlansTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RolloutPlansClient(metaclass=RolloutPlansClientMeta): + """The RolloutPlans API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RolloutPlansClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RolloutPlansClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RolloutPlansTransport: + """Returns the transport used by the client instance. + + Returns: + RolloutPlansTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = RolloutPlansClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = RolloutPlansClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RolloutPlansClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RolloutPlansClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = RolloutPlansClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RolloutPlansClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[str, RolloutPlansTransport, Callable[..., RolloutPlansTransport]] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the rollout plans client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RolloutPlansTransport,Callable[..., RolloutPlansTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RolloutPlansTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RolloutPlansClient._read_environment_variables() + self._client_cert_source = RolloutPlansClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + self._universe_domain = RolloutPlansClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RolloutPlansTransport) + if transport_provided: + # transport is a RolloutPlansTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RolloutPlansTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = self._api_endpoint or RolloutPlansClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RolloutPlansTransport], Callable[..., RolloutPlansTransport] + ] = ( + RolloutPlansClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., RolloutPlansTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RolloutPlansClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "credentialsType": None, + }, + ) + + def delete_unary( + self, + request: Optional[Union[compute.DeleteRolloutPlanRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout_plan: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes a RolloutPlan. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutPlanRequest( + project="project_value", + rollout_plan="rollout_plan_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRolloutPlanRequest, dict]): + The request object. A request message for + RolloutPlans.Delete. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout_plan (str): + Name of the RolloutPlan resource to + delete. + + This corresponds to the ``rollout_plan`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout_plan] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRolloutPlanRequest): + request = compute.DeleteRolloutPlanRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout_plan is not None: + request.rollout_plan = rollout_plan + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout_plan", request.rollout_plan), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[Union[compute.DeleteRolloutPlanRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout_plan: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes a RolloutPlan. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutPlanRequest( + project="project_value", + rollout_plan="rollout_plan_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRolloutPlanRequest, dict]): + The request object. A request message for + RolloutPlans.Delete. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout_plan (str): + Name of the RolloutPlan resource to + delete. + + This corresponds to the ``rollout_plan`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout_plan] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRolloutPlanRequest): + request = compute.DeleteRolloutPlanRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout_plan is not None: + request.rollout_plan = rollout_plan + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout_plan", request.rollout_plan), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetRolloutPlanRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout_plan: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.RolloutPlan: + r"""Gets details of a single project-scoped RolloutPlan. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRolloutPlanRequest( + project="project_value", + rollout_plan="rollout_plan_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRolloutPlanRequest, dict]): + The request object. A request message for + RolloutPlans.Get. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout_plan (str): + Name of the persistent rollout plan + to return. + + This corresponds to the ``rollout_plan`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.RolloutPlan: + RolloutPlan resource. + + A RolloutPlan is the customer-defined + strategy to divide a large-scale change + into smaller increments, referred to as + "waves". Each wave targets a specific + portion of the overall affected area and + defines criteria that must be met before + progressing to the subsequent wave. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout_plan] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRolloutPlanRequest): + request = compute.GetRolloutPlanRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout_plan is not None: + request.rollout_plan = rollout_plan + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout_plan", request.rollout_plan), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[Union[compute.InsertRolloutPlanRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout_plan_resource: Optional[compute.RolloutPlan] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a new RolloutPlan in a given project and + location. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRolloutPlanRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRolloutPlanRequest, dict]): + The request object. A request message for + RolloutPlans.Insert. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout_plan_resource (google.cloud.compute_v1beta.types.RolloutPlan): + The body resource for this request + This corresponds to the ``rollout_plan_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout_plan_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRolloutPlanRequest): + request = compute.InsertRolloutPlanRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout_plan_resource is not None: + request.rollout_plan_resource = rollout_plan_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[Union[compute.InsertRolloutPlanRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout_plan_resource: Optional[compute.RolloutPlan] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a new RolloutPlan in a given project and + location. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRolloutPlanRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertRolloutPlanRequest, dict]): + The request object. A request message for + RolloutPlans.Insert. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout_plan_resource (google.cloud.compute_v1beta.types.RolloutPlan): + The body resource for this request + This corresponds to the ``rollout_plan_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout_plan_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertRolloutPlanRequest): + request = compute.InsertRolloutPlanRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout_plan_resource is not None: + request.rollout_plan_resource = rollout_plan_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[Union[compute.ListRolloutPlansRequest, dict]] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists RolloutPlans in a given project and location. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRolloutPlansRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRolloutPlansRequest, dict]): + The request object. A request message for + RolloutPlans.List. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.rollout_plans.pagers.ListPager: + Contains a list of RolloutPlan + resources. + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRolloutPlansRequest): + request = compute.ListRolloutPlansRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RolloutPlansClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RolloutPlansClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/pagers.py new file mode 100644 index 000000000000..df19d0ab2cf8 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/pagers.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.RolloutPlansListResponse` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.RolloutPlansListResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.RolloutPlansListResponse], + request: compute.ListRolloutPlansRequest, + response: compute.RolloutPlansListResponse, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRolloutPlansRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.RolloutPlansListResponse): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRolloutPlansRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.RolloutPlansListResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.RolloutPlan]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/README.rst new file mode 100644 index 000000000000..3be1f939604c --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RolloutPlansTransport` is the ABC for all transports. +- public child `RolloutPlansGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RolloutPlansGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRolloutPlansRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RolloutPlansRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/__init__.py new file mode 100644 index 000000000000..9164cd848147 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RolloutPlansTransport +from .rest import RolloutPlansRestInterceptor, RolloutPlansRestTransport + +# Compile a registry of transports. +_transport_registry = OrderedDict() # type: Dict[str, Type[RolloutPlansTransport]] +_transport_registry["rest"] = RolloutPlansRestTransport + +__all__ = ( + "RolloutPlansTransport", + "RolloutPlansRestTransport", + "RolloutPlansRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/base.py new file mode 100644 index 000000000000..55d44704db5d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/base.py @@ -0,0 +1,228 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import global_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RolloutPlansTransport(abc.ABC): + """Abstract transport class for RolloutPlans.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRolloutPlanRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRolloutPlanRequest], + Union[compute.RolloutPlan, Awaitable[compute.RolloutPlan]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertRolloutPlanRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRolloutPlansRequest], + Union[ + compute.RolloutPlansListResponse, + Awaitable[compute.RolloutPlansListResponse], + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _global_operations_client(self) -> global_operations.GlobalOperationsClient: + ex_op_service = self._extended_operations_services.get("global_operations") + if not ex_op_service: + ex_op_service = global_operations.GlobalOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["global_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RolloutPlansTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest.py new file mode 100644 index 000000000000..c81c3bba0b85 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest.py @@ -0,0 +1,1084 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRolloutPlansRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RolloutPlansRestInterceptor: + """Interceptor for RolloutPlans. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RolloutPlansRestTransport. + + .. code-block:: python + class MyCustomRolloutPlansInterceptor(RolloutPlansRestInterceptor): + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RolloutPlansRestTransport(interceptor=MyCustomRolloutPlansInterceptor()) + client = RolloutPlansClient(transport=transport) + + + """ + + def pre_delete( + self, + request: compute.DeleteRolloutPlanRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteRolloutPlanRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the RolloutPlans server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RolloutPlans server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RolloutPlans server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRolloutPlanRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.GetRolloutPlanRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the RolloutPlans server. + """ + return request, metadata + + def post_get(self, response: compute.RolloutPlan) -> compute.RolloutPlan: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RolloutPlans server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.RolloutPlan, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.RolloutPlan, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RolloutPlans server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertRolloutPlanRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertRolloutPlanRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the RolloutPlans server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RolloutPlans server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RolloutPlans server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRolloutPlansRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListRolloutPlansRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the RolloutPlans server. + """ + return request, metadata + + def post_list( + self, response: compute.RolloutPlansListResponse + ) -> compute.RolloutPlansListResponse: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the RolloutPlans server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.RolloutPlansListResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.RolloutPlansListResponse, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the RolloutPlans server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RolloutPlansRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RolloutPlansRestInterceptor + + +class RolloutPlansRestTransport(_BaseRolloutPlansRestTransport): + """REST backend synchronous transport for RolloutPlans. + + The RolloutPlans API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RolloutPlansRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RolloutPlansRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Delete(_BaseRolloutPlansRestTransport._BaseDelete, RolloutPlansRestStub): + def __hash__(self): + return hash("RolloutPlansRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRolloutPlanRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRolloutPlanRequest): + The request object. A request message for + RolloutPlans.Delete. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRolloutPlansRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = ( + _BaseRolloutPlansRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutPlansRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutPlansClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutPlansRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutPlansClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get(_BaseRolloutPlansRestTransport._BaseGet, RolloutPlansRestStub): + def __hash__(self): + return hash("RolloutPlansRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRolloutPlanRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.RolloutPlan: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRolloutPlanRequest): + The request object. A request message for + RolloutPlans.Get. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.RolloutPlan: + RolloutPlan resource. + + A RolloutPlan is the customer-defined + strategy to divide a large-scale change + into smaller increments, referred to as + "waves". Each wave targets a specific + portion of the overall affected area and + defines criteria that must be met before + progressing to the subsequent wave. + + """ + + http_options = _BaseRolloutPlansRestTransport._BaseGet._get_http_options() + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = ( + _BaseRolloutPlansRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutPlansRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutPlansClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutPlansRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.RolloutPlan() + pb_resp = compute.RolloutPlan.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.RolloutPlan.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutPlansClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert(_BaseRolloutPlansRestTransport._BaseInsert, RolloutPlansRestStub): + def __hash__(self): + return hash("RolloutPlansRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertRolloutPlanRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertRolloutPlanRequest): + The request object. A request message for + RolloutPlans.Insert. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseRolloutPlansRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = ( + _BaseRolloutPlansRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + ) + + body = _BaseRolloutPlansRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutPlansRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutPlansClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutPlansRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutPlansClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List(_BaseRolloutPlansRestTransport._BaseList, RolloutPlansRestStub): + def __hash__(self): + return hash("RolloutPlansRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRolloutPlansRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.RolloutPlansListResponse: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRolloutPlansRequest): + The request object. A request message for + RolloutPlans.List. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.RolloutPlansListResponse: + Contains a list of RolloutPlan + resources. + + """ + + http_options = _BaseRolloutPlansRestTransport._BaseList._get_http_options() + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = ( + _BaseRolloutPlansRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutPlansRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutPlansClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutPlansRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.RolloutPlansListResponse() + pb_resp = compute.RolloutPlansListResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.RolloutPlansListResponse.to_json( + response + ) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutPlansClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.RolloutPlans", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def delete(self) -> Callable[[compute.DeleteRolloutPlanRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get(self) -> Callable[[compute.GetRolloutPlanRequest], compute.RolloutPlan]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert(self) -> Callable[[compute.InsertRolloutPlanRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[[compute.ListRolloutPlansRequest], compute.RolloutPlansListResponse]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RolloutPlansRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest_base.py new file mode 100644 index 000000000000..95a224b68a53 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollout_plans/transports/rest_base.py @@ -0,0 +1,285 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RolloutPlansTransport + + +class _BaseRolloutPlansRestTransport(RolloutPlansTransport): + """Base REST backend transport for RolloutPlans. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/global/rolloutPlans/{rollout_plan}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRolloutPlanRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutPlansRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/rolloutPlans/{rollout_plan}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRolloutPlanRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutPlansRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/global/rolloutPlans", + "body": "rollout_plan_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertRolloutPlanRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutPlansRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/rolloutPlans", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRolloutPlansRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutPlansRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRolloutPlansRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/__init__.py new file mode 100644 index 000000000000..ac05f6502a2b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import RolloutsClient + +__all__ = ("RolloutsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/client.py new file mode 100644 index 000000000000..efbf33c848dd --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/client.py @@ -0,0 +1,1513 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.rollouts import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, RolloutsTransport +from .transports.rest import RolloutsRestTransport + + +class RolloutsClientMeta(type): + """Metaclass for the Rollouts client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = OrderedDict() # type: Dict[str, Type[RolloutsTransport]] + _transport_registry["rest"] = RolloutsRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[RolloutsTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class RolloutsClient(metaclass=RolloutsClientMeta): + """The Rollouts API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RolloutsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + RolloutsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> RolloutsTransport: + """Returns the transport used by the client instance. + + Returns: + RolloutsTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = RolloutsClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = RolloutsClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = RolloutsClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = RolloutsClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = RolloutsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = RolloutsClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[str, RolloutsTransport, Callable[..., RolloutsTransport]] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the rollouts client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,RolloutsTransport,Callable[..., RolloutsTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the RolloutsTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = RolloutsClient._read_environment_variables() + self._client_cert_source = RolloutsClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + self._universe_domain = RolloutsClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, RolloutsTransport) + if transport_provided: + # transport is a RolloutsTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(RolloutsTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = self._api_endpoint or RolloutsClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[RolloutsTransport], Callable[..., RolloutsTransport] + ] = ( + RolloutsClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., RolloutsTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.RolloutsClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "credentialsType": None, + }, + ) + + def cancel_unary( + self, + request: Optional[Union[compute.CancelRolloutRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Cancels a Rollout. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_cancel(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.cancel(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.CancelRolloutRequest, dict]): + The request object. A request message for + Rollouts.Cancel. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout (str): + Name of the Rollout resource to + cancel. + + This corresponds to the ``rollout`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.CancelRolloutRequest): + request = compute.CancelRolloutRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout is not None: + request.rollout = rollout + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.cancel] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout", request.rollout), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def cancel( + self, + request: Optional[Union[compute.CancelRolloutRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Cancels a Rollout. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_cancel(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.cancel(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.CancelRolloutRequest, dict]): + The request object. A request message for + Rollouts.Cancel. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout (str): + Name of the Rollout resource to + cancel. + + This corresponds to the ``rollout`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.CancelRolloutRequest): + request = compute.CancelRolloutRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout is not None: + request.rollout = rollout + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.cancel] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout", request.rollout), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def delete_unary( + self, + request: Optional[Union[compute.DeleteRolloutRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes a Rollout. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRolloutRequest, dict]): + The request object. A request message for + Rollouts.Delete. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout (str): + Name of the Rollout resource to + delete. + + This corresponds to the ``rollout`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRolloutRequest): + request = compute.DeleteRolloutRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout is not None: + request.rollout = rollout + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout", request.rollout), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[Union[compute.DeleteRolloutRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes a Rollout. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteRolloutRequest, dict]): + The request object. A request message for + Rollouts.Delete. See the method + description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout (str): + Name of the Rollout resource to + delete. + + This corresponds to the ``rollout`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteRolloutRequest): + request = compute.DeleteRolloutRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout is not None: + request.rollout = rollout + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout", request.rollout), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._global_operations_client + operation_request = compute.GetGlobalOperationRequest() + operation_request.project = request.project + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetRolloutRequest, dict]] = None, + *, + project: Optional[str] = None, + rollout: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Rollout: + r"""Gets details of a single project-scoped Rollout. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetRolloutRequest, dict]): + The request object. A request message for Rollouts.Get. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + rollout (str): + Name of the persistent rollout to + return. + + This corresponds to the ``rollout`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.Rollout: + Rollout resource. + + A Rollout is a specific instance of a + RolloutPlan. It represents a single + execution of a strategy to roll out a + specific resource. It also provides APIs + to interact with the rollout. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, rollout] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetRolloutRequest): + request = compute.GetRolloutRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if rollout is not None: + request.rollout = rollout + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("rollout", request.rollout), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def list( + self, + request: Optional[Union[compute.ListRolloutsRequest, dict]] = None, + *, + project: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists Rollouts in a given project and location. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRolloutsRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListRolloutsRequest, dict]): + The request object. A request message for Rollouts.List. + See the method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.rollouts.pagers.ListPager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListRolloutsRequest): + request = compute.ListRolloutsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("project", request.project),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def __enter__(self) -> "RolloutsClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("RolloutsClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/pagers.py new file mode 100644 index 000000000000..94afc8d29ccf --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/pagers.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.RolloutsListResponse` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.RolloutsListResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.RolloutsListResponse], + request: compute.ListRolloutsRequest, + response: compute.RolloutsListResponse, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListRolloutsRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.RolloutsListResponse): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListRolloutsRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.RolloutsListResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.Rollout]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/README.rst new file mode 100644 index 000000000000..425b888bfbc9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`RolloutsTransport` is the ABC for all transports. +- public child `RolloutsGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `RolloutsGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseRolloutsRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `RolloutsRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/__init__.py new file mode 100644 index 000000000000..3824e601f64f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import RolloutsTransport +from .rest import RolloutsRestInterceptor, RolloutsRestTransport + +# Compile a registry of transports. +_transport_registry = OrderedDict() # type: Dict[str, Type[RolloutsTransport]] +_transport_registry["rest"] = RolloutsRestTransport + +__all__ = ( + "RolloutsTransport", + "RolloutsRestTransport", + "RolloutsRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/base.py new file mode 100644 index 000000000000..81f1487a6a8b --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/base.py @@ -0,0 +1,224 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import global_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RolloutsTransport(abc.ABC): + """Abstract transport class for Rollouts.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.cancel: gapic_v1.method.wrap_method( + self.cancel, + default_timeout=None, + client_info=client_info, + ), + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def cancel( + self, + ) -> Callable[ + [compute.CancelRolloutRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteRolloutRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetRolloutRequest], Union[compute.Rollout, Awaitable[compute.Rollout]] + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListRolloutsRequest], + Union[compute.RolloutsListResponse, Awaitable[compute.RolloutsListResponse]], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _global_operations_client(self) -> global_operations.GlobalOperationsClient: + ex_op_service = self._extended_operations_services.get("global_operations") + if not ex_op_service: + ex_op_service = global_operations.GlobalOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["global_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("RolloutsTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest.py new file mode 100644 index 000000000000..e22a51c19e8e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest.py @@ -0,0 +1,1054 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseRolloutsRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class RolloutsRestInterceptor: + """Interceptor for Rollouts. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the RolloutsRestTransport. + + .. code-block:: python + class MyCustomRolloutsInterceptor(RolloutsRestInterceptor): + def pre_cancel(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_cancel(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + transport = RolloutsRestTransport(interceptor=MyCustomRolloutsInterceptor()) + client = RolloutsClient(transport=transport) + + + """ + + def pre_cancel( + self, + request: compute.CancelRolloutRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.CancelRolloutRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for cancel + + Override in a subclass to manipulate the request or metadata + before they are sent to the Rollouts server. + """ + return request, metadata + + def post_cancel(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for cancel + + DEPRECATED. Please use the `post_cancel_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the Rollouts server but before + it is returned to user code. This `post_cancel` interceptor runs + before the `post_cancel_with_metadata` interceptor. + """ + return response + + def post_cancel_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for cancel + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the Rollouts server but before it is returned to user code. + + We recommend only using this `post_cancel_with_metadata` + interceptor in new development instead of the `post_cancel` interceptor. + When both interceptors are used, this `post_cancel_with_metadata` interceptor runs after the + `post_cancel` interceptor. The (possibly modified) response returned by + `post_cancel` will be passed to + `post_cancel_with_metadata`. + """ + return response, metadata + + def pre_delete( + self, + request: compute.DeleteRolloutRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.DeleteRolloutRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the Rollouts server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the Rollouts server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the Rollouts server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetRolloutRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.GetRolloutRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the Rollouts server. + """ + return request, metadata + + def post_get(self, response: compute.Rollout) -> compute.Rollout: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the Rollouts server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.Rollout, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Rollout, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the Rollouts server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListRolloutsRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.ListRolloutsRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the Rollouts server. + """ + return request, metadata + + def post_list( + self, response: compute.RolloutsListResponse + ) -> compute.RolloutsListResponse: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the Rollouts server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.RolloutsListResponse, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.RolloutsListResponse, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the Rollouts server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class RolloutsRestStub: + _session: AuthorizedSession + _host: str + _interceptor: RolloutsRestInterceptor + + +class RolloutsRestTransport(_BaseRolloutsRestTransport): + """REST backend synchronous transport for Rollouts. + + The Rollouts API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[RolloutsRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or RolloutsRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Cancel(_BaseRolloutsRestTransport._BaseCancel, RolloutsRestStub): + def __hash__(self): + return hash("RolloutsRestTransport.Cancel") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.CancelRolloutRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the cancel method over HTTP. + + Args: + request (~.compute.CancelRolloutRequest): + The request object. A request message for + Rollouts.Cancel. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = _BaseRolloutsRestTransport._BaseCancel._get_http_options() + + request, metadata = self._interceptor.pre_cancel(request, metadata) + transcoded_request = ( + _BaseRolloutsRestTransport._BaseCancel._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutsRestTransport._BaseCancel._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutsClient.Cancel", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Cancel", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutsRestTransport._Cancel._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_cancel(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_cancel_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutsClient.cancel", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Cancel", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Delete(_BaseRolloutsRestTransport._BaseDelete, RolloutsRestStub): + def __hash__(self): + return hash("RolloutsRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteRolloutRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteRolloutRequest): + The request object. A request message for + Rollouts.Delete. See the method + description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = _BaseRolloutsRestTransport._BaseDelete._get_http_options() + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = ( + _BaseRolloutsRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = ( + _BaseRolloutsRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutsClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutsRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutsClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get(_BaseRolloutsRestTransport._BaseGet, RolloutsRestStub): + def __hash__(self): + return hash("RolloutsRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetRolloutRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Rollout: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetRolloutRequest): + The request object. A request message for Rollouts.Get. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Rollout: + Rollout resource. + + A Rollout is a specific instance of a + RolloutPlan. It represents a single + execution of a strategy to roll out a + specific resource. It also provides APIs + to interact with the rollout. + + """ + + http_options = _BaseRolloutsRestTransport._BaseGet._get_http_options() + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = ( + _BaseRolloutsRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = _BaseRolloutsRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutsClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutsRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Rollout() + pb_resp = compute.Rollout.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Rollout.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutsClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List(_BaseRolloutsRestTransport._BaseList, RolloutsRestStub): + def __hash__(self): + return hash("RolloutsRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListRolloutsRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.RolloutsListResponse: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListRolloutsRequest): + The request object. A request message for Rollouts.List. + See the method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.RolloutsListResponse: + + """ + + http_options = _BaseRolloutsRestTransport._BaseList._get_http_options() + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = ( + _BaseRolloutsRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + ) + + # Jsonify the query params + query_params = _BaseRolloutsRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.RolloutsClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = RolloutsRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.RolloutsListResponse() + pb_resp = compute.RolloutsListResponse.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.RolloutsListResponse.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.RolloutsClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.Rollouts", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def cancel(self) -> Callable[[compute.CancelRolloutRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Cancel(self._session, self._host, self._interceptor) # type: ignore + + @property + def delete(self) -> Callable[[compute.DeleteRolloutRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get(self) -> Callable[[compute.GetRolloutRequest], compute.Rollout]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[[compute.ListRolloutsRequest], compute.RolloutsListResponse]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("RolloutsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest_base.py new file mode 100644 index 000000000000..d69c3be665ae --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/rollouts/transports/rest_base.py @@ -0,0 +1,275 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, RolloutsTransport + + +class _BaseRolloutsRestTransport(RolloutsTransport): + """Base REST backend transport for Rollouts. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseCancel: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/global/rollouts/{rollout}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.CancelRolloutRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutsRestTransport._BaseCancel._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/global/rollouts/{rollout}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteRolloutRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutsRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/rollouts/{rollout}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetRolloutRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutsRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/global/rollouts", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListRolloutsRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseRolloutsRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseRolloutsRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py index c1467cfc0bd2..149ab885a41f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py @@ -712,9 +712,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of routers. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of routers. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1480,8 +1481,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Router: Represents a Cloud Router resource. + For more information about Cloud Router, - read the Cloud Router overview. + read theCloud Router overview. """ # Create or coerce a protobuf request object. @@ -2810,9 +2812,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2951,9 +2953,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data - included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -3424,7 +3426,7 @@ def preview( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.RoutersPreviewResponse: r"""Preview fields auto-generated during router create - and update operations. Calling this method does NOT + andupdate operations. Calling this method does NOT create or update the router. .. code-block:: python @@ -3714,7 +3716,7 @@ def update_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified Router resource with the data - included in the request. This method conforms to PUT + included in the request. This method conforms toPUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message @@ -3859,7 +3861,7 @@ def update( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified Router resource with the data - included in the request. This method conforms to PUT + included in the request. This method conforms toPUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py index 74492e7b9be8..867f6fa2cfae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py @@ -1358,21 +1358,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1521,21 +1532,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1686,8 +1708,9 @@ def __call__( Returns: ~.compute.Router: Represents a Cloud Router resource. + For more information about Cloud Router, - read the Cloud Router overview. + read theCloud Router overview. """ @@ -2438,21 +2461,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3045,21 +3079,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3214,21 +3259,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3694,21 +3750,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -3863,21 +3930,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py index 8a6ff9025202..58c38db6a42e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py @@ -1030,12 +1030,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Route: - Represents a Route resource. A route - defines a path from VM instances in the - VPC network to a specific destination. - This destination can be inside or - outside the VPC network. For more - information, read the Routes overview. + Represents a Route resource. + + A route defines a path from VM instances + in the VPC network to a specific + destination. This destination can be + inside or outside the VPC network. For + more information, read theRoutes + overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py index 0ca547155a57..e94080e45b0c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py @@ -484,21 +484,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -644,12 +655,14 @@ def __call__( Returns: ~.compute.Route: - Represents a Route resource. A route - defines a path from VM instances in the - VPC network to a specific destination. - This destination can be inside or - outside the VPC network. For more - information, read the Routes overview. + Represents a Route resource. + + A route defines a path from VM instances + in the VPC network to a specific + destination. This destination can be + inside or outside the VPC network. For + more information, read theRoutes + overview. """ @@ -792,21 +805,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py index 0b1bddc63ad4..1ed480f1c75c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py @@ -1009,9 +1009,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SecurityPolicy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1460,11 +1461,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ # Create or coerce a protobuf request object. @@ -3006,7 +3007,8 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python @@ -3142,7 +3144,8 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a security policy. To learn more - about labels, read the Labeling Resources documentation. + about labels, read the Labeling Resources + documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py index c46af44b4785..5b975b99af23 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py @@ -946,21 +946,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1268,21 +1279,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1434,11 +1456,11 @@ def __call__( Returns: ~.compute.SecurityPolicy: Represents a Google Cloud Armor - security policy resource. Only external - backend services that use load balancers - can reference a security policy. For - more information, see Google Cloud Armor - security policy overview. + security policy resource. + Only external backend services that use + load balancers can reference a security + policy. For more information, see Google + Cloud Armor security policy overview. """ @@ -1742,21 +1764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2223,21 +2256,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2396,21 +2440,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2564,21 +2619,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2728,21 +2794,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py index 06dcf1cf78a1..06fcb6715c0b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py @@ -725,8 +725,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all ServiceAttachment resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1210,13 +1211,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.ServiceAttachment: Represents a ServiceAttachment - resource. A service attachment - represents a service that a producer has - exposed. It encapsulates the load - balancer which fronts the service runs - and a list of NAT IP ranges that the - producers uses to represent the - consumers connecting to the service. + resource. + A service attachment represents a + service that a producer has exposed. It + encapsulates the load balancer which + fronts the service runs and a list of + NAT IP ranges that the producers uses to + represent the consumers connecting to + the service. """ # Create or coerce a protobuf request object. @@ -1353,28 +1355,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1869,8 +1879,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified ServiceAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2022,8 +2032,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified ServiceAttachment resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -2272,28 +2282,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py index 52786c783e30..f02404ee0f4f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py @@ -876,21 +876,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1042,13 +1053,14 @@ def __call__( Returns: ~.compute.ServiceAttachment: Represents a ServiceAttachment - resource. A service attachment - represents a service that a producer has - exposed. It encapsulates the load - balancer which fronts the service runs - and a list of NAT IP ranges that the - producers uses to represent the - consumers connecting to the service. + resource. + A service attachment represents a + service that a producer has exposed. It + encapsulates the load balancer which + fronts the service runs and a list of + NAT IP ranges that the producers uses to + represent the consumers connecting to + the service. """ @@ -1199,26 +1211,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1368,21 +1431,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1689,21 +1763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1866,26 +1951,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py index fffb1caaa93a..9f3b99463b70 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py @@ -478,21 +478,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py index 25fff4138140..ab57ca0ce859 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py @@ -713,9 +713,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all of the snapshots in your - project across all regions and global scope. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + project across all regions and global scope. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -841,8 +842,10 @@ def delete_unary( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -970,8 +973,10 @@ def delete( delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next - corresponding snapshot. For more information, see - Deleting snapshots. + corresponding snapshot. + + For more information, seeDeleting + snapshots. .. code-block:: python @@ -1174,10 +1179,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ # Create or coerce a protobuf request object. @@ -1300,28 +1306,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1390,9 +1404,10 @@ def insert_unary( r"""Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of - disks.createSnapshot, as this method supports more - features, such as creating snapshots in a project - different from the source disk project. + disks.createSnapshot, + as this method supports more features, such as creating + snapshots in a project different from the source disk + project. .. code-block:: python @@ -1510,9 +1525,10 @@ def insert( r"""Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of - disks.createSnapshot, as this method supports more - features, such as creating snapshots in a project - different from the source disk project. + disks.createSnapshot, + as this method supports more features, such as creating + snapshots in a project different from the source disk + project. .. code-block:: python @@ -1838,28 +1854,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1933,7 +1957,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a snapshot. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -2069,7 +2093,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a snapshot. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py index 93c333231345..3b5372d636bb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py @@ -856,21 +856,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1019,10 +1030,11 @@ def __call__( Returns: ~.compute.Snapshot: Represents a Persistent Disk Snapshot - resource. You can use snapshots to back - up data on a regular interval. For more - information, read Creating persistent - disk snapshots. + resource. + You can use snapshots to back up data on + a regular interval. For more + information, read Creating + persistent disk snapshots. """ @@ -1168,26 +1180,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1339,21 +1402,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1654,26 +1728,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1830,21 +1955,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py index 8dd03a8ac030..403a0a4ce240 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py @@ -722,9 +722,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslCertificate resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1173,26 +1174,36 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - [Global](/compute/docs/reference/rest/beta/sslCertificates) - \* - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) - The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate + resources: + + - [Global](/compute/docs/reference/rest/beta/sslCertificates) + - [Regional](/compute/docs/reference/rest/beta/regionSslCertificates) + + The global SSL certificates (sslCertificates) are + used by: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL + proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use + SSL keys and certificates to secure connections to a + load balancer. For more information, read Creating + and using SSL certificates,SSL certificates quotas + and limits, and Troubleshooting SSL certificates. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py index 4d17a9fd3a63..785cf92579a7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py @@ -707,21 +707,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -872,26 +883,38 @@ def __call__( Returns: ~.compute.SslCertificate: - Represents an SSL certificate resource. Google Compute - Engine has two SSL certificate resources: \* - `Global `__ - \* - `Regional `__ + Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + The global SSL certificates (sslCertificates) are used - by: - Global external Application Load Balancers - - Classic Application Load Balancers - Proxy Network Load - Balancers (with target SSL proxies) The regional SSL - certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional - internal Application Load Balancers Optionally, - certificate file contents that you upload can contain a - set of up to five PEM-encoded certificates. The API call - creates an object (sslCertificate) that holds this data. - You can use SSL keys and certificates to secure - connections to a load balancer. For more information, - read Creating and using SSL certificates, SSL - certificates quotas and limits, and Troubleshooting SSL - certificates. + by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) + are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload + can contain a set of up to five PEM-encoded + certificates. The API call creates an object + (sslCertificate) that holds this data. You can use SSL + keys and certificates to secure connections to a load + balancer. For more information, read Creating and using + SSL certificates,SSL certificates quotas and limits, and + Troubleshooting SSL certificates. """ @@ -1041,21 +1064,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py index b5b2b7aea8ae..fc587af9f330 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py @@ -713,9 +713,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslPolicy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1173,6 +1174,7 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py index a4e2df524f26..031d8edf98b2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py @@ -807,21 +807,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -971,6 +982,7 @@ def __call__( Returns: ~.compute.SslPolicy: Represents an SSL Policy resource. + Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application @@ -1122,21 +1134,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1587,21 +1610,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py index 1c4a82a1f0ed..a7d4ee5a7c13 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py @@ -719,8 +719,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of storage pool types. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of storage pool types. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py index 9da72d462948..50dc28316f88 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py @@ -714,8 +714,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of storage pools. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of storage pools. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1336,28 +1337,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2074,28 +2083,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py index bc82b4d050a6..779874eea2cb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py @@ -919,21 +919,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1233,26 +1244,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1402,21 +1464,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1870,26 +1943,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2200,21 +2324,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py index dd259351b0ca..d559855fccf8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py @@ -712,9 +712,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of subnetworks. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of subnetworks. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1530,13 +1531,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Subnetwork: - Represents a Subnetwork resource. A - subnetwork (also known as a subnet) is a - logical partition of a Virtual Private + Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is + a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. - For more information, read Virtual - Private Cloud (VPC) Network. + For more information, read + Virtual Private Cloud (VPC) Network. """ # Create or coerce a protobuf request object. @@ -1671,28 +1673,36 @@ def sample_get_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -2315,8 +2325,9 @@ def patch_unary( r"""Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field - descriptions. You must specify the current fingerprint - of the subnetwork resource being patched. + descriptions. + You must specify the current fingerprint of the + subnetwork resource being patched. .. code-block:: python @@ -2462,8 +2473,9 @@ def patch( r"""Patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field - descriptions. You must specify the current fingerprint - of the subnetwork resource being patched. + descriptions. + You must specify the current fingerprint of the + subnetwork resource being patched. .. code-block:: python @@ -2703,28 +2715,36 @@ def sample_set_iam_policy(): Returns: google.cloud.compute_v1beta.types.Policy: - An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - Policy is a collection of bindings. A binding binds one - or more members, or principals, to a single role. - Principals can be user accounts, service accounts, - Google groups, and domains (such as G Suite). A role is - a named list of permissions; each role can be an IAM - predefined role or a user-created custom role. For some - types of Google Cloud resources, a binding can also - specify a condition, which is a logical expression that - allows access to a resource only if the expression - evaluates to true. A condition can add constraints based - on attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the [IAM - documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - **JSON example:** - :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ - \**YAML example:\*\* - \ ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3``\ \` - For a description of IAM and its features, see the [IAM - documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. + + A Policy is a collection of bindings. A binding binds + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** + + :literal:`` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`\ \` + + **YAML example:** + + :literal:`` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`\ \` + + For a description of IAM and its features, see the + [IAM + documentation](https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py index 79b9b6519883..cc211bcf8ff7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py @@ -1031,21 +1031,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1197,21 +1208,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1365,13 +1387,14 @@ def __call__( Returns: ~.compute.Subnetwork: - Represents a Subnetwork resource. A - subnetwork (also known as a subnet) is a - logical partition of a Virtual Private + Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is + a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. - For more information, read Virtual - Private Cloud (VPC) Network. + For more information, read + Virtual Private Cloud (VPC) Network. """ @@ -1519,26 +1542,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -1690,21 +1764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2157,21 +2242,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2329,26 +2425,77 @@ def __call__( Returns: ~.compute.Policy: An Identity and Access Management (IAM) policy, which - specifies access controls for Google Cloud resources. A - ``Policy`` is a collection of ``bindings``. A + specifies access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds one or more ``members``, or principals, to a single ``role``. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A ``role`` is a named list of permissions; each ``role`` can be an IAM predefined role - or a user-created custom role. For some types of Google - Cloud resources, a ``binding`` can also specify a - ``condition``, which is a logical expression that allows - access to a resource only if the expression evaluates to - ``true``. A condition can add constraints based on - attributes of the request, the resource, or both. To - learn which resources support conditions in their IAM - policies, see the `IAM + or a user-created custom role. + + For some types of Google Cloud resources, a ``binding`` + can also specify a ``condition``, which is a logical + expression that allows access to a resource only if the + expression evaluates to ``true``. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -2510,21 +2657,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py index 64a087843881..0a4699327613 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py @@ -1052,13 +1052,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetGrpcProxy: - Represents a Target gRPC Proxy resource. A target gRPC - proxy is a component of load balancers intended for load - balancing gRPC traffic. Only global forwarding rules - with load balancing scheme INTERNAL_SELF_MANAGED can - reference a target gRPC proxy. The target gRPC Proxy - references a URL map that specifies how traffic is - routed to gRPC backend services. + Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers + intended for load balancing gRPC traffic. Only global + forwarding rules with load balancing scheme + INTERNAL_SELF_MANAGED can reference a target gRPC + proxy. The target gRPC Proxy references a URL map + that specifies how traffic is routed to gRPC backend + services. """ # Create or coerce a protobuf request object. @@ -1506,8 +1508,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetGrpcProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1640,8 +1642,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetGrpcProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py index aa70ae21a598..d5f60b2854ae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py @@ -554,21 +554,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -719,13 +730,15 @@ def __call__( Returns: ~.compute.TargetGrpcProxy: - Represents a Target gRPC Proxy resource. A target gRPC - proxy is a component of load balancers intended for load - balancing gRPC traffic. Only global forwarding rules - with load balancing scheme INTERNAL_SELF_MANAGED can - reference a target gRPC proxy. The target gRPC Proxy - references a URL map that specifies how traffic is - routed to gRPC backend services. + Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers + intended for load balancing gRPC traffic. Only global + forwarding rules with load balancing scheme + INTERNAL_SELF_MANAGED can reference a target gRPC proxy. + The target gRPC Proxy references a URL map that + specifies how traffic is routed to gRPC backend + services. """ @@ -875,21 +888,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1198,21 +1222,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py index 3c15a31c9781..f10a6eb47888 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py @@ -725,8 +725,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpProxy resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1176,22 +1177,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) - A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies) + + A target HTTP proxy is a component of Google Cloud + HTTP load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1639,8 +1647,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetHttpProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1773,8 +1781,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py index 47abfc63de3b..bdf7990a1de7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py @@ -816,21 +816,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -981,22 +992,29 @@ def __call__( Returns: ~.compute.TargetHttpProxy: - Represents a Target HTTP Proxy resource. Google Compute - Engine has two Target HTTP Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP - load balancers. \* targetHttpProxies are used by global - external Application Load Balancers, classic Application - Load Balancers, cross-region internal Application Load - Balancers, and Traffic Director. \* - regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTP proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + load balancers. + + - targetHttpProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -1146,21 +1164,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1469,21 +1498,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1644,21 +1684,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py index ec060f3e3e86..e463e0020104 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py @@ -725,8 +725,9 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpsProxy resources, regional - and global, available to the specified project. To prevent - failure, Google recommends that you set the + and global, available to the specified project. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1176,22 +1177,29 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) - \* - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) - A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) + - [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) + + A target HTTPS proxy is a component of Google Cloud + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application + Load Balancers, cross-region internal Application + Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional + internal Application Load Balancers and regional + external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and + the target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ # Create or coerce a protobuf request object. @@ -1639,8 +1647,8 @@ def patch_unary( ) -> compute.Operation: r"""Patches the specified TargetHttpsProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1773,8 +1781,8 @@ def patch( ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpsProxy resource with the data included in the request. This method supports - PATCH semantics and uses JSON merge patch format and - processing rules. + PATCH semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py index 45a51ea43647..f46d40c43d92 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py @@ -1041,21 +1041,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1206,22 +1217,29 @@ def __call__( Returns: ~.compute.TargetHttpsProxy: - Represents a Target HTTPS Proxy resource. Google Compute - Engine has two Target HTTPS Proxy resources: \* - `Global `__ - \* - `Regional `__ + Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy + resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud - HTTPS load balancers. \* targetHttpsProxies are used by - global external Application Load Balancers, classic - Application Load Balancers, cross-region internal - Application Load Balancers, and Traffic Director. \* - regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external - Application Load Balancers. Forwarding rules reference a - target HTTPS proxy, and the target proxy then references - a URL map. For more information, read Using Target - Proxies and Forwarding rule concepts. + HTTPS load balancers. + + - targetHttpsProxies are used by global external + Application Load Balancers, classic Application Load + Balancers, cross-region internal Application Load + Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal + Application Load Balancers and regional external + Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the + target proxy then references a URL map. For more + information, readUsing Target Proxies and Forwarding + rule concepts. """ @@ -1371,21 +1389,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1694,21 +1723,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1870,21 +1910,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2042,21 +2093,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2214,21 +2276,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2388,21 +2461,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2557,21 +2641,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py index 7a13324ffa5b..3b9083a31cf8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py @@ -721,8 +721,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target instances. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target instances. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1205,13 +1206,15 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetInstance: Represents a Target Instance - resource. You can use a target instance - to handle traffic for one or more - forwarding rules, which is ideal for - forwarding protocol traffic that is - managed by a single source. For example, - ESP, AH, TCP, or UDP. For more - information, read Target instances. + resource. + You can use a target instance to handle + traffic for one or more forwarding + rules, which is ideal for forwarding + protocol traffic that is managed by a + single source. For example, ESP, AH, + TCP, or UDP. For more information, + readTarget + instances. """ # Create or coerce a protobuf request object. @@ -1715,8 +1718,8 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified target instance. For more information, see - Google Cloud Armor Overview + specified target instance. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python @@ -1872,8 +1875,8 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified target instance. For more information, see - Google Cloud Armor Overview + specified target instance. For more information, + seeGoogle Cloud Armor Overview .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py index 3a257f1e418e..f7be612b3833 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py @@ -764,21 +764,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -930,13 +941,15 @@ def __call__( Returns: ~.compute.TargetInstance: Represents a Target Instance - resource. You can use a target instance - to handle traffic for one or more - forwarding rules, which is ideal for - forwarding protocol traffic that is - managed by a single source. For example, - ESP, AH, TCP, or UDP. For more - information, read Target instances. + resource. + You can use a target instance to handle + traffic for one or more forwarding + rules, which is ideal for forwarding + protocol traffic that is managed by a + single source. For example, ESP, AH, + TCP, or UDP. For more information, + readTarget + instances. """ @@ -1086,21 +1099,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1408,21 +1432,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py index b8cf5879d93d..1832c4afadea 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py @@ -1370,8 +1370,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target pools. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target pools. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1854,13 +1855,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetPool: Represents a Target Pool resource. + Target pools are used with external passthrough Network Load Balancers. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup - target pool. For more information, read - Using target pools. + target pool. For more information, + readUsing target pools. """ # Create or coerce a protobuf request object. @@ -3476,7 +3478,7 @@ def set_security_policy_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the - specified target pool. For more information, see Google + specified target pool. For more information, seeGoogle Cloud Armor Overview .. code-block:: python @@ -3633,7 +3635,7 @@ def set_security_policy( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the - specified target pool. For more information, see Google + specified target pool. For more information, seeGoogle Cloud Armor Overview .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py index f55d56c4cafb..9bbef28c9369 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py @@ -942,21 +942,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1113,21 +1124,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1433,21 +1455,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1597,13 +1630,14 @@ def __call__( Returns: ~.compute.TargetPool: Represents a Target Pool resource. + Target pools are used with external passthrough Network Load Balancers. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup - target pool. For more information, read - Using target pools. + target pool. For more information, + readUsing target pools. """ @@ -1905,21 +1939,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2222,21 +2267,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2393,21 +2449,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2560,21 +2627,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2733,21 +2811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py index e54ba9bf4cb8..b1559dd3a66b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py @@ -1048,13 +1048,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetSslProxy: Represents a Target SSL Proxy - resource. A target SSL proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target SSL proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target SSL proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + SSL proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py index 93cbd153c1d7..bd3912731aae 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py @@ -781,21 +781,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -947,13 +958,14 @@ def __call__( Returns: ~.compute.TargetSslProxy: Represents a Target SSL Proxy - resource. A target SSL proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target SSL proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target SSL proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + SSL proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -1103,21 +1115,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1427,21 +1450,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1599,21 +1633,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1770,21 +1815,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1942,21 +1998,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2113,21 +2180,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py index a2c872703ba9..c8a717808c13 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py @@ -723,9 +723,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetTcpProxy resources, regional and - global, available to the specified project. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + global, available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1175,13 +1176,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py index 8776d66942aa..2d090500f048 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py @@ -819,21 +819,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -985,13 +996,14 @@ def __call__( Returns: ~.compute.TargetTcpProxy: Represents a Target TCP Proxy - resource. A target TCP proxy is a - component of a Proxy Network Load - Balancer. The forwarding rule references - the target TCP proxy, and the target - proxy then references a backend service. - For more information, read Proxy Network - Load Balancer overview. + resource. + A target TCP proxy is a component of a + Proxy Network Load Balancer. The + forwarding rule references the target + TCP proxy, and the target proxy then + references a backend service. For more + information, readProxy Network Load + Balancer overview. """ @@ -1141,21 +1153,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1465,21 +1488,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1636,21 +1670,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py index 5883d34cdc7d..d0bc0d2e5929 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py @@ -724,8 +724,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of target VPN gateways. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of target VPN gateways. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1202,10 +1203,11 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.TargetVpnGateway: Represents a Target VPN Gateway - resource. The target VPN gateway - resource represents a Classic Cloud VPN - gateway. For more information, read the - the Cloud VPN Overview. + resource. + The target VPN gateway resource + represents a Classic Cloud VPN gateway. + For more information, read thethe + Cloud VPN Overview. """ # Create or coerce a protobuf request object. @@ -1701,7 +1703,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a TargetVpnGateway. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python @@ -1852,7 +1854,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a TargetVpnGateway. To learn more - about labels, read the Labeling Resources documentation. + about labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py index a824711f3dcc..2e575af6a30f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py @@ -763,21 +763,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -929,10 +940,11 @@ def __call__( Returns: ~.compute.TargetVpnGateway: Represents a Target VPN Gateway - resource. The target VPN gateway - resource represents a Classic Cloud VPN - gateway. For more information, read the - the Cloud VPN Overview. + resource. + The target VPN gateway resource + represents a Classic Cloud VPN gateway. + For more information, read thethe + Cloud VPN Overview. """ @@ -1082,21 +1094,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1407,21 +1430,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py index f2c3db5731bc..faab43237a4b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py @@ -713,9 +713,10 @@ def aggregated_list( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all UrlMap resources, regional and global, - available to the specified project. To prevent failure, Google - recommends that you set the ``returnPartialSuccess`` parameter - to ``true``. + available to the specified project. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1161,31 +1162,43 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - [Global](/compute/docs/reference/rest/beta/urlMaps) \* - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) - A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more - information, read URL Map Concepts. + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - [Global](/compute/docs/reference/rest/beta/urlMaps) + - [Regional](/compute/docs/reference/rest/beta/regionUrlMaps) + + A URL map resource is a component of certain types of + cloud load balancers and Traffic Director: + + \* urlMaps are used by global external Application + Load Balancers, classic Application Load Balancers, + and cross-region internal Application Load Balancers. + \* regionUrlMaps are used by internal Application + Load Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: + Routing and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing + and traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend + bucket. + + To use the global urlMaps resource, the backend + service must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. + To use the regionUrlMaps resource, the backend + service must have aloadBalancingScheme of + INTERNAL_MANAGED. For more information, read URL Map + Concepts. """ # Create or coerce a protobuf request object. @@ -1509,8 +1522,9 @@ def invalidate_cache_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1647,8 +1661,9 @@ def invalidate_cache( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Initiates a cache invalidation operation, invalidating the - specified path, scoped to the specified UrlMap. For more - information, see `Invalidating cached + specified path, scoped to the specified UrlMap. + + For more information, see `Invalidating cached content `__. .. code-block:: python @@ -1929,9 +1944,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python @@ -2060,9 +2075,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data - included in the request. This method supports PATCH - semantics and uses the JSON merge patch format and - processing rules. + included in the request. This method supportsPATCH + semantics and uses theJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py index 4a44fe453241..e0c1358c240c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py @@ -906,21 +906,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1066,31 +1077,40 @@ def __call__( Returns: ~.compute.UrlMap: - Represents a URL Map resource. Compute Engine has two - URL Map resources: \* - `Global `__ - \* - `Regional `__ + Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + A URL map resource is a component of certain types of - cloud load balancers and Traffic Director: \* urlMaps - are used by global external Application Load Balancers, - classic Application Load Balancers, and cross-region - internal Application Load Balancers. \* regionUrlMaps - are used by internal Application Load Balancers, - regional external Application Load Balancers and - regional internal Application Load Balancers. For a list - of supported URL map features by the load balancer type, - see the Load balancing features: Routing and traffic - management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director - features: Routing and traffic management table. This - resource defines mappings from hostnames and URL paths - to either a backend service or a backend bucket. To use - the global urlMaps resource, the backend service must - have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the - regionUrlMaps resource, the backend service must have a - loadBalancingScheme of INTERNAL_MANAGED. For more + cloud load balancers and Traffic Director: + + - urlMaps are used by global external Application Load + Balancers, classic Application Load Balancers, and + cross-region internal Application Load Balancers. + - regionUrlMaps are used by internal Application Load + Balancers, regional external Application Load + Balancers and regional internal Application Load + Balancers. + + For a list of supported URL map features by the load + balancer type, see the Load balancing features: Routing + and traffic management table. + + For a list of supported URL map features for Traffic + Director, see the Traffic Director features: Routing and + traffic management table. + + This resource defines mappings from hostnames and URL + paths to either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service + must have a loadBalancingScheme of either + EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To + use the regionUrlMaps resource, the backend service must + have aloadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts. """ @@ -1234,21 +1254,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1403,21 +1434,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1718,21 +1760,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -2038,21 +2091,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py index 93eed6679ef6..9dd133464f49 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py @@ -712,8 +712,9 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of VPN gateways. To prevent - failure, Google recommends that you set the + r"""Retrieves an aggregated list of VPN gateways. + + To prevent failure, Google recommends that you set the ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1183,13 +1184,14 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.VpnGateway: - Represents a HA VPN gateway. HA VPN - is a high-availability (HA) Cloud VPN - solution that lets you securely connect - your on-premises network to your Google - Cloud Virtual Private Cloud network - through an IPsec VPN connection in a - single region. For more information + Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud + VPN solution that lets you securely + connect your on-premises network to your + Google Cloud Virtual Private Cloud + network through an IPsec VPN connection + in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies . @@ -1816,7 +1818,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnGateway. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -1967,7 +1969,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnGateway. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py index 701368c1bfdd..a6488b60e624 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py @@ -811,21 +811,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -974,13 +985,14 @@ def __call__( Returns: ~.compute.VpnGateway: - Represents a HA VPN gateway. HA VPN - is a high-availability (HA) Cloud VPN - solution that lets you securely connect - your on-premises network to your Google - Cloud Virtual Private Cloud network - through an IPsec VPN connection in a - single region. For more information + Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud + VPN solution that lets you securely + connect your on-premises network to your + Google Cloud Virtual Private Cloud + network through an IPsec VPN connection + in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies . @@ -1278,21 +1290,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1593,21 +1616,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py index cfcb73c2c4f0..0591d9cabe1d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py @@ -712,9 +712,10 @@ def aggregated_list( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AggregatedListPager: - r"""Retrieves an aggregated list of VPN tunnels. To prevent failure, - Google recommends that you set the ``returnPartialSuccess`` - parameter to ``true``. + r"""Retrieves an aggregated list of VPN tunnels. + + To prevent failure, Google recommends that you set the + ``returnPartialSuccess`` parameter to ``true``. .. code-block:: python @@ -1189,8 +1190,9 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.VpnTunnel: Represents a Cloud VPN Tunnel - resource. For more information about - VPN, read the the Cloud VPN Overview. + resource. + For more information about VPN, read the + the Cloud VPN Overview. """ # Create or coerce a protobuf request object. @@ -1686,7 +1688,7 @@ def set_labels_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnTunnel. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python @@ -1837,7 +1839,7 @@ def set_labels( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnTunnel. To learn more about - labels, read the Labeling Resources documentation. + labels, read theLabeling Resources documentation. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py index 36676c9e8379..bfe59d9bd95a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py @@ -748,21 +748,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -911,8 +922,9 @@ def __call__( Returns: ~.compute.VpnTunnel: Represents a Cloud VPN Tunnel - resource. For more information about - VPN, read the the Cloud VPN Overview. + resource. + For more information about VPN, read the + the Cloud VPN Overview. """ @@ -1056,21 +1068,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1371,21 +1394,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py index 5e55e42011cf..6b93eaae754d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py @@ -1562,9 +1562,9 @@ def patch_unary( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: r"""Updates the specified wire group resource with the - data included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python @@ -1711,9 +1711,9 @@ def patch( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified wire group resource with the - data included in the request. This method supports PATCH - semantics and uses JSON merge patch format and - processing rules. + data included in the request. This method supportsPATCH + semantics and usesJSON merge + patch format and processing rules. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py index fe65e60ae91c..90642004e18c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py @@ -481,21 +481,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -788,21 +799,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -1101,21 +1123,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py index 74f3b75e572c..5982e663fb91 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py @@ -916,23 +916,30 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. @@ -1144,13 +1151,18 @@ def wait( retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be ``DONE`` or still in - progress. This method is called on a best-effort basis. - Specifically: - In uncommon cases, when the server is - overloaded, the request might return before the default deadline - is reached, or might return after zero seconds. - If the default - deadline is reached, there is no guarantee that the operation is - actually done when the method returns. Be prepared to retry if - the operation is not ``DONE``. + progress. + + This method is called on a best-effort basis. Specifically: + + :: + + - In uncommon cases, when the server is overloaded, the request might + return before the default deadline is reached, or might return after zero + seconds. + - If the default deadline is reached, there is no guarantee that the + operation is actually done when the method returns. Be prepared to retry + if the operation is not `DONE`. .. code-block:: python @@ -1213,23 +1225,30 @@ def sample_wait(): Returns: google.cloud.compute_v1beta.types.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - [Global](/compute/docs/reference/rest/beta/globalOperations) - \* - [Regional](/compute/docs/reference/rest/beta/regionOperations) - \* - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) - You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the globalOperations - resource. - For regional operations, use the - regionOperations resource. - For zonal operations, use - the zoneOperations resource. For more information, read - Global, Regional, and Zonal Resources. Note that - completed Operation resources have a limited retention - period. + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - [Global](/compute/docs/reference/rest/beta/globalOperations) + - [Regional](/compute/docs/reference/rest/beta/regionOperations) + - [Zonal](/compute/docs/reference/rest/beta/zoneOperations) + + You can use an operation resource to manage + asynchronous API requests. For more information, + readHandling API responses. + + Operations can be global, regional or zonal. + + - For global operations, use the globalOperations + resource. - For regional operations, use the + regionOperations resource. - For zonal operations, + use the zoneOperations resource. + + For more information, read Global, Regional, and + Zonal Resources. + + Note that completed Operation resources have a + limited retention period. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py index f86151cadf0c..1e906f24158f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py @@ -594,21 +594,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. @@ -903,21 +914,32 @@ def __call__( Returns: ~.compute.Operation: - Represents an Operation resource. Google Compute Engine - has three Operation resources: \* - `Global `__ - \* - `Regional `__ - \* - `Zonal `__ + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + You can use an operation resource to manage asynchronous - API requests. For more information, read Handling API - responses. Operations can be global, regional or zonal. - - For global operations, use the ``globalOperations`` - resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, - use the ``zoneOperations`` resource. For more - information, read Global, Regional, and Zonal Resources. + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + Note that completed Operation resources have a limited retention period. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py new file mode 100644 index 000000000000..2102bc0bf7fb --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .client import ZoneVmExtensionPoliciesClient + +__all__ = ("ZoneVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py new file mode 100644 index 000000000000..ab9e224fe02e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/client.py @@ -0,0 +1,1915 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +import functools +from http import HTTPStatus +import json +import logging as std_logging +import os +import re +from typing import ( + Callable, + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) +import warnings + +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation, gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore +from google.auth.transport import mtls # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + +from google.api_core import extended_operation # type: ignore + +from google.cloud.compute_v1beta.services.zone_vm_extension_policies import pagers +from google.cloud.compute_v1beta.types import compute + +from .transports.base import DEFAULT_CLIENT_INFO, ZoneVmExtensionPoliciesTransport +from .transports.rest import ZoneVmExtensionPoliciesRestTransport + + +class ZoneVmExtensionPoliciesClientMeta(type): + """Metaclass for the ZoneVmExtensionPolicies client. + + This provides class-level methods for building and retrieving + support objects (e.g. transport) without polluting the client instance + objects. + """ + + _transport_registry = ( + OrderedDict() + ) # type: Dict[str, Type[ZoneVmExtensionPoliciesTransport]] + _transport_registry["rest"] = ZoneVmExtensionPoliciesRestTransport + + def get_transport_class( + cls, + label: Optional[str] = None, + ) -> Type[ZoneVmExtensionPoliciesTransport]: + """Returns an appropriate transport class. + + Args: + label: The name of the desired transport. If none is + provided, then the first transport in the registry is used. + + Returns: + The transport class to use. + """ + # If a specific transport is requested, return that one. + if label: + return cls._transport_registry[label] + + # No transport is requested; return the default (that is, the first one + # in the dictionary). + return next(iter(cls._transport_registry.values())) + + +class ZoneVmExtensionPoliciesClient(metaclass=ZoneVmExtensionPoliciesClientMeta): + """The ZoneVmExtensionPolicies API.""" + + @staticmethod + def _get_default_mtls_endpoint(api_endpoint): + """Converts api endpoint to mTLS endpoint. + + Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to + "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. + Args: + api_endpoint (Optional[str]): the api endpoint to convert. + Returns: + str: converted mTLS api endpoint. + """ + if not api_endpoint: + return api_endpoint + + mtls_endpoint_re = re.compile( + r"(?P[^.]+)(?P\.mtls)?(?P\.sandbox)?(?P\.googleapis\.com)?" + ) + + m = mtls_endpoint_re.match(api_endpoint) + name, mtls, sandbox, googledomain = m.groups() + if mtls or not googledomain: + return api_endpoint + + if sandbox: + return api_endpoint.replace( + "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" + ) + + return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") + + # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead. + DEFAULT_ENDPOINT = "compute.googleapis.com" + DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore + DEFAULT_ENDPOINT + ) + + _DEFAULT_ENDPOINT_TEMPLATE = "compute.{UNIVERSE_DOMAIN}" + _DEFAULT_UNIVERSE = "googleapis.com" + + @staticmethod + def _use_client_cert_effective(): + """Returns whether client certificate should be used for mTLS if the + google-auth version supports should_use_client_cert automatic mTLS enablement. + + Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var. + + Returns: + bool: whether client certificate should be used for mTLS + Raises: + ValueError: (If using a version of google-auth without should_use_client_cert and + GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.) + """ + # check if google-auth version supports should_use_client_cert for automatic mTLS enablement + if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER + return mtls.should_use_client_cert() + else: # pragma: NO COVER + # if unsupported, fallback to reading from env var + use_client_cert_str = os.getenv( + "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false" + ).lower() + if use_client_cert_str not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be" + " either `true` or `false`" + ) + return use_client_cert_str == "true" + + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials + info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ZoneVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + @classmethod + def from_service_account_file(cls, filename: str, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + ZoneVmExtensionPoliciesClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @property + def transport(self) -> ZoneVmExtensionPoliciesTransport: + """Returns the transport used by the client instance. + + Returns: + ZoneVmExtensionPoliciesTransport: The transport used by the client + instance. + """ + return self._transport + + @staticmethod + def common_billing_account_path( + billing_account: str, + ) -> str: + """Returns a fully-qualified billing_account string.""" + return "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + + @staticmethod + def parse_common_billing_account_path(path: str) -> Dict[str, str]: + """Parse a billing_account path into its component segments.""" + m = re.match(r"^billingAccounts/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_folder_path( + folder: str, + ) -> str: + """Returns a fully-qualified folder string.""" + return "folders/{folder}".format( + folder=folder, + ) + + @staticmethod + def parse_common_folder_path(path: str) -> Dict[str, str]: + """Parse a folder path into its component segments.""" + m = re.match(r"^folders/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_organization_path( + organization: str, + ) -> str: + """Returns a fully-qualified organization string.""" + return "organizations/{organization}".format( + organization=organization, + ) + + @staticmethod + def parse_common_organization_path(path: str) -> Dict[str, str]: + """Parse a organization path into its component segments.""" + m = re.match(r"^organizations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_project_path( + project: str, + ) -> str: + """Returns a fully-qualified project string.""" + return "projects/{project}".format( + project=project, + ) + + @staticmethod + def parse_common_project_path(path: str) -> Dict[str, str]: + """Parse a project path into its component segments.""" + m = re.match(r"^projects/(?P.+?)$", path) + return m.groupdict() if m else {} + + @staticmethod + def common_location_path( + project: str, + location: str, + ) -> str: + """Returns a fully-qualified location string.""" + return "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + + @staticmethod + def parse_common_location_path(path: str) -> Dict[str, str]: + """Parse a location path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) + return m.groupdict() if m else {} + + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Deprecated. Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variable is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + + warnings.warn( + "get_mtls_endpoint_and_cert_source is deprecated. Use the api_endpoint property instead.", + DeprecationWarning, + ) + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = ZoneVmExtensionPoliciesClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert: + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + + @staticmethod + def _read_environment_variables(): + """Returns the environment variables used by the client. + + Returns: + Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE, + GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables. + + Raises: + ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not + any of ["true", "false"]. + google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT + is not any of ["auto", "never", "always"]. + """ + use_client_cert = ZoneVmExtensionPoliciesClient._use_client_cert_effective() + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower() + universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN") + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + return use_client_cert, use_mtls_endpoint, universe_domain_env + + @staticmethod + def _get_client_cert_source(provided_cert_source, use_cert_flag): + """Return the client cert source to be used by the client. + + Args: + provided_cert_source (bytes): The client certificate source provided. + use_cert_flag (bool): A flag indicating whether to use the client certificate. + + Returns: + bytes or None: The client cert source to be used by the client. + """ + client_cert_source = None + if use_cert_flag: + if provided_cert_source: + client_cert_source = provided_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + return client_cert_source + + @staticmethod + def _get_api_endpoint( + api_override, client_cert_source, universe_domain, use_mtls_endpoint + ): + """Return the API endpoint used by the client. + + Args: + api_override (str): The API endpoint override. If specified, this is always + the return value of this function and the other arguments are not used. + client_cert_source (bytes): The client certificate source used by the client. + universe_domain (str): The universe domain used by the client. + use_mtls_endpoint (str): How to use the mTLS endpoint, which depends also on the other parameters. + Possible values are "always", "auto", or "never". + + Returns: + str: The API endpoint to be used by the client. + """ + if api_override is not None: + api_endpoint = api_override + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + _default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if universe_domain != _default_universe: + raise MutualTLSChannelError( + f"mTLS is not supported in any universe other than {_default_universe}." + ) + api_endpoint = ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = ( + ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=universe_domain + ) + ) + return api_endpoint + + @staticmethod + def _get_universe_domain( + client_universe_domain: Optional[str], universe_domain_env: Optional[str] + ) -> str: + """Return the universe domain used by the client. + + Args: + client_universe_domain (Optional[str]): The universe domain configured via the client options. + universe_domain_env (Optional[str]): The universe domain configured via the "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable. + + Returns: + str: The universe domain to be used by the client. + + Raises: + ValueError: If the universe domain is an empty string. + """ + universe_domain = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + if client_universe_domain is not None: + universe_domain = client_universe_domain + elif universe_domain_env is not None: + universe_domain = universe_domain_env + if len(universe_domain.strip()) == 0: + raise ValueError("Universe Domain cannot be an empty string.") + return universe_domain + + def _validate_universe_domain(self): + """Validates client's and credentials' universe domains are consistent. + + Returns: + bool: True iff the configured universe domain is valid. + + Raises: + ValueError: If the configured universe domain is not valid. + """ + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True + + def _add_cred_info_for_auth_errors( + self, error: core_exceptions.GoogleAPICallError + ) -> None: + """Adds credential info string to error details for 401/403/404 errors. + + Args: + error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info. + """ + if error.code not in [ + HTTPStatus.UNAUTHORIZED, + HTTPStatus.FORBIDDEN, + HTTPStatus.NOT_FOUND, + ]: + return + + cred = self._transport._credentials + + # get_cred_info is only available in google-auth>=2.35.0 + if not hasattr(cred, "get_cred_info"): + return + + # ignore the type check since pypy test fails when get_cred_info + # is not available + cred_info = cred.get_cred_info() # type: ignore + if cred_info and hasattr(error._details, "append"): + error._details.append(json.dumps(cred_info)) + + @property + def api_endpoint(self): + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._api_endpoint + + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._universe_domain + + def __init__( + self, + *, + credentials: Optional[ga_credentials.Credentials] = None, + transport: Optional[ + Union[ + str, + ZoneVmExtensionPoliciesTransport, + Callable[..., ZoneVmExtensionPoliciesTransport], + ] + ] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + ) -> None: + """Instantiates the zone vm extension policies client. + + Args: + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + transport (Optional[Union[str,ZoneVmExtensionPoliciesTransport,Callable[..., ZoneVmExtensionPoliciesTransport]]]): + The transport to use, or a Callable that constructs and returns a new transport. + If a Callable is given, it will be called with the same set of initialization + arguments as used in the ZoneVmExtensionPoliciesTransport constructor. + If set to None, a transport is chosen automatically. + NOTE: "rest" transport functionality is currently in a + beta state (preview). We welcome your feedback via an + issue in this library's source repository. + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): + Custom options for the client. + + 1. The ``api_endpoint`` property can be used to override the + default endpoint provided by the client when ``transport`` is + not explicitly provided. Only if this property is not set and + ``transport`` was not explicitly provided, the endpoint is + determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment + variable, which have one of the following values: + "always" (always use the default mTLS endpoint), "never" (always + use the default regular endpoint) and "auto" (auto-switch to the + default mTLS endpoint if client certificate is present; this is + the default value). + + 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable + is "true", then the ``client_cert_source`` property can be used + to provide a client certificate for mTLS transport. If + not provided, the default SSL client certificate will be used if + present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not + set, no client certificate will be used. + + 3. The ``universe_domain`` property can be used to override the + default "googleapis.com" universe. Note that the ``api_endpoint`` + property still takes precedence; and ``universe_domain`` is + currently not supported for mTLS. + + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + """ + self._client_options = client_options + if isinstance(self._client_options, dict): + self._client_options = client_options_lib.from_dict(self._client_options) + if self._client_options is None: + self._client_options = client_options_lib.ClientOptions() + self._client_options = cast( + client_options_lib.ClientOptions, self._client_options + ) + + universe_domain_opt = getattr(self._client_options, "universe_domain", None) + + ( + self._use_client_cert, + self._use_mtls_endpoint, + self._universe_domain_env, + ) = ZoneVmExtensionPoliciesClient._read_environment_variables() + self._client_cert_source = ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + self._client_options.client_cert_source, self._use_client_cert + ) + ) + self._universe_domain = ZoneVmExtensionPoliciesClient._get_universe_domain( + universe_domain_opt, self._universe_domain_env + ) + self._api_endpoint = None # updated below, depending on `transport` + + # Initialize the universe domain validation. + self._is_universe_domain_valid = False + + if CLIENT_LOGGING_SUPPORTED: # pragma: NO COVER + # Setup logging. + client_logging.initialize_logging() + + api_key_value = getattr(self._client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) + + # Save or instantiate the transport. + # Ordinarily, we provide the transport, but allowing a custom transport + # instance provides an extensibility point for unusual situations. + transport_provided = isinstance(transport, ZoneVmExtensionPoliciesTransport) + if transport_provided: + # transport is a ZoneVmExtensionPoliciesTransport instance. + if credentials or self._client_options.credentials_file or api_key_value: + raise ValueError( + "When providing a transport instance, " + "provide its credentials directly." + ) + if self._client_options.scopes: + raise ValueError( + "When providing a transport instance, provide its scopes " + "directly." + ) + self._transport = cast(ZoneVmExtensionPoliciesTransport, transport) + self._api_endpoint = self._transport.host + + self._api_endpoint = ( + self._api_endpoint + or ZoneVmExtensionPoliciesClient._get_api_endpoint( + self._client_options.api_endpoint, + self._client_cert_source, + self._universe_domain, + self._use_mtls_endpoint, + ) + ) + + if not transport_provided: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + + transport_init: Union[ + Type[ZoneVmExtensionPoliciesTransport], + Callable[..., ZoneVmExtensionPoliciesTransport], + ] = ( + ZoneVmExtensionPoliciesClient.get_transport_class(transport) + if isinstance(transport, str) or transport is None + else cast(Callable[..., ZoneVmExtensionPoliciesTransport], transport) + ) + # initialize with the provided callable or the passed in class + self._transport = transport_init( + credentials=credentials, + credentials_file=self._client_options.credentials_file, + host=self._api_endpoint, + scopes=self._client_options.scopes, + client_cert_source_for_mtls=self._client_cert_source, + quota_project_id=self._client_options.quota_project_id, + client_info=client_info, + always_use_jwt_access=True, + api_audience=self._client_options.api_audience, + ) + + if "async" not in str(self._transport): + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ): # pragma: NO COVER + _LOGGER.debug( + "Created client `google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient`.", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "universeDomain": getattr( + self._transport._credentials, "universe_domain", "" + ), + "credentialsType": f"{type(self._transport._credentials).__module__}.{type(self._transport._credentials).__qualname__}", + "credentialsInfo": getattr( + self.transport._credentials, "get_cred_info", lambda: None + )(), + } + if hasattr(self._transport, "_credentials") + else { + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "credentialsType": None, + }, + ) + + def delete_unary( + self, + request: Optional[ + Union[compute.DeleteZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Deletes a specified zone VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to delete. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteZoneVmExtensionPolicyRequest): + request = compute.DeleteZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete( + self, + request: Optional[ + Union[compute.DeleteZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Deletes a specified zone VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to delete. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.DeleteZoneVmExtensionPolicyRequest): + request = compute.DeleteZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.delete] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def get( + self, + request: Optional[Union[compute.GetZoneVmExtensionPolicyRequest, dict]] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicy: + r"""Retrieves details of a specific zone VM extension + policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_get(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.GetZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Get. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the VM extension policy + resource to return. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.types.VmExtensionPolicy: + Represents a VM extension policy. + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, vm_extension_policy] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.GetZoneVmExtensionPolicyRequest): + request = compute.GetZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.get] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert_unary( + self, + request: Optional[ + Union[compute.InsertZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Creates a new zone-level VM extension policy within a + project. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertZoneVmExtensionPolicyRequest): + request = compute.InsertZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def insert( + self, + request: Optional[ + Union[compute.InsertZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Creates a new zone-level VM extension policy within a + project. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone, vm_extension_policy_resource] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.InsertZoneVmExtensionPolicyRequest): + request = compute.InsertZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.insert] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def list( + self, + request: Optional[ + Union[compute.ListZoneVmExtensionPoliciesRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> pagers.ListPager: + r"""Lists all VM extension policies within a specific + zone for a project. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_list(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListZoneVmExtensionPoliciesRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.List. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers.ListPager: + Iterating over this object will yield + results and resolve additional pages + automatically. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [project, zone] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.ListZoneVmExtensionPoliciesRequest): + request = compute.ListZoneVmExtensionPoliciesRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.list] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListPager( + method=rpc, + request=request, + response=response, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update_unary( + self, + request: Optional[ + Union[compute.UpdateZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Modifies an existing zone VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to update. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + vm_extension_policy, + vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateZoneVmExtensionPolicyRequest): + request = compute.UpdateZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update( + self, + request: Optional[ + Union[compute.UpdateZoneVmExtensionPolicyRequest, dict] + ] = None, + *, + project: Optional[str] = None, + zone: Optional[str] = None, + vm_extension_policy: Optional[str] = None, + vm_extension_policy_resource: Optional[compute.VmExtensionPolicy] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> extended_operation.ExtendedOperation: + r"""Modifies an existing zone VM extension policy. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import compute_v1beta + + def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest, dict]): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + project (str): + Project ID for this request. + This corresponds to the ``project`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + zone (str): + Name of the zone for this request. + This corresponds to the ``zone`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy (str): + Name of the zone VM extension policy + to update. + + This corresponds to the ``vm_extension_policy`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + This corresponds to the ``vm_extension_policy_resource`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.api_core.extended_operation.ExtendedOperation: + An object representing a extended + long-running operation. + + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [ + project, + zone, + vm_extension_policy, + vm_extension_policy_resource, + ] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, compute.UpdateZoneVmExtensionPolicyRequest): + request = compute.UpdateZoneVmExtensionPolicyRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if project is not None: + request.project = project + if zone is not None: + request.zone = zone + if vm_extension_policy is not None: + request.vm_extension_policy = vm_extension_policy + if vm_extension_policy_resource is not None: + request.vm_extension_policy_resource = vm_extension_policy_resource + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.update] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ("project", request.project), + ("zone", request.zone), + ("vm_extension_policy", request.vm_extension_policy), + ) + ), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + operation_service = self._transport._zone_operations_client + operation_request = compute.GetZoneOperationRequest() + operation_request.project = request.project + operation_request.zone = request.zone + operation_request.operation = response.name + + get_operation = functools.partial(operation_service.get, operation_request) + # Cancel is not part of extended operations yet. + cancel_operation = lambda: None + + # Note: this class is an implementation detail to provide a uniform + # set of names for certain fields in the extended operation proto message. + # See google.api_core.extended_operation.ExtendedOperation for details + # on these properties and the expected interface. + class _CustomOperation(extended_operation.ExtendedOperation): + @property + def error_message(self): + return self._extended_operation.http_error_message + + @property + def error_code(self): + return self._extended_operation.http_error_status_code + + response = _CustomOperation.make(get_operation, cancel_operation, response) + + # Done; return the response. + return response + + def __enter__(self) -> "ZoneVmExtensionPoliciesClient": + return self + + def __exit__(self, type, value, traceback): + """Releases underlying transport's resources. + + .. warning:: + ONLY use as a context manager if the transport is NOT shared + with other clients! Exiting the with block will CLOSE the transport + and may cause errors in other clients! + """ + self.transport.close() + + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + +__all__ = ("ZoneVmExtensionPoliciesClient",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py new file mode 100644 index 000000000000..ced5c7e591a0 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/pagers.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from typing import ( + Any, + AsyncIterator, + Awaitable, + Callable, + Iterator, + Optional, + Sequence, + Tuple, + Union, +) + +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.api_core import retry_async as retries_async + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] + OptionalAsyncRetry = Union[ + retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None + ] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore + +from google.cloud.compute_v1beta.types import compute + + +class ListPager: + """A pager for iterating through ``list`` requests. + + This class thinly wraps an initial + :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyList` object, and + provides an ``__iter__`` method to iterate through its + ``items`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``List`` requests and continue to iterate + through the ``items`` field on the + corresponding responses. + + All the usual :class:`google.cloud.compute_v1beta.types.VmExtensionPolicyList` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., compute.VmExtensionPolicyList], + request: compute.ListZoneVmExtensionPoliciesRequest, + response: compute.VmExtensionPolicyList, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest): + The initial request object. + response (google.cloud.compute_v1beta.types.VmExtensionPolicyList): + The initial response object. + retry (google.api_core.retry.Retry): Designation of what errors, + if any, should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + """ + self._method = method + self._request = compute.ListZoneVmExtensionPoliciesRequest(request) + self._response = response + self._retry = retry + self._timeout = timeout + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[compute.VmExtensionPolicyList]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method( + self._request, + retry=self._retry, + timeout=self._timeout, + metadata=self._metadata, + ) + yield self._response + + def __iter__(self) -> Iterator[compute.VmExtensionPolicy]: + for page in self.pages: + yield from page.items + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst new file mode 100644 index 000000000000..35339b868a6f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/README.rst @@ -0,0 +1,9 @@ + +transport inheritance structure +_______________________________ + +`ZoneVmExtensionPoliciesTransport` is the ABC for all transports. +- public child `ZoneVmExtensionPoliciesGrpcTransport` for sync gRPC transport (defined in `grpc.py`). +- public child `ZoneVmExtensionPoliciesGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`). +- private child `_BaseZoneVmExtensionPoliciesRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`). +- public child `ZoneVmExtensionPoliciesRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`). diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py new file mode 100644 index 000000000000..601f34f0d2db --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/__init__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import ZoneVmExtensionPoliciesTransport +from .rest import ( + ZoneVmExtensionPoliciesRestInterceptor, + ZoneVmExtensionPoliciesRestTransport, +) + +# Compile a registry of transports. +_transport_registry = ( + OrderedDict() +) # type: Dict[str, Type[ZoneVmExtensionPoliciesTransport]] +_transport_registry["rest"] = ZoneVmExtensionPoliciesRestTransport + +__all__ = ( + "ZoneVmExtensionPoliciesTransport", + "ZoneVmExtensionPoliciesRestTransport", + "ZoneVmExtensionPoliciesRestInterceptor", +) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py new file mode 100644 index 000000000000..c441bf2198ee --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/base.py @@ -0,0 +1,239 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +import google.auth # type: ignore +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore +import google.protobuf + +from google.cloud.compute_v1beta import gapic_version as package_version +from google.cloud.compute_v1beta.services import zone_operations +from google.cloud.compute_v1beta.types import compute + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class ZoneVmExtensionPoliciesTransport(abc.ABC): + """Abstract transport class for ZoneVmExtensionPolicies.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "compute.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + """ + self._extended_operations_services: Dict[str, Any] = {} + + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + **scopes_kwargs, quota_project_id=quota_project_id + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.delete: gapic_v1.method.wrap_method( + self.delete, + default_timeout=None, + client_info=client_info, + ), + self.get: gapic_v1.method.wrap_method( + self.get, + default_timeout=None, + client_info=client_info, + ), + self.insert: gapic_v1.method.wrap_method( + self.insert, + default_timeout=None, + client_info=client_info, + ), + self.list: gapic_v1.method.wrap_method( + self.list, + default_timeout=None, + client_info=client_info, + ), + self.update: gapic_v1.method.wrap_method( + self.update, + default_timeout=None, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def delete( + self, + ) -> Callable[ + [compute.DeleteZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def get( + self, + ) -> Callable[ + [compute.GetZoneVmExtensionPolicyRequest], + Union[compute.VmExtensionPolicy, Awaitable[compute.VmExtensionPolicy]], + ]: + raise NotImplementedError() + + @property + def insert( + self, + ) -> Callable[ + [compute.InsertZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def list( + self, + ) -> Callable[ + [compute.ListZoneVmExtensionPoliciesRequest], + Union[compute.VmExtensionPolicyList, Awaitable[compute.VmExtensionPolicyList]], + ]: + raise NotImplementedError() + + @property + def update( + self, + ) -> Callable[ + [compute.UpdateZoneVmExtensionPolicyRequest], + Union[compute.Operation, Awaitable[compute.Operation]], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + @property + def _zone_operations_client(self) -> zone_operations.ZoneOperationsClient: + ex_op_service = self._extended_operations_services.get("zone_operations") + if not ex_op_service: + ex_op_service = zone_operations.ZoneOperationsClient( + credentials=self._credentials, + transport=self.kind, + ) + self._extended_operations_services["zone_operations"] = ex_op_service + + return ex_op_service + + +__all__ = ("ZoneVmExtensionPoliciesTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py new file mode 100644 index 000000000000..80bc37f48848 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest.py @@ -0,0 +1,1328 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import dataclasses +import json # type: ignore +import logging +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, rest_helpers, rest_streaming +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore +import google.protobuf +from google.protobuf import json_format +from requests import __version__ as requests_version + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .rest_base import _BaseZoneVmExtensionPoliciesRestTransport + +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object, None] # type: ignore + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = logging.getLogger(__name__) + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, + grpc_version=None, + rest_version=f"requests@{requests_version}", +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class ZoneVmExtensionPoliciesRestInterceptor: + """Interceptor for ZoneVmExtensionPolicies. + + Interceptors are used to manipulate requests, request metadata, and responses + in arbitrary ways. + Example use cases include: + * Logging + * Verifying requests according to service or custom semantics + * Stripping extraneous information from responses + + These use cases and more can be enabled by injecting an + instance of a custom subclass when constructing the ZoneVmExtensionPoliciesRestTransport. + + .. code-block:: python + class MyCustomZoneVmExtensionPoliciesInterceptor(ZoneVmExtensionPoliciesRestInterceptor): + def pre_delete(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_delete(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_get(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_get(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_insert(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_insert(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_list(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_list(self, response): + logging.log(f"Received response: {response}") + return response + + def pre_update(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_update(self, response): + logging.log(f"Received response: {response}") + return response + + transport = ZoneVmExtensionPoliciesRestTransport(interceptor=MyCustomZoneVmExtensionPoliciesInterceptor()) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + + """ + + def pre_delete( + self, + request: compute.DeleteZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.DeleteZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for delete + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_delete(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for delete + + DEPRECATED. Please use the `post_delete_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_delete` interceptor runs + before the `post_delete_with_metadata` interceptor. + """ + return response + + def post_delete_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for delete + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_delete_with_metadata` + interceptor in new development instead of the `post_delete` interceptor. + When both interceptors are used, this `post_delete_with_metadata` interceptor runs after the + `post_delete` interceptor. The (possibly modified) response returned by + `post_delete` will be passed to + `post_delete_with_metadata`. + """ + return response, metadata + + def pre_get( + self, + request: compute.GetZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.GetZoneVmExtensionPolicyRequest, Sequence[Tuple[str, Union[str, bytes]]] + ]: + """Pre-rpc interceptor for get + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_get( + self, response: compute.VmExtensionPolicy + ) -> compute.VmExtensionPolicy: + """Post-rpc interceptor for get + + DEPRECATED. Please use the `post_get_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_get` interceptor runs + before the `post_get_with_metadata` interceptor. + """ + return response + + def post_get_with_metadata( + self, + response: compute.VmExtensionPolicy, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.VmExtensionPolicy, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for get + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_get_with_metadata` + interceptor in new development instead of the `post_get` interceptor. + When both interceptors are used, this `post_get_with_metadata` interceptor runs after the + `post_get` interceptor. The (possibly modified) response returned by + `post_get` will be passed to + `post_get_with_metadata`. + """ + return response, metadata + + def pre_insert( + self, + request: compute.InsertZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.InsertZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for insert + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_insert(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for insert + + DEPRECATED. Please use the `post_insert_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_insert` interceptor runs + before the `post_insert_with_metadata` interceptor. + """ + return response + + def post_insert_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for insert + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_insert_with_metadata` + interceptor in new development instead of the `post_insert` interceptor. + When both interceptors are used, this `post_insert_with_metadata` interceptor runs after the + `post_insert` interceptor. The (possibly modified) response returned by + `post_insert` will be passed to + `post_insert_with_metadata`. + """ + return response, metadata + + def pre_list( + self, + request: compute.ListZoneVmExtensionPoliciesRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.ListZoneVmExtensionPoliciesRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for list + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_list( + self, response: compute.VmExtensionPolicyList + ) -> compute.VmExtensionPolicyList: + """Post-rpc interceptor for list + + DEPRECATED. Please use the `post_list_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_list` interceptor runs + before the `post_list_with_metadata` interceptor. + """ + return response + + def post_list_with_metadata( + self, + response: compute.VmExtensionPolicyList, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.VmExtensionPolicyList, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for list + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_list_with_metadata` + interceptor in new development instead of the `post_list` interceptor. + When both interceptors are used, this `post_list_with_metadata` interceptor runs after the + `post_list` interceptor. The (possibly modified) response returned by + `post_list` will be passed to + `post_list_with_metadata`. + """ + return response, metadata + + def pre_update( + self, + request: compute.UpdateZoneVmExtensionPolicyRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[ + compute.UpdateZoneVmExtensionPolicyRequest, + Sequence[Tuple[str, Union[str, bytes]]], + ]: + """Pre-rpc interceptor for update + + Override in a subclass to manipulate the request or metadata + before they are sent to the ZoneVmExtensionPolicies server. + """ + return request, metadata + + def post_update(self, response: compute.Operation) -> compute.Operation: + """Post-rpc interceptor for update + + DEPRECATED. Please use the `post_update_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the ZoneVmExtensionPolicies server but before + it is returned to user code. This `post_update` interceptor runs + before the `post_update_with_metadata` interceptor. + """ + return response + + def post_update_with_metadata( + self, + response: compute.Operation, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[compute.Operation, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for update + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the ZoneVmExtensionPolicies server but before it is returned to user code. + + We recommend only using this `post_update_with_metadata` + interceptor in new development instead of the `post_update` interceptor. + When both interceptors are used, this `post_update_with_metadata` interceptor runs after the + `post_update` interceptor. The (possibly modified) response returned by + `post_update` will be passed to + `post_update_with_metadata`. + """ + return response, metadata + + +@dataclasses.dataclass +class ZoneVmExtensionPoliciesRestStub: + _session: AuthorizedSession + _host: str + _interceptor: ZoneVmExtensionPoliciesRestInterceptor + + +class ZoneVmExtensionPoliciesRestTransport(_BaseZoneVmExtensionPoliciesRestTransport): + """REST backend synchronous transport for ZoneVmExtensionPolicies. + + The ZoneVmExtensionPolicies API. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + interceptor: Optional[ZoneVmExtensionPoliciesRestInterceptor] = None, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + NOTE: This REST transport functionality is currently in a beta + state (preview). We welcome your feedback via a GitHub issue in + this library's repository. Thank you! + + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. This argument will be + removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. + # TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the + # credentials object + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + url_scheme=url_scheme, + api_audience=api_audience, + ) + self._session = AuthorizedSession( + self._credentials, default_host=self.DEFAULT_HOST + ) + if client_cert_source_for_mtls: + self._session.configure_mtls_channel(client_cert_source_for_mtls) + self._interceptor = interceptor or ZoneVmExtensionPoliciesRestInterceptor() + self._prep_wrapped_messages(client_info) + + class _Delete( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Delete") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.DeleteZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the delete method over HTTP. + + Args: + request (~.compute.DeleteZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Delete. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_http_options() + ) + + request, metadata = self._interceptor.pre_delete(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Delete", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Delete._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_delete(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_delete_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.delete", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Delete", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Get( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Get") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.GetZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicy: + r"""Call the get method over HTTP. + + Args: + request (~.compute.GetZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Get. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicy: + Represents a VM extension policy. + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_http_options() + ) + + request, metadata = self._interceptor.pre_get(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Get", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Get", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Get._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicy() + pb_resp = compute.VmExtensionPolicy.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_get(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_get_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.VmExtensionPolicy.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.get", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Get", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Insert( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Insert") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.InsertZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the insert method over HTTP. + + Args: + request (~.compute.InsertZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Insert. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_http_options() + ) + + request, metadata = self._interceptor.pre_insert(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_transcoded_request( + http_options, request + ) + + body = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Insert", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Insert._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_insert(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_insert_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.insert", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Insert", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _List( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.List") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + ) + return response + + def __call__( + self, + request: compute.ListZoneVmExtensionPoliciesRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.VmExtensionPolicyList: + r"""Call the list method over HTTP. + + Args: + request (~.compute.ListZoneVmExtensionPoliciesRequest): + The request object. A request message for + ZoneVmExtensionPolicies.List. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.VmExtensionPolicyList: + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_http_options() + ) + + request, metadata = self._interceptor.pre_list(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_transcoded_request( + http_options, request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.List", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "List", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._List._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.VmExtensionPolicyList() + pb_resp = compute.VmExtensionPolicyList.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_list(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_list_with_metadata(resp, response_metadata) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.VmExtensionPolicyList.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.list", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "List", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + class _Update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate, + ZoneVmExtensionPoliciesRestStub, + ): + def __hash__(self): + return hash("ZoneVmExtensionPoliciesRestTransport.Update") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: compute.UpdateZoneVmExtensionPolicyRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> compute.Operation: + r"""Call the update method over HTTP. + + Args: + request (~.compute.UpdateZoneVmExtensionPolicyRequest): + The request object. A request message for + ZoneVmExtensionPolicies.Update. See the + method description for details. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.compute.Operation: + Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous + API requests. For more information, readHandling API + responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal + Resources. + + Note that completed Operation resources have a limited + retention period. + + """ + + http_options = ( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_http_options() + ) + + request, metadata = self._interceptor.pre_update(request, metadata) + transcoded_request = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_transcoded_request( + http_options, request + ) + + body = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.Update", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Update", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = ZoneVmExtensionPoliciesRestTransport._Update._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = compute.Operation() + pb_resp = compute.Operation.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_update(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_update_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = compute.Operation.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.update", + extra={ + "serviceName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "rpcName": "Update", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + + @property + def delete( + self, + ) -> Callable[[compute.DeleteZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Delete(self._session, self._host, self._interceptor) # type: ignore + + @property + def get( + self, + ) -> Callable[[compute.GetZoneVmExtensionPolicyRequest], compute.VmExtensionPolicy]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Get(self._session, self._host, self._interceptor) # type: ignore + + @property + def insert( + self, + ) -> Callable[[compute.InsertZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Insert(self._session, self._host, self._interceptor) # type: ignore + + @property + def list( + self, + ) -> Callable[ + [compute.ListZoneVmExtensionPoliciesRequest], compute.VmExtensionPolicyList + ]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._List(self._session, self._host, self._interceptor) # type: ignore + + @property + def update( + self, + ) -> Callable[[compute.UpdateZoneVmExtensionPolicyRequest], compute.Operation]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._Update(self._session, self._host, self._interceptor) # type: ignore + + @property + def kind(self) -> str: + return "rest" + + def close(self): + self._session.close() + + +__all__ = ("ZoneVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py new file mode 100644 index 000000000000..5527a278d882 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_vm_extension_policies/transports/rest_base.py @@ -0,0 +1,341 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json # type: ignore +import re +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +from google.api_core import gapic_v1, path_template +from google.protobuf import json_format + +from google.cloud.compute_v1beta.types import compute + +from .base import DEFAULT_CLIENT_INFO, ZoneVmExtensionPoliciesTransport + + +class _BaseZoneVmExtensionPoliciesRestTransport(ZoneVmExtensionPoliciesTransport): + """Base REST backend transport for ZoneVmExtensionPolicies. + + Note: This class is not meant to be used directly. Use its sync and + async sub-classes instead. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends JSON representations of protocol buffers over HTTP/1.1 + """ + + def __init__( + self, + *, + host: str = "compute.googleapis.com", + credentials: Optional[Any] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + url_scheme: str = "https", + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[Any]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. + """ + # Run the base constructor + maybe_url_match = re.match("^(?Phttp(?:s)?://)?(?P.*)$", host) + if maybe_url_match is None: + raise ValueError( + f"Unexpected hostname structure: {host}" + ) # pragma: NO COVER + + url_match_items = maybe_url_match.groupdict() + + host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host + + super().__init__( + host=host, + credentials=credentials, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + class _BaseDelete: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "delete", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.DeleteZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseDelete._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseGet: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.GetZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseGet._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseInsert: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies", + "body": "vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.InsertZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseInsert._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseList: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "get", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.ListZoneVmExtensionPoliciesRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseList._get_unset_required_fields( + query_params + ) + ) + + return query_params + + class _BaseUpdate: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "patch", + "uri": "/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}", + "body": "vm_extension_policy_resource", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = compute.UpdateZoneVmExtensionPolicyRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=False + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=False, + ) + ) + query_params.update( + _BaseZoneVmExtensionPoliciesRestTransport._BaseUpdate._get_unset_required_fields( + query_params + ) + ) + + return query_params + + +__all__ = ("_BaseZoneVmExtensionPoliciesRestTransport",) diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py index bd6bcf5c8e5a..394f551da266 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py @@ -763,12 +763,13 @@ def sample_get(): Returns: google.cloud.compute_v1beta.types.Zone: - Represents a Zone resource. A zone is - a deployment area. These deployment - areas are subsets of a region. For - example the zone us-east1-b is located - in the us-east1 region. For more - information, read Regions and Zones. + Represents a Zone resource. + + A zone is a deployment area. These + deployment areas are subsets of a + region. For example the zone us-east1-b + is located in theus-east1 region. For + more information, readRegions and Zones. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py index 5e005b25be75..5427838e719d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py @@ -322,12 +322,13 @@ def __call__( Returns: ~.compute.Zone: - Represents a Zone resource. A zone is - a deployment area. These deployment - areas are subsets of a region. For - example the zone us-east1-b is located - in the us-east1 region. For more - information, read Regions and Zones. + Represents a Zone resource. + + A zone is a deployment area. These + deployment areas are subsets of a + region. For example the zone us-east1-b + is located in theus-east1 region. For + more information, readRegions and Zones. """ 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 c235aa673344..63e19bfd7a86 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 @@ -18,6 +18,9 @@ AbandonInstancesRegionInstanceGroupManagerRequest, AcceleratorConfig, Accelerators, + AcceleratorTopologiesInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfo, + AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState, AcceleratorType, AcceleratorTypeAggregatedList, AcceleratorTypeList, @@ -53,16 +56,19 @@ AddSignedUrlKeyBackendBucketRequest, AddSignedUrlKeyBackendServiceRequest, AddTrafficClassificationRuleRegionNetworkPolicyRequest, + AdoptInstancesRegionInstanceGroupManagerRequest, AdvancedMachineFeatures, AggregatedListAcceleratorTypesRequest, AggregatedListAddressesRequest, AggregatedListAutoscalersRequest, + AggregatedListBackendBucketsRequest, AggregatedListBackendServicesRequest, AggregatedListDisksRequest, AggregatedListDiskTypesRequest, AggregatedListForwardingRulesRequest, AggregatedListFutureReservationsRequest, AggregatedListGlobalOperationsRequest, + AggregatedListGlobalVmExtensionPoliciesRequest, AggregatedListHealthChecksRequest, AggregatedListInstanceGroupManagersRequest, AggregatedListInstanceGroupsRequest, @@ -81,6 +87,8 @@ AggregatedListPacketMirroringsRequest, AggregatedListPublicDelegatedPrefixesRequest, AggregatedListRegionCommitmentsRequest, + AggregatedListRegionCompositeHealthChecksRequest, + AggregatedListRegionHealthAggregationPoliciesRequest, AggregatedListRegionHealthSourcesRequest, AggregatedListRegionNetworkPoliciesRequest, AggregatedListReservationsRequest, @@ -142,6 +150,7 @@ AWSV4Signature, Backend, BackendBucket, + BackendBucketAggregatedList, BackendBucketCdnPolicy, BackendBucketCdnPolicyBypassCacheOnRequestHeader, BackendBucketCdnPolicyCacheKeyPolicy, @@ -149,6 +158,7 @@ BackendBucketList, BackendBucketListUsable, BackendBucketParams, + BackendBucketsScopedList, BackendBucketUsedBy, BackendCustomMetric, BackendService, @@ -210,6 +220,8 @@ CancelFutureReservationRequest, CancelInstanceGroupManagerResizeRequestRequest, CancelRegionInstanceGroupManagerResizeRequestRequest, + CancelRequestRemovePeeringNetworkRequest, + CancelRolloutRequest, CircuitBreakers, CloneRulesFirewallPolicyRequest, CloneRulesNetworkFirewallPolicyRequest, @@ -219,6 +231,10 @@ CommitmentList, CommitmentResourceStatus, CommitmentsScopedList, + CompositeHealthCheck, + CompositeHealthCheckAggregatedList, + CompositeHealthCheckList, + CompositeHealthChecksScopedList, ConfidentialInstanceConfig, ConnectionDraining, ConsistentHashLoadBalancerSettings, @@ -258,6 +274,7 @@ DeleteGlobalOrganizationOperationRequest, DeleteGlobalOrganizationOperationResponse, DeleteGlobalPublicDelegatedPrefixeRequest, + DeleteGlobalVmExtensionPolicyRequest, DeleteHealthCheckRequest, DeleteImageRequest, DeleteInstanceGroupManagerRequest, @@ -290,8 +307,11 @@ DeletePublicAdvertisedPrefixeRequest, DeletePublicDelegatedPrefixeRequest, DeleteRegionAutoscalerRequest, + DeleteRegionBackendBucketRequest, DeleteRegionBackendServiceRequest, + DeleteRegionCompositeHealthCheckRequest, DeleteRegionDiskRequest, + DeleteRegionHealthAggregationPolicyRequest, DeleteRegionHealthCheckRequest, DeleteRegionHealthCheckServiceRequest, DeleteRegionHealthSourceRequest, @@ -316,6 +336,8 @@ DeleteRegionUrlMapRequest, DeleteReservationRequest, DeleteResourcePolicyRequest, + DeleteRolloutPlanRequest, + DeleteRolloutRequest, DeleteRoutePolicyRouterRequest, DeleteRouteRequest, DeleteRouterRequest, @@ -342,6 +364,7 @@ DeleteWireGroupRequest, DeleteZoneOperationRequest, DeleteZoneOperationResponse, + DeleteZoneVmExtensionPolicyRequest, Denied, DeprecateImageRequest, DeprecationStatus, @@ -442,6 +465,7 @@ GetAssociationRegionNetworkFirewallPolicyRequest, GetAssociationRegionNetworkPolicyRequest, GetAutoscalerRequest, + GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, GetBackendBucketRequest, GetBackendServiceRequest, GetCrossSiteNetworkRequest, @@ -465,6 +489,7 @@ GetGlobalOperationRequest, GetGlobalOrganizationOperationRequest, GetGlobalPublicDelegatedPrefixeRequest, + GetGlobalVmExtensionPolicyRequest, GetGuestAttributesInstanceRequest, GetHealthBackendServiceRequest, GetHealthCheckRequest, @@ -486,12 +511,15 @@ GetIamPolicyNetworkFirewallPolicyRequest, GetIamPolicyNodeGroupRequest, GetIamPolicyNodeTemplateRequest, + GetIamPolicyRegionBackendBucketRequest, GetIamPolicyRegionBackendServiceRequest, GetIamPolicyRegionDiskRequest, GetIamPolicyRegionInstantSnapshotRequest, GetIamPolicyRegionNetworkFirewallPolicyRequest, GetIamPolicyRegionSnapshotRequest, + GetIamPolicyReservationBlockRequest, GetIamPolicyReservationRequest, + GetIamPolicyReservationSubBlockRequest, GetIamPolicyResourcePolicyRequest, GetIamPolicyServiceAttachmentRequest, GetIamPolicySnapshotRequest, @@ -540,11 +568,14 @@ GetPublicAdvertisedPrefixeRequest, GetPublicDelegatedPrefixeRequest, GetRegionAutoscalerRequest, + GetRegionBackendBucketRequest, GetRegionBackendServiceRequest, GetRegionCommitmentRequest, + GetRegionCompositeHealthCheckRequest, GetRegionDiskRequest, GetRegionDiskSettingRequest, GetRegionDiskTypeRequest, + GetRegionHealthAggregationPolicyRequest, GetRegionHealthCheckRequest, GetRegionHealthCheckServiceRequest, GetRegionHealthSourceRequest, @@ -573,6 +604,8 @@ GetReservationRequest, GetReservationSubBlockRequest, GetResourcePolicyRequest, + GetRolloutPlanRequest, + GetRolloutRequest, GetRoutePolicyRouterRequest, GetRouteRequest, GetRouterRequest, @@ -614,12 +647,22 @@ GetXpnResourcesProjectsRequest, GetZoneOperationRequest, GetZoneRequest, + GetZoneVmExtensionPolicyRequest, GlobalAddressesMoveRequest, GlobalNetworkEndpointGroupsAttachEndpointsRequest, GlobalNetworkEndpointGroupsDetachEndpointsRequest, GlobalOrganizationSetPolicyRequest, GlobalSetLabelsRequest, GlobalSetPolicyRequest, + GlobalVmExtensionPolicy, + GlobalVmExtensionPolicyExtensionPolicy, + GlobalVmExtensionPolicyInstanceSelector, + GlobalVmExtensionPolicyLabelSelector, + GlobalVmExtensionPolicyList, + GlobalVmExtensionPolicyRolloutOperation, + GlobalVmExtensionPolicyRolloutOperationRolloutInput, + GlobalVmExtensionPolicyRolloutOperationRolloutStatus, + GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata, GroupMaintenanceInfo, GRPCHealthCheck, GRPCTLSHealthCheck, @@ -627,6 +670,10 @@ GuestAttributesEntry, GuestAttributesValue, GuestOsFeature, + HealthAggregationPoliciesScopedList, + HealthAggregationPolicy, + HealthAggregationPolicyAggregatedList, + HealthAggregationPolicyList, HealthCheck, HealthCheckList, HealthCheckLogConfig, @@ -681,6 +728,7 @@ InsertGlobalForwardingRuleRequest, InsertGlobalNetworkEndpointGroupRequest, InsertGlobalPublicDelegatedPrefixeRequest, + InsertGlobalVmExtensionPolicyRequest, InsertHealthCheckRequest, InsertImageRequest, InsertInstanceGroupManagerRequest, @@ -707,9 +755,12 @@ InsertPublicAdvertisedPrefixeRequest, InsertPublicDelegatedPrefixeRequest, InsertRegionAutoscalerRequest, + InsertRegionBackendBucketRequest, InsertRegionBackendServiceRequest, InsertRegionCommitmentRequest, + InsertRegionCompositeHealthCheckRequest, InsertRegionDiskRequest, + InsertRegionHealthAggregationPolicyRequest, InsertRegionHealthCheckRequest, InsertRegionHealthCheckServiceRequest, InsertRegionHealthSourceRequest, @@ -732,6 +783,7 @@ InsertRegionUrlMapRequest, InsertReservationRequest, InsertResourcePolicyRequest, + InsertRolloutPlanRequest, InsertRouteRequest, InsertRouterRequest, InsertSecurityPolicyRequest, @@ -753,6 +805,7 @@ InsertVpnGatewayRequest, InsertVpnTunnelRequest, InsertWireGroupRequest, + InsertZoneVmExtensionPolicyRequest, Instance, InstanceAggregatedList, InstanceConsumptionData, @@ -782,6 +835,8 @@ InstanceGroupManagersCreateInstancesRequest, InstanceGroupManagersDeleteInstancesRequest, InstanceGroupManagersDeletePerInstanceConfigsReq, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, + InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo, InstanceGroupManagersListErrorsResponse, InstanceGroupManagersListManagedInstancesResponse, InstanceGroupManagersListPerInstanceConfigsResp, @@ -879,7 +934,12 @@ InterconnectAttachmentGroupsListResponse, InterconnectAttachmentGroupsOperationalStatus, InterconnectAttachmentGroupsOperationalStatusAttachmentStatus, + InterconnectAttachmentL2Forwarding, + InterconnectAttachmentL2ForwardingApplianceMapping, + InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping, + InterconnectAttachmentL2ForwardingGeneveHeader, InterconnectAttachmentList, + InterconnectAttachmentParams, InterconnectAttachmentPartnerMetadata, InterconnectAttachmentPrivateInfo, InterconnectAttachmentsScopedList, @@ -917,6 +977,7 @@ InterconnectMacsecConfigPreSharedKey, InterconnectMacsecPreSharedKey, InterconnectOutageNotification, + InterconnectParams, InterconnectRemoteLocation, InterconnectRemoteLocationConstraints, InterconnectRemoteLocationConstraintsSubnetLengthRange, @@ -960,6 +1021,7 @@ ListGlobalOperationsRequest, ListGlobalOrganizationOperationsRequest, ListGlobalPublicDelegatedPrefixesRequest, + ListGlobalVmExtensionPoliciesRequest, ListHealthChecksRequest, ListImagesRequest, ListInstanceGroupManagerResizeRequestsRequest, @@ -1005,10 +1067,13 @@ ListPublicDelegatedPrefixesRequest, ListReferrersInstancesRequest, ListRegionAutoscalersRequest, + ListRegionBackendBucketsRequest, ListRegionBackendServicesRequest, ListRegionCommitmentsRequest, + ListRegionCompositeHealthChecksRequest, ListRegionDisksRequest, ListRegionDiskTypesRequest, + ListRegionHealthAggregationPoliciesRequest, ListRegionHealthCheckServicesRequest, ListRegionHealthChecksRequest, ListRegionHealthSourcesRequest, @@ -1037,6 +1102,8 @@ ListReservationsRequest, ListReservationSubBlocksRequest, ListResourcePoliciesRequest, + ListRolloutPlansRequest, + ListRolloutsRequest, ListRoutePoliciesRoutersRequest, ListRoutersRequest, ListRoutesRequest, @@ -1059,6 +1126,7 @@ ListUrlMapsRequest, ListUsableBackendBucketsRequest, ListUsableBackendServicesRequest, + ListUsableRegionBackendBucketsRequest, ListUsableRegionBackendServicesRequest, ListUsableSubnetworksRequest, ListVpnGatewaysRequest, @@ -1067,6 +1135,7 @@ ListXpnHostsProjectsRequest, ListZoneOperationsRequest, ListZonesRequest, + ListZoneVmExtensionPoliciesRequest, LocalDisk, LocalizedMessage, LocationPolicy, @@ -1157,6 +1226,7 @@ NetworkProfilesListResponse, NetworkRoutingConfig, NetworksAddPeeringRequest, + NetworksCancelRequestRemovePeeringRequest, NetworksGetEffectiveFirewallsResponse, NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy, NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy, @@ -1240,8 +1310,11 @@ PatchPublicAdvertisedPrefixeRequest, PatchPublicDelegatedPrefixeRequest, PatchRegionAutoscalerRequest, + PatchRegionBackendBucketRequest, PatchRegionBackendServiceRequest, + PatchRegionCompositeHealthCheckRequest, PatchRegionDiskSettingRequest, + PatchRegionHealthAggregationPolicyRequest, PatchRegionHealthCheckRequest, PatchRegionHealthCheckServiceRequest, PatchRegionHealthSourceRequest, @@ -1332,6 +1405,7 @@ RegionInstanceGroupManagerPatchInstanceConfigReq, RegionInstanceGroupManagerResizeRequestsListResponse, RegionInstanceGroupManagersAbandonInstancesRequest, + RegionInstanceGroupManagersAdoptInstancesRequest, RegionInstanceGroupManagersApplyUpdatesRequest, RegionInstanceGroupManagersCreateInstancesRequest, RegionInstanceGroupManagersDeleteInstancesRequest, @@ -1440,12 +1514,29 @@ ResourceStatus, ResourceStatusEffectiveInstanceMetadata, ResourceStatusPhysicalHostTopology, + ResourceStatusReservationConsumptionInfo, ResourceStatusScheduling, ResourceStatusShutdownDetails, ResumeInstanceRequest, ResumeInstancesInstanceGroupManagerRequest, ResumeInstancesRegionInstanceGroupManagerRequest, + Rollout, + RolloutPlan, + RolloutPlansListResponse, + RolloutPlanWave, + RolloutPlanWaveOrchestrationOptions, + RolloutPlanWaveOrchestrationOptionsDelay, + RolloutPlanWaveSelector, + RolloutPlanWaveSelectorLocationSelector, + RolloutPlanWaveSelectorResourceHierarchySelector, + RolloutPlanWaveValidation, + RolloutPlanWaveValidationTimeBasedValidationMetadata, RolloutPolicy, + RolloutRolloutEntity, + RolloutRolloutEntityOrchestratedEntity, + RolloutsListResponse, + RolloutWaveDetails, + RolloutWaveDetailsOrchestratedWaveDetails, Route, RouteAsPath, RouteList, @@ -1567,12 +1658,15 @@ SetIamPolicyNetworkFirewallPolicyRequest, SetIamPolicyNodeGroupRequest, SetIamPolicyNodeTemplateRequest, + SetIamPolicyRegionBackendBucketRequest, SetIamPolicyRegionBackendServiceRequest, SetIamPolicyRegionDiskRequest, SetIamPolicyRegionInstantSnapshotRequest, SetIamPolicyRegionNetworkFirewallPolicyRequest, SetIamPolicyRegionSnapshotRequest, + SetIamPolicyReservationBlockRequest, SetIamPolicyReservationRequest, + SetIamPolicyReservationSubBlockRequest, SetIamPolicyResourcePolicyRequest, SetIamPolicyServiceAttachmentRequest, SetIamPolicySnapshotRequest, @@ -1698,6 +1792,7 @@ StoragePool, StoragePoolAggregatedList, StoragePoolDisk, + StoragePoolExapoolProvisionedCapacityGb, StoragePoolList, StoragePoolListDisks, StoragePoolResourceStatus, @@ -1804,9 +1899,12 @@ TestIamPermissionsNodeTemplateRequest, TestIamPermissionsPacketMirroringRequest, TestIamPermissionsRegionAutoscalerRequest, + TestIamPermissionsRegionBackendBucketRequest, TestIamPermissionsRegionBackendServiceRequest, TestIamPermissionsRegionCommitmentRequest, + TestIamPermissionsRegionCompositeHealthCheckRequest, TestIamPermissionsRegionDiskRequest, + TestIamPermissionsRegionHealthAggregationPolicyRequest, TestIamPermissionsRegionHealthCheckRequest, TestIamPermissionsRegionHealthCheckServiceRequest, TestIamPermissionsRegionHealthSourceRequest, @@ -1822,7 +1920,9 @@ TestIamPermissionsRegionTargetHttpsProxyRequest, TestIamPermissionsRegionTargetTcpProxyRequest, TestIamPermissionsRegionUrlMapRequest, + TestIamPermissionsReservationBlockRequest, TestIamPermissionsReservationRequest, + TestIamPermissionsReservationSubBlockRequest, TestIamPermissionsResourcePolicyRequest, TestIamPermissionsRouteRequest, TestIamPermissionsRouterRequest, @@ -1856,6 +1956,7 @@ UpdateDisplayDeviceInstanceRequest, UpdateFirewallRequest, UpdateFutureReservationRequest, + UpdateGlobalVmExtensionPolicyRequest, UpdateHealthCheckRequest, UpdateInstanceGroupManagerRequest, UpdateInstanceRequest, @@ -1880,6 +1981,7 @@ UpdateShieldedVmConfigInstanceRequest, UpdateStoragePoolRequest, UpdateUrlMapRequest, + UpdateZoneVmExtensionPolicyRequest, UrlMap, UrlMapList, UrlMapReference, @@ -1901,6 +2003,13 @@ VmEndpointNatMappingsInterfaceNatMappings, VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, VmEndpointNatMappingsList, + VmExtensionPoliciesScopedList, + VmExtensionPolicy, + VmExtensionPolicyAggregatedListResponse, + VmExtensionPolicyExtensionPolicy, + VmExtensionPolicyInstanceSelector, + VmExtensionPolicyLabelSelector, + VmExtensionPolicyList, VpnGateway, VpnGatewayAggregatedList, VpnGatewayList, @@ -1943,6 +2052,7 @@ Zone, ZoneList, ZoneSetLabelsRequest, + ZoneSetNestedPolicyRequest, ZoneSetPolicyRequest, ) @@ -1951,6 +2061,9 @@ "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", "Accelerators", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -1986,16 +2099,19 @@ "AddSignedUrlKeyBackendBucketRequest", "AddSignedUrlKeyBackendServiceRequest", "AddTrafficClassificationRuleRegionNetworkPolicyRequest", + "AdoptInstancesRegionInstanceGroupManagerRequest", "AdvancedMachineFeatures", "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDisksRequest", "AggregatedListDiskTypesRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -2014,6 +2130,8 @@ "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -2075,6 +2193,7 @@ "AWSV4Signature", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -2082,6 +2201,7 @@ "BackendBucketList", "BackendBucketListUsable", "BackendBucketParams", + "BackendBucketsScopedList", "BackendBucketUsedBy", "BackendCustomMetric", "BackendService", @@ -2143,6 +2263,8 @@ "CancelFutureReservationRequest", "CancelInstanceGroupManagerResizeRequestRequest", "CancelRegionInstanceGroupManagerResizeRequestRequest", + "CancelRequestRemovePeeringNetworkRequest", + "CancelRolloutRequest", "CircuitBreakers", "CloneRulesFirewallPolicyRequest", "CloneRulesNetworkFirewallPolicyRequest", @@ -2152,6 +2274,10 @@ "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -2191,6 +2317,7 @@ "DeleteGlobalOrganizationOperationRequest", "DeleteGlobalOrganizationOperationResponse", "DeleteGlobalPublicDelegatedPrefixeRequest", + "DeleteGlobalVmExtensionPolicyRequest", "DeleteHealthCheckRequest", "DeleteImageRequest", "DeleteInstanceGroupManagerRequest", @@ -2223,8 +2350,11 @@ "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -2249,6 +2379,8 @@ "DeleteRegionUrlMapRequest", "DeleteReservationRequest", "DeleteResourcePolicyRequest", + "DeleteRolloutPlanRequest", + "DeleteRolloutRequest", "DeleteRoutePolicyRouterRequest", "DeleteRouteRequest", "DeleteRouterRequest", @@ -2275,6 +2407,7 @@ "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -2375,6 +2508,7 @@ "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -2398,6 +2532,7 @@ "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -2419,12 +2554,15 @@ "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -2473,11 +2611,14 @@ "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -2506,6 +2647,8 @@ "GetReservationRequest", "GetReservationSubBlockRequest", "GetResourcePolicyRequest", + "GetRolloutPlanRequest", + "GetRolloutRequest", "GetRoutePolicyRouterRequest", "GetRouteRequest", "GetRouterRequest", @@ -2547,12 +2690,22 @@ "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesMoveRequest", "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "GlobalNetworkEndpointGroupsDetachEndpointsRequest", "GlobalOrganizationSetPolicyRequest", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyList", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GRPCHealthCheck", "GRPCTLSHealthCheck", @@ -2560,6 +2713,10 @@ "GuestAttributesEntry", "GuestAttributesValue", "GuestOsFeature", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -2614,6 +2771,7 @@ "InsertGlobalForwardingRuleRequest", "InsertGlobalNetworkEndpointGroupRequest", "InsertGlobalPublicDelegatedPrefixeRequest", + "InsertGlobalVmExtensionPolicyRequest", "InsertHealthCheckRequest", "InsertImageRequest", "InsertInstanceGroupManagerRequest", @@ -2640,9 +2798,12 @@ "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -2665,6 +2826,7 @@ "InsertRegionUrlMapRequest", "InsertReservationRequest", "InsertResourcePolicyRequest", + "InsertRolloutPlanRequest", "InsertRouteRequest", "InsertRouterRequest", "InsertSecurityPolicyRequest", @@ -2686,6 +2848,7 @@ "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -2715,6 +2878,8 @@ "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -2812,7 +2977,12 @@ "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsScopedList", @@ -2850,6 +3020,7 @@ "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -2893,6 +3064,7 @@ "ListGlobalOperationsRequest", "ListGlobalOrganizationOperationsRequest", "ListGlobalPublicDelegatedPrefixesRequest", + "ListGlobalVmExtensionPoliciesRequest", "ListHealthChecksRequest", "ListImagesRequest", "ListInstanceGroupManagerResizeRequestsRequest", @@ -2938,10 +3110,13 @@ "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDisksRequest", "ListRegionDiskTypesRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -2970,6 +3145,8 @@ "ListReservationsRequest", "ListReservationSubBlocksRequest", "ListResourcePoliciesRequest", + "ListRolloutPlansRequest", + "ListRolloutsRequest", "ListRoutePoliciesRoutersRequest", "ListRoutersRequest", "ListRoutesRequest", @@ -2992,6 +3169,7 @@ "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -3000,6 +3178,7 @@ "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", "ListZonesRequest", + "ListZoneVmExtensionPoliciesRequest", "LocalDisk", "LocalizedMessage", "LocationPolicy", @@ -3090,6 +3269,7 @@ "NetworkProfilesListResponse", "NetworkRoutingConfig", "NetworksAddPeeringRequest", + "NetworksCancelRequestRemovePeeringRequest", "NetworksGetEffectiveFirewallsResponse", "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy", @@ -3173,8 +3353,11 @@ "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -3265,6 +3448,7 @@ "RegionInstanceGroupManagerPatchInstanceConfigReq", "RegionInstanceGroupManagerResizeRequestsListResponse", "RegionInstanceGroupManagersAbandonInstancesRequest", + "RegionInstanceGroupManagersAdoptInstancesRequest", "RegionInstanceGroupManagersApplyUpdatesRequest", "RegionInstanceGroupManagersCreateInstancesRequest", "RegionInstanceGroupManagersDeleteInstancesRequest", @@ -3373,12 +3557,29 @@ "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", "ResumeInstancesInstanceGroupManagerRequest", "ResumeInstancesRegionInstanceGroupManagerRequest", + "Rollout", + "RolloutPlan", + "RolloutPlansListResponse", + "RolloutPlanWave", + "RolloutPlanWaveOrchestrationOptions", + "RolloutPlanWaveOrchestrationOptionsDelay", + "RolloutPlanWaveSelector", + "RolloutPlanWaveSelectorLocationSelector", + "RolloutPlanWaveSelectorResourceHierarchySelector", + "RolloutPlanWaveValidation", + "RolloutPlanWaveValidationTimeBasedValidationMetadata", "RolloutPolicy", + "RolloutRolloutEntity", + "RolloutRolloutEntityOrchestratedEntity", + "RolloutsListResponse", + "RolloutWaveDetails", + "RolloutWaveDetailsOrchestratedWaveDetails", "Route", "RouteAsPath", "RouteList", @@ -3500,12 +3701,15 @@ "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -3631,6 +3835,7 @@ "StoragePool", "StoragePoolAggregatedList", "StoragePoolDisk", + "StoragePoolExapoolProvisionedCapacityGb", "StoragePoolList", "StoragePoolListDisks", "StoragePoolResourceStatus", @@ -3737,9 +3942,12 @@ "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -3755,7 +3963,9 @@ "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -3789,6 +3999,7 @@ "UpdateDisplayDeviceInstanceRequest", "UpdateFirewallRequest", "UpdateFutureReservationRequest", + "UpdateGlobalVmExtensionPolicyRequest", "UpdateHealthCheckRequest", "UpdateInstanceGroupManagerRequest", "UpdateInstanceRequest", @@ -3813,6 +4024,7 @@ "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -3834,6 +4046,13 @@ "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -3876,5 +4095,6 @@ "Zone", "ZoneList", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", ) 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 9ee42cc40c59..ff1b2a700452 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 @@ -28,6 +28,9 @@ "AbandonInstancesInstanceGroupManagerRequest", "AbandonInstancesRegionInstanceGroupManagerRequest", "AcceleratorConfig", + "AcceleratorTopologiesInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfo", + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", "AcceleratorType", "AcceleratorTypeAggregatedList", "AcceleratorTypeList", @@ -64,16 +67,19 @@ "AddressAggregatedList", "AddressList", "AddressesScopedList", + "AdoptInstancesRegionInstanceGroupManagerRequest", "AdvancedMachineFeatures", "AggregatedListAcceleratorTypesRequest", "AggregatedListAddressesRequest", "AggregatedListAutoscalersRequest", + "AggregatedListBackendBucketsRequest", "AggregatedListBackendServicesRequest", "AggregatedListDiskTypesRequest", "AggregatedListDisksRequest", "AggregatedListForwardingRulesRequest", "AggregatedListFutureReservationsRequest", "AggregatedListGlobalOperationsRequest", + "AggregatedListGlobalVmExtensionPoliciesRequest", "AggregatedListHealthChecksRequest", "AggregatedListInstanceGroupManagersRequest", "AggregatedListInstanceGroupsRequest", @@ -92,6 +98,8 @@ "AggregatedListPacketMirroringsRequest", "AggregatedListPublicDelegatedPrefixesRequest", "AggregatedListRegionCommitmentsRequest", + "AggregatedListRegionCompositeHealthChecksRequest", + "AggregatedListRegionHealthAggregationPoliciesRequest", "AggregatedListRegionHealthSourcesRequest", "AggregatedListRegionNetworkPoliciesRequest", "AggregatedListReservationsRequest", @@ -152,6 +160,7 @@ "AutoscalingPolicyScalingSchedule", "Backend", "BackendBucket", + "BackendBucketAggregatedList", "BackendBucketCdnPolicy", "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "BackendBucketCdnPolicyCacheKeyPolicy", @@ -160,6 +169,7 @@ "BackendBucketListUsable", "BackendBucketParams", "BackendBucketUsedBy", + "BackendBucketsScopedList", "BackendCustomMetric", "BackendService", "BackendServiceAggregatedList", @@ -220,6 +230,8 @@ "CancelFutureReservationRequest", "CancelInstanceGroupManagerResizeRequestRequest", "CancelRegionInstanceGroupManagerResizeRequestRequest", + "CancelRequestRemovePeeringNetworkRequest", + "CancelRolloutRequest", "CircuitBreakers", "CloneRulesFirewallPolicyRequest", "CloneRulesNetworkFirewallPolicyRequest", @@ -229,6 +241,10 @@ "CommitmentList", "CommitmentResourceStatus", "CommitmentsScopedList", + "CompositeHealthCheck", + "CompositeHealthCheckAggregatedList", + "CompositeHealthCheckList", + "CompositeHealthChecksScopedList", "ConfidentialInstanceConfig", "ConnectionDraining", "ConsistentHashLoadBalancerSettings", @@ -268,6 +284,7 @@ "DeleteGlobalOrganizationOperationRequest", "DeleteGlobalOrganizationOperationResponse", "DeleteGlobalPublicDelegatedPrefixeRequest", + "DeleteGlobalVmExtensionPolicyRequest", "DeleteHealthCheckRequest", "DeleteImageRequest", "DeleteInstanceGroupManagerRequest", @@ -300,8 +317,11 @@ "DeletePublicAdvertisedPrefixeRequest", "DeletePublicDelegatedPrefixeRequest", "DeleteRegionAutoscalerRequest", + "DeleteRegionBackendBucketRequest", "DeleteRegionBackendServiceRequest", + "DeleteRegionCompositeHealthCheckRequest", "DeleteRegionDiskRequest", + "DeleteRegionHealthAggregationPolicyRequest", "DeleteRegionHealthCheckRequest", "DeleteRegionHealthCheckServiceRequest", "DeleteRegionHealthSourceRequest", @@ -326,6 +346,8 @@ "DeleteRegionUrlMapRequest", "DeleteReservationRequest", "DeleteResourcePolicyRequest", + "DeleteRolloutPlanRequest", + "DeleteRolloutRequest", "DeleteRoutePolicyRouterRequest", "DeleteRouteRequest", "DeleteRouterRequest", @@ -352,6 +374,7 @@ "DeleteWireGroupRequest", "DeleteZoneOperationRequest", "DeleteZoneOperationResponse", + "DeleteZoneVmExtensionPolicyRequest", "Denied", "DeprecateImageRequest", "DeprecationStatus", @@ -454,6 +477,7 @@ "GetAssociationRegionNetworkFirewallPolicyRequest", "GetAssociationRegionNetworkPolicyRequest", "GetAutoscalerRequest", + "GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest", "GetBackendBucketRequest", "GetBackendServiceRequest", "GetCrossSiteNetworkRequest", @@ -477,6 +501,7 @@ "GetGlobalOperationRequest", "GetGlobalOrganizationOperationRequest", "GetGlobalPublicDelegatedPrefixeRequest", + "GetGlobalVmExtensionPolicyRequest", "GetGuestAttributesInstanceRequest", "GetHealthBackendServiceRequest", "GetHealthCheckRequest", @@ -498,12 +523,15 @@ "GetIamPolicyNetworkFirewallPolicyRequest", "GetIamPolicyNodeGroupRequest", "GetIamPolicyNodeTemplateRequest", + "GetIamPolicyRegionBackendBucketRequest", "GetIamPolicyRegionBackendServiceRequest", "GetIamPolicyRegionDiskRequest", "GetIamPolicyRegionInstantSnapshotRequest", "GetIamPolicyRegionNetworkFirewallPolicyRequest", "GetIamPolicyRegionSnapshotRequest", + "GetIamPolicyReservationBlockRequest", "GetIamPolicyReservationRequest", + "GetIamPolicyReservationSubBlockRequest", "GetIamPolicyResourcePolicyRequest", "GetIamPolicyServiceAttachmentRequest", "GetIamPolicySnapshotRequest", @@ -552,11 +580,14 @@ "GetPublicAdvertisedPrefixeRequest", "GetPublicDelegatedPrefixeRequest", "GetRegionAutoscalerRequest", + "GetRegionBackendBucketRequest", "GetRegionBackendServiceRequest", "GetRegionCommitmentRequest", + "GetRegionCompositeHealthCheckRequest", "GetRegionDiskRequest", "GetRegionDiskSettingRequest", "GetRegionDiskTypeRequest", + "GetRegionHealthAggregationPolicyRequest", "GetRegionHealthCheckRequest", "GetRegionHealthCheckServiceRequest", "GetRegionHealthSourceRequest", @@ -585,6 +616,8 @@ "GetReservationRequest", "GetReservationSubBlockRequest", "GetResourcePolicyRequest", + "GetRolloutPlanRequest", + "GetRolloutRequest", "GetRoutePolicyRouterRequest", "GetRouteRequest", "GetRouterRequest", @@ -626,12 +659,22 @@ "GetXpnResourcesProjectsRequest", "GetZoneOperationRequest", "GetZoneRequest", + "GetZoneVmExtensionPolicyRequest", "GlobalAddressesMoveRequest", "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "GlobalNetworkEndpointGroupsDetachEndpointsRequest", "GlobalOrganizationSetPolicyRequest", "GlobalSetLabelsRequest", "GlobalSetPolicyRequest", + "GlobalVmExtensionPolicy", + "GlobalVmExtensionPolicyExtensionPolicy", + "GlobalVmExtensionPolicyInstanceSelector", + "GlobalVmExtensionPolicyLabelSelector", + "GlobalVmExtensionPolicyList", + "GlobalVmExtensionPolicyRolloutOperation", + "GlobalVmExtensionPolicyRolloutOperationRolloutInput", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", "GroupMaintenanceInfo", "GuestAttributes", "GuestAttributesEntry", @@ -640,6 +683,10 @@ "HTTP2HealthCheck", "HTTPHealthCheck", "HTTPSHealthCheck", + "HealthAggregationPoliciesScopedList", + "HealthAggregationPolicy", + "HealthAggregationPolicyAggregatedList", + "HealthAggregationPolicyList", "HealthCheck", "HealthCheckList", "HealthCheckLogConfig", @@ -691,6 +738,7 @@ "InsertGlobalForwardingRuleRequest", "InsertGlobalNetworkEndpointGroupRequest", "InsertGlobalPublicDelegatedPrefixeRequest", + "InsertGlobalVmExtensionPolicyRequest", "InsertHealthCheckRequest", "InsertImageRequest", "InsertInstanceGroupManagerRequest", @@ -717,9 +765,12 @@ "InsertPublicAdvertisedPrefixeRequest", "InsertPublicDelegatedPrefixeRequest", "InsertRegionAutoscalerRequest", + "InsertRegionBackendBucketRequest", "InsertRegionBackendServiceRequest", "InsertRegionCommitmentRequest", + "InsertRegionCompositeHealthCheckRequest", "InsertRegionDiskRequest", + "InsertRegionHealthAggregationPolicyRequest", "InsertRegionHealthCheckRequest", "InsertRegionHealthCheckServiceRequest", "InsertRegionHealthSourceRequest", @@ -742,6 +793,7 @@ "InsertRegionUrlMapRequest", "InsertReservationRequest", "InsertResourcePolicyRequest", + "InsertRolloutPlanRequest", "InsertRouteRequest", "InsertRouterRequest", "InsertSecurityPolicyRequest", @@ -763,6 +815,7 @@ "InsertVpnGatewayRequest", "InsertVpnTunnelRequest", "InsertWireGroupRequest", + "InsertZoneVmExtensionPolicyRequest", "Instance", "InstanceAggregatedList", "InstanceConsumptionData", @@ -803,6 +856,8 @@ "InstanceGroupManagersCreateInstancesRequest", "InstanceGroupManagersDeleteInstancesRequest", "InstanceGroupManagersDeletePerInstanceConfigsReq", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", "InstanceGroupManagersListErrorsResponse", "InstanceGroupManagersListManagedInstancesResponse", "InstanceGroupManagersListPerInstanceConfigsResp", @@ -889,7 +944,12 @@ "InterconnectAttachmentGroupsListResponse", "InterconnectAttachmentGroupsOperationalStatus", "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + "InterconnectAttachmentL2Forwarding", + "InterconnectAttachmentL2ForwardingApplianceMapping", + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + "InterconnectAttachmentL2ForwardingGeneveHeader", "InterconnectAttachmentList", + "InterconnectAttachmentParams", "InterconnectAttachmentPartnerMetadata", "InterconnectAttachmentPrivateInfo", "InterconnectAttachmentsScopedList", @@ -927,6 +987,7 @@ "InterconnectMacsecConfigPreSharedKey", "InterconnectMacsecPreSharedKey", "InterconnectOutageNotification", + "InterconnectParams", "InterconnectRemoteLocation", "InterconnectRemoteLocationConstraints", "InterconnectRemoteLocationConstraintsSubnetLengthRange", @@ -970,6 +1031,7 @@ "ListGlobalOperationsRequest", "ListGlobalOrganizationOperationsRequest", "ListGlobalPublicDelegatedPrefixesRequest", + "ListGlobalVmExtensionPoliciesRequest", "ListHealthChecksRequest", "ListImagesRequest", "ListInstanceGroupManagerResizeRequestsRequest", @@ -1015,10 +1077,13 @@ "ListPublicDelegatedPrefixesRequest", "ListReferrersInstancesRequest", "ListRegionAutoscalersRequest", + "ListRegionBackendBucketsRequest", "ListRegionBackendServicesRequest", "ListRegionCommitmentsRequest", + "ListRegionCompositeHealthChecksRequest", "ListRegionDiskTypesRequest", "ListRegionDisksRequest", + "ListRegionHealthAggregationPoliciesRequest", "ListRegionHealthCheckServicesRequest", "ListRegionHealthChecksRequest", "ListRegionHealthSourcesRequest", @@ -1047,6 +1112,8 @@ "ListReservationSubBlocksRequest", "ListReservationsRequest", "ListResourcePoliciesRequest", + "ListRolloutPlansRequest", + "ListRolloutsRequest", "ListRoutePoliciesRoutersRequest", "ListRoutersRequest", "ListRoutesRequest", @@ -1069,6 +1136,7 @@ "ListUrlMapsRequest", "ListUsableBackendBucketsRequest", "ListUsableBackendServicesRequest", + "ListUsableRegionBackendBucketsRequest", "ListUsableRegionBackendServicesRequest", "ListUsableSubnetworksRequest", "ListVpnGatewaysRequest", @@ -1076,6 +1144,7 @@ "ListWireGroupsRequest", "ListXpnHostsProjectsRequest", "ListZoneOperationsRequest", + "ListZoneVmExtensionPoliciesRequest", "ListZonesRequest", "LocalDisk", "LocalizedMessage", @@ -1167,6 +1236,7 @@ "NetworkProfilesListResponse", "NetworkRoutingConfig", "NetworksAddPeeringRequest", + "NetworksCancelRequestRemovePeeringRequest", "NetworksGetEffectiveFirewallsResponse", "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy", @@ -1250,8 +1320,11 @@ "PatchPublicAdvertisedPrefixeRequest", "PatchPublicDelegatedPrefixeRequest", "PatchRegionAutoscalerRequest", + "PatchRegionBackendBucketRequest", "PatchRegionBackendServiceRequest", + "PatchRegionCompositeHealthCheckRequest", "PatchRegionDiskSettingRequest", + "PatchRegionHealthAggregationPolicyRequest", "PatchRegionHealthCheckRequest", "PatchRegionHealthCheckServiceRequest", "PatchRegionHealthSourceRequest", @@ -1343,6 +1416,7 @@ "RegionInstanceGroupManagerResizeRequestsListResponse", "RegionInstanceGroupManagerUpdateInstanceConfigReq", "RegionInstanceGroupManagersAbandonInstancesRequest", + "RegionInstanceGroupManagersAdoptInstancesRequest", "RegionInstanceGroupManagersApplyUpdatesRequest", "RegionInstanceGroupManagersCreateInstancesRequest", "RegionInstanceGroupManagersDeleteInstancesRequest", @@ -1450,12 +1524,29 @@ "ResourceStatus", "ResourceStatusEffectiveInstanceMetadata", "ResourceStatusPhysicalHostTopology", + "ResourceStatusReservationConsumptionInfo", "ResourceStatusScheduling", "ResourceStatusShutdownDetails", "ResumeInstanceRequest", "ResumeInstancesInstanceGroupManagerRequest", "ResumeInstancesRegionInstanceGroupManagerRequest", + "Rollout", + "RolloutPlan", + "RolloutPlanWave", + "RolloutPlanWaveOrchestrationOptions", + "RolloutPlanWaveOrchestrationOptionsDelay", + "RolloutPlanWaveSelector", + "RolloutPlanWaveSelectorLocationSelector", + "RolloutPlanWaveSelectorResourceHierarchySelector", + "RolloutPlanWaveValidation", + "RolloutPlanWaveValidationTimeBasedValidationMetadata", + "RolloutPlansListResponse", "RolloutPolicy", + "RolloutRolloutEntity", + "RolloutRolloutEntityOrchestratedEntity", + "RolloutWaveDetails", + "RolloutWaveDetailsOrchestratedWaveDetails", + "RolloutsListResponse", "Route", "RouteAsPath", "RouteList", @@ -1578,12 +1669,15 @@ "SetIamPolicyNetworkFirewallPolicyRequest", "SetIamPolicyNodeGroupRequest", "SetIamPolicyNodeTemplateRequest", + "SetIamPolicyRegionBackendBucketRequest", "SetIamPolicyRegionBackendServiceRequest", "SetIamPolicyRegionDiskRequest", "SetIamPolicyRegionInstantSnapshotRequest", "SetIamPolicyRegionNetworkFirewallPolicyRequest", "SetIamPolicyRegionSnapshotRequest", + "SetIamPolicyReservationBlockRequest", "SetIamPolicyReservationRequest", + "SetIamPolicyReservationSubBlockRequest", "SetIamPolicyResourcePolicyRequest", "SetIamPolicyServiceAttachmentRequest", "SetIamPolicySnapshotRequest", @@ -1708,6 +1802,7 @@ "StoragePool", "StoragePoolAggregatedList", "StoragePoolDisk", + "StoragePoolExapoolProvisionedCapacityGb", "StoragePoolList", "StoragePoolListDisks", "StoragePoolResourceStatus", @@ -1814,9 +1909,12 @@ "TestIamPermissionsNodeTemplateRequest", "TestIamPermissionsPacketMirroringRequest", "TestIamPermissionsRegionAutoscalerRequest", + "TestIamPermissionsRegionBackendBucketRequest", "TestIamPermissionsRegionBackendServiceRequest", "TestIamPermissionsRegionCommitmentRequest", + "TestIamPermissionsRegionCompositeHealthCheckRequest", "TestIamPermissionsRegionDiskRequest", + "TestIamPermissionsRegionHealthAggregationPolicyRequest", "TestIamPermissionsRegionHealthCheckRequest", "TestIamPermissionsRegionHealthCheckServiceRequest", "TestIamPermissionsRegionHealthSourceRequest", @@ -1832,7 +1930,9 @@ "TestIamPermissionsRegionTargetHttpsProxyRequest", "TestIamPermissionsRegionTargetTcpProxyRequest", "TestIamPermissionsRegionUrlMapRequest", + "TestIamPermissionsReservationBlockRequest", "TestIamPermissionsReservationRequest", + "TestIamPermissionsReservationSubBlockRequest", "TestIamPermissionsResourcePolicyRequest", "TestIamPermissionsRouteRequest", "TestIamPermissionsRouterRequest", @@ -1866,6 +1966,7 @@ "UpdateDisplayDeviceInstanceRequest", "UpdateFirewallRequest", "UpdateFutureReservationRequest", + "UpdateGlobalVmExtensionPolicyRequest", "UpdateHealthCheckRequest", "UpdateInstanceGroupManagerRequest", "UpdateInstanceRequest", @@ -1890,6 +1991,7 @@ "UpdateShieldedVmConfigInstanceRequest", "UpdateStoragePoolRequest", "UpdateUrlMapRequest", + "UpdateZoneVmExtensionPolicyRequest", "UrlMap", "UrlMapList", "UrlMapReference", @@ -1911,6 +2013,13 @@ "VmEndpointNatMappingsInterfaceNatMappings", "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", "VmEndpointNatMappingsList", + "VmExtensionPoliciesScopedList", + "VmExtensionPolicy", + "VmExtensionPolicyAggregatedListResponse", + "VmExtensionPolicyExtensionPolicy", + "VmExtensionPolicyInstanceSelector", + "VmExtensionPolicyLabelSelector", + "VmExtensionPolicyList", "VpnGateway", "VpnGatewayAggregatedList", "VpnGatewayList", @@ -1953,6 +2062,7 @@ "Zone", "ZoneList", "ZoneSetLabelsRequest", + "ZoneSetNestedPolicyRequest", "ZoneSetPolicyRequest", }, ) @@ -1976,7 +2086,9 @@ class AWSV4Signature(proto.Message): creating a backend that uses AWS v4 signature authentication, but will not be returned as part of the configuration when queried with a REST - API GET request. @InputOnly + API GET request. + + @InputOnly This field is a member of `oneof`_ ``_access_key``. access_key_id (str): @@ -1993,7 +2105,7 @@ class AWSV4Signature(proto.Message): origin_region (str): The name of the cloud region of your origin. This is a free-form field with the name of the - region your cloud uses to host your origin. For + region your cloud uses to host your origin. For example, "us-east-1" for AWS or "us-ashburn-1" for OCI. @@ -2041,21 +2153,25 @@ class AbandonInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -2105,17 +2221,21 @@ class AbandonInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2160,12 +2280,11 @@ class AcceleratorConfig(proto.Message): accelerator_type (str): Full or partial URL of the accelerator type resource to attach to this instance. For - example: - projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 + example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, - specify only the accelerator name. See GPUs on - Compute Engine for a full list of accelerator - types. + specify only the accelerator name. + See GPUs on Compute Engine + for a full list of accelerator types. This field is a member of `oneof`_ ``_accelerator_type``. """ @@ -2182,19 +2301,129 @@ class AcceleratorConfig(proto.Message): ) +class AcceleratorTopologiesInfo(proto.Message): + r"""Info for accelerator topologies within a densely packed + reservation. + + Attributes: + accelerator_topology_infos (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorTopologiesInfoAcceleratorTopologyInfo]): + Info for each accelerator topology. + """ + + accelerator_topology_infos: MutableSequence[ + "AcceleratorTopologiesInfoAcceleratorTopologyInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=219451401, + message="AcceleratorTopologiesInfoAcceleratorTopologyInfo", + ) + + +class AcceleratorTopologiesInfoAcceleratorTopologyInfo(proto.Message): + r"""Info for a slice of a given topology. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_topology (str): + The accelerator topology. + + This field is a member of `oneof`_ ``_accelerator_topology``. + info_per_topology_states (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState]): + Info for each topology state. + """ + + accelerator_topology: str = proto.Field( + proto.STRING, + number=389323203, + optional=True, + ) + info_per_topology_states: MutableSequence[ + "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState" + ] = proto.RepeatedField( + proto.MESSAGE, + number=183777695, + message="AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", + ) + + +class AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState( + proto.Message +): + r"""Info for each topology state. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + count (int): + The number of accelerator topologies in this + state. + + This field is a member of `oneof`_ ``_count``. + state (str): + The state of the accelerator topology. + Check the State enum for the list of possible + values. + + This field is a member of `oneof`_ ``_state``. + """ + + class State(proto.Enum): + r"""The state of the accelerator topology. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + AVAILABLE (442079913): + The accelerator topology is available. + DEGRADED (396890926): + The accelerator topology is degraded. The + underlying capacity is not in a healthy state + and is not available. + RUNNING (121282975): + The accelerator topology is running. If there + are both running and degraded hosts within a + topology, DEGRADED state will be returned. + TOPOLOGY_STATE_UNSPECIFIED (188327545): + The state of the topology is unspecified. + UNHEALTHY (462118084): + This value has been deprecated and is no + longer used. + """ + UNDEFINED_STATE = 0 + AVAILABLE = 442079913 + DEGRADED = 396890926 + RUNNING = 121282975 + TOPOLOGY_STATE_UNSPECIFIED = 188327545 + UNHEALTHY = 462118084 + + count: int = proto.Field( + proto.INT32, + number=94851343, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + + class AcceleratorType(proto.Message): - r"""Represents an Accelerator Type resource. Google Cloud - Platform provides graphics processing units (accelerators) that - you can add to VM instances to improve or accelerate performance - when working with intensive workloads. For more information, - read GPUs on Compute Engine. + r"""Represents an Accelerator Type resource. + + Google Cloud Platform provides graphics processing units + (accelerators) that you can add to VM instances to improve or + accelerate performance when working with intensive workloads. + For more information, readGPUs on Compute Engine. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -2213,8 +2442,8 @@ class AcceleratorType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#acceleratorType for accelerator types. + Output only. [Output Only] The type of the resource. + Alwayscompute#acceleratorType for accelerator types. This field is a member of `oneof`_ ``_kind``. maximum_cards_per_instance (int): @@ -2227,8 +2456,8 @@ class AcceleratorType(proto.Message): This field is a member of `oneof`_ ``_name``. self_link (str): - [Output Only] Server-defined, fully qualified URL for this - resource. + Output only. [Output Only] Server-defined, fully qualified + URL for this resource. This field is a member of `oneof`_ ``_self_link``. zone (str): @@ -2303,26 +2532,27 @@ class AcceleratorTypeAggregatedList(proto.Message): A list of AcceleratorTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#acceleratorTypeAggregatedList for aggregated lists - of accelerator types. + Output only. [Output Only] Type of resource. + Alwayscompute#acceleratorTypeAggregatedList for aggregated + lists of accelerator types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -2385,21 +2615,23 @@ class AcceleratorTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorType]): A list of AcceleratorType resources. kind (str): - [Output Only] Type of resource. Always - compute#acceleratorTypeList for lists of accelerator types. + Output only. [Output Only] Type of resource. + Alwayscompute#acceleratorTypeList for lists of accelerator + types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -2487,7 +2719,7 @@ class Accelerators(proto.Message): This field is a member of `oneof`_ ``_guest_accelerator_count``. guest_accelerator_type (str): The accelerator type resource name, not a - full URL, e.g. nvidia-tesla-t4. + full URL, e.g.nvidia-tesla-t4. This field is a member of `oneof`_ ``_guest_accelerator_type``. """ @@ -2513,10 +2745,10 @@ class AccessConfig(proto.Message): Attributes: external_ipv6 (str): - Applies to ipv6AccessConfigs only. The first - IPv6 address of the external IPv6 range - associated with this instance, prefix length is - stored in externalIpv6PrefixLength in + Applies to ipv6AccessConfigs only. + The first IPv6 address of the external IPv6 + range associated with this instance, prefix + length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, @@ -2531,8 +2763,8 @@ class AccessConfig(proto.Message): This field is a member of `oneof`_ ``_external_ipv6_prefix_length``. kind (str): - [Output Only] Type of the resource. Always - compute#accessConfig for access configs. + Output only. [Output Only] Type of the resource. + Alwayscompute#accessConfig for access configs. This field is a member of `oneof`_ ``_kind``. name (str): @@ -2540,13 +2772,13 @@ class AccessConfig(proto.Message): accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP - or Network Access. In ipv6AccessConfigs, the + orNetwork Access. In ipv6AccessConfigs, the recommend name is External IPv6. This field is a member of `oneof`_ ``_name``. nat_i_p (str): - Applies to accessConfigs (IPv4) only. An - external IP address associated with this + Applies to accessConfigs (IPv4) only. + Anexternal IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared @@ -2558,23 +2790,27 @@ class AccessConfig(proto.Message): network_tier (str): This signifies the networking tier used for configuring this access configuration and can - only take the following values: PREMIUM, - STANDARD. If an AccessConfig is specified - without a valid external IP address, an - ephemeral IP will be created with this - networkTier. If an AccessConfig with a valid - external IP address is specified, it must match - that of the networkTier associated with the - Address resource owning that IP. Check the - NetworkTier enum for the list of possible - values. + only take the following values: + PREMIUM,STANDARD. + + If an AccessConfig is specified without a valid + external IP address, an ephemeral IP will be + created with this networkTier. + + If an AccessConfig with a valid external IP + address is specified, it must match that of the + networkTier associated with the Address resource + owning that IP. + Check the NetworkTier enum for the list of + possible values. This field is a member of `oneof`_ ``_network_tier``. public_ptr_domain_name (str): - The DNS domain name for the public PTR record. You can set - this field only if the ``setPublicPtr`` field is enabled in - accessConfig. If this field is unspecified in - ipv6AccessConfig, a default PTR record will be created for + The DNS domain name for the public PTR record. + + You can set this field only if the ``setPublicPtr`` field is + enabled inaccessConfig. If this field is unspecified + inipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range. This field is a member of `oneof`_ ``_public_ptr_domain_name``. @@ -2586,17 +2822,18 @@ class AccessConfig(proto.Message): set_public_ptr (bool): Specifies whether a public DNS 'PTR' record should be created to map the external IP address - of the instance to a DNS domain name. This field - is not used in ipv6AccessConfig. A default PTR - record will be created if the VM has external - IPv6 range associated. + of the instance to a DNS domain name. + + This field is not used in ipv6AccessConfig. A + default PTR record will be created if the VM has + external IPv6 range associated. This field is a member of `oneof`_ ``_set_public_ptr``. type_ (str): The type of configuration. In accessConfigs (IPv4), the - default and only option is ONE_TO_ONE_NAT. In - ipv6AccessConfigs, the default and only option is - DIRECT_IPV6. Check the Type enum for the list of possible + default and only option is ONE_TO_ONE_NAT. + Inipv6AccessConfigs, the default and only option + isDIRECT_IPV6. Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. @@ -2605,11 +2842,14 @@ class AccessConfig(proto.Message): class NetworkTier(proto.Enum): r"""This signifies the networking tier used for configuring this access configuration and can only take the following values: - PREMIUM, STANDARD. If an AccessConfig is specified without a - valid external IP address, an ephemeral IP will be created with - this networkTier. If an AccessConfig with a valid external IP - address is specified, it must match that of the networkTier - associated with the Address resource owning that IP. + PREMIUM,STANDARD. + + If an AccessConfig is specified without a valid external IP + address, an ephemeral IP will be created with this networkTier. + + If an AccessConfig with a valid external IP address is + specified, it must match that of the networkTier associated with + the Address resource owning that IP. Values: UNDEFINED_NETWORK_TIER (0): @@ -2635,8 +2875,8 @@ class NetworkTier(proto.Enum): class Type(proto.Enum): r"""The type of configuration. In accessConfigs (IPv4), the default and - only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and - only option is DIRECT_IPV6. + only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and + only option isDIRECT_IPV6. Values: UNDEFINED_TYPE (0): @@ -2725,17 +2965,21 @@ class AddAccessConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -2795,17 +3039,21 @@ class AddAssociationFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2858,17 +3106,21 @@ class AddAssociationNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -2920,17 +3172,21 @@ class AddAssociationOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -2995,17 +3251,21 @@ class AddAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3066,17 +3326,21 @@ class AddAssociationRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3122,17 +3386,21 @@ class AddHealthCheckTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -3183,17 +3451,21 @@ class AddInstanceTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -3249,22 +3521,26 @@ class AddInstancesInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -3312,17 +3588,21 @@ class AddNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3372,17 +3652,21 @@ class AddNodesNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3431,17 +3715,21 @@ class AddPacketMirroringRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3477,14 +3765,14 @@ class AddPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3496,17 +3784,21 @@ class AddPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3561,17 +3853,21 @@ class AddPeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3615,17 +3911,21 @@ class AddResourcePoliciesDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3677,17 +3977,21 @@ class AddResourcePoliciesInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -3739,17 +4043,21 @@ class AddResourcePoliciesRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3795,17 +4103,21 @@ class AddRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3840,14 +4152,14 @@ class AddRuleNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3859,17 +4171,21 @@ class AddRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -3917,17 +4233,21 @@ class AddRuleOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -3966,14 +4286,14 @@ class AddRuleRegionNetworkFirewallPolicyRequest(proto.Message): The body resource for this request max_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. This field is a member of `oneof`_ ``_max_priority``. min_priority (int): When rule.priority is not specified, auto - choose a unused priority between minPriority and + choose a unused priority betweenminPriority and maxPriority>. This field is exclusive with rule.priority. @@ -3987,17 +4307,21 @@ class AddRuleRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -4141,17 +4465,21 @@ class AddSignedUrlKeyBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. signed_url_key_resource (google.cloud.compute_v1beta.types.SignedUrlKey): @@ -4197,17 +4525,21 @@ class AddSignedUrlKeyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. signed_url_key_resource (google.cloud.compute_v1beta.types.SignedUrlKey): @@ -4257,17 +4589,21 @@ class AddTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -4297,11 +4633,15 @@ class AddTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): class Address(proto.Message): - r"""Represents an IP Address resource. Google Compute Engine has two IP - Address resources: \* `Global (external and - internal) `__ - \* `Regional (external and - internal) `__ + r"""Represents an IP Address resource. + + Google Compute Engine has two IP Address resources: + + - `Global (external and + internal) `__ + - `Regional (external and + internal) `__ + For more information, see Reserving a static external IP address. @@ -4315,13 +4655,14 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_address``. address_type (str): The type of address to reserve, either - INTERNAL or EXTERNAL. If unspecified, defaults - to EXTERNAL. Check the AddressType enum for the + INTERNAL orEXTERNAL. If unspecified, defaults to + EXTERNAL. Check the AddressType enum for the list of possible values. This field is a member of `oneof`_ ``_address_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -4330,28 +4671,36 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_description``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. ip_collection (str): Reference to the source of external IPv4 addresses, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must support enhanced IPv4 - allocations. Use one of the following formats to - specify a PDP when reserving an external IPv4 - address using BYOIP. - Full resource URL, as in - https://www.googleapis.com/compute/v1/projects/projectId/regions/region - /publicDelegatedPrefixes/pdp-name - Partial URL, - as in - - projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name + allocations. + + Use one of the following formats to specify a + PDP when reserving an external IPv4 address + using BYOIP. + + - + Full resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name - - regions/region/publicDelegatedPrefixes/pdp-name + Partial URL, as in + + + - + projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name + - + regions/region/publicDelegatedPrefixes/pdp-name This field is a member of `oneof`_ ``_ip_collection``. ip_version (str): The IP version that will be used by this - address. Valid options are IPV4 or IPV6. Check + address. Valid options areIPV4 or IPV6. Check the IpVersion enum for the list of possible values. @@ -4366,8 +4715,8 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_ipv6_endpoint_type``. kind (str): - [Output Only] Type of the resource. Always compute#address - for addresses. + Output only. [Output Only] Type of the resource. Always + compute#address for addresses. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -4379,20 +4728,21 @@ class Address(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve an Address. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an Address. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -4403,21 +4753,22 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_name``. network (str): The URL of the network in which to reserve the address. This - field can only be used with INTERNAL type with the - VPC_PEERING purpose. + field can only be used with INTERNAL type with + theVPC_PEERING purpose. This field is a member of `oneof`_ ``_network``. network_tier (str): This signifies the networking tier used for configuring this address and can only take the - following values: PREMIUM or STANDARD. Internal + following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier; global external IP addresses are always Premium Tier; regional external IP addresses can be either - Standard or Premium Tier. If this field is not - specified, it is assumed to be PREMIUM. Check - the NetworkTier enum for the list of possible - values. + Standard or Premium Tier. + + If this field is not specified, it is assumed to + be PREMIUM. Check the NetworkTier enum for the + list of possible values. This field is a member of `oneof`_ ``_network_tier``. prefix_length (int): @@ -4427,32 +4778,41 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_prefix_length``. purpose (str): The purpose of this resource, which can be one of the - following values: - GCE_ENDPOINT for addresses that are used - by VM instances, alias IP ranges, load balancers, and - similar resources. - DNS_RESOLVER for a DNS resolver address - in a subnetwork for a Cloud DNS inbound forwarder IP - addresses (regional internal IP address in a subnet of a VPC - network) - VPC_PEERING for global internal IP addresses used - for private services access allocated ranges. - NAT_AUTO for - the regional external IP addresses used by Cloud NAT when - allocating addresses using automatic NAT IP address - allocation. - IPSEC_INTERCONNECT for addresses created from - a private IP range that are reserved for a VLAN attachment - in an *HA VPN over Cloud Interconnect* configuration. These - addresses are regional resources. - - ``SHARED_LOADBALANCER_VIP`` for an internal IP address that - is assigned to multiple internal forwarding rules. - - ``PRIVATE_SERVICE_CONNECT`` for a private network address - that is used to configure Private Service Connect. Only - global internal addresses can use this purpose. Check the - Purpose enum for the list of possible values. + following values: + + :: + + - GCE_ENDPOINT for addresses that are used by VM + instances, alias IP ranges, load balancers, and similar resources. + - DNS_RESOLVER for a DNS resolver address in a subnetwork + for a Cloud DNS inbound + forwarder IP addresses (regional internal IP address in a subnet of + a VPC network) + - VPC_PEERING for global internal IP addresses used for + + private services access allocated ranges. + - NAT_AUTO for the regional external IP addresses used by + Cloud NAT when allocating addresses using + + automatic NAT IP address allocation. + - IPSEC_INTERCONNECT for addresses created from a private + IP range that are reserved for a VLAN attachment in an + *HA VPN over Cloud Interconnect* configuration. These addresses + are regional resources. + - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned + to multiple internal forwarding rules. + - `PRIVATE_SERVICE_CONNECT` for a private network address that is + used to configure Private Service Connect. Only global internal addresses + can use this purpose. + + Check the Purpose enum for the list of possible values. This field is a member of `oneof`_ ``_purpose``. region (str): - [Output Only] The URL of the region where a regional address - resides. For regional addresses, you must specify the region - as a path parameter in the HTTP request URL. *This field is - not applicable to global addresses.* + Output only. [Output Only] The URL of the region where a + regional address resides. For regional addresses, you must + specify the region as a path parameter in the HTTP request + URL. *This field is not applicable to global addresses.* This field is a member of `oneof`_ ``_region``. self_link (str): @@ -4460,20 +4820,20 @@ class Address(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): - [Output Only] The status of the address, which can be one of - RESERVING, RESERVED, or IN_USE. An address that is RESERVING - is currently in the process of being reserved. A RESERVED - address is currently reserved and available to use. An - IN_USE address is currently being used by another resource - and is not available. Check the Status enum for the list of - possible values. + Output only. [Output Only] The status of the address, which + can be one ofRESERVING, RESERVED, or IN_USE. An address that + is RESERVING is currently in the process of being reserved. + A RESERVED address is currently reserved and available to + use. An IN_USE address is currently being used by another + resource and is not available. Check the Status enum for the + list of possible values. This field is a member of `oneof`_ ``_status``. subnetwork (str): The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with - INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose. + INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose. This field is a member of `oneof`_ ``_subnetwork``. users (MutableSequence[str]): @@ -4482,7 +4842,7 @@ class Address(proto.Message): """ class AddressType(proto.Enum): - r"""The type of address to reserve, either INTERNAL or EXTERNAL. + r"""The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL. Values: @@ -4505,7 +4865,7 @@ class AddressType(proto.Enum): class IpVersion(proto.Enum): r"""The IP version that will be used by this address. Valid - options are IPV4 or IPV6. + options areIPV4 or IPV6. Values: UNDEFINED_IP_VERSION (0): @@ -4524,8 +4884,8 @@ class IpVersion(proto.Enum): UNSPECIFIED_VERSION = 21850000 class Ipv6EndpointType(proto.Enum): - r"""The endpoint type of this address, which should be VM or - NETLB. This is used for deciding which type of endpoint this + r"""The endpoint type of this address, which should be VM + or NETLB. This is used for deciding which type of endpoint this address can be used after the external IPv6 address reservation. Values: @@ -4544,11 +4904,12 @@ class Ipv6EndpointType(proto.Enum): class NetworkTier(proto.Enum): r"""This signifies the networking tier used for configuring this - address and can only take the following values: PREMIUM or - STANDARD. Internal IP addresses are always Premium Tier; global - external IP addresses are always Premium Tier; regional external - IP addresses can be either Standard or Premium Tier. If this - field is not specified, it is assumed to be PREMIUM. + address and can only take the following values: PREMIUM + orSTANDARD. Internal IP addresses are always Premium Tier; + global external IP addresses are always Premium Tier; regional + external IP addresses can be either Standard or Premium Tier. + + If this field is not specified, it is assumed to be PREMIUM. Values: UNDEFINED_NETWORK_TIER (0): @@ -4574,22 +4935,32 @@ class NetworkTier(proto.Enum): class Purpose(proto.Enum): r"""The purpose of this resource, which can be one of the following - values: - GCE_ENDPOINT for addresses that are used by VM instances, - alias IP ranges, load balancers, and similar resources. - - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud - DNS inbound forwarder IP addresses (regional internal IP address in - a subnet of a VPC network) - VPC_PEERING for global internal IP - addresses used for private services access allocated ranges. - - NAT_AUTO for the regional external IP addresses used by Cloud NAT - when allocating addresses using automatic NAT IP address allocation. - - IPSEC_INTERCONNECT for addresses created from a private IP range - that are reserved for a VLAN attachment in an *HA VPN over Cloud - Interconnect* configuration. These addresses are regional resources. - - ``SHARED_LOADBALANCER_VIP`` for an internal IP address that is - assigned to multiple internal forwarding rules. - - ``PRIVATE_SERVICE_CONNECT`` for a private network address that is - used to configure Private Service Connect. Only global internal - addresses can use this purpose. + values: + + :: + + - GCE_ENDPOINT for addresses that are used by VM + instances, alias IP ranges, load balancers, and similar resources. + - DNS_RESOLVER for a DNS resolver address in a subnetwork + for a Cloud DNS inbound + forwarder IP addresses (regional internal IP address in a subnet of + a VPC network) + - VPC_PEERING for global internal IP addresses used for + + private services access allocated ranges. + - NAT_AUTO for the regional external IP addresses used by + Cloud NAT when allocating addresses using + + automatic NAT IP address allocation. + - IPSEC_INTERCONNECT for addresses created from a private + IP range that are reserved for a VLAN attachment in an + *HA VPN over Cloud Interconnect* configuration. These addresses + are regional resources. + - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned + to multiple internal forwarding rules. + - `PRIVATE_SERVICE_CONNECT` for a private network address that is + used to configure Private Service Connect. Only global internal addresses + can use this purpose. Values: UNDEFINED_PURPOSE (0): @@ -4617,7 +4988,7 @@ class Purpose(proto.Enum): PRIVATE_SERVICE_CONNECT (48134724): A private network IP address that can be used to configure Private Service Connect. This - purpose can be specified only for GLOBAL + purpose can be specified only forGLOBAL addresses of Type INTERNAL SERVERLESS (270492508): A regional internal IP address range reserved @@ -4640,9 +5011,9 @@ class Purpose(proto.Enum): VPC_PEERING = 400800170 class Status(proto.Enum): - r"""[Output Only] The status of the address, which can be one of - RESERVING, RESERVED, or IN_USE. An address that is RESERVING is - currently in the process of being reserved. A RESERVED address is + r"""Output only. [Output Only] The status of the address, which can be + one ofRESERVING, RESERVED, or IN_USE. An address that is RESERVING + is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available. @@ -4783,26 +5154,27 @@ class AddressAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.AddressesScopedList]): A list of AddressesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#addressAggregatedList for aggregated lists of + Output only. [Output Only] Type of resource. + Alwayscompute#addressAggregatedList for aggregated lists of addresses. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -4865,21 +5237,22 @@ class AddressList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Address]): A list of Address resources. kind (str): - [Output Only] Type of resource. Always compute#addressList - for lists of addresses. + Output only. [Output Only] Type of resource. Always + compute#addressList for lists of addresses. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -4953,13 +5326,80 @@ class AddressesScopedList(proto.Message): ) +class AdoptInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.AdoptInstances. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_group_manager (str): + Name of the managed instance group. It should + conform to RFC1035 or be a resource ID. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. It + should conform to RFC1035. + region_instance_group_managers_adopt_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAdoptInstancesRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_group_managers_adopt_instances_request_resource: "RegionInstanceGroupManagersAdoptInstancesRequest" = proto.Field( + proto.MESSAGE, + number=310404488, + message="RegionInstanceGroupManagersAdoptInstancesRequest", + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class AdvancedMachineFeatures(proto.Message): r"""Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have - corresponding entries in the GuestOsFeatures of an Image (e.g., - whether or not the OS in the Image supports nested - virtualization being enabled or disabled). + corresponding entries in the GuestOsFeatures of anImage (e.g., + whether or not the OS in theImage supports nested virtualization + being enabled or disabled). .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -4991,9 +5431,12 @@ class AdvancedMachineFeatures(proto.Message): This field is a member of `oneof`_ ``_threads_per_core``. turbo_mode (str): Turbo frequency mode to use for the instance. Supported - modes include: \* ALL_CORE_MAX Using empty string or not - setting this field will use the platform-specific default - turbo mode. + modes include: + + - ALL_CORE_MAX + + Using empty string or not setting this field will use the + platform-specific default turbo mode. This field is a member of `oneof`_ ``_turbo_mode``. visible_core_count (int): @@ -5076,42 +5519,69 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5139,13 +5609,17 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5160,10 +5634,11 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5230,42 +5705,69 @@ class AggregatedListAddressesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5293,13 +5795,17 @@ class AggregatedListAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5314,10 +5820,11 @@ class AggregatedListAddressesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5384,42 +5891,69 @@ class AggregatedListAutoscalersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5447,13 +5981,17 @@ class AggregatedListAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5468,10 +6006,11 @@ class AggregatedListAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5524,8 +6063,8 @@ class AggregatedListAutoscalersRequest(proto.Message): ) -class AggregatedListBackendServicesRequest(proto.Message): - r"""A request message for BackendServices.AggregatedList. See the +class AggregatedListBackendBucketsRequest(proto.Message): + r"""A request message for BackendBuckets.AggregatedList. See the method description for details. @@ -5538,42 +6077,69 @@ class AggregatedListBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5601,13 +6167,17 @@ class AggregatedListBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5622,10 +6192,11 @@ class AggregatedListBackendServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5678,8 +6249,8 @@ class AggregatedListBackendServicesRequest(proto.Message): ) -class AggregatedListDiskTypesRequest(proto.Message): - r"""A request message for DiskTypes.AggregatedList. See the +class AggregatedListBackendServicesRequest(proto.Message): + r"""A request message for BackendServices.AggregatedList. See the method description for details. @@ -5692,42 +6263,69 @@ class AggregatedListDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5755,13 +6353,17 @@ class AggregatedListDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5772,14 +6374,15 @@ class AggregatedListDiskTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5832,9 +6435,9 @@ class AggregatedListDiskTypesRequest(proto.Message): ) -class AggregatedListDisksRequest(proto.Message): - r"""A request message for Disks.AggregatedList. See the method - description for details. +class AggregatedListDiskTypesRequest(proto.Message): + r"""A request message for DiskTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -5846,42 +6449,69 @@ class AggregatedListDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -5909,13 +6539,17 @@ class AggregatedListDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -5930,10 +6564,11 @@ class AggregatedListDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -5986,9 +6621,9 @@ class AggregatedListDisksRequest(proto.Message): ) -class AggregatedListForwardingRulesRequest(proto.Message): - r"""A request message for ForwardingRules.AggregatedList. See the - method description for details. +class AggregatedListDisksRequest(proto.Message): + r"""A request message for Disks.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6000,42 +6635,69 @@ class AggregatedListForwardingRulesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6063,13 +6725,17 @@ class AggregatedListForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6084,10 +6750,11 @@ class AggregatedListForwardingRulesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6140,9 +6807,9 @@ class AggregatedListForwardingRulesRequest(proto.Message): ) -class AggregatedListFutureReservationsRequest(proto.Message): - r"""A request message for FutureReservations.AggregatedList. See - the method description for details. +class AggregatedListForwardingRulesRequest(proto.Message): + r"""A request message for ForwardingRules.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6154,42 +6821,69 @@ class AggregatedListFutureReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6217,13 +6911,17 @@ class AggregatedListFutureReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6238,10 +6936,11 @@ class AggregatedListFutureReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6294,8 +6993,8 @@ class AggregatedListFutureReservationsRequest(proto.Message): ) -class AggregatedListGlobalOperationsRequest(proto.Message): - r"""A request message for GlobalOperations.AggregatedList. See +class AggregatedListFutureReservationsRequest(proto.Message): + r"""A request message for FutureReservations.AggregatedList. See the method description for details. @@ -6308,42 +7007,69 @@ class AggregatedListGlobalOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6371,13 +7097,17 @@ class AggregatedListGlobalOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6392,10 +7122,11 @@ class AggregatedListGlobalOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6448,9 +7179,9 @@ class AggregatedListGlobalOperationsRequest(proto.Message): ) -class AggregatedListHealthChecksRequest(proto.Message): - r"""A request message for HealthChecks.AggregatedList. See the - method description for details. +class AggregatedListGlobalOperationsRequest(proto.Message): + r"""A request message for GlobalOperations.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6462,42 +7193,69 @@ class AggregatedListHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6525,13 +7283,17 @@ class AggregatedListHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6542,14 +7304,15 @@ class AggregatedListHealthChecksRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6602,9 +7365,10 @@ class AggregatedListHealthChecksRequest(proto.Message): ) -class AggregatedListInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.AggregatedList. - See the method description for details. +class AggregatedListGlobalVmExtensionPoliciesRequest(proto.Message): + r"""A request message for + GlobalVmExtensionPolicies.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6616,42 +7380,69 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6679,13 +7470,17 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6696,14 +7491,15 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6756,8 +7552,8 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): ) -class AggregatedListInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.AggregatedList. See the +class AggregatedListHealthChecksRequest(proto.Message): + r"""A request message for HealthChecks.AggregatedList. See the method description for details. @@ -6770,42 +7566,69 @@ class AggregatedListInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6833,13 +7656,17 @@ class AggregatedListInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -6850,14 +7677,15 @@ class AggregatedListInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -6910,9 +7738,9 @@ class AggregatedListInstanceGroupsRequest(proto.Message): ) -class AggregatedListInstanceTemplatesRequest(proto.Message): - r"""A request message for InstanceTemplates.AggregatedList. See - the method description for details. +class AggregatedListInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -6924,42 +7752,69 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -6987,13 +7842,17 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7004,14 +7863,15 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7064,8 +7924,8 @@ class AggregatedListInstanceTemplatesRequest(proto.Message): ) -class AggregatedListInstancesRequest(proto.Message): - r"""A request message for Instances.AggregatedList. See the +class AggregatedListInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.AggregatedList. See the method description for details. @@ -7078,42 +7938,69 @@ class AggregatedListInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7141,13 +8028,17 @@ class AggregatedListInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7162,10 +8053,11 @@ class AggregatedListInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7218,8 +8110,8 @@ class AggregatedListInstancesRequest(proto.Message): ) -class AggregatedListInstantSnapshotsRequest(proto.Message): - r"""A request message for InstantSnapshots.AggregatedList. See +class AggregatedListInstanceTemplatesRequest(proto.Message): + r"""A request message for InstanceTemplates.AggregatedList. See the method description for details. @@ -7232,42 +8124,69 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7295,13 +8214,17 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7312,14 +8235,15 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7372,9 +8296,9 @@ class AggregatedListInstantSnapshotsRequest(proto.Message): ) -class AggregatedListInterconnectAttachmentsRequest(proto.Message): - r"""A request message for InterconnectAttachments.AggregatedList. - See the method description for details. +class AggregatedListInstancesRequest(proto.Message): + r"""A request message for Instances.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7386,42 +8310,69 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7449,13 +8400,17 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7470,10 +8425,11 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7526,9 +8482,9 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): ) -class AggregatedListMachineTypesRequest(proto.Message): - r"""A request message for MachineTypes.AggregatedList. See the - method description for details. +class AggregatedListInstantSnapshotsRequest(proto.Message): + r"""A request message for InstantSnapshots.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7540,42 +8496,69 @@ class AggregatedListMachineTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7603,13 +8586,17 @@ class AggregatedListMachineTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7624,10 +8611,11 @@ class AggregatedListMachineTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7680,9 +8668,9 @@ class AggregatedListMachineTypesRequest(proto.Message): ) -class AggregatedListNetworkAttachmentsRequest(proto.Message): - r"""A request message for NetworkAttachments.AggregatedList. See - the method description for details. +class AggregatedListInterconnectAttachmentsRequest(proto.Message): + r"""A request message for InterconnectAttachments.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7694,42 +8682,69 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7757,13 +8772,17 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7778,10 +8797,11 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7834,10 +8854,9 @@ class AggregatedListNetworkAttachmentsRequest(proto.Message): ) -class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): - r"""A request message for - NetworkEdgeSecurityServices.AggregatedList. See the method - description for details. +class AggregatedListMachineTypesRequest(proto.Message): + r"""A request message for MachineTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -7849,42 +8868,69 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -7912,13 +8958,17 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -7929,14 +8979,15 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -7989,9 +9040,9 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): ) -class AggregatedListNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.AggregatedList. - See the method description for details. +class AggregatedListNetworkAttachmentsRequest(proto.Message): + r"""A request message for NetworkAttachments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8003,42 +9054,69 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8066,13 +9144,17 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8087,10 +9169,11 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8143,9 +9226,10 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): ) -class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.AggregatedList. - See the method description for details. +class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): + r"""A request message for + NetworkEdgeSecurityServices.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8157,42 +9241,69 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8220,13 +9331,17 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8237,14 +9352,15 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8297,9 +9413,9 @@ class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): ) -class AggregatedListNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.AggregatedList. See the - method description for details. +class AggregatedListNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8311,42 +9427,69 @@ class AggregatedListNodeGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8374,13 +9517,17 @@ class AggregatedListNodeGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8395,10 +9542,11 @@ class AggregatedListNodeGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8451,9 +9599,9 @@ class AggregatedListNodeGroupsRequest(proto.Message): ) -class AggregatedListNodeTemplatesRequest(proto.Message): - r"""A request message for NodeTemplates.AggregatedList. See the - method description for details. +class AggregatedListNetworkFirewallPoliciesRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8465,42 +9613,69 @@ class AggregatedListNodeTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8528,13 +9703,17 @@ class AggregatedListNodeTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8549,10 +9728,11 @@ class AggregatedListNodeTemplatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8605,8 +9785,8 @@ class AggregatedListNodeTemplatesRequest(proto.Message): ) -class AggregatedListNodeTypesRequest(proto.Message): - r"""A request message for NodeTypes.AggregatedList. See the +class AggregatedListNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.AggregatedList. See the method description for details. @@ -8619,42 +9799,69 @@ class AggregatedListNodeTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8682,13 +9889,17 @@ class AggregatedListNodeTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8703,10 +9914,11 @@ class AggregatedListNodeTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8759,9 +9971,9 @@ class AggregatedListNodeTypesRequest(proto.Message): ) -class AggregatedListPacketMirroringsRequest(proto.Message): - r"""A request message for PacketMirrorings.AggregatedList. See - the method description for details. +class AggregatedListNodeTemplatesRequest(proto.Message): + r"""A request message for NodeTemplates.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8773,42 +9985,69 @@ class AggregatedListPacketMirroringsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -8836,13 +10075,17 @@ class AggregatedListPacketMirroringsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -8857,10 +10100,11 @@ class AggregatedListPacketMirroringsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -8913,9 +10157,9 @@ class AggregatedListPacketMirroringsRequest(proto.Message): ) -class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.AggregatedList. - See the method description for details. +class AggregatedListNodeTypesRequest(proto.Message): + r"""A request message for NodeTypes.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -8927,196 +10171,69 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. - - This field is a member of `oneof`_ ``_filter``. - include_all_scopes (bool): - Indicates whether every visible scope for - each scope type (zone, region, global) should be - included in the response. For new resource types - added after this field, the flag has no effect - as new resource types will always include every - visible scope for each scope type in response. - For resource types which predate this field, if - this flag is omitted or false, only scopes of - the scope types where the resource type is - expected to be found will be included. + mixed in one request. - This field is a member of `oneof`_ ``_include_all_scopes``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. - - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. - - This field is a member of `oneof`_ ``_page_token``. - project (str): - Name of the project scoping this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_return_partial_success``. - service_project_number (int): - The Shared VPC service project id or service - project number for which aggregated list request - is invoked for subnetworks list-usable api. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_service_project_number``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - include_all_scopes: bool = proto.Field( - proto.BOOL, - number=391327988, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - service_project_number: int = proto.Field( - proto.INT64, - number=316757497, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class AggregatedListRegionCommitmentsRequest(proto.Message): - r"""A request message for RegionCommitments.AggregatedList. See - the method description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9144,13 +10261,17 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9165,10 +10286,11 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9221,8 +10343,8 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): ) -class AggregatedListRegionHealthSourcesRequest(proto.Message): - r"""A request message for RegionHealthSources.AggregatedList. See +class AggregatedListPacketMirroringsRequest(proto.Message): + r"""A request message for PacketMirrorings.AggregatedList. See the method description for details. @@ -9235,42 +10357,69 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9298,13 +10447,17 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9315,14 +10468,15 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9375,8 +10529,8 @@ class AggregatedListRegionHealthSourcesRequest(proto.Message): ) -class AggregatedListRegionNetworkPoliciesRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.AggregatedList. +class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.AggregatedList. See the method description for details. @@ -9389,42 +10543,69 @@ class AggregatedListRegionNetworkPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9452,13 +10633,17 @@ class AggregatedListRegionNetworkPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9469,14 +10654,15 @@ class AggregatedListRegionNetworkPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9529,9 +10715,9 @@ class AggregatedListRegionNetworkPoliciesRequest(proto.Message): ) -class AggregatedListReservationsRequest(proto.Message): - r"""A request message for Reservations.AggregatedList. See the - method description for details. +class AggregatedListRegionCommitmentsRequest(proto.Message): + r"""A request message for RegionCommitments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -9543,42 +10729,69 @@ class AggregatedListReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9606,13 +10819,17 @@ class AggregatedListReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9627,10 +10844,11 @@ class AggregatedListReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9683,9 +10901,10 @@ class AggregatedListReservationsRequest(proto.Message): ) -class AggregatedListResourcePoliciesRequest(proto.Message): - r"""A request message for ResourcePolicies.AggregatedList. See - the method description for details. +class AggregatedListRegionCompositeHealthChecksRequest(proto.Message): + r"""A request message for + RegionCompositeHealthChecks.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -9697,42 +10916,69 @@ class AggregatedListResourcePoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9760,13 +11006,17 @@ class AggregatedListResourcePoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9777,14 +11027,15 @@ class AggregatedListResourcePoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9837,8 +11088,9 @@ class AggregatedListResourcePoliciesRequest(proto.Message): ) -class AggregatedListRoutersRequest(proto.Message): - r"""A request message for Routers.AggregatedList. See the method +class AggregatedListRegionHealthAggregationPoliciesRequest(proto.Message): + r"""A request message for + RegionHealthAggregationPolicies.AggregatedList. See the method description for details. @@ -9851,42 +11103,69 @@ class AggregatedListRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -9914,13 +11193,17 @@ class AggregatedListRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -9931,14 +11214,15 @@ class AggregatedListRoutersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -9991,8 +11275,8 @@ class AggregatedListRoutersRequest(proto.Message): ) -class AggregatedListSecurityPoliciesRequest(proto.Message): - r"""A request message for SecurityPolicies.AggregatedList. See +class AggregatedListRegionHealthSourcesRequest(proto.Message): + r"""A request message for RegionHealthSources.AggregatedList. See the method description for details. @@ -10005,42 +11289,69 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10068,13 +11379,17 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10089,10 +11404,11 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10145,9 +11461,9 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): ) -class AggregatedListServiceAttachmentsRequest(proto.Message): - r"""A request message for ServiceAttachments.AggregatedList. See - the method description for details. +class AggregatedListRegionNetworkPoliciesRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.AggregatedList. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10159,42 +11475,69 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10222,13 +11565,17 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10239,14 +11586,15 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10299,8 +11647,8 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): ) -class AggregatedListSnapshotsRequest(proto.Message): - r"""A request message for Snapshots.AggregatedList. See the +class AggregatedListReservationsRequest(proto.Message): + r"""A request message for Reservations.AggregatedList. See the method description for details. @@ -10313,42 +11661,69 @@ class AggregatedListSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10376,13 +11751,17 @@ class AggregatedListSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10397,10 +11776,11 @@ class AggregatedListSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10453,9 +11833,9 @@ class AggregatedListSnapshotsRequest(proto.Message): ) -class AggregatedListSslCertificatesRequest(proto.Message): - r"""A request message for SslCertificates.AggregatedList. See the - method description for details. +class AggregatedListResourcePoliciesRequest(proto.Message): + r"""A request message for ResourcePolicies.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10467,42 +11847,69 @@ class AggregatedListSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10530,13 +11937,17 @@ class AggregatedListSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10547,14 +11958,15 @@ class AggregatedListSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10607,9 +12019,9 @@ class AggregatedListSslCertificatesRequest(proto.Message): ) -class AggregatedListSslPoliciesRequest(proto.Message): - r"""A request message for SslPolicies.AggregatedList. See the - method description for details. +class AggregatedListRoutersRequest(proto.Message): + r"""A request message for Routers.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10621,42 +12033,69 @@ class AggregatedListSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10684,13 +12123,17 @@ class AggregatedListSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10701,14 +12144,15 @@ class AggregatedListSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Name of the project scoping this request. + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10761,8 +12205,8 @@ class AggregatedListSslPoliciesRequest(proto.Message): ) -class AggregatedListStoragePoolTypesRequest(proto.Message): - r"""A request message for StoragePoolTypes.AggregatedList. See +class AggregatedListSecurityPoliciesRequest(proto.Message): + r"""A request message for SecurityPolicies.AggregatedList. See the method description for details. @@ -10775,42 +12219,69 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10838,13 +12309,17 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -10855,14 +12330,15 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -10915,9 +12391,9 @@ class AggregatedListStoragePoolTypesRequest(proto.Message): ) -class AggregatedListStoragePoolsRequest(proto.Message): - r"""A request message for StoragePools.AggregatedList. See the - method description for details. +class AggregatedListServiceAttachmentsRequest(proto.Message): + r"""A request message for ServiceAttachments.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -10929,42 +12405,69 @@ class AggregatedListStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -10992,13 +12495,17 @@ class AggregatedListStoragePoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11009,14 +12516,15 @@ class AggregatedListStoragePoolsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11069,8 +12577,8 @@ class AggregatedListStoragePoolsRequest(proto.Message): ) -class AggregatedListSubnetworksRequest(proto.Message): - r"""A request message for Subnetworks.AggregatedList. See the +class AggregatedListSnapshotsRequest(proto.Message): + r"""A request message for Snapshots.AggregatedList. See the method description for details. @@ -11083,42 +12591,69 @@ class AggregatedListSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11146,13 +12681,17 @@ class AggregatedListSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11167,10 +12706,11 @@ class AggregatedListSubnetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11223,9 +12763,9 @@ class AggregatedListSubnetworksRequest(proto.Message): ) -class AggregatedListTargetHttpProxiesRequest(proto.Message): - r"""A request message for TargetHttpProxies.AggregatedList. See - the method description for details. +class AggregatedListSslCertificatesRequest(proto.Message): + r"""A request message for SslCertificates.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11237,42 +12777,69 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11300,13 +12867,17 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11321,10 +12892,11 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11377,9 +12949,9 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): ) -class AggregatedListTargetHttpsProxiesRequest(proto.Message): - r"""A request message for TargetHttpsProxies.AggregatedList. See - the method description for details. +class AggregatedListSslPoliciesRequest(proto.Message): + r"""A request message for SslPolicies.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11391,42 +12963,69 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11454,13 +13053,17 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11475,10 +13078,11 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11531,9 +13135,9 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): ) -class AggregatedListTargetInstancesRequest(proto.Message): - r"""A request message for TargetInstances.AggregatedList. See the - method description for details. +class AggregatedListStoragePoolTypesRequest(proto.Message): + r"""A request message for StoragePoolTypes.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11545,42 +13149,69 @@ class AggregatedListTargetInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11608,13 +13239,17 @@ class AggregatedListTargetInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11629,10 +13264,11 @@ class AggregatedListTargetInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11685,8 +13321,8 @@ class AggregatedListTargetInstancesRequest(proto.Message): ) -class AggregatedListTargetPoolsRequest(proto.Message): - r"""A request message for TargetPools.AggregatedList. See the +class AggregatedListStoragePoolsRequest(proto.Message): + r"""A request message for StoragePools.AggregatedList. See the method description for details. @@ -11699,42 +13335,69 @@ class AggregatedListTargetPoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -11762,13 +13425,17 @@ class AggregatedListTargetPoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -11783,10 +13450,11 @@ class AggregatedListTargetPoolsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -11839,9 +13507,9 @@ class AggregatedListTargetPoolsRequest(proto.Message): ) -class AggregatedListTargetTcpProxiesRequest(proto.Message): - r"""A request message for TargetTcpProxies.AggregatedList. See - the method description for details. +class AggregatedListSubnetworksRequest(proto.Message): + r"""A request message for Subnetworks.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -11853,196 +13521,69 @@ class AggregatedListTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - include_all_scopes (bool): - Indicates whether every visible scope for - each scope type (zone, region, global) should be - included in the response. For new resource types - added after this field, the flag has no effect - as new resource types will always include every - visible scope for each scope type in response. - For resource types which predate this field, if - this flag is omitted or false, only scopes of - the scope types where the resource type is - expected to be found will be included. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_include_all_scopes``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + :: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + labels.owner:* - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Name of the project scoping this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_return_partial_success``. - service_project_number (int): - The Shared VPC service project id or service - project number for which aggregated list request - is invoked for subnetworks list-usable api. + :: - This field is a member of `oneof`_ ``_service_project_number``. - """ + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - include_all_scopes: bool = proto.Field( - proto.BOOL, - number=391327988, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - service_project_number: int = proto.Field( - proto.INT64, - number=316757497, - optional=True, - ) - - -class AggregatedListTargetVpnGatewaysRequest(proto.Message): - r"""A request message for TargetVpnGateways.AggregatedList. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12070,13 +13611,17 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12091,10 +13636,11 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12104,8 +13650,42 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): is invoked for subnetworks list-usable api. This field is a member of `oneof`_ ``_service_project_number``. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Check the Views enum for the list of possible values. + + This field is a member of `oneof`_ ``_views``. """ + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Values: + UNDEFINED_VIEWS (0): + A value indicating that the enum field is not + set. + DEFAULT (115302945): + No description available. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. + """ + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -12145,11 +13725,16 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): number=316757497, optional=True, ) + views: str = proto.Field( + proto.STRING, + number=112204398, + optional=True, + ) -class AggregatedListUrlMapsRequest(proto.Message): - r"""A request message for UrlMaps.AggregatedList. See the method - description for details. +class AggregatedListTargetHttpProxiesRequest(proto.Message): + r"""A request message for TargetHttpProxies.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -12161,42 +13746,69 @@ class AggregatedListUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12224,13 +13836,17 @@ class AggregatedListUrlMapsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12245,10 +13861,11 @@ class AggregatedListUrlMapsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12301,9 +13918,9 @@ class AggregatedListUrlMapsRequest(proto.Message): ) -class AggregatedListVpnGatewaysRequest(proto.Message): - r"""A request message for VpnGateways.AggregatedList. See the - method description for details. +class AggregatedListTargetHttpsProxiesRequest(proto.Message): + r"""A request message for TargetHttpsProxies.AggregatedList. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -12315,42 +13932,69 @@ class AggregatedListVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12378,13 +14022,17 @@ class AggregatedListVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12395,14 +14043,15 @@ class AggregatedListVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. + Name of the project scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12455,8 +14104,8 @@ class AggregatedListVpnGatewaysRequest(proto.Message): ) -class AggregatedListVpnTunnelsRequest(proto.Message): - r"""A request message for VpnTunnels.AggregatedList. See the +class AggregatedListTargetInstancesRequest(proto.Message): + r"""A request message for TargetInstances.AggregatedList. See the method description for details. @@ -12469,42 +14118,69 @@ class AggregatedListVpnTunnelsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. include_all_scopes (bool): @@ -12532,13 +14208,17 @@ class AggregatedListVpnTunnelsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -12553,10 +14233,11 @@ class AggregatedListVpnTunnelsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -12609,2750 +14290,2654 @@ class AggregatedListVpnTunnelsRequest(proto.Message): ) -class AliasIpRange(proto.Message): - r"""An alias IP range attached to an instance's network - interface. +class AggregatedListTargetPoolsRequest(proto.Message): + r"""A request message for TargetPools.AggregatedList. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ip_cidr_range (str): - The IP alias ranges to allocate for this - interface. This IP CIDR range must belong to the - specified subnetwork and cannot contain IP - addresses reserved by system or used by other - network interfaces. This range may be a single - IP address (such as 10.2.3.4), a netmask (such - as /24) or a CIDR-formatted string (such as - 10.1.2.0/24). + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_ip_cidr_range``. - subnetwork_range_name (str): - The name of a subnetwork secondary IP range - from which to allocate an IP alias range. If not - specified, the primary range of the subnetwork - is used. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_subnetwork_range_name``. - """ + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - ip_cidr_range: str = proto.Field( - proto.STRING, - number=98117322, - optional=True, - ) - subnetwork_range_name: str = proto.Field( - proto.STRING, - number=387995966, - optional=True, - ) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: -class AllocationAggregateReservation(proto.Message): - r"""This reservation type is specified by total resource amounts - (e.g. total count of CPUs) and can account for multiple instance - SKUs. In other words, one can create instances of varying shapes - against this reservation. + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - Attributes: - host_count (int): - Count of reserved hosts of specified VM - family. The host has fixed number of - accelerators based on the accelerator/vm-family - selected. + :: - This field is a member of `oneof`_ ``_host_count``. - in_use_host_count (int): - Number of hosts currently in use. If there is - one or more Instances running on the host, it is - considered in use. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_in_use_host_count``. - in_use_instance_count (int): - Number of instances currently in use in this - reservation. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_in_use_instance_count``. - in_use_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): - [Output only] List of resources currently in use. - reserved_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): - List of reserved resources (CPUs, memory, - accelerators). - vm_family (str): - The VM family that all instances scheduled - against this reservation must belong to. Check - the VmFamily enum for the list of possible - values. + :: - This field is a member of `oneof`_ ``_vm_family``. - workload_type (str): - The workload type of the instances that will - target this reservation. Check the WorkloadType - enum for the list of possible values. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_workload_type``. - """ + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - class VmFamily(proto.Enum): - r"""The VM family that all instances scheduled against this - reservation must belong to. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - Values: - UNDEFINED_VM_FAMILY (0): - A value indicating that the enum field is not - set. - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): - No description available. - """ - UNDEFINED_VM_FAMILY = 0 - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - class WorkloadType(proto.Enum): - r"""The workload type of the instances that will target this - reservation. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - Values: - UNDEFINED_WORKLOAD_TYPE (0): - A value indicating that the enum field is not - set. - BATCH (62971674): - Reserved resources will be optimized for - BATCH workloads, such as ML training. - SERVING (17781740): - Reserved resources will be optimized for - SERVING workloads, such as ML inference. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_WORKLOAD_TYPE = 0 - BATCH = 62971674 - SERVING = 17781740 - UNSPECIFIED = 526786327 + You cannot combine constraints on multiple fields using + regular expressions. - host_count: int = proto.Field( - proto.INT32, - number=297782200, + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - in_use_host_count: int = proto.Field( - proto.INT32, - number=364069834, + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, optional=True, ) - in_use_instance_count: int = proto.Field( - proto.INT32, - number=319874039, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - in_use_resources: MutableSequence[ - "AllocationAggregateReservationReservedResourceInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=409009107, - message="AllocationAggregateReservationReservedResourceInfo", - ) - reserved_resources: MutableSequence[ - "AllocationAggregateReservationReservedResourceInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=213217742, - message="AllocationAggregateReservationReservedResourceInfo", + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, ) - vm_family: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=125017580, + number=19994697, optional=True, ) - workload_type: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=273432322, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, optional=True, ) -class AllocationAggregateReservationReservedResourceInfo(proto.Message): - r""" +class AggregatedListTargetTcpProxiesRequest(proto.Message): + r"""A request message for TargetTcpProxies.AggregatedList. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - accelerator (google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfoAccelerator): - Properties of accelerator resources in this - reservation. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_accelerator``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - accelerator: "AllocationAggregateReservationReservedResourceInfoAccelerator" = ( - proto.Field( - proto.MESSAGE, - number=424338027, - optional=True, - message="AllocationAggregateReservationReservedResourceInfoAccelerator", - ) - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class AllocationAggregateReservationReservedResourceInfoAccelerator(proto.Message): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - accelerator_count (int): - Number of accelerators of specified type. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_accelerator_count``. - accelerator_type (str): - Full or partial URL to accelerator type. e.g. - "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l". + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_accelerator_type``. - """ + :: - accelerator_count: int = proto.Field( - proto.INT32, - number=504879675, - optional=True, - ) - accelerator_type: str = proto.Field( - proto.STRING, - number=138031246, - optional=True, - ) + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: -class AllocationReservationSharingPolicy(proto.Message): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - Attributes: - service_share_type (str): - Sharing config for all Google Cloud services. - Check the ServiceShareType enum for the list of - possible values. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_service_share_type``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - class ServiceShareType(proto.Enum): - r"""Sharing config for all Google Cloud services. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - Values: - UNDEFINED_SERVICE_SHARE_TYPE (0): - A value indicating that the enum field is not - set. - ALLOW_ALL (475536235): - Allow all Google Cloud managed services to - share reservations. - DISALLOW_ALL (277786301): - [Default] Disallow sharing with all Google Cloud services. - SERVICE_SHARE_TYPE_UNSPECIFIED (279057148): - No description available. - """ - UNDEFINED_SERVICE_SHARE_TYPE = 0 - ALLOW_ALL = 475536235 - DISALLOW_ALL = 277786301 - SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148 + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - service_share_type: str = proto.Field( - proto.STRING, - number=514508644, - optional=True, - ) + You cannot combine constraints on multiple fields using + regular expressions. + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. -class AllocationResourceStatus(proto.Message): - r"""[Output Only] Contains output only fields. + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - Attributes: - health_info (google.cloud.compute_v1beta.types.AllocationResourceStatusHealthInfo): - [Output only] Health information for the reservation. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - This field is a member of `oneof`_ ``_health_info``. - reservation_block_count (int): - The number of reservation blocks associated - with this reservation. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_reservation_block_count``. - reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): - Maintenance information for this reservation + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_reservation_maintenance``. - specific_sku_allocation (google.cloud.compute_v1beta.types.AllocationResourceStatusSpecificSKUAllocation): - Allocation Properties of this reservation. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Name of the project scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_specific_sku_allocation``. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. """ - health_info: "AllocationResourceStatusHealthInfo" = proto.Field( - proto.MESSAGE, - number=235287729, + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, - message="AllocationResourceStatusHealthInfo", ) - reservation_block_count: int = proto.Field( - proto.INT32, - number=161835754, + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, optional=True, ) - reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( - proto.MESSAGE, - number=340607776, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, - message="GroupMaintenanceInfo", ) - specific_sku_allocation: "AllocationResourceStatusSpecificSKUAllocation" = ( - proto.Field( - proto.MESSAGE, - number=196231151, - optional=True, - message="AllocationResourceStatusSpecificSKUAllocation", - ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, ) -class AllocationResourceStatusHealthInfo(proto.Message): - r"""Health information for the reservation. +class AggregatedListTargetVpnGatewaysRequest(proto.Message): + r"""A request message for TargetVpnGateways.AggregatedList. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - degraded_block_count (int): - The number of reservation blocks that are - degraded. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_degraded_block_count``. - health_status (str): - The health status of the reservation. - Check the HealthStatus enum for the list of - possible values. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_health_status``. - healthy_block_count (int): - The number of reservation blocks that are - healthy. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_healthy_block_count``. - """ + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - class HealthStatus(proto.Enum): - r"""The health status of the reservation. + :: - Values: - UNDEFINED_HEALTH_STATUS (0): - A value indicating that the enum field is not - set. - DEGRADED (396890926): - The reservation is degraded. - HEALTHY (439801213): - The reservation is healthy. - HEALTH_STATUS_UNSPECIFIED (482246925): - The health status of the reservation is - unspecified. - """ - UNDEFINED_HEALTH_STATUS = 0 - DEGRADED = 396890926 - HEALTHY = 439801213 - HEALTH_STATUS_UNSPECIFIED = 482246925 - - degraded_block_count: int = proto.Field( - proto.INT32, - number=514082636, - optional=True, - ) - health_status: str = proto.Field( - proto.STRING, - number=380545845, - optional=True, - ) - healthy_block_count: int = proto.Field( - proto.INT32, - number=223625019, - optional=True, - ) - - -class AllocationResourceStatusSpecificSKUAllocation(proto.Message): - r"""Contains Properties set for the reservation. + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - source_instance_template_id (str): - ID of the instance template used to populate - reservation properties. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_source_instance_template_id``. - utilizations (MutableMapping[str, int]): - Per service utilization breakdown. The Key is - the Google Cloud managed service name. - """ + :: - source_instance_template_id: str = proto.Field( - proto.STRING, - number=111196154, - optional=True, - ) - utilizations: MutableMapping[str, int] = proto.MapField( - proto.STRING, - proto.INT64, - number=402495121, - ) + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: -class AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( - proto.Message -): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - Attributes: - disk_size_gb (int): - Specifies the size of the disk in base-2 GB. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_disk_size_gb``. - interface (str): - Specifies the disk interface to use for - attaching this disk, which is either SCSI or - NVME. The default is SCSI. For performance - characteristics of SCSI over NVMe, see Local SSD - performance. Check the Interface enum for the - list of possible values. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_interface``. - """ + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - class Interface(proto.Enum): - r"""Specifies the disk interface to use for attaching this disk, - which is either SCSI or NVME. The default is SCSI. For - performance characteristics of SCSI over NVMe, see Local SSD - performance. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - Values: - UNDEFINED_INTERFACE (0): - A value indicating that the enum field is not - set. - NVME (2408800): - No description available. - SCSI (2539686): - No description available. - """ - UNDEFINED_INTERFACE = 0 - NVME = 2408800 - SCSI = 2539686 + You cannot combine constraints on multiple fields using + regular expressions. - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, - optional=True, - ) - interface: str = proto.Field( - proto.STRING, - number=502623545, - optional=True, - ) + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) -class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): - r"""Properties of the SKU instances being reserved. Next ID: 9 + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - Attributes: - guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): - Specifies accelerator type and count. - local_ssds (MutableSequence[google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk]): - Specifies amount of local ssd to reserve with - each instance. The type of disk is local-ssd. - location_hint (str): - An opaque location hint used to place the - allocation close to other resources. This field - is for use by internal tools that use the public - API. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_location_hint``. - machine_type (str): - Specifies type of machine (name only) which has fixed number - of vCPUs and fixed amount of memory. This also includes - specifying custom machine type following - custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_machine_type``. - maintenance_freeze_duration_hours (int): - Specifies the number of hours after - reservation creation where instances using the - reservation won't be scheduled for maintenance. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_maintenance_freeze_duration_hours``. - maintenance_interval (str): - Specifies the frequency of planned maintenance events. The - accepted values are: ``PERIODIC``. Check the - MaintenanceInterval enum for the list of possible values. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - This field is a member of `oneof`_ ``_maintenance_interval``. - min_cpu_platform (str): - Minimum cpu platform the reservation. + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. - This field is a member of `oneof`_ ``_min_cpu_platform``. + This field is a member of `oneof`_ ``_service_project_number``. """ - class MaintenanceInterval(proto.Enum): - r"""Specifies the frequency of planned maintenance events. The accepted - values are: ``PERIODIC``. - - Values: - UNDEFINED_MAINTENANCE_INTERVAL (0): - A value indicating that the enum field is not - set. - AS_NEEDED (500724834): - VMs are eligible to receive infrastructure - and hypervisor updates as they become available. - This may result in more maintenance operations - (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. - PERIODIC (142804635): - VMs receive infrastructure and hypervisor updates on a - periodic basis, minimizing the number of maintenance - operations (live migrations or terminations) on an - individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. - Security updates will still be applied as soon as they are - available. - RECURRENT (194244550): - VMs receive infrastructure and hypervisor updates on a - periodic basis, minimizing the number of maintenance - operations (live migrations or terminations) on an - individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. - Security updates will still be applied as soon as they are - available. RECURRENT is used for GEN3 and Slice of Hardware - VMs. - """ - UNDEFINED_MAINTENANCE_INTERVAL = 0 - AS_NEEDED = 500724834 - PERIODIC = 142804635 - RECURRENT = 194244550 - - guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=463595119, - message="AcceleratorConfig", + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, ) - local_ssds: MutableSequence[ - "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" - ] = proto.RepeatedField( - proto.MESSAGE, - number=229951299, - message="AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, ) - location_hint: str = proto.Field( - proto.STRING, - number=350519505, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - machine_type: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=227711026, + number=160562920, optional=True, ) - maintenance_freeze_duration_hours: int = proto.Field( - proto.INT32, - number=371662624, + page_token: str = proto.Field( + proto.STRING, + number=19994697, optional=True, ) - maintenance_interval: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=403368049, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - min_cpu_platform: str = proto.Field( - proto.STRING, - number=242912759, + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, optional=True, ) -class AllocationSpecificSKUReservation(proto.Message): - r"""This reservation type allows to pre allocate specific - instance configuration. +class AggregatedListUrlMapsRequest(proto.Message): + r"""A request message for UrlMaps.AggregatedList. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - assured_count (int): - [Output Only] Indicates how many instances are actually - usable currently. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_assured_count``. - count (int): - Specifies the number of resources that are - allocated. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_count``. - in_use_count (int): - [Output Only] Indicates how many instances are in use. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_in_use_count``. - instance_properties (google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationReservedInstanceProperties): - The instance properties for the reservation. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_instance_properties``. - source_instance_template (str): - Specifies the instance template to create the - reservation. If you use this field, you must - exclude the instanceProperties field. This field - is optional, and it can be a full or partial - URL. For example, the following are all valid - URLs to an instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate + :: - This field is a member of `oneof`_ ``_source_instance_template``. - """ + labels.owner:* - assured_count: int = proto.Field( - proto.INT64, - number=281197645, - optional=True, - ) - count: int = proto.Field( - proto.INT64, - number=94851343, - optional=True, - ) - in_use_count: int = proto.Field( - proto.INT64, - number=493458877, - optional=True, - ) - instance_properties: "AllocationSpecificSKUAllocationReservedInstanceProperties" = ( - proto.Field( - proto.MESSAGE, - number=215355165, - optional=True, - message="AllocationSpecificSKUAllocationReservedInstanceProperties", - ) - ) - source_instance_template: str = proto.Field( - proto.STRING, - number=332423616, - optional=True, - ) + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: -class Allowed(proto.Message): - r""" + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - I_p_protocol (str): - The IP protocol to which this rule applies. - The protocol type is required when creating a - firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp) or the IP - protocol number. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_I_p_protocol``. - ports (MutableSequence[str]): - An optional list of ports to which this rule applies. This - field is only applicable for the UDP or TCP protocol. Each - entry must be either an integer or a range. If not - specified, this rule applies to connections through any - port. Example inputs include: ["22"], ["80","443"], and - ["12345-12349"]. - """ + :: - I_p_protocol: str = proto.Field( - proto.STRING, - number=488094525, - optional=True, - ) - ports: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=106854418, - ) + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: -class AnnouncePublicAdvertisedPrefixeRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.Announce. See - the method description for details. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - Attributes: - project (str): - Project ID for this request. - public_advertised_prefix (str): - The name of the public advertised prefix. It - should comply with RFC1035. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + You cannot combine constraints on multiple fields using + regular expressions. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - public_advertised_prefix: str = proto.Field( - proto.STRING, - number=101874590, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. -class AnnouncePublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.Announce. See - the method description for details. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - Attributes: + This field is a member of `oneof`_ ``_page_token``. project (str): - Project ID for this request. - public_delegated_prefix (str): - The name of the public delegated prefix. It - should comply with RFC1035. - region (str): - The name of the region where the public - delegated prefix is located. It should comply - with RFC1035. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Name of the project scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. """ - project: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=227560217, + number=336120696, + optional=True, ) - public_delegated_prefix: str = proto.Field( - proto.STRING, - number=204238440, + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - request_id: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=37109963, + number=160562920, optional=True, ) - - -class ApplyUpdatesToInstancesInstanceGroupManagerRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.ApplyUpdatesToInstances. See the method - description for details. - - Attributes: - instance_group_manager (str): - The name of the managed instance group, - should conform to RFC1035. - instance_group_managers_apply_updates_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersApplyUpdatesRequest): - The body resource for this request - project (str): - Project ID for this request. - zone (str): - The name of the zone where the managed - instance group is located. Should conform to - RFC1035. - """ - - instance_group_manager: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=249363395, - ) - instance_group_managers_apply_updates_request_resource: "InstanceGroupManagersApplyUpdatesRequest" = proto.Field( - proto.MESSAGE, - number=259242835, - message="InstanceGroupManagersApplyUpdatesRequest", + number=19994697, + optional=True, ) project: str = proto.Field( proto.STRING, number=227560217, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, ) - - -class ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ApplyUpdatesToInstances. See the + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, + ) + + +class AggregatedListVpnGatewaysRequest(proto.Message): + r"""A request message for VpnGateways.AggregatedList. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - instance_group_manager (str): - The name of the managed instance group, - should conform to RFC1035. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request, - should conform to RFC1035. - region_instance_group_managers_apply_updates_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest): - The body resource for this request - """ + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - region_instance_group_managers_apply_updates_request_resource: "RegionInstanceGroupManagersApplyUpdatesRequest" = proto.Field( - proto.MESSAGE, - number=76248318, - message="RegionInstanceGroupManagersApplyUpdatesRequest", - ) + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. -class AttachDiskInstanceRequest(proto.Message): - r"""A request message for Instances.AttachDisk. See the method - description for details. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - attached_disk_resource (google.cloud.compute_v1beta.types.AttachedDisk): - The body resource for this request - force_attach (bool): - Whether to force attach the regional disk - even if it's currently attached to another - instance. If you try to force attach a zonal - disk to an instance, you will receive an error. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_force_attach``. - instance (str): - The instance name for this request. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. """ - attached_disk_resource: "AttachedDisk" = proto.Field( - proto.MESSAGE, - number=90605845, - message="AttachedDisk", + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, ) - force_attach: bool = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, - number=142758425, + number=391327988, optional=True, ) - instance: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=18257045, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, ) project: str = proto.Field( proto.STRING, number=227560217, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, ) -class AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): - r"""A request message for - GlobalNetworkEndpointGroups.AttachNetworkEndpoints. See the +class AggregatedListVpnTunnelsRequest(proto.Message): + r"""A request message for VpnTunnels.AggregatedList. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - global_network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.GlobalNetworkEndpointGroupsAttachEndpointsRequest): - The body resource for this request - network_endpoint_group (str): - The name of the network endpoint group where - you are attaching network endpoints to. It - should comply with RFC1035. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_request_id``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - global_network_endpoint_groups_attach_endpoints_request_resource: "GlobalNetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=30691563, - message="GlobalNetworkEndpointGroupsAttachEndpointsRequest", - ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class AttachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): - r"""A request message for - NetworkEndpointGroups.AttachNetworkEndpoints. See the method - description for details. + :: + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - network_endpoint_group (str): - The name of the network endpoint group where - you are attaching network endpoints to. It - should comply with RFC1035. - network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsAttachEndpointsRequest): - The body resource for this request + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + include_all_scopes (bool): + Indicates whether every visible scope for + each scope type (zone, region, global) should be + included in the response. For new resource types + added after this field, the flag has no effect + as new resource types will always include every + visible scope for each scope type in response. + For resource types which predate this field, if + this flag is omitted or false, only scopes of + the scope types where the resource type is + expected to be found will be included. + + This field is a member of `oneof`_ ``_include_all_scopes``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + service_project_number (int): + The Shared VPC service project id or service + project number for which aggregated list request + is invoked for subnetworks list-usable api. + + This field is a member of `oneof`_ ``_service_project_number``. """ - network_endpoint_group: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=433907078, + number=336120696, + optional=True, ) - network_endpoint_groups_attach_endpoints_request_resource: "NetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=531079, - message="NetworkEndpointGroupsAttachEndpointsRequest", + include_all_scopes: bool = proto.Field( + proto.BOOL, + number=391327988, + optional=True, ) - project: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=227560217, + number=160562920, + optional=True, ) - request_id: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=37109963, + number=19994697, optional=True, ) - zone: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3744684, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + service_project_number: int = proto.Field( + proto.INT64, + number=316757497, + optional=True, ) -class AttachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): - r"""A request message for - RegionNetworkEndpointGroups.AttachNetworkEndpoints. See the - method description for details. +class AliasIpRange(proto.Message): + r"""An alias IP range attached to an instance's network + interface. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group where - you are attaching network endpoints to. It - should comply with RFC1035. - project (str): - Project ID for this request. - region (str): - The name of the region where you want to - create the network endpoint group. It should - comply with RFC1035. - region_network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + ip_cidr_range (str): + The IP alias ranges to allocate for this + interface. This IP CIDR range must belong to the + specified subnetwork and cannot contain IP + addresses reserved by system or used by other + network interfaces. This range may be a single + IP address (such as 10.2.3.4), a netmask (such + as/24) or a CIDR-formatted string (such + as10.1.2.0/24). - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_ip_cidr_range``. + subnetwork_range_name (str): + The name of a subnetwork secondary IP range + from which to allocate an IP alias range. If not + specified, the primary range of the subnetwork + is used. + + This field is a member of `oneof`_ ``_subnetwork_range_name``. """ - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, - number=138946292, - ) - region_network_endpoint_groups_attach_endpoints_request_resource: "RegionNetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=334986492, - message="RegionNetworkEndpointGroupsAttachEndpointsRequest", + number=98117322, + optional=True, ) - request_id: str = proto.Field( + subnetwork_range_name: str = proto.Field( proto.STRING, - number=37109963, + number=387995966, optional=True, ) -class AttachedDisk(proto.Message): - r"""An instance-attached disk resource. +class AllocationAggregateReservation(proto.Message): + r"""This reservation type is specified by total resource amounts + (e.g. total count of CPUs) and can account for multiple instance + SKUs. In other words, one can create instances of varying shapes + against this reservation. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - architecture (str): - [Output Only] The architecture of the attached disk. Valid - values are ARM64 or X86_64. Check the Architecture enum for - the list of possible values. - - This field is a member of `oneof`_ ``_architecture``. - auto_delete (bool): - Specifies whether the disk will be - auto-deleted when the instance is deleted (but - not when the disk is detached from the - instance). + host_count (int): + Count of reserved hosts of specified VM + family. The host has fixed number of + accelerators based on the accelerator/vm-family + selected. - This field is a member of `oneof`_ ``_auto_delete``. - boot (bool): - Indicates that this is a boot disk. The - virtual machine will use the first partition of - the disk for its root filesystem. + This field is a member of `oneof`_ ``_host_count``. + in_use_host_count (int): + Output only. Number of hosts currently in + use. If there is one or more Instances running + on the host, it is considered in use. - This field is a member of `oneof`_ ``_boot``. - device_name (str): - Specifies a unique device name of your choice that is - reflected into the /dev/disk/by-id/google-\* tree of a Linux - operating system running within the instance. This name can - be used to reference the device for mounting, resizing, and - so on, from within the instance. If not specified, the - server chooses a default device name to apply to this disk, - in the form persistent-disk-x, where x is a number assigned - by Google Compute Engine. This field is only applicable for - persistent disks. + This field is a member of `oneof`_ ``_in_use_host_count``. + in_use_instance_count (int): + Output only. Number of instances currently in + use in this reservation. - This field is a member of `oneof`_ ``_device_name``. - disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts or decrypts a disk using a - customer-supplied encryption key. If you are - creating a new disk, this field encrypts the new - disk using an encryption key that you provide. - If you are attaching an existing disk that is - already encrypted, this field decrypts the disk - using the customer-supplied encryption key. If - you encrypt a disk using a customer-supplied - key, you must provide the same key again when - you attempt to use this resource at a later - time. For example, you must provide the key when - you create a snapshot or an image from the disk - or when you attach the disk to a virtual machine - instance. If you do not provide an encryption - key, then the disk will be encrypted using an - automatically generated key and you do not need - to provide a key to use the disk later. Note: - Instance templates do not store - customer-supplied encryption keys, so you cannot - use your own keys to encrypt disks in a managed - instance group. You cannot create VMs that have - disks with customer-supplied keys using the bulk - insert method. + This field is a member of `oneof`_ ``_in_use_instance_count``. + in_use_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): + Output only. [Output only] List of resources currently in + use. + reserved_resources (MutableSequence[google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfo]): + List of reserved resources (CPUs, memory, + accelerators). + vm_family (str): + The VM family that all instances scheduled + against this reservation must belong to. + Check the VmFamily enum for the list of possible + values. - This field is a member of `oneof`_ ``_disk_encryption_key``. - disk_size_gb (int): - The size of the disk in GB. + This field is a member of `oneof`_ ``_vm_family``. + workload_type (str): + The workload type of the instances that will + target this reservation. Check the WorkloadType + enum for the list of possible values. - This field is a member of `oneof`_ ``_disk_size_gb``. - force_attach (bool): - [Input Only] Whether to force attach the regional disk even - if it's currently attached to another instance. If you try - to force attach a zonal disk to an instance, you will - receive an error. + This field is a member of `oneof`_ ``_workload_type``. + """ - This field is a member of `oneof`_ ``_force_attach``. - guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): - A list of features to enable on the guest - operating system. Applicable only for bootable - images. Read Enabling guest operating system - features to see a list of available options. - index (int): - [Output Only] A zero-based index to this disk, where 0 is - reserved for the boot disk. If you have many disks attached - to an instance, each disk would have a unique index number. - - This field is a member of `oneof`_ ``_index``. - initialize_params (google.cloud.compute_v1beta.types.AttachedDiskInitializeParams): - [Input Only] Specifies the parameters for a new disk that - will be created alongside the new instance. Use - initialization parameters to create boot disks or local SSDs - attached to the new instance. This property is mutually - exclusive with the source property; you can only define one - or the other, but not both. - - This field is a member of `oneof`_ ``_initialize_params``. - interface (str): - Specifies the disk interface to use for - attaching this disk, which is either SCSI or - NVME. For most machine types, the default is - SCSI. Local SSDs can use either NVME or SCSI. In - certain configurations, persistent disks can use - NVMe. For more information, see About persistent - disks. Check the Interface enum for the list of - possible values. - - This field is a member of `oneof`_ ``_interface``. - kind (str): - [Output Only] Type of the resource. Always - compute#attachedDisk for attached disks. - - This field is a member of `oneof`_ ``_kind``. - licenses (MutableSequence[str]): - [Output Only] Any valid publicly visible licenses. - locked (bool): - [Output Only] Whether to indicate the attached disk is - locked. The locked disk is not allowed to be detached from - the instance, or to be used as the source of the snapshot - creation, and the image creation. The instance with at least - one locked attached disk is not allow to be used as source - of machine image creation, instant snapshot creation, and - not allowed to be deleted with --keep-disk parameter set to - true for locked disks. - - This field is a member of `oneof`_ ``_locked``. - mode (str): - The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the - disk in READ_WRITE mode. Check the Mode enum for the list of - possible values. - - This field is a member of `oneof`_ ``_mode``. - saved_state (str): - For LocalSSD disks on VM Instances in STOPPED or SUSPENDED - state, this field is set to PRESERVED if the LocalSSD data - has been saved to a persistent location by customer request. - (see the discard_local_ssd option on Stop/Suspend). - Read-only in the api. Check the SavedState enum for the list - of possible values. - - This field is a member of `oneof`_ ``_saved_state``. - shielded_instance_initial_state (google.cloud.compute_v1beta.types.InitialStateConfig): - [Output Only] shielded vm initial state stored on disk - - This field is a member of `oneof`_ ``_shielded_instance_initial_state``. - source (str): - Specifies a valid partial or full URL to an - existing Persistent Disk resource. When creating - a new instance boot disk, one of - initializeParams.sourceImage or - initializeParams.sourceSnapshot or disks.source - is required. If desired, you can also attach - existing non-root persistent disks using this - property. This field is only applicable for - persistent disks. Note that for - InstanceTemplate, specify the disk name for - zonal disk, and the URL for regional disk. - - This field is a member of `oneof`_ ``_source``. - type_ (str): - Specifies the type of the disk, either - SCRATCH or PERSISTENT. If not specified, the - default is PERSISTENT. Check the Type enum for - the list of possible values. - - This field is a member of `oneof`_ ``_type``. - user_licenses (MutableSequence[str]): - [Output Only] A list of user provided licenses. It - represents a list of URLs to the license resource. Unlike - regular licenses, user provided licenses can be modified - after the disk is created. - """ - - class Architecture(proto.Enum): - r"""[Output Only] The architecture of the attached disk. Valid values - are ARM64 or X86_64. - - Values: - UNDEFINED_ARCHITECTURE (0): - A value indicating that the enum field is not - set. - ARCHITECTURE_UNSPECIFIED (394750507): - Default value indicating Architecture is not - set. - ARM64 (62547450): - Machines with architecture ARM64 - X86_64 (425300551): - Machines with architecture X86_64 - """ - UNDEFINED_ARCHITECTURE = 0 - ARCHITECTURE_UNSPECIFIED = 394750507 - ARM64 = 62547450 - X86_64 = 425300551 - - class Interface(proto.Enum): - r"""Specifies the disk interface to use for attaching this disk, - which is either SCSI or NVME. For most machine types, the - default is SCSI. Local SSDs can use either NVME or SCSI. In - certain configurations, persistent disks can use NVMe. For more - information, see About persistent disks. + class VmFamily(proto.Enum): + r"""The VM family that all instances scheduled against this + reservation must belong to. Values: - UNDEFINED_INTERFACE (0): + UNDEFINED_VM_FAMILY (0): A value indicating that the enum field is not set. - NVME (2408800): + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): No description available. - SCSI (2539686): + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X (485271888): No description available. """ - UNDEFINED_INTERFACE = 0 - NVME = 2408800 - SCSI = 2539686 - - class Mode(proto.Enum): - r"""The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the disk in - READ_WRITE mode. - - Values: - UNDEFINED_MODE (0): - A value indicating that the enum field is not - set. - READ_ONLY (91950261): - Attaches this disk in read-only mode. - Multiple virtual machines can use a disk in - read-only mode at a time. - READ_WRITE (173607894): - *[Default]* Attaches this disk in read-write mode. Only one - virtual machine at a time can be attached to a disk in - read-write mode. - """ - UNDEFINED_MODE = 0 - READ_ONLY = 91950261 - READ_WRITE = 173607894 - - class SavedState(proto.Enum): - r"""For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, - this field is set to PRESERVED if the LocalSSD data has been saved - to a persistent location by customer request. (see the - discard_local_ssd option on Stop/Suspend). Read-only in the api. - - Values: - UNDEFINED_SAVED_STATE (0): - A value indicating that the enum field is not - set. - DISK_SAVED_STATE_UNSPECIFIED (391290831): - *[Default]* Disk state has not been preserved. - PRESERVED (254159736): - Disk state has been preserved. - """ - UNDEFINED_SAVED_STATE = 0 - DISK_SAVED_STATE_UNSPECIFIED = 391290831 - PRESERVED = 254159736 + UNDEFINED_VM_FAMILY = 0 + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X = 485271888 - class Type(proto.Enum): - r"""Specifies the type of the disk, either SCRATCH or PERSISTENT. - If not specified, the default is PERSISTENT. + class WorkloadType(proto.Enum): + r"""The workload type of the instances that will target this + reservation. Values: - UNDEFINED_TYPE (0): + UNDEFINED_WORKLOAD_TYPE (0): A value indicating that the enum field is not set. - PERSISTENT (460683927): - No description available. - SCRATCH (496778970): + BATCH (62971674): + Reserved resources will be optimized for + BATCH workloads, such as ML training. + SERVING (17781740): + Reserved resources will be optimized for + SERVING workloads, such as ML inference. + UNSPECIFIED (526786327): No description available. """ - UNDEFINED_TYPE = 0 - PERSISTENT = 460683927 - SCRATCH = 496778970 + UNDEFINED_WORKLOAD_TYPE = 0 + BATCH = 62971674 + SERVING = 17781740 + UNSPECIFIED = 526786327 - architecture: str = proto.Field( - proto.STRING, - number=302803283, + host_count: int = proto.Field( + proto.INT32, + number=297782200, optional=True, ) - auto_delete: bool = proto.Field( - proto.BOOL, - number=464761403, + in_use_host_count: int = proto.Field( + proto.INT32, + number=364069834, optional=True, ) - boot: bool = proto.Field( - proto.BOOL, - number=3029746, + in_use_instance_count: int = proto.Field( + proto.INT32, + number=319874039, optional=True, ) - device_name: str = proto.Field( - proto.STRING, - number=67541716, - optional=True, + in_use_resources: MutableSequence[ + "AllocationAggregateReservationReservedResourceInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=409009107, + message="AllocationAggregateReservationReservedResourceInfo", ) - disk_encryption_key: "CustomerEncryptionKey" = proto.Field( + reserved_resources: MutableSequence[ + "AllocationAggregateReservationReservedResourceInfo" + ] = proto.RepeatedField( proto.MESSAGE, - number=271660677, - optional=True, - message="CustomerEncryptionKey", + number=213217742, + message="AllocationAggregateReservationReservedResourceInfo", ) - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, + vm_family: str = proto.Field( + proto.STRING, + number=125017580, optional=True, ) - force_attach: bool = proto.Field( - proto.BOOL, - number=142758425, + workload_type: str = proto.Field( + proto.STRING, + number=273432322, optional=True, ) - guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( - proto.MESSAGE, - number=79294545, - message="GuestOsFeature", + + +class AllocationAggregateReservationReservedResourceInfo(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator (google.cloud.compute_v1beta.types.AllocationAggregateReservationReservedResourceInfoAccelerator): + Properties of accelerator resources in this + reservation. + + This field is a member of `oneof`_ ``_accelerator``. + """ + + accelerator: "AllocationAggregateReservationReservedResourceInfoAccelerator" = ( + proto.Field( + proto.MESSAGE, + number=424338027, + optional=True, + message="AllocationAggregateReservationReservedResourceInfoAccelerator", + ) ) - index: int = proto.Field( + + +class AllocationAggregateReservationReservedResourceInfoAccelerator(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_count (int): + Number of accelerators of specified type. + + This field is a member of `oneof`_ ``_accelerator_count``. + accelerator_type (str): + Full or partial URL to accelerator type. e.g. + "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l". + + This field is a member of `oneof`_ ``_accelerator_type``. + """ + + accelerator_count: int = proto.Field( proto.INT32, - number=100346066, - optional=True, - ) - initialize_params: "AttachedDiskInitializeParams" = proto.Field( - proto.MESSAGE, - number=17697045, - optional=True, - message="AttachedDiskInitializeParams", - ) - interface: str = proto.Field( - proto.STRING, - number=502623545, + number=504879675, optional=True, ) - kind: str = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, - number=3292052, + number=138031246, optional=True, ) - licenses: MutableSequence[str] = proto.RepeatedField( + + +class AllocationReservationSharingPolicy(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + service_share_type (str): + Sharing config for all Google Cloud services. + Check the ServiceShareType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_service_share_type``. + """ + + class ServiceShareType(proto.Enum): + r"""Sharing config for all Google Cloud services. + + Values: + UNDEFINED_SERVICE_SHARE_TYPE (0): + A value indicating that the enum field is not + set. + ALLOW_ALL (475536235): + Allow all Google Cloud managed services to + share reservations. + DISALLOW_ALL (277786301): + [Default] Disallow sharing with all Google Cloud services. + SERVICE_SHARE_TYPE_UNSPECIFIED (279057148): + No description available. + """ + UNDEFINED_SERVICE_SHARE_TYPE = 0 + ALLOW_ALL = 475536235 + DISALLOW_ALL = 277786301 + SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148 + + service_share_type: str = proto.Field( proto.STRING, - number=337642578, - ) - locked: bool = proto.Field( - proto.BOOL, - number=513159946, + number=514508644, optional=True, ) - mode: str = proto.Field( - proto.STRING, - number=3357091, + + +class AllocationResourceStatus(proto.Message): + r"""[Output Only] Contains output only fields. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_info (google.cloud.compute_v1beta.types.AllocationResourceStatusHealthInfo): + [Output only] Health information for the reservation. + + This field is a member of `oneof`_ ``_health_info``. + reservation_block_count (int): + The number of reservation blocks associated + with this reservation. + + This field is a member of `oneof`_ ``_reservation_block_count``. + reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): + Maintenance information for this reservation + + This field is a member of `oneof`_ ``_reservation_maintenance``. + specific_sku_allocation (google.cloud.compute_v1beta.types.AllocationResourceStatusSpecificSKUAllocation): + Allocation Properties of this reservation. + + This field is a member of `oneof`_ ``_specific_sku_allocation``. + """ + + health_info: "AllocationResourceStatusHealthInfo" = proto.Field( + proto.MESSAGE, + number=235287729, optional=True, + message="AllocationResourceStatusHealthInfo", ) - saved_state: str = proto.Field( - proto.STRING, - number=411587801, + reservation_block_count: int = proto.Field( + proto.INT32, + number=161835754, optional=True, ) - shielded_instance_initial_state: "InitialStateConfig" = proto.Field( + reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( proto.MESSAGE, - number=192356867, + number=340607776, optional=True, - message="InitialStateConfig", + message="GroupMaintenanceInfo", ) - source: str = proto.Field( - proto.STRING, - number=177235995, + specific_sku_allocation: "AllocationResourceStatusSpecificSKUAllocation" = ( + proto.Field( + proto.MESSAGE, + number=196231151, + optional=True, + message="AllocationResourceStatusSpecificSKUAllocation", + ) + ) + + +class AllocationResourceStatusHealthInfo(proto.Message): + r"""Health information for the reservation. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + degraded_block_count (int): + The number of reservation blocks that are + degraded. + + This field is a member of `oneof`_ ``_degraded_block_count``. + health_status (str): + The health status of the reservation. + Check the HealthStatus enum for the list of + possible values. + + This field is a member of `oneof`_ ``_health_status``. + healthy_block_count (int): + The number of reservation blocks that are + healthy. + + This field is a member of `oneof`_ ``_healthy_block_count``. + """ + + class HealthStatus(proto.Enum): + r"""The health status of the reservation. + + Values: + UNDEFINED_HEALTH_STATUS (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + The reservation is degraded. + HEALTHY (439801213): + The reservation is healthy. + HEALTH_STATUS_UNSPECIFIED (482246925): + The health status of the reservation is + unspecified. + """ + UNDEFINED_HEALTH_STATUS = 0 + DEGRADED = 396890926 + HEALTHY = 439801213 + HEALTH_STATUS_UNSPECIFIED = 482246925 + + degraded_block_count: int = proto.Field( + proto.INT32, + number=514082636, optional=True, ) - type_: str = proto.Field( + health_status: str = proto.Field( proto.STRING, - number=3575610, + number=380545845, optional=True, ) - user_licenses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=388193862, + healthy_block_count: int = proto.Field( + proto.INT32, + number=223625019, + optional=True, ) -class AttachedDiskInitializeParams(proto.Message): - r"""[Input Only] Specifies the parameters for a new disk that will be - created alongside the new instance. Use initialization parameters to - create boot disks or local SSDs attached to the new instance. This - field is persisted and returned for instanceTemplate and not - returned in the context of instance. This property is mutually - exclusive with the source property; you can only define one or the - other, but not both. - +class AllocationResourceStatusSpecificSKUAllocation(proto.Message): + r"""Contains Properties set for the reservation. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - architecture (str): - The architecture of the attached disk. Valid values are - arm64 or x86_64. Check the Architecture enum for the list of - possible values. + source_instance_template_id (str): + ID of the instance template used to populate + reservation properties. - This field is a member of `oneof`_ ``_architecture``. - description (str): - An optional description. Provide this - property when creating the disk. + This field is a member of `oneof`_ ``_source_instance_template_id``. + utilizations (MutableMapping[str, int]): + Per service utilization breakdown. The Key is + the Google Cloud managed service name. + """ - This field is a member of `oneof`_ ``_description``. - disk_name (str): - Specifies the disk name. If not specified, - the default is to use the name of the instance. - If a disk with the same name already exists in - the given region, the existing disk is attached - to the new instance and the new disk is not - created. + source_instance_template_id: str = proto.Field( + proto.STRING, + number=111196154, + optional=True, + ) + utilizations: MutableMapping[str, int] = proto.MapField( + proto.STRING, + proto.INT64, + number=402495121, + ) - This field is a member of `oneof`_ ``_disk_name``. + +class AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( + proto.Message +): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: disk_size_gb (int): Specifies the size of the disk in base-2 GB. - The size must be at least 10 GB. If you specify - a sourceImage, which is required for boot disks, - the default size is the size of the sourceImage. - If you do not specify a sourceImage, the default - disk size is 500 GB. This field is a member of `oneof`_ ``_disk_size_gb``. - disk_type (str): - Specifies the disk type to use to create the - instance. If not specified, the default is - pd-standard, specified using the full URL. For - example: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /diskTypes/pd-standard For a full list of - acceptable values, see Persistent disk types. If - you specify this field when creating a VM, you - can provide either the full or partial URL. For - example, the following values are valid: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /diskTypes/diskType - - projects/project/zones/zone/diskTypes/diskType - - zones/zone/diskTypes/diskType If you specify - this field when creating or updating an instance - template or all-instances configuration, specify - the type of the disk, not the URL. For example: - pd-standard. + interface (str): + Specifies the disk interface to use for + attaching this disk, which is either SCSI or + NVME. The default isSCSI. For performance + characteristics of SCSI over NVMe, seeLocal SSD + performance. Check the Interface enum for the + list of possible values. - This field is a member of `oneof`_ ``_disk_type``. - enable_confidential_compute (bool): - Whether this disk is using confidential - compute mode. + This field is a member of `oneof`_ ``_interface``. + """ - This field is a member of `oneof`_ ``_enable_confidential_compute``. - guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): - A list of features to enable on the guest - operating system. Applicable only for bootable - images. Read Enabling guest operating system - features to see a list of available options. - Guest OS features are applied by merging - initializeParams.guestOsFeatures and - disks.guestOsFeatures - labels (MutableMapping[str, str]): - Labels to apply to this disk. These can be - later modified by the disks.setLabels method. - This field is only applicable for persistent - disks. - licenses (MutableSequence[str]): - A list of publicly visible licenses. Reserved - for Google's use. - multi_writer (bool): - Indicates whether or not the disk can be - read/write attached to more than one instance. + class Interface(proto.Enum): + r"""Specifies the disk interface to use for attaching this disk, + which is either SCSI or NVME. The default isSCSI. + For performance characteristics of SCSI over NVMe, seeLocal SSD + performance. - This field is a member of `oneof`_ ``_multi_writer``. - on_update_action (str): - Specifies which action to take on instance - update with this disk. Default is to use the - existing disk. Check the OnUpdateAction enum for - the list of possible values. + Values: + UNDEFINED_INTERFACE (0): + A value indicating that the enum field is not + set. + NVME (2408800): + No description available. + SCSI (2539686): + No description available. + """ + UNDEFINED_INTERFACE = 0 + NVME = 2408800 + SCSI = 2539686 - This field is a member of `oneof`_ ``_on_update_action``. - provisioned_iops (int): - Indicates how many IOPS to provision for the - disk. This sets the number of I/O operations per - second that the disk can handle. Values must be - between 10,000 and 120,000. For more details, - see the Extreme persistent disk documentation. + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, + optional=True, + ) + interface: str = proto.Field( + proto.STRING, + number=502623545, + optional=True, + ) - This field is a member of `oneof`_ ``_provisioned_iops``. - provisioned_throughput (int): - Indicates how much throughput to provision - for the disk. This sets the number of throughput - mb per second that the disk can handle. Values - must greater than or equal to 1. - This field is a member of `oneof`_ ``_provisioned_throughput``. - replica_zones (MutableSequence[str]): - Required for each regional disk associated - with the instance. Specify the URLs of the zones - where the disk should be replicated to. You must - provide exactly two replica zones, and one zone - must be the same as the instance zone. - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to be bound to the disk. Tag keys and - values have the same definition as resource manager tags. - Keys must be in the format ``tagKeys/{tag_key_id}``, and - values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. - resource_policies (MutableSequence[str]): - Resource policies applied to this disk for - automatic snapshot creations. Specified using - the full or partial URL. For instance template, - specify only the resource policy name. - source_image (str): - The source image to create this disk. When - creating a new instance boot disk, one of - initializeParams.sourceImage or - initializeParams.sourceSnapshot or disks.source - is required. To create a disk with one of the - public operating system images, specify the - image by its family name. For example, specify - family/debian-9 to use the latest Debian 9 - image: - projects/debian-cloud/global/images/family/debian-9 - Alternatively, use a specific version of a - public operating system image: - projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - To create a disk with a custom image that you - created, specify the image name in the following - format: global/images/my-custom-image You can - also specify a custom image by its image family, - which returns the latest version of the image in - that family. Replace the image name with - family/family-name: - global/images/family/my-image-family If the - source image is deleted later, this field will - not be set. +class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): + r"""Properties of the SKU instances being reserved. + Next ID: 9 - This field is a member of `oneof`_ ``_source_image``. - source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source image. Required if the source image is - protected by a customer-supplied encryption key. - InstanceTemplate and InstancePropertiesPatch do - not store customer-supplied encryption keys, so - you cannot create disks for instances in a - managed instance group if the source images are - encrypted with your own keys. - This field is a member of `oneof`_ ``_source_image_encryption_key``. - source_instant_snapshot (str): - The source instant-snapshot to create this - disk. When creating a new instance boot disk, - one of initializeParams.sourceSnapshot or - initializeParams.sourceInstantSnapshot - initializeParams.sourceImage or disks.source is - required. To create a disk with a snapshot that - you created, specify the snapshot name in the - following format: - us-central1-a/instantSnapshots/my-backup If the - source instant-snapshot is deleted later, this - field will not be set. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_source_instant_snapshot``. - source_snapshot (str): - The source snapshot to create this disk. When - creating a new instance boot disk, one of - initializeParams.sourceSnapshot or - initializeParams.sourceImage or disks.source is - required. To create a disk with a snapshot that - you created, specify the snapshot name in the - following format: global/snapshots/my-backup If - the source snapshot is deleted later, this field - will not be set. Note: You cannot create VMs in - bulk using a snapshot as the source. Use an - image instead when you create VMs using the bulk - insert method. + Attributes: + guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): + Specifies accelerator type and count. + local_ssds (MutableSequence[google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk]): + Specifies amount of local ssd to reserve with + each instance. The type of disk is local-ssd. + location_hint (str): + An opaque location hint used to place the + allocation close to other resources. + This field is for use by internal tools that use + the public API. - This field is a member of `oneof`_ ``_source_snapshot``. - source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source snapshot. + This field is a member of `oneof`_ ``_location_hint``. + machine_type (str): + Specifies type of machine (name only) which has fixed number + of vCPUs and fixed amount of memory. This also includes + specifying custom machine type following + custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. - This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. - storage_pool (str): - The storage pool in which the new disk is - created. You can provide this as a partial or - full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /storagePools/storagePool - - projects/project/zones/zone/storagePools/storagePool - - zones/zone/storagePools/storagePool + This field is a member of `oneof`_ ``_machine_type``. + maintenance_freeze_duration_hours (int): + Specifies the number of hours after + reservation creation where instances using the + reservation won't be scheduled for maintenance. - This field is a member of `oneof`_ ``_storage_pool``. - """ + This field is a member of `oneof`_ ``_maintenance_freeze_duration_hours``. + maintenance_interval (str): + Specifies the frequency of planned maintenance events. The + accepted values are: ``PERIODIC``. Check the + MaintenanceInterval enum for the list of possible values. - class Architecture(proto.Enum): - r"""The architecture of the attached disk. Valid values are arm64 or - x86_64. + This field is a member of `oneof`_ ``_maintenance_interval``. + min_cpu_platform (str): + Minimum cpu platform the reservation. - Values: - UNDEFINED_ARCHITECTURE (0): - A value indicating that the enum field is not - set. - ARCHITECTURE_UNSPECIFIED (394750507): - Default value indicating Architecture is not - set. - ARM64 (62547450): - Machines with architecture ARM64 - X86_64 (425300551): - Machines with architecture X86_64 - """ - UNDEFINED_ARCHITECTURE = 0 - ARCHITECTURE_UNSPECIFIED = 394750507 - ARM64 = 62547450 - X86_64 = 425300551 + This field is a member of `oneof`_ ``_min_cpu_platform``. + """ - class OnUpdateAction(proto.Enum): - r"""Specifies which action to take on instance update with this - disk. Default is to use the existing disk. + class MaintenanceInterval(proto.Enum): + r"""Specifies the frequency of planned maintenance events. The accepted + values are: ``PERIODIC``. Values: - UNDEFINED_ON_UPDATE_ACTION (0): + UNDEFINED_MAINTENANCE_INTERVAL (0): A value indicating that the enum field is not set. - RECREATE_DISK (494767853): - Always recreate the disk. - RECREATE_DISK_IF_SOURCE_CHANGED (398099712): - Recreate the disk if source (image, snapshot) - of this disk is different from source of - existing disk. - USE_EXISTING_DISK (232682233): - Use the existing disk, this is the default - behaviour. + AS_NEEDED (500724834): + VMs are eligible to receive infrastructure + and hypervisor updates as they become available. + This may result in more maintenance operations + (live migrations or terminations) for the VM + than the PERIODIC andRECURRENT options. + PERIODIC (142804635): + VMs receive infrastructure and hypervisor updates on a + periodic basis, minimizing the number of maintenance + operations (live migrations or terminations) on an + individual VM. This may mean a VM will take longer to + receive an update than if it was configured forAS_NEEDED. + Security updates will still be applied as soon as they are + available. + RECURRENT (194244550): + VMs receive infrastructure and hypervisor updates on a + periodic basis, minimizing the number of maintenance + operations (live migrations or terminations) on an + individual VM. This may mean a VM will take longer to + receive an update than if it was configured forAS_NEEDED. + Security updates will still be applied as soon as they are + available. RECURRENT is used for GEN3 and Slice of Hardware + VMs. """ - UNDEFINED_ON_UPDATE_ACTION = 0 - RECREATE_DISK = 494767853 - RECREATE_DISK_IF_SOURCE_CHANGED = 398099712 - USE_EXISTING_DISK = 232682233 + UNDEFINED_MAINTENANCE_INTERVAL = 0 + AS_NEEDED = 500724834 + PERIODIC = 142804635 + RECURRENT = 194244550 - architecture: str = proto.Field( - proto.STRING, - number=302803283, - optional=True, + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=463595119, + message="AcceleratorConfig", ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, + local_ssds: MutableSequence[ + "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" + ] = proto.RepeatedField( + proto.MESSAGE, + number=229951299, + message="AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", ) - disk_name: str = proto.Field( + location_hint: str = proto.Field( proto.STRING, - number=92807149, - optional=True, - ) - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, + number=350519505, optional=True, ) - disk_type: str = proto.Field( + machine_type: str = proto.Field( proto.STRING, - number=93009052, + number=227711026, optional=True, ) - enable_confidential_compute: bool = proto.Field( - proto.BOOL, - number=102135228, + maintenance_freeze_duration_hours: int = proto.Field( + proto.INT32, + number=371662624, optional=True, ) - guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( - proto.MESSAGE, - number=79294545, - message="GuestOsFeature", - ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, - ) - licenses: MutableSequence[str] = proto.RepeatedField( + maintenance_interval: str = proto.Field( proto.STRING, - number=337642578, - ) - multi_writer: bool = proto.Field( - proto.BOOL, - number=528165433, + number=403368049, optional=True, ) - on_update_action: str = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, - number=202451980, + number=242912759, optional=True, ) - provisioned_iops: int = proto.Field( + + +class AllocationSpecificSKUReservation(proto.Message): + r"""This reservation type allows to pre allocate specific + instance configuration. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + assured_count (int): + Output only. [Output Only] Indicates how many instances are + actually usable currently. + + This field is a member of `oneof`_ ``_assured_count``. + count (int): + Specifies the number of resources that are + allocated. + + This field is a member of `oneof`_ ``_count``. + in_use_count (int): + Output only. [Output Only] Indicates how many instances are + in use. + + This field is a member of `oneof`_ ``_in_use_count``. + instance_properties (google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationReservedInstanceProperties): + The instance properties for the reservation. + + This field is a member of `oneof`_ ``_instance_properties``. + source_instance_template (str): + Specifies the instance template to create the + reservation. If you use this field, you must + exclude the instanceProperties field. + + This field is optional, and it can be a full or + partial URL. For example, the following are all + valid URLs to an instance template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate + + This field is a member of `oneof`_ ``_source_instance_template``. + """ + + assured_count: int = proto.Field( proto.INT64, - number=186769108, + number=281197645, optional=True, ) - provisioned_throughput: int = proto.Field( + count: int = proto.Field( proto.INT64, - number=526524181, + number=94851343, optional=True, ) - replica_zones: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=48438272, - ) - resource_manager_tags: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=377671164, - ) - resource_policies: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=22220385, - ) - source_image: str = proto.Field( - proto.STRING, - number=50443319, + in_use_count: int = proto.Field( + proto.INT64, + number=493458877, optional=True, ) - source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=381503659, - optional=True, - message="CustomerEncryptionKey", + instance_properties: "AllocationSpecificSKUAllocationReservedInstanceProperties" = ( + proto.Field( + proto.MESSAGE, + number=215355165, + optional=True, + message="AllocationSpecificSKUAllocationReservedInstanceProperties", + ) ) - source_instant_snapshot: str = proto.Field( + source_instance_template: str = proto.Field( proto.STRING, - number=219202054, + number=332423616, optional=True, ) - source_snapshot: str = proto.Field( + + +class Allowed(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + I_p_protocol (str): + The IP protocol to which this rule applies. + The protocol type is required when creating a + firewall rule. This value can either be one of + the following well known protocol strings (tcp, + udp,icmp, esp, ah, ipip,sctp) or the IP protocol + number. + + This field is a member of `oneof`_ ``_I_p_protocol``. + ports (MutableSequence[str]): + An optional list of ports to which this rule applies. This + field is only applicable for the UDP or TCP protocol. Each + entry must be either an integer or a range. If not + specified, this rule applies to connections through any + port. + + Example inputs include: ["22"], ["80","443"], and + ["12345-12349"]. + """ + + I_p_protocol: str = proto.Field( proto.STRING, - number=126061928, - optional=True, - ) - source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=303679322, + number=488094525, optional=True, - message="CustomerEncryptionKey", ) - storage_pool: str = proto.Field( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=360473440, - optional=True, + number=106854418, ) -class AuditConfig(proto.Message): - r"""Specifies the audit configuration for a service. The configuration - determines which permission types are logged, and what identities, - if any, are exempted from logging. An AuditConfig must have one or - more AuditLogConfigs. If there are AuditConfigs for both - ``allServices`` and a specific service, the union of the two - AuditConfigs is used for that service: the log_types specified in - each AuditConfig are enabled, and the exempted_members in each - AuditLogConfig are exempted. Example Policy with multiple - AuditConfigs: { "audit_configs": [ { "service": "allServices", - "audit_log_configs": [ { "log_type": "DATA_READ", - "exempted_members": [ "user:jose@example.com" ] }, { "log_type": - "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": - "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": - "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ - "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy - enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also - exempts ``jose@example.com`` from DATA_READ logging, and - ``aliya@example.com`` from DATA_WRITE logging. +class AnnouncePublicAdvertisedPrefixeRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.Announce. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - audit_log_configs (MutableSequence[google.cloud.compute_v1beta.types.AuditLogConfig]): - The configuration for logging of each type of - permission. - exempted_members (MutableSequence[str]): - - service (str): - Specifies a service that will be enabled for audit logging. - For example, ``storage.googleapis.com``, - ``cloudsql.googleapis.com``. ``allServices`` is a special - value that covers all services. + project (str): + Project ID for this request. + public_advertised_prefix (str): + The name of the public advertised prefix. It + should comply with RFC1035. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_service``. + This field is a member of `oneof`_ ``_request_id``. """ - audit_log_configs: MutableSequence["AuditLogConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=488420626, - message="AuditLogConfig", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - exempted_members: MutableSequence[str] = proto.RepeatedField( + public_advertised_prefix: str = proto.Field( proto.STRING, - number=232615576, + number=101874590, ) - service: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=373540533, + number=37109963, optional=True, ) -class AuditLogConfig(proto.Message): - r"""Provides the configuration for logging a type of permissions. - Example: { "audit_log_configs": [ { "log_type": "DATA_READ", - "exempted_members": [ "user:jose@example.com" ] }, { "log_type": - "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' - logging, while exempting jose@example.com from DATA_READ logging. +class AnnouncePublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.Announce. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - exempted_members (MutableSequence[str]): - Specifies the identities that do not cause - logging for this type of permission. Follows the - same format of Binding.members. - ignore_child_exemptions (bool): - - This field is a member of `oneof`_ ``_ignore_child_exemptions``. - log_type (str): - The log type that this config enables. - Check the LogType enum for the list of possible - values. + project (str): + Project ID for this request. + public_delegated_prefix (str): + The name of the public delegated prefix. It + should comply with RFC1035. + region (str): + The name of theregion where + the public delegated prefix is located. It + should comply with RFC1035. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_log_type``. + This field is a member of `oneof`_ ``_request_id``. """ - class LogType(proto.Enum): - r"""The log type that this config enables. - - Values: - UNDEFINED_LOG_TYPE (0): - A value indicating that the enum field is not - set. - ADMIN_READ (128951462): - Admin reads. Example: CloudIAM getIamPolicy - DATA_READ (305224971): - Data reads. Example: CloudSQL Users list - DATA_WRITE (340181738): - Data writes. Example: CloudSQL Users create - LOG_TYPE_UNSPECIFIED (154527053): - Default case. Should never be this. - """ - UNDEFINED_LOG_TYPE = 0 - ADMIN_READ = 128951462 - DATA_READ = 305224971 - DATA_WRITE = 340181738 - LOG_TYPE_UNSPECIFIED = 154527053 - - exempted_members: MutableSequence[str] = proto.RepeatedField( + project: str = proto.Field( proto.STRING, - number=232615576, + number=227560217, ) - ignore_child_exemptions: bool = proto.Field( - proto.BOOL, - number=70141850, - optional=True, + public_delegated_prefix: str = proto.Field( + proto.STRING, + number=204238440, ) - log_type: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=403115861, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class Autoscaler(proto.Message): - r"""Represents an Autoscaler resource. Google Compute Engine has two - Autoscaler resources: \* - `Zonal `__ \* - `Regional `__ - Use autoscalers to automatically add or delete instances from a - managed instance group according to your defined autoscaling policy. - For more information, read Autoscaling Groups of Instances. For - zonal managed instance groups resource, use the autoscaler resource. - For regional managed instance groups, use the regionAutoscalers - resource. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class ApplyUpdatesToInstancesInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.ApplyUpdatesToInstances. See the method + description for details. Attributes: - autoscaling_policy (google.cloud.compute_v1beta.types.AutoscalingPolicy): - The configuration parameters for the - autoscaling algorithm. You can define one or - more signals for an autoscaler: cpuUtilization, - customMetricUtilizations, and - loadBalancingUtilization. If none of these are - specified, the default will be to autoscale - based on cpuUtilization to 0.6 or 60%. - - This field is a member of `oneof`_ ``_autoscaling_policy``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + instance_group_manager (str): + The name of the managed instance group, + should conform to RFC1035. + instance_group_managers_apply_updates_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersApplyUpdatesRequest): + The body resource for this request + project (str): + Project ID for this request. + zone (str): + The name of thezone + where the managed instance group is located. + Should conform to RFC1035. + """ - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#autoscaler for autoscalers. + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + instance_group_managers_apply_updates_request_resource: "InstanceGroupManagersApplyUpdatesRequest" = proto.Field( + proto.MESSAGE, + number=259242835, + message="InstanceGroupManagersApplyUpdatesRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_name``. - recommended_size (int): - [Output Only] Target recommended MIG size (number of - instances) computed by autoscaler. Autoscaler calculates the - recommended MIG size even when the autoscaling policy mode - is different from ON. This field is empty when autoscaler is - not connected to an existing managed instance group or - autoscaler did not generate its prediction. +class ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ApplyUpdatesToInstances. See the + method description for details. - This field is a member of `oneof`_ ``_recommended_size``. + Attributes: + instance_group_manager (str): + The name of the managed instance group, + should conform to RFC1035. + project (str): + Project ID for this request. region (str): - [Output Only] URL of the region where the instance group - resides (for autoscalers living in regional scope). + Name of the region scoping this request, + should conform to RFC1035. + region_instance_group_managers_apply_updates_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest): + The body resource for this request + """ - This field is a member of `oneof`_ ``_region``. - scaling_schedule_status (MutableMapping[str, google.cloud.compute_v1beta.types.ScalingScheduleStatus]): - [Output Only] Status information of existing scaling - schedules. - self_link (str): - [Output Only] Server-defined URL for the resource. + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_group_managers_apply_updates_request_resource: "RegionInstanceGroupManagersApplyUpdatesRequest" = proto.Field( + proto.MESSAGE, + number=76248318, + message="RegionInstanceGroupManagersApplyUpdatesRequest", + ) - This field is a member of `oneof`_ ``_self_link``. - status (str): - [Output Only] The status of the autoscaler configuration. - Current set of possible values: - PENDING: Autoscaler - backend hasn't read new/updated configuration. - DELETING: - Configuration is being deleted. - ACTIVE: Configuration is - acknowledged to be effective. Some warnings might be present - in the statusDetails field. - ERROR: Configuration has - errors. Actionable for users. Details are present in the - statusDetails field. New values might be added in the - future. Check the Status enum for the list of possible - values. - This field is a member of `oneof`_ ``_status``. - status_details (MutableSequence[google.cloud.compute_v1beta.types.AutoscalerStatusDetails]): - [Output Only] Human-readable details about the current state - of the autoscaler. Read the documentation for Commonly - returned status messages for examples of status messages you - might encounter. - target (str): - URL of the managed instance group that this - autoscaler will scale. This field is required - when creating an autoscaler. +class AttachDiskInstanceRequest(proto.Message): + r"""A request message for Instances.AttachDisk. See the method + description for details. - This field is a member of `oneof`_ ``_target``. - zone (str): - [Output Only] URL of the zone where the instance group - resides (for autoscalers living in zonal scope). - This field is a member of `oneof`_ ``_zone``. - """ + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class Status(proto.Enum): - r"""[Output Only] The status of the autoscaler configuration. Current - set of possible values: - PENDING: Autoscaler backend hasn't read - new/updated configuration. - DELETING: Configuration is being - deleted. - ACTIVE: Configuration is acknowledged to be effective. - Some warnings might be present in the statusDetails field. - ERROR: - Configuration has errors. Actionable for users. Details are present - in the statusDetails field. New values might be added in the future. + Attributes: + attached_disk_resource (google.cloud.compute_v1beta.types.AttachedDisk): + The body resource for this request + force_attach (bool): + Whether to force attach the regional disk + even if it's currently attached to another + instance. If you try to force attach a zonal + disk to an instance, you will receive an error. - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - Configuration is acknowledged to be effective - DELETING (528602024): - Configuration is being deleted - ERROR (66247144): - Configuration has errors. Actionable for - users. - PENDING (35394935): - Autoscaler backend hasn't read new/updated - configuration - """ - UNDEFINED_STATUS = 0 - ACTIVE = 314733318 - DELETING = 528602024 - ERROR = 66247144 - PENDING = 35394935 + This field is a member of `oneof`_ ``_force_attach``. + instance (str): + The instance name for this request. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - autoscaling_policy: "AutoscalingPolicy" = proto.Field( + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. + """ + + attached_disk_resource: "AttachedDisk" = proto.Field( proto.MESSAGE, - number=221950041, - optional=True, - message="AutoscalingPolicy", + number=90605845, + message="AttachedDisk", ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, + force_attach: bool = proto.Field( + proto.BOOL, + number=142758425, optional=True, ) - description: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=18257045, ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - kind: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3292052, + number=37109963, optional=True, ) - name: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=3744684, ) - recommended_size: int = proto.Field( - proto.INT32, - number=257915749, - optional=True, + + +class AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + GlobalNetworkEndpointGroups.AttachNetworkEndpoints. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + global_network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.GlobalNetworkEndpointGroupsAttachEndpointsRequest): + The body resource for this request + network_endpoint_group (str): + The name of the network endpoint group where + you are attaching network endpoints to. It + should comply with RFC1035. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + global_network_endpoint_groups_attach_endpoints_request_resource: "GlobalNetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=30691563, + message="GlobalNetworkEndpointGroupsAttachEndpointsRequest", ) - region: str = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, - number=138946292, - optional=True, + number=433907078, ) - scaling_schedule_status: MutableMapping[ - str, "ScalingScheduleStatus" - ] = proto.MapField( + project: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=465950178, - message="ScalingScheduleStatus", + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - status: str = proto.Field( + + +class AttachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + NetworkEndpointGroups.AttachNetworkEndpoints. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + network_endpoint_group (str): + The name of the network endpoint group where + you are attaching network endpoints to. It + should comply with RFC1035. + network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsAttachEndpointsRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. + """ + + network_endpoint_group: str = proto.Field( proto.STRING, - number=181260274, - optional=True, + number=433907078, ) - status_details: MutableSequence["AutoscalerStatusDetails"] = proto.RepeatedField( + network_endpoint_groups_attach_endpoints_request_resource: "NetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( proto.MESSAGE, - number=363353845, - message="AutoscalerStatusDetails", + number=531079, + message="NetworkEndpointGroupsAttachEndpointsRequest", ) - target: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=192835985, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) zone: str = proto.Field( proto.STRING, number=3744684, - optional=True, ) -class AutoscalerAggregatedList(proto.Message): - r""" +class AttachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + RegionNetworkEndpointGroups.AttachNetworkEndpoints. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.AutoscalersScopedList]): - A list of AutoscalersScopedList resources. - kind (str): - [Output Only] Type of resource. Always - compute#autoscalerAggregatedList for aggregated lists of - autoscalers. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + network_endpoint_group (str): + The name of the network endpoint group where + you are attaching network endpoints to. It + should comply with RFC1035. + project (str): + Project ID for this request. + region (str): + The name of the region where + you want to create the network endpoint group. + It should comply with RFC1035. + region_network_endpoint_groups_attach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "AutoscalersScopedList"] = proto.MapField( + network_endpoint_group: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=100526016, - message="AutoscalersScopedList", + number=433907078, ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + region_network_endpoint_groups_attach_endpoints_request_resource: "RegionNetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=334986492, + message="RegionNetworkEndpointGroupsAttachEndpointsRequest", ) - unreachables: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class AutoscalerList(proto.Message): - r"""Contains a list of Autoscaler resources. +class AttachedDisk(proto.Message): + r"""An instance-attached disk resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + architecture (str): + Output only. [Output Only] The architecture of the attached + disk. Valid values are ARM64 or X86_64. Check the + Architecture enum for the list of possible values. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): - A list of Autoscaler resources. - kind (str): - [Output Only] Type of resource. Always - compute#autoscalerList for lists of autoscalers. + This field is a member of `oneof`_ ``_architecture``. + auto_delete (bool): + Specifies whether the disk will be + auto-deleted when the instance is deleted (but + not when the disk is detached from the + instance). - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_auto_delete``. + boot (bool): + Indicates that this is a boot disk. The + virtual machine will use the first partition of + the disk for its root filesystem. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_boot``. + device_name (str): + Specifies a unique device name of your choice that is + reflected into the/dev/disk/by-id/google-\* tree of a Linux + operating system running within the instance. This name can + be used to reference the device for mounting, resizing, and + so on, from within the instance. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + If not specified, the server chooses a default device name + to apply to this disk, in the form persistent-disk-x, where + x is a number assigned by Google Compute Engine. This field + is only applicable for persistent disks. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_device_name``. + disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Encrypts or decrypts a disk using + acustomer-supplied encryption key. + + If you are creating a new disk, this field + encrypts the new disk using an encryption key + that you provide. If you are attaching an + existing disk that is already encrypted, this + field decrypts the disk using the + customer-supplied encryption key. - @property - def raw_page(self): - return self + If you encrypt a disk using a customer-supplied + key, you must provide the same key again when + you attempt to use this resource at a later + time. For example, you must provide the key when + you create a snapshot or an image from the disk + or when you attach the disk to a virtual machine + instance. - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Autoscaler"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Autoscaler", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + If you do not provide an encryption key, then + the disk will be encrypted using an + automatically generated key and you do not need + to provide a key to use the disk later. + Note: -class AutoscalerStatusDetails(proto.Message): - r""" + Instance templates do not storecustomer-supplied + encryption keys, so you cannot use your own keys + to encrypt disks in amanaged instance group. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You cannot create VMs that have disks with + customer-supplied keys using the bulk + insert method. - Attributes: - message (str): - The status message. + This field is a member of `oneof`_ ``_disk_encryption_key``. + disk_size_gb (int): + The size of the disk in GB. - This field is a member of `oneof`_ ``_message``. - type_ (str): - The type of error, warning, or notice returned. Current set - of possible values: - ALL_INSTANCES_UNHEALTHY (WARNING): All - instances in the instance group are unhealthy (not in - RUNNING state). - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): - There is no backend service attached to the instance group. - - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler - recommends a size greater than maxNumReplicas. - - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom - metric samples are not exported often enough to be a - credible base for autoscaling. - CUSTOM_METRIC_INVALID - (ERROR): The custom metric that was specified does not exist - or does not have the necessary labels. - MIN_EQUALS_MAX - (WARNING): The minNumReplicas is equal to maxNumReplicas. - This means the autoscaler cannot add or remove instances - from the instance group. - MISSING_CUSTOM_METRIC_DATA_POINTS - (WARNING): The autoscaler did not receive any data from the - custom metric configured for autoscaling. - - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler - is configured to scale based on a load balancing signal but - the instance group has not received any requests from the - load balancer. - MODE_OFF (WARNING): Autoscaling is turned - off. The number of instances in the group won't change - automatically. The autoscaling configuration is preserved. - - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale - only out" mode. The autoscaler can add instances but not - remove any. - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The - instance group cannot be autoscaled because it has more than - one backend service attached to it. - - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient - quota for the necessary resources, such as CPU or number of - instances. - REGION_RESOURCE_STOCKOUT (ERROR): Shown only - for regional autoscalers: there is a resource stockout in - the chosen region. - SCALING_TARGET_DOES_NOT_EXIST (ERROR): - The target to be scaled does not exist. - - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): - Autoscaling does not work with an HTTP/S load balancer that - has been configured for maxRate. - ZONE_RESOURCE_STOCKOUT - (ERROR): For zonal autoscalers: there is a resource stockout - in the chosen zone. For regional autoscalers: in at least - one of the zones you're using there is a resource stockout. - New values might be added in the future. Some of the values - might not be available in all API versions. Check the Type - enum for the list of possible values. + This field is a member of `oneof`_ ``_disk_size_gb``. + force_attach (bool): + [Input Only] Whether to force attach the regional disk even + if it's currently attached to another instance. If you try + to force attach a zonal disk to an instance, you will + receive an error. - This field is a member of `oneof`_ ``_type``. - """ + This field is a member of `oneof`_ ``_force_attach``. + guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): + A list of features to enable on the guest + operating system. Applicable only for bootable + images. Read Enabling guest operating system + features to see a list of available options. + index (int): + Output only. [Output Only] A zero-based index to this disk, + where 0 is reserved for the boot disk. If you have many + disks attached to an instance, each disk would have a unique + index number. - class Type(proto.Enum): - r"""The type of error, warning, or notice returned. Current set of - possible values: - ALL_INSTANCES_UNHEALTHY (WARNING): All instances - in the instance group are unhealthy (not in RUNNING state). - - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service - attached to the instance group. - CAPPED_AT_MAX_NUM_REPLICAS - (WARNING): Autoscaler recommends a size greater than maxNumReplicas. - - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric - samples are not exported often enough to be a credible base for - autoscaling. - CUSTOM_METRIC_INVALID (ERROR): The custom metric that - was specified does not exist or does not have the necessary labels. - - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to - maxNumReplicas. This means the autoscaler cannot add or remove - instances from the instance group. - - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not - receive any data from the custom metric configured for autoscaling. - - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is - configured to scale based on a load balancing signal but the - instance group has not received any requests from the load balancer. - - MODE_OFF (WARNING): Autoscaling is turned off. The number of - instances in the group won't change automatically. The autoscaling - configuration is preserved. - MODE_ONLY_UP (WARNING): Autoscaling is - in the "Autoscale only out" mode. The autoscaler can add instances - but not remove any. - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The - instance group cannot be autoscaled because it has more than one - backend service attached to it. - NOT_ENOUGH_QUOTA_AVAILABLE - (ERROR): There is insufficient quota for the necessary resources, - such as CPU or number of instances. - REGION_RESOURCE_STOCKOUT - (ERROR): Shown only for regional autoscalers: there is a resource - stockout in the chosen region. - SCALING_TARGET_DOES_NOT_EXIST - (ERROR): The target to be scaled does not exist. - - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): - Autoscaling does not work with an HTTP/S load balancer that has been - configured for maxRate. - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal - autoscalers: there is a resource stockout in the chosen zone. For - regional autoscalers: in at least one of the zones you're using - there is a resource stockout. New values might be added in the - future. Some of the values might not be available in all API - versions. + This field is a member of `oneof`_ ``_index``. + initialize_params (google.cloud.compute_v1beta.types.AttachedDiskInitializeParams): + [Input Only] Specifies the parameters for a new disk that + will be created alongside the new instance. Use + initialization parameters to create boot disks or local SSDs + attached to the new instance. - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - ALL_INSTANCES_UNHEALTHY (404965477): - All instances in the instance group are - unhealthy (not in RUNNING state). - BACKEND_SERVICE_DOES_NOT_EXIST (191417626): - There is no backend service attached to the - instance group. - CAPPED_AT_MAX_NUM_REPLICAS (518617): - Autoscaler recommends a size greater than - maxNumReplicas. - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (328964659): - The custom metric samples are not exported - often enough to be a credible base for - autoscaling. - CUSTOM_METRIC_INVALID (204430550): - The custom metric that was specified does not - exist or does not have the necessary labels. - MIN_EQUALS_MAX (2821361): - The minNumReplicas is equal to - maxNumReplicas. This means the autoscaler cannot - add or remove instances from the instance group. - MISSING_CUSTOM_METRIC_DATA_POINTS (94885086): - The autoscaler did not receive any data from - the custom metric configured for autoscaling. - MISSING_LOAD_BALANCING_DATA_POINTS (509858898): - The autoscaler is configured to scale based - on a load balancing signal but the instance - group has not received any requests from the - load balancer. - MODE_OFF (164169907): - Autoscaling is turned off. The number of - instances in the group won't change - automatically. The autoscaling configuration is - preserved. - MODE_ONLY_SCALE_OUT (3840994): - Autoscaling is in the "Autoscale only scale - out" mode. Instances in the group will be only - added. - MODE_ONLY_UP (100969842): - Autoscaling is in the "Autoscale only out" - mode. Instances in the group will be only added. - MORE_THAN_ONE_BACKEND_SERVICE (151922141): - The instance group cannot be autoscaled - because it has more than one backend service - attached to it. - NOT_ENOUGH_QUOTA_AVAILABLE (403101631): - There is insufficient quota for the necessary - resources, such as CPU or number of instances. - REGION_RESOURCE_STOCKOUT (528622846): - Showed only for regional autoscalers: there - is a resource stockout in the chosen region. - SCALING_TARGET_DOES_NOT_EXIST (122636699): - The target to be scaled does not exist. - SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX (29275586): - For some scaling schedules - minRequiredReplicas is greater than - maxNumReplicas. Autoscaler always recommends at - most maxNumReplicas instances. - SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN (398287669): - For some scaling schedules - minRequiredReplicas is less than minNumReplicas. - Autoscaler always recommends at least - minNumReplicas instances. - UNKNOWN (433141802): - No description available. - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (330845009): - Autoscaling does not work with an HTTP/S load - balancer that has been configured for maxRate. - ZONE_RESOURCE_STOCKOUT (210200502): - For zonal autoscalers: there is a resource - stockout in the chosen zone. For regional - autoscalers: in at least one of the zones you're - using there is a resource stockout. - """ - UNDEFINED_TYPE = 0 - ALL_INSTANCES_UNHEALTHY = 404965477 - BACKEND_SERVICE_DOES_NOT_EXIST = 191417626 - CAPPED_AT_MAX_NUM_REPLICAS = 518617 - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE = 328964659 - CUSTOM_METRIC_INVALID = 204430550 - MIN_EQUALS_MAX = 2821361 - MISSING_CUSTOM_METRIC_DATA_POINTS = 94885086 - MISSING_LOAD_BALANCING_DATA_POINTS = 509858898 - MODE_OFF = 164169907 - MODE_ONLY_SCALE_OUT = 3840994 - MODE_ONLY_UP = 100969842 - MORE_THAN_ONE_BACKEND_SERVICE = 151922141 - NOT_ENOUGH_QUOTA_AVAILABLE = 403101631 - REGION_RESOURCE_STOCKOUT = 528622846 - SCALING_TARGET_DOES_NOT_EXIST = 122636699 - SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX = 29275586 - SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN = 398287669 - UNKNOWN = 433141802 - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION = 330845009 - ZONE_RESOURCE_STOCKOUT = 210200502 + This property is mutually exclusive with the source + property; you can only define one or the other, but not + both. - message: str = proto.Field( - proto.STRING, - number=418054151, - optional=True, - ) - type_: str = proto.Field( - proto.STRING, - number=3575610, - optional=True, - ) + This field is a member of `oneof`_ ``_initialize_params``. + interface (str): + Specifies the disk interface to use for + attaching this disk, which is either SCSI or + NVME. For most machine types, the default is + SCSI. Local SSDs can use either NVME or SCSI. In + certain configurations, persistent disks can use + NVMe. For more information, seeAbout + persistent disks. + Check the Interface enum for the list of + possible values. + This field is a member of `oneof`_ ``_interface``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#attachedDisk for attached disks. -class AutoscalersScopedList(proto.Message): - r""" + This field is a member of `oneof`_ ``_kind``. + licenses (MutableSequence[str]): + Output only. [Output Only] Any valid publicly visible + licenses. + locked (bool): + Output only. [Output Only] Whether to indicate the attached + disk is locked. The locked disk is not allowed to be + detached from the instance, or to be used as the source of + the snapshot creation, and the image creation. The instance + with at least one locked attached disk is not allow to be + used as source of machine image creation, instant snapshot + creation, and not allowed to be deleted with --keep-disk + parameter set to true for locked disks. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_locked``. + mode (str): + The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the + disk in READ_WRITE mode. Check the Mode enum for the list of + possible values. - Attributes: - autoscalers (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): - [Output Only] A list of autoscalers contained in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of autoscalers when the list is empty. + This field is a member of `oneof`_ ``_mode``. + saved_state (str): + Output only. For LocalSSD disks on VM Instances in STOPPED + or SUSPENDED state, this field is set to PRESERVED if the + LocalSSD data has been saved to a persistent location by + customer request. (see the discard_local_ssd option on + Stop/Suspend). Read-only in the api. Check the SavedState + enum for the list of possible values. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_saved_state``. + shielded_instance_initial_state (google.cloud.compute_v1beta.types.InitialStateConfig): + Output only. [Output Only] shielded vm initial state stored + on disk - autoscalers: MutableSequence["Autoscaler"] = proto.RepeatedField( - proto.MESSAGE, - number=465771644, - message="Autoscaler", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + This field is a member of `oneof`_ ``_shielded_instance_initial_state``. + source (str): + Specifies a valid partial or full URL to an + existing Persistent Disk resource. When creating + a new instance boot disk, one + ofinitializeParams.sourceImage + orinitializeParams.sourceSnapshot or + disks.source is required. + If desired, you can also attach existing + non-root persistent disks using this property. + This field is only applicable for persistent + disks. -class AutoscalingPolicy(proto.Message): - r"""Cloud Autoscaler policy. + Note that for InstanceTemplate, specify the disk + name for zonal disk, and the URL for regional + disk. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_source``. + type_ (str): + Specifies the type of the disk, either + SCRATCH orPERSISTENT. If not specified, the + default isPERSISTENT. Check the Type enum for + the list of possible values. - Attributes: - cool_down_period_sec (int): - The number of seconds that your application takes to - initialize on a VM instance. This is referred to as the - `initialization - period `__. - Specifying an accurate initialization period improves - autoscaler decisions. For example, when scaling out, the - autoscaler ignores data from VMs that are still initializing - because those VMs might not yet represent normal usage of - your application. The default initialization period is 60 - seconds. Initialization periods might vary because of - numerous factors. We recommend that you test how long your - application takes to initialize. To do this, create a VM and - time your application's startup process. + This field is a member of `oneof`_ ``_type``. + user_licenses (MutableSequence[str]): + Output only. [Output Only] A list of user provided licenses. + It represents a list of URLs to the license resource. Unlike + regular licenses, user provided licenses can be modified + after the disk is created. + """ - This field is a member of `oneof`_ ``_cool_down_period_sec``. - cpu_utilization (google.cloud.compute_v1beta.types.AutoscalingPolicyCpuUtilization): - Defines the CPU utilization policy that - allows the autoscaler to scale based on the - average CPU utilization of a managed instance - group. + class Architecture(proto.Enum): + r"""Output only. [Output Only] The architecture of the attached disk. + Valid values are ARM64 or X86_64. - This field is a member of `oneof`_ ``_cpu_utilization``. - custom_metric_utilizations (MutableSequence[google.cloud.compute_v1beta.types.AutoscalingPolicyCustomMetricUtilization]): - Configuration parameters of autoscaling based - on a custom metric. - load_balancing_utilization (google.cloud.compute_v1beta.types.AutoscalingPolicyLoadBalancingUtilization): - Configuration parameters of autoscaling based - on load balancer. + Values: + UNDEFINED_ARCHITECTURE (0): + A value indicating that the enum field is not + set. + ARCHITECTURE_UNSPECIFIED (394750507): + Default value indicating Architecture is not + set. + ARM64 (62547450): + Machines with architecture ARM64 + X86_64 (425300551): + Machines with architecture X86_64 + """ + UNDEFINED_ARCHITECTURE = 0 + ARCHITECTURE_UNSPECIFIED = 394750507 + ARM64 = 62547450 + X86_64 = 425300551 - This field is a member of `oneof`_ ``_load_balancing_utilization``. - max_num_replicas (int): - The maximum number of instances that the - autoscaler can scale out to. This is required - when creating or updating an autoscaler. The - maximum number of replicas must not be lower - than minimal number of replicas. + class Interface(proto.Enum): + r"""Specifies the disk interface to use for attaching this disk, + which is either SCSI or NVME. For most machine types, the + default is SCSI. Local SSDs can use either NVME or SCSI. In + certain configurations, persistent disks can use NVMe. For more + information, seeAbout + persistent disks. - This field is a member of `oneof`_ ``_max_num_replicas``. - min_num_replicas (int): - The minimum number of replicas that the - autoscaler can scale in to. This cannot be less - than 0. If not provided, autoscaler chooses a - default value depending on maximum number of - instances allowed. + Values: + UNDEFINED_INTERFACE (0): + A value indicating that the enum field is not + set. + NVME (2408800): + No description available. + SCSI (2539686): + No description available. + """ + UNDEFINED_INTERFACE = 0 + NVME = 2408800 + SCSI = 2539686 - This field is a member of `oneof`_ ``_min_num_replicas``. - mode (str): - Defines the operating mode for this policy. The following - modes are available: - OFF: Disables the autoscaler but - maintains its configuration. - ONLY_SCALE_OUT: Restricts the - autoscaler to add VM instances only. - ON: Enables all - autoscaler activities according to its policy. For more - information, see "Turning off or restricting an autoscaler" - Check the Mode enum for the list of possible values. + class Mode(proto.Enum): + r"""The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in + READ_WRITE mode. - This field is a member of `oneof`_ ``_mode``. - scale_down_control (google.cloud.compute_v1beta.types.AutoscalingPolicyScaleDownControl): + Values: + UNDEFINED_MODE (0): + A value indicating that the enum field is not + set. + READ_ONLY (91950261): + Attaches this disk in read-only mode. + Multiple virtual machines can use a disk in + read-only mode at a time. + READ_WRITE (173607894): + *[Default]* Attaches this disk in read-write mode. Only one + virtual machine at a time can be attached to a disk in + read-write mode. + """ + UNDEFINED_MODE = 0 + READ_ONLY = 91950261 + READ_WRITE = 173607894 - This field is a member of `oneof`_ ``_scale_down_control``. - scale_in_control (google.cloud.compute_v1beta.types.AutoscalingPolicyScaleInControl): + class SavedState(proto.Enum): + r"""Output only. For LocalSSD disks on VM Instances in STOPPED or + SUSPENDED state, this field is set to PRESERVED if the LocalSSD data + has been saved to a persistent location by customer request. (see + the discard_local_ssd option on Stop/Suspend). Read-only in the api. - This field is a member of `oneof`_ ``_scale_in_control``. - scaling_schedules (MutableMapping[str, google.cloud.compute_v1beta.types.AutoscalingPolicyScalingSchedule]): - Scaling schedules defined for an autoscaler. Multiple - schedules can be set on an autoscaler, and they can overlap. - During overlapping periods the greatest - min_required_replicas of all scaling schedules is applied. - Up to 128 scaling schedules are allowed. - """ + Values: + UNDEFINED_SAVED_STATE (0): + A value indicating that the enum field is not + set. + DISK_SAVED_STATE_UNSPECIFIED (391290831): + *[Default]* Disk state has not been preserved. + PRESERVED (254159736): + Disk state has been preserved. + """ + UNDEFINED_SAVED_STATE = 0 + DISK_SAVED_STATE_UNSPECIFIED = 391290831 + PRESERVED = 254159736 - class Mode(proto.Enum): - r"""Defines the operating mode for this policy. The following modes are - available: - OFF: Disables the autoscaler but maintains its - configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM - instances only. - ON: Enables all autoscaler activities according to - its policy. For more information, see "Turning off or restricting an - autoscaler" + class Type(proto.Enum): + r"""Specifies the type of the disk, either SCRATCH orPERSISTENT. + If not specified, the default isPERSISTENT. Values: - UNDEFINED_MODE (0): + UNDEFINED_TYPE (0): A value indicating that the enum field is not set. - OFF (78159): - Do not automatically scale the MIG in or out. The - recommended_size field contains the size of MIG that would - be set if the actuation mode was enabled. - ON (2527): - Automatically scale the MIG in and out - according to the policy. - ONLY_SCALE_OUT (152713670): - Automatically create VMs according to the - policy, but do not scale the MIG in. - ONLY_UP (478095374): - Automatically create VMs according to the - policy, but do not scale the MIG in. + PERSISTENT (460683927): + No description available. + SCRATCH (496778970): + No description available. """ - UNDEFINED_MODE = 0 - OFF = 78159 - ON = 2527 - ONLY_SCALE_OUT = 152713670 - ONLY_UP = 478095374 + UNDEFINED_TYPE = 0 + PERSISTENT = 460683927 + SCRATCH = 496778970 - cool_down_period_sec: int = proto.Field( - proto.INT32, - number=107692954, + architecture: str = proto.Field( + proto.STRING, + number=302803283, optional=True, ) - cpu_utilization: "AutoscalingPolicyCpuUtilization" = proto.Field( - proto.MESSAGE, - number=381211147, + auto_delete: bool = proto.Field( + proto.BOOL, + number=464761403, optional=True, - message="AutoscalingPolicyCpuUtilization", ) - custom_metric_utilizations: MutableSequence[ - "AutoscalingPolicyCustomMetricUtilization" - ] = proto.RepeatedField( + boot: bool = proto.Field( + proto.BOOL, + number=3029746, + optional=True, + ) + device_name: str = proto.Field( + proto.STRING, + number=67541716, + optional=True, + ) + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, - number=131972850, - message="AutoscalingPolicyCustomMetricUtilization", + number=271660677, + optional=True, + message="CustomerEncryptionKey", ) - load_balancing_utilization: "AutoscalingPolicyLoadBalancingUtilization" = ( - proto.Field( - proto.MESSAGE, - number=429746403, - optional=True, - message="AutoscalingPolicyLoadBalancingUtilization", - ) + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, + optional=True, ) - max_num_replicas: int = proto.Field( - proto.INT32, - number=62327375, + force_attach: bool = proto.Field( + proto.BOOL, + number=142758425, optional=True, ) - min_num_replicas: int = proto.Field( + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( + proto.MESSAGE, + number=79294545, + message="GuestOsFeature", + ) + index: int = proto.Field( proto.INT32, - number=535329825, + number=100346066, + optional=True, + ) + initialize_params: "AttachedDiskInitializeParams" = proto.Field( + proto.MESSAGE, + number=17697045, + optional=True, + message="AttachedDiskInitializeParams", + ) + interface: str = proto.Field( + proto.STRING, + number=502623545, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=337642578, + ) + locked: bool = proto.Field( + proto.BOOL, + number=513159946, optional=True, ) mode: str = proto.Field( @@ -15360,1331 +16945,939 @@ class Mode(proto.Enum): number=3357091, optional=True, ) - scale_down_control: "AutoscalingPolicyScaleDownControl" = proto.Field( - proto.MESSAGE, - number=412071829, + saved_state: str = proto.Field( + proto.STRING, + number=411587801, optional=True, - message="AutoscalingPolicyScaleDownControl", ) - scale_in_control: "AutoscalingPolicyScaleInControl" = proto.Field( + shielded_instance_initial_state: "InitialStateConfig" = proto.Field( proto.MESSAGE, - number=527670872, + number=192356867, optional=True, - message="AutoscalingPolicyScaleInControl", + message="InitialStateConfig", ) - scaling_schedules: MutableMapping[ - str, "AutoscalingPolicyScalingSchedule" - ] = proto.MapField( + source: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=355416580, - message="AutoscalingPolicyScalingSchedule", + number=177235995, + optional=True, + ) + type_: str = proto.Field( + proto.STRING, + number=3575610, + optional=True, + ) + user_licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=388193862, ) -class AutoscalingPolicyCpuUtilization(proto.Message): - r"""CPU utilization policy. +class AttachedDiskInitializeParams(proto.Message): + r"""[Input Only] Specifies the parameters for a new disk that will be + created alongside the new instance. Use initialization parameters to + create boot disks or local SSDs attached to the new instance. + + This field is persisted and returned for instanceTemplate and not + returned in the context of instance. + + This property is mutually exclusive with the source property; you + can only define one or the other, but not both. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - predictive_method (str): - Indicates whether predictive autoscaling based on CPU metric - is enabled. Valid values are: \* NONE (default). No - predictive method is used. The autoscaler scales the group - to meet current demand based on real-time metrics. \* - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves - availability by monitoring daily and weekly load patterns - and scaling out ahead of anticipated demand. Check the - PredictiveMethod enum for the list of possible values. + architecture (str): + The architecture of the attached disk. Valid values are + arm64 or x86_64. Check the Architecture enum for the list of + possible values. - This field is a member of `oneof`_ ``_predictive_method``. - utilization_target (float): - The target CPU utilization that the autoscaler maintains. - Must be a float value in the range (0, 1]. If not specified, - the default is 0.6. If the CPU level is below the target - utilization, the autoscaler scales in the number of - instances until it reaches the minimum number of instances - you specified or until the average CPU of your instances - reaches the target utilization. If the average CPU is above - the target utilization, the autoscaler scales out until it - reaches the maximum number of instances you specified or - until the average utilization reaches the target - utilization. + This field is a member of `oneof`_ ``_architecture``. + description (str): + An optional description. Provide this + property when creating the disk. - This field is a member of `oneof`_ ``_utilization_target``. - """ + This field is a member of `oneof`_ ``_description``. + disk_name (str): + Specifies the disk name. If not specified, + the default is to use the name of the instance. + If a disk with the same name already exists in + the given region, the existing disk is attached + to the new instance and the new disk is not + created. - class PredictiveMethod(proto.Enum): - r"""Indicates whether predictive autoscaling based on CPU metric is - enabled. Valid values are: \* NONE (default). No predictive method - is used. The autoscaler scales the group to meet current demand - based on real-time metrics. \* OPTIMIZE_AVAILABILITY. Predictive - autoscaling improves availability by monitoring daily and weekly - load patterns and scaling out ahead of anticipated demand. + This field is a member of `oneof`_ ``_disk_name``. + disk_size_gb (int): + Specifies the size of the disk in base-2 GB. + The size must be at least 10 GB. If you specify + a sourceImage, which is required for boot disks, + the default size is the size of the sourceImage. + If you do not specify a sourceImage, the default + disk size is 500 GB. - Values: - UNDEFINED_PREDICTIVE_METHOD (0): - A value indicating that the enum field is not - set. - NONE (2402104): - No predictive method is used. The autoscaler - scales the group to meet current demand based on - real-time metrics - OPTIMIZE_AVAILABILITY (11629437): - Predictive autoscaling improves availability - by monitoring daily and weekly load patterns and - scaling out ahead of anticipated demand. - PREDICTIVE_METHOD_UNSPECIFIED (52410265): - No description available. - """ - UNDEFINED_PREDICTIVE_METHOD = 0 - NONE = 2402104 - OPTIMIZE_AVAILABILITY = 11629437 - PREDICTIVE_METHOD_UNSPECIFIED = 52410265 + This field is a member of `oneof`_ ``_disk_size_gb``. + disk_type (str): + Specifies the disk type to use to create the + instance. If not specified, the default is + pd-standard, specified using the full URL. For + example: - predictive_method: str = proto.Field( - proto.STRING, - number=390220737, - optional=True, - ) - utilization_target: float = proto.Field( - proto.DOUBLE, - number=215905870, - optional=True, - ) + https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard + For a full list of acceptable values, + seePersistent disk types. If you specify this + field when creating a VM, you can provide either + the full or partial URL. For example, the + following values are valid: -class AutoscalingPolicyCustomMetricUtilization(proto.Message): - r"""Custom utilization metric policy. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType + - + projects/project/zones/zone/diskTypes/diskType + - zones/zone/diskTypes/diskType - Attributes: - filter (str): - A filter string, compatible with a Stackdriver Monitoring - filter string for TimeSeries.list API call. This filter is - used to select a specific TimeSeries for the purpose of - autoscaling and to determine whether the metric is exporting - per-instance or per-group data. For the filter to be valid - for autoscaling purposes, the following rules apply: - You - can only use the AND operator for joining selectors. - You - can only use direct equality comparison operator (=) without - any functions for each selector. - You can specify the - metric in both the filter string and in the metric field. - However, if specified in both places, the metric must be - identical. - The monitored resource type determines what - kind of values are expected for the metric. If it is a - gce_instance, the autoscaler expects the metric to include a - separate TimeSeries for each instance in a group. In such a - case, you cannot filter on resource labels. If the resource - type is any other value, the autoscaler expects this metric - to contain values that apply to the entire autoscaled - instance group and resource label filtering can be performed - to point autoscaler at the correct TimeSeries to scale upon. - This is called a *per-group metric* for the purpose of - autoscaling. If not specified, the type defaults to - gce_instance. Try to provide a filter that is selective - enough to pick just one TimeSeries for the autoscaled group - or for each of the instances (if you are using gce_instance - resource type). If multiple TimeSeries are returned upon the - query execution, the autoscaler will sum their respective - values to obtain its scaling value. + If you specify this field when creating or + updating an instance template or all-instances + configuration, specify the type of the disk, not + the URL. For example: pd-standard. - This field is a member of `oneof`_ ``_filter``. - metric (str): - The identifier (type) of the Stackdriver - Monitoring metric. The metric cannot have - negative values. The metric must have a value - type of INT64 or DOUBLE. + This field is a member of `oneof`_ ``_disk_type``. + enable_confidential_compute (bool): + Whether this disk is using confidential + compute mode. - This field is a member of `oneof`_ ``_metric``. - single_instance_assignment (float): - If scaling is based on a per-group metric value that - represents the total amount of work to be done or resource - usage, set this value to an amount assigned for a single - instance of the scaled group. Autoscaler keeps the number of - instances proportional to the value of this metric. The - metric itself does not change value due to group resizing. A - good metric to use with the target is for example - pubsub.googleapis.com/subscription/num_undelivered_messages - or a custom metric exporting the total number of requests - coming to your instances. A bad example would be a metric - exporting an average or median latency, since this value - can't include a chunk assignable to a single instance, it - could be better used with utilization_target instead. + This field is a member of `oneof`_ ``_enable_confidential_compute``. + guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): + A list of features to enable on the guest + operating system. Applicable only for bootable + images. Read Enabling guest operating system + features to see a list of available options. - This field is a member of `oneof`_ ``_single_instance_assignment``. - utilization_target (float): - The target value of the metric that autoscaler maintains. - This must be a positive value. A utilization metric scales - number of virtual machines handling requests to increase or - decrease proportionally to the metric. For example, a good - metric to use as a utilization_target is - https://www.googleapis.com/compute/v1/instance/network/received_bytes_count. - The autoscaler works to keep this value constant for each of - the instances. + Guest OS features are applied by + merginginitializeParams.guestOsFeatures + anddisks.guestOsFeatures + labels (MutableMapping[str, str]): + Labels to apply to this disk. These can be + later modified by thedisks.setLabels method. + This field is only applicable for persistent + disks. + licenses (MutableSequence[str]): + A list of publicly visible licenses. Reserved + for Google's use. + multi_writer (bool): + Indicates whether or not the disk can be + read/write attached to more than one instance. - This field is a member of `oneof`_ ``_utilization_target``. - utilization_target_type (str): - Defines how target utilization value is expressed for a - Stackdriver Monitoring metric. Either GAUGE, - DELTA_PER_SECOND, or DELTA_PER_MINUTE. Check the - UtilizationTargetType enum for the list of possible values. + This field is a member of `oneof`_ ``_multi_writer``. + on_update_action (str): + Specifies which action to take on instance + update with this disk. Default is to use the + existing disk. Check the OnUpdateAction enum for + the list of possible values. - This field is a member of `oneof`_ ``_utilization_target_type``. + This field is a member of `oneof`_ ``_on_update_action``. + provisioned_iops (int): + Indicates how many IOPS to provision for the + disk. This sets the number of I/O operations per + second that the disk can handle. Values must be + between 10,000 and 120,000. For more details, + see theExtreme persistent disk documentation. + + This field is a member of `oneof`_ ``_provisioned_iops``. + provisioned_throughput (int): + Indicates how much throughput to provision + for the disk. This sets the number of throughput + mb per second that the disk can handle. Values + must greater than or equal to 1. + + This field is a member of `oneof`_ ``_provisioned_throughput``. + replica_zones (MutableSequence[str]): + Required for each regional disk associated + with the instance. Specify the URLs of the zones + where the disk should be replicated to. You must + provide exactly two replica zones, and one zone + must be the same as the instance zone. + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to be bound to the disk. Tag keys and + values have the same definition as resource manager tags. + Keys and values can be either in numeric format, such as + ``tagKeys/{tag_key_id}`` and ``tagValues/456`` or in + namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. The field is ignored (both PUT & + PATCH) when empty. + resource_policies (MutableSequence[str]): + Resource policies applied to this disk for + automatic snapshot creations. Specified using + the full or partial URL. For instance template, + specify only the resource policy name. + source_image (str): + The source image to create this disk. When + creating a new instance boot disk, one of + initializeParams.sourceImage + orinitializeParams.sourceSnapshot or + disks.source is required. + + To create a disk with one of the public + operating system images, specify the image by + its family name. For example, + specifyfamily/debian-9 to use the latest Debian + 9 image: + + projects/debian-cloud/global/images/family/debian-9 + + Alternatively, use a specific version of a + public operating system image: + + projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD + + To create a disk with a custom image that you + created, specify the image name in the following + format: + + global/images/my-custom-image + + You can also specify a custom image by its image + family, which returns the latest version of the + image in that family. Replace the image name + with family/family-name: + + global/images/family/my-image-family + + If the source image is deleted later, this field + will not be set. + + This field is a member of `oneof`_ ``_source_image``. + source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Thecustomer-supplied + encryption key of the source image. Required if + the source image is protected by a + customer-supplied encryption key. + + InstanceTemplate and InstancePropertiesPatch do + not storecustomer-supplied encryption keys, so + you cannot create disks for instances in a + managed instance group if the source images are + encrypted with your own keys. + + This field is a member of `oneof`_ ``_source_image_encryption_key``. + source_instant_snapshot (str): + The source instant-snapshot to create this + disk. When creating a new instance boot disk, + one of initializeParams.sourceSnapshot or + initializeParams.sourceInstantSnapshotinitializeParams.sourceImage + or disks.source is required. + + To create a disk with a snapshot that you + created, specify the snapshot name in the + following format: + + us-central1-a/instantSnapshots/my-backup + + If the source instant-snapshot is deleted later, + this field will not be set. + + This field is a member of `oneof`_ ``_source_instant_snapshot``. + source_snapshot (str): + The source snapshot to create this disk. When + creating a new instance boot disk, one of + initializeParams.sourceSnapshot + orinitializeParams.sourceImage or disks.source + is required. + + To create a disk with a snapshot that you + created, specify the snapshot name in the + following format: + + global/snapshots/my-backup + + If the source snapshot is deleted later, this + field will not be set. + + Note: You cannot create VMs in bulk using a + snapshot as the source. Use an image instead + when you create VMs using + the bulk + insert method. + + This field is a member of `oneof`_ ``_source_snapshot``. + source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Thecustomer-supplied + encryption key of the source snapshot. + + This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. + storage_pool (str): + The storage pool in which the new disk is + created. You can provide this as a partial or + full URL to the resource. For example, the + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool + - + projects/project/zones/zone/storagePools/storagePool + - zones/zone/storagePools/storagePool + + This field is a member of `oneof`_ ``_storage_pool``. """ - class UtilizationTargetType(proto.Enum): - r"""Defines how target utilization value is expressed for a Stackdriver - Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or - DELTA_PER_MINUTE. + class Architecture(proto.Enum): + r"""The architecture of the attached disk. Valid values are arm64 or + x86_64. Values: - UNDEFINED_UTILIZATION_TARGET_TYPE (0): + UNDEFINED_ARCHITECTURE (0): A value indicating that the enum field is not set. - DELTA_PER_MINUTE (87432861): - Sets the utilization target value for a - cumulative or delta metric, expressed as the - rate of growth per minute. - DELTA_PER_SECOND (255180029): - Sets the utilization target value for a - cumulative or delta metric, expressed as the - rate of growth per second. - GAUGE (67590361): - Sets the utilization target value for a gauge - metric. The autoscaler will collect the average - utilization of the virtual machines from the - last couple of minutes, and compare the value to - the utilization target value to perform - autoscaling. + ARCHITECTURE_UNSPECIFIED (394750507): + Default value indicating Architecture is not + set. + ARM64 (62547450): + Machines with architecture ARM64 + X86_64 (425300551): + Machines with architecture X86_64 """ - UNDEFINED_UTILIZATION_TARGET_TYPE = 0 - DELTA_PER_MINUTE = 87432861 - DELTA_PER_SECOND = 255180029 - GAUGE = 67590361 + UNDEFINED_ARCHITECTURE = 0 + ARCHITECTURE_UNSPECIFIED = 394750507 + ARM64 = 62547450 + X86_64 = 425300551 - filter: str = proto.Field( + class OnUpdateAction(proto.Enum): + r"""Specifies which action to take on instance update with this + disk. Default is to use the existing disk. + + Values: + UNDEFINED_ON_UPDATE_ACTION (0): + A value indicating that the enum field is not + set. + RECREATE_DISK (494767853): + Always recreate the disk. + RECREATE_DISK_IF_SOURCE_CHANGED (398099712): + Recreate the disk if source (image, snapshot) + of this disk is different from source of + existing disk. + USE_EXISTING_DISK (232682233): + Use the existing disk, this is the default + behaviour. + """ + UNDEFINED_ON_UPDATE_ACTION = 0 + RECREATE_DISK = 494767853 + RECREATE_DISK_IF_SOURCE_CHANGED = 398099712 + USE_EXISTING_DISK = 232682233 + + architecture: str = proto.Field( proto.STRING, - number=336120696, + number=302803283, optional=True, ) - metric: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=533067184, + number=422937596, optional=True, ) - single_instance_assignment: float = proto.Field( - proto.DOUBLE, - number=504768064, + disk_name: str = proto.Field( + proto.STRING, + number=92807149, optional=True, ) - utilization_target: float = proto.Field( - proto.DOUBLE, - number=215905870, + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, optional=True, ) - utilization_target_type: str = proto.Field( + disk_type: str = proto.Field( proto.STRING, - number=340169355, + number=93009052, + optional=True, + ) + enable_confidential_compute: bool = proto.Field( + proto.BOOL, + number=102135228, + optional=True, + ) + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( + proto.MESSAGE, + number=79294545, + message="GuestOsFeature", + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, + ) + licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=337642578, + ) + multi_writer: bool = proto.Field( + proto.BOOL, + number=528165433, + optional=True, + ) + on_update_action: str = proto.Field( + proto.STRING, + number=202451980, + optional=True, + ) + provisioned_iops: int = proto.Field( + proto.INT64, + number=186769108, + optional=True, + ) + provisioned_throughput: int = proto.Field( + proto.INT64, + number=526524181, + optional=True, + ) + replica_zones: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=48438272, + ) + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, + ) + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) + source_image: str = proto.Field( + proto.STRING, + number=50443319, + optional=True, + ) + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=381503659, + optional=True, + message="CustomerEncryptionKey", + ) + source_instant_snapshot: str = proto.Field( + proto.STRING, + number=219202054, + optional=True, + ) + source_snapshot: str = proto.Field( + proto.STRING, + number=126061928, + optional=True, + ) + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=303679322, + optional=True, + message="CustomerEncryptionKey", + ) + storage_pool: str = proto.Field( + proto.STRING, + number=360473440, optional=True, ) -class AutoscalingPolicyLoadBalancingUtilization(proto.Message): - r"""Configuration parameters of autoscaling based on load - balancing. +class AuditConfig(proto.Message): + r"""Specifies the audit configuration for a service. The configuration + determines which permission types are logged, and what identities, + if any, are exempted from logging. An AuditConfig must have one or + more AuditLogConfigs. + + If there are AuditConfigs for both ``allServices`` and a specific + service, the union of the two AuditConfigs is used for that service: + the log_types specified in each AuditConfig are enabled, and the + exempted_members in each AuditLogConfig are exempted. + + Example Policy with multiple AuditConfigs: + + :: + + { + "audit_configs": [ + { + "service": "allServices", + "audit_log_configs": [ + { + "log_type": "DATA_READ", + "exempted_members": [ + "user:jose@example.com" + ] + }, + { + "log_type": "DATA_WRITE" + }, + { + "log_type": "ADMIN_READ" + } + ] + }, + { + "service": "sampleservice.googleapis.com", + "audit_log_configs": [ + { + "log_type": "DATA_READ" + }, + { + "log_type": "DATA_WRITE", + "exempted_members": [ + "user:aliya@example.com" + ] + } + ] + } + ] + } + + For sampleservice, this policy enables DATA_READ, DATA_WRITE and + ADMIN_READ logging. It also exempts ``jose@example.com`` from + DATA_READ logging, and ``aliya@example.com`` from DATA_WRITE + logging. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - utilization_target (float): - Fraction of backend capacity utilization (set - in HTTP(S) load balancing configuration) that - the autoscaler maintains. Must be a positive - float value. If not defined, the default is 0.8. + audit_log_configs (MutableSequence[google.cloud.compute_v1beta.types.AuditLogConfig]): + The configuration for logging of each type of + permission. + exempted_members (MutableSequence[str]): - This field is a member of `oneof`_ ``_utilization_target``. + service (str): + Specifies a service that will be enabled for audit logging. + For example, ``storage.googleapis.com``, + ``cloudsql.googleapis.com``. ``allServices`` is a special + value that covers all services. + + This field is a member of `oneof`_ ``_service``. """ - utilization_target: float = proto.Field( - proto.DOUBLE, - number=215905870, + audit_log_configs: MutableSequence["AuditLogConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=488420626, + message="AuditLogConfig", + ) + exempted_members: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=232615576, + ) + service: str = proto.Field( + proto.STRING, + number=373540533, optional=True, ) -class AutoscalingPolicyScaleDownControl(proto.Message): - r"""Configuration that allows for slower scale in so that even if - Autoscaler recommends an abrupt scale in of a MIG, it will be - throttled as specified by the parameters below. +class AuditLogConfig(proto.Message): + r"""Provides the configuration for logging a type of permissions. + Example: + + :: + + { + "audit_log_configs": [ + { + "log_type": "DATA_READ", + "exempted_members": [ + "user:jose@example.com" + ] + }, + { + "log_type": "DATA_WRITE" + } + ] + } + + This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + jose@example.com from DATA_READ logging. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - max_scaled_down_replicas (google.cloud.compute_v1beta.types.FixedOrPercent): - Maximum allowed number (or %) of VMs that can - be deducted from the peak recommendation during - the window autoscaler looks at when computing - recommendations. Possibly all these VMs can be - deleted at once so user service needs to be - prepared to lose that many VMs in one step. + exempted_members (MutableSequence[str]): + Specifies the identities that do not cause + logging for this type of permission. + Follows the same format of Binding.members. + ignore_child_exemptions (bool): - This field is a member of `oneof`_ ``_max_scaled_down_replicas``. - time_window_sec (int): - How far back autoscaling looks when computing - recommendations to include directives regarding - slower scale in, as described above. + This field is a member of `oneof`_ ``_ignore_child_exemptions``. + log_type (str): + The log type that this config enables. + Check the LogType enum for the list of possible + values. - This field is a member of `oneof`_ ``_time_window_sec``. + This field is a member of `oneof`_ ``_log_type``. """ - max_scaled_down_replicas: "FixedOrPercent" = proto.Field( - proto.MESSAGE, - number=47461006, + class LogType(proto.Enum): + r"""The log type that this config enables. + + Values: + UNDEFINED_LOG_TYPE (0): + A value indicating that the enum field is not + set. + ADMIN_READ (128951462): + Admin reads. Example: CloudIAM getIamPolicy + DATA_READ (305224971): + Data reads. Example: CloudSQL Users list + DATA_WRITE (340181738): + Data writes. Example: CloudSQL Users create + LOG_TYPE_UNSPECIFIED (154527053): + Default case. Should never be this. + """ + UNDEFINED_LOG_TYPE = 0 + ADMIN_READ = 128951462 + DATA_READ = 305224971 + DATA_WRITE = 340181738 + LOG_TYPE_UNSPECIFIED = 154527053 + + exempted_members: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=232615576, + ) + ignore_child_exemptions: bool = proto.Field( + proto.BOOL, + number=70141850, optional=True, - message="FixedOrPercent", ) - time_window_sec: int = proto.Field( - proto.INT32, - number=36405300, + log_type: str = proto.Field( + proto.STRING, + number=403115861, optional=True, ) -class AutoscalingPolicyScaleInControl(proto.Message): - r"""Configuration that allows for slower scale in so that even if - Autoscaler recommends an abrupt scale in of a MIG, it will be - throttled as specified by the parameters below. +class Autoscaler(proto.Message): + r"""Represents an Autoscaler resource. + Google Compute Engine has two Autoscaler resources: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - `Zonal `__ + - `Regional `__ - Attributes: - max_scaled_in_replicas (google.cloud.compute_v1beta.types.FixedOrPercent): - Maximum allowed number (or %) of VMs that can - be deducted from the peak recommendation during - the window autoscaler looks at when computing - recommendations. Possibly all these VMs can be - deleted at once so user service needs to be - prepared to lose that many VMs in one step. + Use autoscalers to automatically add or delete instances from a + managed instance group according to your defined autoscaling policy. + For more information, read Autoscaling Groups of Instances. - This field is a member of `oneof`_ ``_max_scaled_in_replicas``. - time_window_sec (int): - How far back autoscaling looks when computing - recommendations to include directives regarding - slower scale in, as described above. + For zonal managed instance groups resource, use the autoscaler + resource. - This field is a member of `oneof`_ ``_time_window_sec``. - """ + For regional managed instance groups, use theregionAutoscalers + resource. - max_scaled_in_replicas: "FixedOrPercent" = proto.Field( - proto.MESSAGE, - number=180710123, - optional=True, - message="FixedOrPercent", - ) - time_window_sec: int = proto.Field( - proto.INT32, - number=36405300, - optional=True, - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields -class AutoscalingPolicyScalingSchedule(proto.Message): - r"""Scaling based on user-defined schedule. The message describes - a single scaling schedule. A scaling schedule changes the - minimum number of VM instances an autoscaler can recommend, - which can trigger scaling out. + Attributes: + autoscaling_policy (google.cloud.compute_v1beta.types.AutoscalingPolicy): + The configuration parameters for the + autoscaling algorithm. You can define one or + more signals for an autoscaler: + cpuUtilization,customMetricUtilizations, + andloadBalancingUtilization. + If none of these are specified, the default will + be to autoscale based oncpuUtilization to 0.6 or + 60%. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_autoscaling_policy``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - Attributes: + This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - A description of a scaling schedule. + An optional description of this resource. + Provide this property when you create the + resource. This field is a member of `oneof`_ ``_description``. - disabled (bool): - A boolean value that specifies whether a - scaling schedule can influence autoscaler - recommendations. If set to true, then a scaling - schedule has no effect. This field is optional, - and its value is false by default. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - This field is a member of `oneof`_ ``_disabled``. - duration_sec (int): - The duration of time intervals, in seconds, - for which this scaling schedule is to run. The - minimum allowed value is 300. This field is - required. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#autoscaler for autoscalers. - This field is a member of `oneof`_ ``_duration_sec``. - min_required_replicas (int): - The minimum number of VM instances that the - autoscaler will recommend in time intervals - starting according to schedule. This field is - required. + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_min_required_replicas``. - schedule (str): - The start timestamps of time intervals when this scaling - schedule is to provide a scaling signal. This field uses the - extended cron format (with an optional year field). The - expression can describe a single timestamp if the optional - year is set, in which case the scaling schedule runs once. - The schedule is interpreted with respect to time_zone. This - field is required. Note: These timestamps only describe when - autoscaler starts providing the scaling signal. The VMs need - additional time to become serving. - - This field is a member of `oneof`_ ``_schedule``. - time_zone (str): - The time zone to use when interpreting the schedule. The - value of this field must be a time zone name from the tz - database: https://en.wikipedia.org/wiki/Tz_database. This - field is assigned a default value of "UTC" if left empty. - - This field is a member of `oneof`_ ``_time_zone``. - """ - - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - disabled: bool = proto.Field( - proto.BOOL, - number=270940796, - optional=True, - ) - duration_sec: int = proto.Field( - proto.INT32, - number=212356902, - optional=True, - ) - min_required_replicas: int = proto.Field( - proto.INT32, - number=365514414, - optional=True, - ) - schedule: str = proto.Field( - proto.STRING, - number=375820951, - optional=True, - ) - time_zone: str = proto.Field( - proto.STRING, - number=36848094, - optional=True, - ) - - -class Backend(proto.Message): - r"""Message containing information of one individual backend. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - balancing_mode (str): - Specifies how to determine whether the - backend of a load balancer can handle additional - traffic or is fully loaded. For usage - guidelines, see Connection balancing mode. - Backends must use compatible balancing modes. - For more information, see Supported balancing - modes and target capacity settings and - Restrictions and guidance for instance groups. - Note: Currently, if you use the API to configure - incompatible balancing modes, the configuration - might be accepted even though it has no impact - and is ignored. Specifically, - Backend.maxUtilization is ignored when - Backend.balancingMode is RATE. In the future, - this incompatible combination will be rejected. - Check the BalancingMode enum for the list of - possible values. - - This field is a member of `oneof`_ ``_balancing_mode``. - capacity_scaler (float): - A multiplier applied to the backend's target capacity of its - balancing mode. The default value is 1, which means the - group serves up to 100% of its configured capacity - (depending on balancingMode). A setting of 0 means the group - is completely drained, offering 0% of its available - capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot - configure a setting larger than 0 and smaller than 0.1. You - cannot configure a setting of 0 when there is only one - backend attached to the backend service. Not available with - backends that don't support using a balancingMode. This - includes backends such as global internet NEGs, regional - serverless NEGs, and PSC NEGs. - - This field is a member of `oneof`_ ``_capacity_scaler``. - custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendCustomMetric]): - List of custom metrics that are used for CUSTOM_METRICS - BalancingMode. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - failover (bool): - This field designates whether this is a - failover backend. More than one failover backend - can be configured for a given BackendService. - - This field is a member of `oneof`_ ``_failover``. - group (str): - The fully-qualified URL of an instance group or network - endpoint group (NEG) resource. To determine what types of - backends a load balancer supports, see the `Backend services - overview `__. - You must use the *fully-qualified* URL (starting with - https://www.googleapis.com/) to specify the instance group - or NEG. Partial URLs are not supported. If haPolicy is - specified, backends must refer to NEG resources of type - GCE_VM_IP. - - This field is a member of `oneof`_ ``_group``. - max_connections (int): - Defines a target maximum number of - simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. - - This field is a member of `oneof`_ ``_max_connections``. - max_connections_per_endpoint (int): - Defines a target maximum number of - simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. - - This field is a member of `oneof`_ ``_max_connections_per_endpoint``. - max_connections_per_instance (int): - Defines a target maximum number of - simultaneous connections. For usage guidelines, - see Connection balancing mode and Utilization - balancing mode. Not available if the backend's - balancingMode is RATE. - - This field is a member of `oneof`_ ``_max_connections_per_instance``. - max_in_flight_requests (int): - Defines a maximum number of in-flight - requests for the whole NEG or instance group. - Not available if backend's balancingMode is RATE - or CONNECTION. - - This field is a member of `oneof`_ ``_max_in_flight_requests``. - max_in_flight_requests_per_endpoint (int): - Defines a maximum number of in-flight - requests for a single endpoint. Not available if - backend's balancingMode is RATE or CONNECTION. - - This field is a member of `oneof`_ ``_max_in_flight_requests_per_endpoint``. - max_in_flight_requests_per_instance (int): - Defines a maximum number of in-flight - requests for a single VM. Not available if - backend's balancingMode is RATE or CONNECTION. - - This field is a member of `oneof`_ ``_max_in_flight_requests_per_instance``. - max_rate (int): - Defines a maximum number of HTTP requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + This field is a member of `oneof`_ ``_name``. + recommended_size (int): + Output only. [Output Only] Target recommended MIG size + (number of instances) computed by autoscaler. Autoscaler + calculates the recommended MIG size even when the + autoscaling policy mode is different from ON. This field is + empty when autoscaler is not connected to an existing + managed instance group or autoscaler did not generate its + prediction. - This field is a member of `oneof`_ ``_max_rate``. - max_rate_per_endpoint (float): - Defines a maximum target for requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + This field is a member of `oneof`_ ``_recommended_size``. + region (str): + Output only. [Output Only] URL of theregion where the + instance group resides (for autoscalers living in regional + scope). - This field is a member of `oneof`_ ``_max_rate_per_endpoint``. - max_rate_per_instance (float): - Defines a maximum target for requests per - second (RPS). For usage guidelines, see Rate - balancing mode and Utilization balancing mode. - Not available if the backend's balancingMode is - CONNECTION. + This field is a member of `oneof`_ ``_region``. + scaling_schedule_status (MutableMapping[str, google.cloud.compute_v1beta.types.ScalingScheduleStatus]): + Output only. [Output Only] Status information of existing + scaling schedules. + self_link (str): + [Output Only] Server-defined URL for the resource. - This field is a member of `oneof`_ ``_max_rate_per_instance``. - max_utilization (float): - Optional parameter to define a target capacity for the - UTILIZATION balancing mode. The valid range is [0.0, 1.0]. - For usage guidelines, see Utilization balancing mode. + This field is a member of `oneof`_ ``_self_link``. + status (str): + [Output Only] The status of the autoscaler configuration. + Current set of possible values: + + :: + + - PENDING: + Autoscaler backend hasn't read new/updated configuration. + - DELETING: + Configuration is being deleted. + - ACTIVE: + Configuration is acknowledged to be effective. Some warnings might + be present in the statusDetails field. + - ERROR: + Configuration has errors. Actionable for users. Details are present in + the statusDetails field. + + New values might be added in the future. Check the Status + enum for the list of possible values. - This field is a member of `oneof`_ ``_max_utilization``. - preference (str): - This field indicates whether this backend - should be fully utilized before sending traffic - to backends with default preference. The - possible values are: - PREFERRED: Backends with - this preference level will be filled up to their - capacity limits first, based on RTT. - DEFAULT: - If preferred backends don't have enough - capacity, backends in this layer would be used - and traffic would be assigned based on the load - balancing algorithm you use. This is the default - Check the Preference enum for the list of - possible values. + This field is a member of `oneof`_ ``_status``. + status_details (MutableSequence[google.cloud.compute_v1beta.types.AutoscalerStatusDetails]): + [Output Only] Human-readable details about the current state + of the autoscaler. Read the documentation forCommonly + returned status messages for examples of status messages you + might encounter. + target (str): + URL of the managed instance group that this + autoscaler will scale. This field is required + when creating an autoscaler. - This field is a member of `oneof`_ ``_preference``. - traffic_duration (str): - Check the TrafficDuration enum for the list - of possible values. + This field is a member of `oneof`_ ``_target``. + zone (str): + Output only. [Output Only] URL of thezone where the instance + group resides (for autoscalers living in zonal scope). - This field is a member of `oneof`_ ``_traffic_duration``. + This field is a member of `oneof`_ ``_zone``. """ - class BalancingMode(proto.Enum): - r"""Specifies how to determine whether the backend of a load - balancer can handle additional traffic or is fully loaded. For - usage guidelines, see Connection balancing mode. Backends must - use compatible balancing modes. For more information, see - Supported balancing modes and target capacity settings and - Restrictions and guidance for instance groups. Note: Currently, - if you use the API to configure incompatible balancing modes, - the configuration might be accepted even though it has no impact - and is ignored. Specifically, Backend.maxUtilization is ignored - when Backend.balancingMode is RATE. In the future, this - incompatible combination will be rejected. - - Values: - UNDEFINED_BALANCING_MODE (0): - A value indicating that the enum field is not - set. - CONNECTION (246311646): - Balance based on the number of simultaneous - connections. - CUSTOM_METRICS (331575765): - Based on custom defined and reported metrics. - IN_FLIGHT (190040266): - Balance based on the number of in-flight - requests. - RATE (2508000): - Balance based on requests per second (RPS). - UTILIZATION (157008386): - Balance based on the backend utilization. - """ - UNDEFINED_BALANCING_MODE = 0 - CONNECTION = 246311646 - CUSTOM_METRICS = 331575765 - IN_FLIGHT = 190040266 - RATE = 2508000 - UTILIZATION = 157008386 + class Status(proto.Enum): + r"""[Output Only] The status of the autoscaler configuration. Current + set of possible values: - class Preference(proto.Enum): - r"""This field indicates whether this backend should be fully - utilized before sending traffic to backends with default - preference. The possible values are: - PREFERRED: Backends with - this preference level will be filled up to their capacity limits - first, based on RTT. - DEFAULT: If preferred backends don't have - enough capacity, backends in this layer would be used and - traffic would be assigned based on the load balancing algorithm - you use. This is the default + :: - Values: - UNDEFINED_PREFERENCE (0): - A value indicating that the enum field is not - set. - DEFAULT (115302945): - No preference. - PREFERENCE_UNSPECIFIED (496219571): - If preference is unspecified, we set it to - the DEFAULT value - PREFERRED (418847841): - Traffic will be sent to this backend first. - """ - UNDEFINED_PREFERENCE = 0 - DEFAULT = 115302945 - PREFERENCE_UNSPECIFIED = 496219571 - PREFERRED = 418847841 + - PENDING: + Autoscaler backend hasn't read new/updated configuration. + - DELETING: + Configuration is being deleted. + - ACTIVE: + Configuration is acknowledged to be effective. Some warnings might + be present in the statusDetails field. + - ERROR: + Configuration has errors. Actionable for users. Details are present in + the statusDetails field. - class TrafficDuration(proto.Enum): - r""" + New values might be added in the future. Values: - UNDEFINED_TRAFFIC_DURATION (0): + UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - LONG (2342524): - Most of the requests are expected to take - more than multiple seconds to finish. - SHORT (78875740): - Most requests are expected to finish with a - sub-second latency. - TRAFFIC_DURATION_UNSPECIFIED (265201166): - Traffic duration is unspecified. + ACTIVE (314733318): + Configuration is acknowledged to be effective + DELETING (528602024): + Configuration is being deleted + ERROR (66247144): + Configuration has errors. Actionable for + users. + PENDING (35394935): + Autoscaler backend hasn't read new/updated + configuration """ - UNDEFINED_TRAFFIC_DURATION = 0 - LONG = 2342524 - SHORT = 78875740 - TRAFFIC_DURATION_UNSPECIFIED = 265201166 + UNDEFINED_STATUS = 0 + ACTIVE = 314733318 + DELETING = 528602024 + ERROR = 66247144 + PENDING = 35394935 - balancing_mode: str = proto.Field( - proto.STRING, - number=430286217, + autoscaling_policy: "AutoscalingPolicy" = proto.Field( + proto.MESSAGE, + number=221950041, optional=True, + message="AutoscalingPolicy", ) - capacity_scaler: float = proto.Field( - proto.FLOAT, - number=315958157, + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, optional=True, ) - custom_metrics: MutableSequence["BackendCustomMetric"] = proto.RepeatedField( - proto.MESSAGE, - number=429453813, - message="BackendCustomMetric", - ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - failover: bool = proto.Field( - proto.BOOL, - number=138892530, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - group: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=98629247, - optional=True, - ) - max_connections: int = proto.Field( - proto.INT32, - number=110652154, - optional=True, - ) - max_connections_per_endpoint: int = proto.Field( - proto.INT32, - number=216904604, - optional=True, - ) - max_connections_per_instance: int = proto.Field( - proto.INT32, - number=104671900, + number=3292052, optional=True, ) - max_in_flight_requests: int = proto.Field( - proto.INT32, - number=273269332, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - max_in_flight_requests_per_endpoint: int = proto.Field( + recommended_size: int = proto.Field( proto.INT32, - number=307928706, + number=257915749, optional=True, ) - max_in_flight_requests_per_instance: int = proto.Field( - proto.INT32, - number=195696002, + region: str = proto.Field( + proto.STRING, + number=138946292, optional=True, ) - max_rate: int = proto.Field( - proto.INT32, - number=408035035, - optional=True, + scaling_schedule_status: MutableMapping[ + str, "ScalingScheduleStatus" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=465950178, + message="ScalingScheduleStatus", ) - max_rate_per_endpoint: float = proto.Field( - proto.FLOAT, - number=129832283, + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, ) - max_rate_per_instance: float = proto.Field( - proto.FLOAT, - number=17599579, + status: str = proto.Field( + proto.STRING, + number=181260274, optional=True, ) - max_utilization: float = proto.Field( - proto.FLOAT, - number=148192199, - optional=True, + status_details: MutableSequence["AutoscalerStatusDetails"] = proto.RepeatedField( + proto.MESSAGE, + number=363353845, + message="AutoscalerStatusDetails", ) - preference: str = proto.Field( + target: str = proto.Field( proto.STRING, - number=150781147, + number=192835985, optional=True, ) - traffic_duration: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=11618710, + number=3744684, optional=True, ) -class BackendBucket(proto.Message): - r"""Represents a Cloud Storage Bucket resource. This Cloud - Storage bucket resource is referenced by a URL map of a load - balancer. For more information, read Backend Buckets. - +class AutoscalerAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bucket_name (str): - Cloud Storage bucket name. - - This field is a member of `oneof`_ ``_bucket_name``. - cdn_policy (google.cloud.compute_v1beta.types.BackendBucketCdnPolicy): - Cloud CDN configuration for this - BackendBucket. - - This field is a member of `oneof`_ ``_cdn_policy``. - compression_mode (str): - Compress text responses using Brotli or gzip - compression, based on the client's - Accept-Encoding header. Check the - CompressionMode enum for the list of possible - values. - - This field is a member of `oneof`_ ``_compression_mode``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - custom_response_headers (MutableSequence[str]): - Headers that the Application Load Balancer - should add to proxied responses. - description (str): - An optional textual description of the - resource; provided by the client when the - resource is created. - - This field is a member of `oneof`_ ``_description``. - edge_security_policy (str): - [Output Only] The resource URL for the edge security policy - associated with this backend bucket. - - This field is a member of `oneof`_ ``_edge_security_policy``. - enable_cdn (bool): - If true, enable Cloud CDN for this - BackendBucket. - - This field is a member of `oneof`_ ``_enable_cdn``. - id (int): + id (str): [Output Only] Unique identifier for the resource; defined by the server. This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.AutoscalersScopedList]): + A list of AutoscalersScopedList resources. kind (str): - Type of the resource. + Output only. [Output Only] Type of resource. + Alwayscompute#autoscalerAggregatedList for aggregated lists + of autoscalers. This field is a member of `oneof`_ ``_kind``. - load_balancing_scheme (str): - The value can only be INTERNAL_MANAGED for cross-region - internal layer 7 load balancer. If loadBalancingScheme is - not specified, the backend bucket can be used by classic - global external load balancers, or global application - external load balancers, or both. Check the - LoadBalancingScheme enum for the list of possible values. - - This field is a member of `oneof`_ ``_load_balancing_scheme``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - - This field is a member of `oneof`_ ``_name``. - params (google.cloud.compute_v1beta.types.BackendBucketParams): - Input only. [Input Only] Additional params passed with the - request, but not persisted as part of resource payload. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_params``. + This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - used_by (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketUsedBy]): - [Output Only] List of resources referencing that backend - bucket. - """ - - class CompressionMode(proto.Enum): - r"""Compress text responses using Brotli or gzip compression, - based on the client's Accept-Encoding header. - - Values: - UNDEFINED_COMPRESSION_MODE (0): - A value indicating that the enum field is not - set. - AUTOMATIC (165298699): - Automatically uses the best compression based - on the Accept-Encoding header sent by the - client. - DISABLED (516696700): - Disables compression. Existing compressed - responses cached by Cloud CDN will not be served - to clients. - """ - UNDEFINED_COMPRESSION_MODE = 0 - AUTOMATIC = 165298699 - DISABLED = 516696700 + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - class LoadBalancingScheme(proto.Enum): - r"""The value can only be INTERNAL_MANAGED for cross-region internal - layer 7 load balancer. If loadBalancingScheme is not specified, the - backend bucket can be used by classic global external load - balancers, or global application external load balancers, or both. + This field is a member of `oneof`_ ``_warning``. + """ - Values: - UNDEFINED_LOAD_BALANCING_SCHEME (0): - A value indicating that the enum field is not - set. - INTERNAL_MANAGED (37350397): - Signifies that this will be used for internal - Application Load Balancers. - """ - UNDEFINED_LOAD_BALANCING_SCHEME = 0 - INTERNAL_MANAGED = 37350397 + @property + def raw_page(self): + return self - bucket_name: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=283610048, + number=3355, optional=True, ) - cdn_policy: "BackendBucketCdnPolicy" = proto.Field( + items: MutableMapping[str, "AutoscalersScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, - number=213976452, - optional=True, - message="BackendBucketCdnPolicy", + number=100526016, + message="AutoscalersScopedList", ) - compression_mode: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=95520988, + number=3292052, optional=True, ) - creation_timestamp: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=30525366, + number=79797525, optional=True, ) - custom_response_headers: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=387539094, - ) - description: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=422937596, + number=456214797, optional=True, ) - edge_security_policy: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=41036943, - optional=True, - ) - enable_cdn: bool = proto.Field( - proto.BOOL, - number=282942321, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - load_balancing_scheme: str = proto.Field( - proto.STRING, - number=363890244, - optional=True, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - params: "BackendBucketParams" = proto.Field( - proto.MESSAGE, - number=78313862, - optional=True, - message="BackendBucketParams", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - used_by: MutableSequence["BackendBucketUsedBy"] = proto.RepeatedField( - proto.MESSAGE, - number=389320729, - message="BackendBucketUsedBy", - ) - - -class BackendBucketCdnPolicy(proto.Message): - r"""Message containing Cloud CDN configuration for a backend - bucket. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketCdnPolicyBypassCacheOnRequestHeader]): - Bypass the cache when the specified request - headers are matched - e.g. Pragma or - Authorization headers. Up to 5 headers can be - specified. The cache is bypassed for all - cdnPolicy.cacheMode settings. - cache_key_policy (google.cloud.compute_v1beta.types.BackendBucketCdnPolicyCacheKeyPolicy): - The CacheKeyPolicy for this CdnPolicy. - - This field is a member of `oneof`_ ``_cache_key_policy``. - cache_mode (str): - Specifies the cache setting for all responses from this - backend. The possible values are: USE_ORIGIN_HEADERS - Requires the origin to set valid caching headers to cache - content. Responses without these headers will not be cached - at Google's edge, and will require a full trip to the origin - on every request, potentially impacting performance and - increasing load on the origin server. FORCE_CACHE_ALL Cache - all content, ignoring any "private", "no-store" or - "no-cache" directives in Cache-Control response headers. - Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC - Automatically cache static content, including common image - formats, media (video and audio), and web assets (JavaScript - and CSS). Requests and responses that are marked as - uncacheable, as well as dynamic content (including HTML), - will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. Check - the CacheMode enum for the list of possible values. - - This field is a member of `oneof`_ ``_cache_mode``. - client_ttl (int): - Specifies a separate client (e.g. browser client) maximum - TTL. This is used to clamp the max-age (or Expires) value - sent to the client. With FORCE_CACHE_ALL, the lesser of - client_ttl and default_ttl is used for the response max-age - directive, along with a "public" directive. For cacheable - content in CACHE_ALL_STATIC mode, client_ttl clamps the - max-age from the origin (if specified), or else sets the - response max-age directive to the lesser of the client_ttl - and default_ttl, and also ensures a "public" cache-control - directive is present. If a client TTL is not specified, a - default value (1 hour) will be used. The maximum allowed - value is 31,622,400s (1 year). - - This field is a member of `oneof`_ ``_client_ttl``. - default_ttl (int): - Specifies the default TTL for cached content served by this - origin for responses that do not have an existing valid TTL - (max-age or s-maxage). Setting a TTL of "0" means "always - revalidate". The value of defaultTTL cannot be set to a - value greater than that of maxTTL, but can be equal. When - the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will - overwrite the TTL set in all responses. The maximum allowed - value is 31,622,400s (1 year), noting that infrequently - accessed objects may be evicted from the cache before the - defined TTL. - - This field is a member of `oneof`_ ``_default_ttl``. - max_ttl (int): - Specifies the maximum allowed TTL for cached - content served by this origin. Cache directives - that attempt to set a max-age or s-maxage higher - than this, or an Expires header more than maxTTL - seconds in the future will be capped at the - value of maxTTL, as if it were the value of an - s-maxage Cache-Control directive. Headers sent - to the client will not be modified. Setting a - TTL of "0" means "always revalidate". The - maximum allowed value is 31,622,400s (1 year), - noting that infrequently accessed objects may be - evicted from the cache before the defined TTL. - - This field is a member of `oneof`_ ``_max_ttl``. - negative_caching (bool): - Negative caching allows per-status code TTLs to be set, in - order to apply fine-grained caching for common errors or - redirects. This can reduce the load on your origin and - improve end-user experience by reducing response latency. - When the cache mode is set to CACHE_ALL_STATIC or - USE_ORIGIN_HEADERS, negative caching applies to responses - with the specified response code that lack any - Cache-Control, Expires, or Pragma: no-cache directives. When - the cache mode is set to FORCE_CACHE_ALL, negative caching - applies to all responses with the specified response code, - and override any caching headers. By default, Cloud CDN will - apply the following default TTLs to these status codes: HTTP - 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m - HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal - Reasons): 120s HTTP 405 (Method Not Found), 501 (Not - Implemented): 60s. These defaults can be overridden in - negative_caching_policy. - - This field is a member of `oneof`_ ``_negative_caching``. - negative_caching_policy (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketCdnPolicyNegativeCachingPolicy]): - Sets a cache TTL for the specified HTTP status code. - negative_caching must be enabled to configure - negative_caching_policy. Omitting the policy and leaving - negative_caching enabled will use Cloud CDN's default cache - TTLs. Note that when specifying an explicit - negative_caching_policy, you should take care to specify a - cache TTL for all response codes that you wish to cache. - Cloud CDN will not apply any default negative caching when a - policy exists. - request_coalescing (bool): - If true then Cloud CDN will combine multiple - concurrent cache fill requests into a small - number of requests to the origin. - - This field is a member of `oneof`_ ``_request_coalescing``. - serve_while_stale (int): - Serve existing content from the cache (if - available) when revalidating content with the - origin, or when an error is encountered when - refreshing the cache. This setting defines the - default "max-stale" duration for any cached - responses that do not specify a max-stale - directive. Stale responses that exceed the TTL - configured here will not be served. The default - limit (max-stale) is 86400s (1 day), which will - allow stale content to be served up to this - limit beyond the max-age (or s-maxage) of a - cached response. The maximum allowed value is - 604800 (1 week). Set this to zero (0) to disable - serve-while-stale. - - This field is a member of `oneof`_ ``_serve_while_stale``. - signed_url_cache_max_age_sec (int): - Maximum number of seconds the response to a signed URL - request will be considered fresh. After this time period, - the response will be revalidated before being served. - Defaults to 1hr (3600s). When serving responses to signed - URL requests, Cloud CDN will internally behave as though all - responses from this backend had a "Cache-Control: public, - max-age=[TTL]" header, regardless of any existing - Cache-Control header. The actual headers served in responses - will not be altered. - - This field is a member of `oneof`_ ``_signed_url_cache_max_age_sec``. - signed_url_key_names (MutableSequence[str]): - [Output Only] Names of the keys for signing request URLs. - """ - - class CacheMode(proto.Enum): - r"""Specifies the cache setting for all responses from this backend. The - possible values are: USE_ORIGIN_HEADERS Requires the origin to set - valid caching headers to cache content. Responses without these - headers will not be cached at Google's edge, and will require a full - trip to the origin on every request, potentially impacting - performance and increasing load on the origin server. - FORCE_CACHE_ALL Cache all content, ignoring any "private", - "no-store" or "no-cache" directives in Cache-Control response - headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC Automatically - cache static content, including common image formats, media (video - and audio), and web assets (JavaScript and CSS). Requests and - responses that are marked as uncacheable, as well as dynamic content - (including HTML), will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. - - Values: - UNDEFINED_CACHE_MODE (0): - A value indicating that the enum field is not - set. - CACHE_ALL_STATIC (355027945): - Automatically cache static content, including - common image formats, media (video and audio), - and web assets (JavaScript and CSS). Requests - and responses that are marked as uncacheable, as - well as dynamic content (including HTML), will - not be cached. - FORCE_CACHE_ALL (486026928): - Cache all content, ignoring any "private", - "no-store" or "no-cache" directives in - Cache-Control response headers. Warning: this - may result in Cloud CDN caching private, - per-user (user identifiable) content. - INVALID_CACHE_MODE (381295560): - No description available. - USE_ORIGIN_HEADERS (55380261): - Requires the origin to set valid caching - headers to cache content. Responses without - these headers will not be cached at Google's - edge, and will require a full trip to the origin - on every request, potentially impacting - performance and increasing load on the origin - server. - """ - UNDEFINED_CACHE_MODE = 0 - CACHE_ALL_STATIC = 355027945 - FORCE_CACHE_ALL = 486026928 - INVALID_CACHE_MODE = 381295560 - USE_ORIGIN_HEADERS = 55380261 - - bypass_cache_on_request_headers: MutableSequence[ - "BackendBucketCdnPolicyBypassCacheOnRequestHeader" - ] = proto.RepeatedField( - proto.MESSAGE, - number=486203082, - message="BackendBucketCdnPolicyBypassCacheOnRequestHeader", - ) - cache_key_policy: "BackendBucketCdnPolicyCacheKeyPolicy" = proto.Field( - proto.MESSAGE, - number=159263727, - optional=True, - message="BackendBucketCdnPolicyCacheKeyPolicy", - ) - cache_mode: str = proto.Field( - proto.STRING, - number=28877888, - optional=True, - ) - client_ttl: int = proto.Field( - proto.INT32, - number=29034360, - optional=True, - ) - default_ttl: int = proto.Field( - proto.INT32, - number=100253422, - optional=True, - ) - max_ttl: int = proto.Field( - proto.INT32, - number=307578001, - optional=True, - ) - negative_caching: bool = proto.Field( - proto.BOOL, - number=336110005, - optional=True, + number=243372063, ) - negative_caching_policy: MutableSequence[ - "BackendBucketCdnPolicyNegativeCachingPolicy" - ] = proto.RepeatedField( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=155359996, - message="BackendBucketCdnPolicyNegativeCachingPolicy", - ) - request_coalescing: bool = proto.Field( - proto.BOOL, - number=532808276, - optional=True, - ) - serve_while_stale: int = proto.Field( - proto.INT32, - number=236682203, - optional=True, - ) - signed_url_cache_max_age_sec: int = proto.Field( - proto.INT64, - number=269374534, - optional=True, - ) - signed_url_key_names: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=371848885, - ) - - -class BackendBucketCdnPolicyBypassCacheOnRequestHeader(proto.Message): - r"""Bypass the cache when the specified request headers are present, - e.g. Pragma or Authorization headers. Values are case insensitive. - The presence of such a header overrides the cache_mode setting. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - header_name (str): - The header field name to match on when - bypassing cache. Values are case-insensitive. - - This field is a member of `oneof`_ ``_header_name``. - """ - - header_name: str = proto.Field( - proto.STRING, - number=110223613, - optional=True, - ) - - -class BackendBucketCdnPolicyCacheKeyPolicy(proto.Message): - r"""Message containing what to include in the cache key for a - request for Cloud CDN. - - Attributes: - include_http_headers (MutableSequence[str]): - Allows HTTP request headers (by name) to be - used in the cache key. - query_string_whitelist (MutableSequence[str]): - Names of query string parameters to include - in cache keys. Default parameters are always - included. '&' and '=' will be percent encoded - and not treated as delimiters. - """ - - include_http_headers: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=2489606, - ) - query_string_whitelist: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=52456496, - ) - - -class BackendBucketCdnPolicyNegativeCachingPolicy(proto.Message): - r"""Specify CDN TTLs for response error codes. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - code (int): - The HTTP status code to define a TTL against. - Only HTTP status codes 300, 301, 302, 307, 308, - 404, 405, 410, 421, 451 and 501 are can be - specified as values, and you cannot specify a - status code more than once. - - This field is a member of `oneof`_ ``_code``. - ttl (int): - The TTL (in seconds) for which to cache - responses with the corresponding status code. - The maximum allowed value is 1800s (30 minutes), - noting that infrequently accessed objects may be - evicted from the cache before the defined TTL. - - This field is a member of `oneof`_ ``_ttl``. - """ - - code: int = proto.Field( - proto.INT32, - number=3059181, - optional=True, - ) - ttl: int = proto.Field( - proto.INT32, - number=115180, + number=50704284, optional=True, + message="Warning", ) -class BackendBucketList(proto.Message): - r"""Contains a list of BackendBucket resources. +class AutoscalerList(proto.Message): + r"""Contains a list of Autoscaler resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -16694,23 +17887,25 @@ class BackendBucketList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): - A list of BackendBucket resources. + items (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): + A list of Autoscaler resources. kind (str): - Type of resource. + Output only. [Output Only] Type of resource. Always + compute#autoscalerList for lists of autoscalers. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -16728,10 +17923,10 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["BackendBucket"] = proto.RepeatedField( + items: MutableSequence["Autoscaler"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="BackendBucket", + message="Autoscaler", ) kind: str = proto.Field( proto.STRING, @@ -16756,72 +17951,264 @@ def raw_page(self): ) -class BackendBucketListUsable(proto.Message): +class AutoscalerStatusDetails(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): - A list of BackendBucket resources. - kind (str): - [Output Only] Type of resource. Always - compute#usableBackendBucketList for lists of usable backend - buckets. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + message (str): + The status message. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_message``. + type_ (str): + The type of error, warning, or notice returned. Current set + of possible values: + + :: + + - ALL_INSTANCES_UNHEALTHY (WARNING): + All instances in the instance group are unhealthy (not in RUNNING + state). + - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): + There is no backend service attached to the instance group. + - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): + Autoscaler recommends a size greater than maxNumReplicas. + - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): + The custom metric samples are not exported often enough to be + a credible base for autoscaling. + - CUSTOM_METRIC_INVALID (ERROR): + The custom metric that was specified does not exist or does not have + the necessary labels. + - MIN_EQUALS_MAX (WARNING): + The minNumReplicas is equal to maxNumReplicas. This means the + autoscaler cannot add or remove instances from the instance group. + - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): + The autoscaler did not receive any data from the custom metric + configured for autoscaling. + - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): + The autoscaler is configured to scale based on a load balancing signal + but the instance group has not received any requests from the load + balancer. + - MODE_OFF (WARNING): + Autoscaling is turned off. The number of instances in the group won't + change automatically. The autoscaling configuration is preserved. + - MODE_ONLY_UP (WARNING): + Autoscaling is in the "Autoscale only out" mode. The autoscaler can add + instances but not remove any. + - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): + The instance group cannot be autoscaled because it has more than one + backend service attached to it. + - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): + There is insufficient quota for the necessary resources, such as CPU or + number of instances. + - REGION_RESOURCE_STOCKOUT (ERROR): + Shown only for regional autoscalers: there is a resource stockout in + the chosen region. + - SCALING_TARGET_DOES_NOT_EXIST (ERROR): + The target to be scaled does not exist. + - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION + (ERROR): Autoscaling does not work with an HTTP/S load balancer that + has been configured for maxRate. + - ZONE_RESOURCE_STOCKOUT (ERROR): + For zonal autoscalers: there is a resource stockout in the chosen zone. + For regional autoscalers: in at least one of the zones you're using + there is a resource stockout. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + New values might be added in the future. Some of the values + might not be available in all API versions. Check the Type + enum for the list of possible values. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_type``. """ - @property - def raw_page(self): - return self + class Type(proto.Enum): + r"""The type of error, warning, or notice returned. Current set of + possible values: + + :: + + - ALL_INSTANCES_UNHEALTHY (WARNING): + All instances in the instance group are unhealthy (not in RUNNING + state). + - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): + There is no backend service attached to the instance group. + - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): + Autoscaler recommends a size greater than maxNumReplicas. + - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): + The custom metric samples are not exported often enough to be + a credible base for autoscaling. + - CUSTOM_METRIC_INVALID (ERROR): + The custom metric that was specified does not exist or does not have + the necessary labels. + - MIN_EQUALS_MAX (WARNING): + The minNumReplicas is equal to maxNumReplicas. This means the + autoscaler cannot add or remove instances from the instance group. + - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): + The autoscaler did not receive any data from the custom metric + configured for autoscaling. + - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): + The autoscaler is configured to scale based on a load balancing signal + but the instance group has not received any requests from the load + balancer. + - MODE_OFF (WARNING): + Autoscaling is turned off. The number of instances in the group won't + change automatically. The autoscaling configuration is preserved. + - MODE_ONLY_UP (WARNING): + Autoscaling is in the "Autoscale only out" mode. The autoscaler can add + instances but not remove any. + - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): + The instance group cannot be autoscaled because it has more than one + backend service attached to it. + - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): + There is insufficient quota for the necessary resources, such as CPU or + number of instances. + - REGION_RESOURCE_STOCKOUT (ERROR): + Shown only for regional autoscalers: there is a resource stockout in + the chosen region. + - SCALING_TARGET_DOES_NOT_EXIST (ERROR): + The target to be scaled does not exist. + - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION + (ERROR): Autoscaling does not work with an HTTP/S load balancer that + has been configured for maxRate. + - ZONE_RESOURCE_STOCKOUT (ERROR): + For zonal autoscalers: there is a resource stockout in the chosen zone. + For regional autoscalers: in at least one of the zones you're using + there is a resource stockout. + + New values might be added in the future. Some of the values might + not be available in all API versions. - id: str = proto.Field( + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + ALL_INSTANCES_UNHEALTHY (404965477): + All instances in the instance group are + unhealthy (not in RUNNING state). + BACKEND_SERVICE_DOES_NOT_EXIST (191417626): + There is no backend service attached to the + instance group. + CAPPED_AT_MAX_NUM_REPLICAS (518617): + Autoscaler recommends a size greater than + maxNumReplicas. + CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (328964659): + The custom metric samples are not exported + often enough to be a credible base for + autoscaling. + CUSTOM_METRIC_INVALID (204430550): + The custom metric that was specified does not + exist or does not have the necessary labels. + MIN_EQUALS_MAX (2821361): + The minNumReplicas is equal to + maxNumReplicas. This means the autoscaler cannot + add or remove instances from the instance group. + MISSING_CUSTOM_METRIC_DATA_POINTS (94885086): + The autoscaler did not receive any data from + the custom metric configured for autoscaling. + MISSING_LOAD_BALANCING_DATA_POINTS (509858898): + The autoscaler is configured to scale based + on a load balancing signal but the instance + group has not received any requests from the + load balancer. + MODE_OFF (164169907): + Autoscaling is turned off. The number of + instances in the group won't change + automatically. The autoscaling configuration is + preserved. + MODE_ONLY_SCALE_OUT (3840994): + Autoscaling is in the "Autoscale only scale + out" mode. Instances in the group will be only + added. + MODE_ONLY_UP (100969842): + Autoscaling is in the "Autoscale only out" + mode. Instances in the group will be only added. + MORE_THAN_ONE_BACKEND_SERVICE (151922141): + The instance group cannot be autoscaled + because it has more than one backend service + attached to it. + NOT_ENOUGH_QUOTA_AVAILABLE (403101631): + There is insufficient quota for the necessary + resources, such as CPU or number of instances. + REGION_RESOURCE_STOCKOUT (528622846): + Showed only for regional autoscalers: there + is a resource stockout in the chosen region. + SCALING_TARGET_DOES_NOT_EXIST (122636699): + The target to be scaled does not exist. + SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX (29275586): + For some scaling schedules + minRequiredReplicas is greater than + maxNumReplicas. Autoscaler always recommends at + most maxNumReplicas instances. + SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN (398287669): + For some scaling schedules + minRequiredReplicas is less than minNumReplicas. + Autoscaler always recommends at least + minNumReplicas instances. + UNKNOWN (433141802): + No description available. + UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (330845009): + Autoscaling does not work with an HTTP/S load + balancer that has been configured for maxRate. + ZONE_RESOURCE_STOCKOUT (210200502): + For zonal autoscalers: there is a resource + stockout in the chosen zone. For regional + autoscalers: in at least one of the zones you're + using there is a resource stockout. + """ + UNDEFINED_TYPE = 0 + ALL_INSTANCES_UNHEALTHY = 404965477 + BACKEND_SERVICE_DOES_NOT_EXIST = 191417626 + CAPPED_AT_MAX_NUM_REPLICAS = 518617 + CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE = 328964659 + CUSTOM_METRIC_INVALID = 204430550 + MIN_EQUALS_MAX = 2821361 + MISSING_CUSTOM_METRIC_DATA_POINTS = 94885086 + MISSING_LOAD_BALANCING_DATA_POINTS = 509858898 + MODE_OFF = 164169907 + MODE_ONLY_SCALE_OUT = 3840994 + MODE_ONLY_UP = 100969842 + MORE_THAN_ONE_BACKEND_SERVICE = 151922141 + NOT_ENOUGH_QUOTA_AVAILABLE = 403101631 + REGION_RESOURCE_STOCKOUT = 528622846 + SCALING_TARGET_DOES_NOT_EXIST = 122636699 + SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX = 29275586 + SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN = 398287669 + UNKNOWN = 433141802 + UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION = 330845009 + ZONE_RESOURCE_STOCKOUT = 210200502 + + message: str = proto.Field( proto.STRING, - number=3355, + number=418054151, optional=True, ) - items: MutableSequence["BackendBucket"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="BackendBucket", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=79797525, + number=3575610, optional=True, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + + +class AutoscalersScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + autoscalers (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): + [Output Only] A list of autoscalers contained in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of autoscalers when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + autoscalers: MutableSequence["Autoscaler"] = proto.RepeatedField( + proto.MESSAGE, + number=465771644, + message="Autoscaler", ) warning: "Warning" = proto.Field( proto.MESSAGE, @@ -16831,1070 +18218,1154 @@ def raw_page(self): ) -class BackendBucketParams(proto.Message): - r"""Additional Backend Bucket parameters. +class AutoscalingPolicy(proto.Message): + r"""Cloud Autoscaler policy. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - resource_manager_tags (MutableMapping[str, str]): - Tag keys/values directly bound to this resource. Tag keys - and values have the same definition as resource manager - tags. The field is allowed for INSERT only. The keys/values - to set on the resource should be specified in either ID { : - } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + cool_down_period_sec (int): + The number of seconds that your application takes to + initialize on a VM instance. This is referred to as the + `initialization + period `__. + Specifying an accurate initialization period improves + autoscaler decisions. For example, when scaling out, the + autoscaler ignores data from VMs that are still initializing + because those VMs might not yet represent normal usage of + your application. The default initialization period is 60 + seconds. + + Initialization periods might vary because of numerous + factors. We recommend that you test how long your + application takes to initialize. To do this, create a VM and + time your application's startup process. + + This field is a member of `oneof`_ ``_cool_down_period_sec``. + cpu_utilization (google.cloud.compute_v1beta.types.AutoscalingPolicyCpuUtilization): + Defines the CPU utilization policy that + allows the autoscaler to scale based on the + average CPU utilization of a managed instance + group. + + This field is a member of `oneof`_ ``_cpu_utilization``. + custom_metric_utilizations (MutableSequence[google.cloud.compute_v1beta.types.AutoscalingPolicyCustomMetricUtilization]): + Configuration parameters of autoscaling based + on a custom metric. + load_balancing_utilization (google.cloud.compute_v1beta.types.AutoscalingPolicyLoadBalancingUtilization): + Configuration parameters of autoscaling based + on load balancer. + + This field is a member of `oneof`_ ``_load_balancing_utilization``. + max_num_replicas (int): + The maximum number of instances that the + autoscaler can scale out to. This is required + when creating or updating an autoscaler. The + maximum number of replicas must not be lower + than minimal number of replicas. + + This field is a member of `oneof`_ ``_max_num_replicas``. + min_num_replicas (int): + The minimum number of replicas that the + autoscaler can scale in to. This cannot be less + than 0. If not provided, autoscaler chooses a + default value depending on maximum number of + instances allowed. + + This field is a member of `oneof`_ ``_min_num_replicas``. + mode (str): + Defines the operating mode for this policy. The following + modes are available: + + :: + + - OFF: Disables the autoscaler but maintains its + configuration. + - ONLY_SCALE_OUT: Restricts the autoscaler to add + VM instances only. + - ON: Enables all autoscaler activities according to its + policy. + + For more information, see "Turning off or restricting an + autoscaler" Check the Mode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_mode``. + scale_down_control (google.cloud.compute_v1beta.types.AutoscalingPolicyScaleDownControl): + + This field is a member of `oneof`_ ``_scale_down_control``. + scale_in_control (google.cloud.compute_v1beta.types.AutoscalingPolicyScaleInControl): + + This field is a member of `oneof`_ ``_scale_in_control``. + scaling_schedules (MutableMapping[str, google.cloud.compute_v1beta.types.AutoscalingPolicyScalingSchedule]): + Scaling schedules defined for an autoscaler. Multiple + schedules can be set on an autoscaler, and they can overlap. + During overlapping periods the greatest + min_required_replicas of all scaling schedules is applied. + Up to 128 scaling schedules are allowed. """ - resource_manager_tags: MutableMapping[str, str] = proto.MapField( + class Mode(proto.Enum): + r"""Defines the operating mode for this policy. The following modes are + available: + + :: + + - OFF: Disables the autoscaler but maintains its + configuration. + - ONLY_SCALE_OUT: Restricts the autoscaler to add + VM instances only. + - ON: Enables all autoscaler activities according to its + policy. + + For more information, see "Turning off or restricting an autoscaler" + + Values: + UNDEFINED_MODE (0): + A value indicating that the enum field is not + set. + OFF (78159): + Do not automatically scale the MIG in or out. The + recommended_size field contains the size of MIG that would + be set if the actuation mode was enabled. + ON (2527): + Automatically scale the MIG in and out + according to the policy. + ONLY_SCALE_OUT (152713670): + Automatically create VMs according to the + policy, but do not scale the MIG in. + ONLY_UP (478095374): + Automatically create VMs according to the + policy, but do not scale the MIG in. + """ + UNDEFINED_MODE = 0 + OFF = 78159 + ON = 2527 + ONLY_SCALE_OUT = 152713670 + ONLY_UP = 478095374 + + cool_down_period_sec: int = proto.Field( + proto.INT32, + number=107692954, + optional=True, + ) + cpu_utilization: "AutoscalingPolicyCpuUtilization" = proto.Field( + proto.MESSAGE, + number=381211147, + optional=True, + message="AutoscalingPolicyCpuUtilization", + ) + custom_metric_utilizations: MutableSequence[ + "AutoscalingPolicyCustomMetricUtilization" + ] = proto.RepeatedField( + proto.MESSAGE, + number=131972850, + message="AutoscalingPolicyCustomMetricUtilization", + ) + load_balancing_utilization: "AutoscalingPolicyLoadBalancingUtilization" = ( + proto.Field( + proto.MESSAGE, + number=429746403, + optional=True, + message="AutoscalingPolicyLoadBalancingUtilization", + ) + ) + max_num_replicas: int = proto.Field( + proto.INT32, + number=62327375, + optional=True, + ) + min_num_replicas: int = proto.Field( + proto.INT32, + number=535329825, + optional=True, + ) + mode: str = proto.Field( proto.STRING, + number=3357091, + optional=True, + ) + scale_down_control: "AutoscalingPolicyScaleDownControl" = proto.Field( + proto.MESSAGE, + number=412071829, + optional=True, + message="AutoscalingPolicyScaleDownControl", + ) + scale_in_control: "AutoscalingPolicyScaleInControl" = proto.Field( + proto.MESSAGE, + number=527670872, + optional=True, + message="AutoscalingPolicyScaleInControl", + ) + scaling_schedules: MutableMapping[ + str, "AutoscalingPolicyScalingSchedule" + ] = proto.MapField( proto.STRING, - number=377671164, + proto.MESSAGE, + number=355416580, + message="AutoscalingPolicyScalingSchedule", ) -class BackendBucketUsedBy(proto.Message): - r""" +class AutoscalingPolicyCpuUtilization(proto.Message): + r"""CPU utilization policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - reference (str): - [Output Only] Server-defined URL for UrlMaps referencing - that BackendBucket. + predictive_method (str): + Indicates whether predictive autoscaling based on CPU metric + is enabled. Valid values are: - This field is a member of `oneof`_ ``_reference``. + - NONE (default). No predictive method is used. The + autoscaler scales the group to meet current demand based + on real-time metrics. + - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves + availability by monitoring daily and weekly load patterns + and scaling out ahead of anticipated demand. Check the + PredictiveMethod enum for the list of possible values. + + This field is a member of `oneof`_ ``_predictive_method``. + utilization_target (float): + The target CPU utilization that the autoscaler maintains. + Must be a float value in the range (0, 1]. If not specified, + the default is0.6. + + If the CPU level is below the target utilization, the + autoscaler scales in the number of instances until it + reaches the minimum number of instances you specified or + until the average CPU of your instances reaches the target + utilization. + + If the average CPU is above the target utilization, the + autoscaler scales out until it reaches the maximum number of + instances you specified or until the average utilization + reaches the target utilization. + + This field is a member of `oneof`_ ``_utilization_target``. """ - reference: str = proto.Field( + class PredictiveMethod(proto.Enum): + r"""Indicates whether predictive autoscaling based on CPU metric is + enabled. Valid values are: + + - NONE (default). No predictive method is used. The autoscaler + scales the group to meet current demand based on real-time + metrics. + - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves + availability by monitoring daily and weekly load patterns and + scaling out ahead of anticipated demand. + + Values: + UNDEFINED_PREDICTIVE_METHOD (0): + A value indicating that the enum field is not + set. + NONE (2402104): + No predictive method is used. The autoscaler + scales the group to meet current demand based on + real-time metrics + OPTIMIZE_AVAILABILITY (11629437): + Predictive autoscaling improves availability + by monitoring daily and weekly load patterns and + scaling out ahead of anticipated demand. + PREDICTIVE_METHOD_UNSPECIFIED (52410265): + No description available. + """ + UNDEFINED_PREDICTIVE_METHOD = 0 + NONE = 2402104 + OPTIMIZE_AVAILABILITY = 11629437 + PREDICTIVE_METHOD_UNSPECIFIED = 52410265 + + predictive_method: str = proto.Field( proto.STRING, - number=148586315, + number=390220737, + optional=True, + ) + utilization_target: float = proto.Field( + proto.DOUBLE, + number=215905870, optional=True, ) -class BackendCustomMetric(proto.Message): - r"""Custom Metrics are used for CUSTOM_METRICS balancing_mode. +class AutoscalingPolicyCustomMetricUtilization(proto.Message): + r"""Custom utilization metric policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - dry_run (bool): - If true, the metric data is collected and - reported to Cloud Monitoring, but is not used - for load balancing. + filter (str): + A filter string, compatible with a Stackdriver + Monitoringfilter string forTimeSeries.list API call. This + filter is used to select a specific TimeSeries for the + purpose of autoscaling and to determine whether the metric + is exporting per-instance or per-group data. + + For the filter to be valid for autoscaling purposes, the + following rules apply: + + :: + + - You can only use the AND operator for joining + selectors. + - You can only use direct equality comparison operator + (=) without any functions for each selector. + - You can specify the metric in both the filter string and in the + metric field. However, if specified in both places, the metric must + be identical. + - The monitored resource type + determines what kind of values are expected for the metric. If it is + a gce_instance, the autoscaler expects the metric to + include a separate TimeSeries for each instance in a group. In such a + case, you cannot filter on resource labels. + + + If the resource type is any other value, the autoscaler expects + this metric to contain values that apply to the entire autoscaled + instance group and resource label filtering can be performed to + point autoscaler at the correct TimeSeries to scale upon. This is + called a *per-group metric* for the purpose of autoscaling. + + If not specified, the type defaults to + gce_instance. + + Try to provide a filter that is selective enough to pick + just one TimeSeries for the autoscaled group or for each of + the instances (if you are using gce_instance resource type). + If multiple TimeSeries are returned upon the query + execution, the autoscaler will sum their respective values + to obtain its scaling value. - This field is a member of `oneof`_ ``_dry_run``. - max_utilization (float): - Optional parameter to define a target utilization for the - Custom Metrics balancing mode. The valid range is [0.0, - 1.0]. + This field is a member of `oneof`_ ``_filter``. + metric (str): + The identifier (type) of the Stackdriver + Monitoring metric. The metric cannot have + negative values. - This field is a member of `oneof`_ ``_max_utilization``. - name (str): - Name of a custom utilization signal. The name must be 1-64 - characters long and match the regular expression - `a-z <[-_.a-z0-9]*[a-z0-9]>`__? which means that the first - character must be a lowercase letter, and all following - characters must be a dash, period, underscore, lowercase - letter, or digit, except the last character, which cannot be - a dash, period, or underscore. For usage guidelines, see - Custom Metrics balancing mode. This field can only be used - for a global or regional backend service with the - loadBalancingScheme set to EXTERNAL_MANAGED, - INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + The metric must have a value type of INT64 + orDOUBLE. - This field is a member of `oneof`_ ``_name``. + This field is a member of `oneof`_ ``_metric``. + single_instance_assignment (float): + If scaling is based on a per-group metric value that + represents the total amount of work to be done or resource + usage, set this value to an amount assigned for a single + instance of the scaled group. Autoscaler keeps the number of + instances proportional to the value of this metric. The + metric itself does not change value due to group resizing. + + A good metric to use with the target is for + examplepubsub.googleapis.com/subscription/num_undelivered_messages + or a custom metric exporting the total number of requests + coming to your instances. + + A bad example would be a metric exporting an average or + median latency, since this value can't include a chunk + assignable to a single instance, it could be better used + with utilization_target instead. + + This field is a member of `oneof`_ ``_single_instance_assignment``. + utilization_target (float): + The target value of the metric that autoscaler maintains. + This must be a positive value. A utilization metric scales + number of virtual machines handling requests to increase or + decrease proportionally to the metric. + + For example, a good metric to use as a utilization_target + ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count. + The autoscaler works to keep this value constant for each of + the instances. + + This field is a member of `oneof`_ ``_utilization_target``. + utilization_target_type (str): + Defines how target utilization value is expressed for a + Stackdriver Monitoring metric. Either + GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE. Check the + UtilizationTargetType enum for the list of possible values. + + This field is a member of `oneof`_ ``_utilization_target_type``. """ - dry_run: bool = proto.Field( - proto.BOOL, - number=323854839, + class UtilizationTargetType(proto.Enum): + r"""Defines how target utilization value is expressed for a Stackdriver + Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or + DELTA_PER_MINUTE. + + Values: + UNDEFINED_UTILIZATION_TARGET_TYPE (0): + A value indicating that the enum field is not + set. + DELTA_PER_MINUTE (87432861): + Sets the utilization target value for a + cumulative or delta metric, expressed as the + rate of growth per minute. + DELTA_PER_SECOND (255180029): + Sets the utilization target value for a + cumulative or delta metric, expressed as the + rate of growth per second. + GAUGE (67590361): + Sets the utilization target value for a gauge + metric. The autoscaler will collect the average + utilization of the virtual machines from the + last couple of minutes, and compare the value to + the utilization target value to perform + autoscaling. + """ + UNDEFINED_UTILIZATION_TARGET_TYPE = 0 + DELTA_PER_MINUTE = 87432861 + DELTA_PER_SECOND = 255180029 + GAUGE = 67590361 + + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - max_utilization: float = proto.Field( - proto.FLOAT, - number=148192199, + metric: str = proto.Field( + proto.STRING, + number=533067184, optional=True, ) - name: str = proto.Field( + single_instance_assignment: float = proto.Field( + proto.DOUBLE, + number=504768064, + optional=True, + ) + utilization_target: float = proto.Field( + proto.DOUBLE, + number=215905870, + optional=True, + ) + utilization_target_type: str = proto.Field( proto.STRING, - number=3373707, + number=340169355, optional=True, ) -class BackendService(proto.Message): - r"""Represents a Backend Service resource. A backend service defines how - Google Cloud load balancers distribute traffic. The backend service - configuration contains a set of values, such as the protocol used to - connect to backends, various distribution and session settings, - health checks, and timeouts. These settings provide fine-grained - control over how your load balancer behaves. Most of the settings - have default values that allow for easy configuration if you need to - get started quickly. Backend services in Google Compute Engine can - be either regionally or globally scoped. \* - `Global `__ - \* - `Regional `__ - For more information, see Backend Services. +class AutoscalingPolicyLoadBalancingUtilization(proto.Message): + r"""Configuration parameters of autoscaling based on load + balancing. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - affinity_cookie_ttl_sec (int): - Lifetime of cookies in seconds. This setting is applicable - to Application Load Balancers and Traffic Director and - requires GENERATED_COOKIE or HTTP_COOKIE session affinity. - If set to 0, the cookie is non-persistent and lasts only - until the end of the browser session (or equivalent). The - maximum allowed value is two weeks (1,209,600). Not - supported when the backend service is referenced by a URL - map that is bound to target gRPC proxy that has - validateForProxyless field set to true. + utilization_target (float): + Fraction of backend capacity utilization (set + in HTTP(S) load balancing configuration) that + the autoscaler maintains. Must be a positive + float value. If not defined, the default is 0.8. - This field is a member of `oneof`_ ``_affinity_cookie_ttl_sec``. - backends (MutableSequence[google.cloud.compute_v1beta.types.Backend]): - The list of backends that serve this - BackendService. - cdn_policy (google.cloud.compute_v1beta.types.BackendServiceCdnPolicy): - Cloud CDN configuration for this - BackendService. Only available for specified - load balancer types. + This field is a member of `oneof`_ ``_utilization_target``. + """ - This field is a member of `oneof`_ ``_cdn_policy``. - circuit_breakers (google.cloud.compute_v1beta.types.CircuitBreakers): + utilization_target: float = proto.Field( + proto.DOUBLE, + number=215905870, + optional=True, + ) - This field is a member of `oneof`_ ``_circuit_breakers``. - compression_mode (str): - Compress text responses using Brotli or gzip - compression, based on the client's - Accept-Encoding header. Check the - CompressionMode enum for the list of possible - values. - This field is a member of `oneof`_ ``_compression_mode``. - connection_draining (google.cloud.compute_v1beta.types.ConnectionDraining): - connectionDraining cannot be specified with - haPolicy. +class AutoscalingPolicyScaleDownControl(proto.Message): + r"""Configuration that allows for slower scale in so that even if + Autoscaler recommends an abrupt scale in of a MIG, it will be + throttled as specified by the parameters below. - This field is a member of `oneof`_ ``_connection_draining``. - connection_tracking_policy (google.cloud.compute_v1beta.types.BackendServiceConnectionTrackingPolicy): - Connection Tracking configuration for this - BackendService. Connection tracking policy - settings are only available for external - passthrough Network Load Balancers and internal - passthrough Network Load Balancers. - connectionTrackingPolicy cannot be specified - with haPolicy. - This field is a member of `oneof`_ ``_connection_tracking_policy``. - consistent_hash (google.cloud.compute_v1beta.types.ConsistentHashLoadBalancerSettings): - Consistent Hash-based load balancing can be used to provide - soft session affinity based on HTTP headers, cookies or - other properties. This load balancing policy is applicable - only for HTTP connections. The affinity to a particular - destination host will be lost when one or more hosts are - added/removed from the destination service. This field - specifies parameters that control consistent hashing. This - field is only applicable when localityLbPolicy is set to - MAGLEV or RING_HASH. This field is applicable to either: - A - regional backend service with the service_protocol set to - HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - INTERNAL_MANAGED. - A global backend service with the - load_balancing_scheme set to INTERNAL_SELF_MANAGED. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_consistent_hash``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Attributes: + max_scaled_down_replicas (google.cloud.compute_v1beta.types.FixedOrPercent): + Maximum allowed number (or %) of VMs that can + be deducted from the peak recommendation during + the window autoscaler looks at when computing + recommendations. Possibly all these VMs can be + deleted at once so user service needs to be + prepared to lose that many VMs in one step. - This field is a member of `oneof`_ ``_creation_timestamp``. - custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCustomMetric]): - List of custom metrics that are used for the - WEIGHTED_ROUND_ROBIN locality_lb_policy. - custom_request_headers (MutableSequence[str]): - Headers that the load balancer adds to proxied requests. See - `Creating custom - headers `__. - custom_response_headers (MutableSequence[str]): - Headers that the load balancer adds to proxied responses. - See `Creating custom - headers `__. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + This field is a member of `oneof`_ ``_max_scaled_down_replicas``. + time_window_sec (int): + How far back autoscaling looks when computing + recommendations to include directives regarding + slower scale in, as described above. - This field is a member of `oneof`_ ``_description``. - dynamic_forwarding (google.cloud.compute_v1beta.types.BackendServiceDynamicForwarding): - Dynamic forwarding configuration. This field - is used to configure the backend service with - dynamic forwarding feature which together with - Service Extension allows customized and complex - routing logic. + This field is a member of `oneof`_ ``_time_window_sec``. + """ - This field is a member of `oneof`_ ``_dynamic_forwarding``. - edge_security_policy (str): - [Output Only] The resource URL for the edge security policy - associated with this backend service. + max_scaled_down_replicas: "FixedOrPercent" = proto.Field( + proto.MESSAGE, + number=47461006, + optional=True, + message="FixedOrPercent", + ) + time_window_sec: int = proto.Field( + proto.INT32, + number=36405300, + optional=True, + ) - This field is a member of `oneof`_ ``_edge_security_policy``. - enable_c_d_n (bool): - If true, enables Cloud CDN for the backend - service of a global external Application Load - Balancer. - This field is a member of `oneof`_ ``_enable_c_d_n``. - external_managed_migration_state (str): - Specifies the canary migration state. Possible values are - PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin - the migration from EXTERNAL to EXTERNAL_MANAGED, the state - must be changed to PREPARE. The state must be changed to - TEST_ALL_TRAFFIC before the loadBalancingScheme can be - changed to EXTERNAL_MANAGED. Optionally, the - TEST_BY_PERCENTAGE state can be used to migrate traffic by - percentage using externalManagedMigrationTestingPercentage. - Rolling back a migration requires the states to be set in - reverse order. So changing the scheme from EXTERNAL_MANAGED - to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC - at the same time. Optionally, the TEST_BY_PERCENTAGE state - can be used to migrate some traffic back to EXTERNAL or - PREPARE can be used to migrate all traffic back to EXTERNAL. - Check the ExternalManagedMigrationState enum for the list of - possible values. +class AutoscalingPolicyScaleInControl(proto.Message): + r"""Configuration that allows for slower scale in so that even if + Autoscaler recommends an abrupt scale in of a MIG, it will be + throttled as specified by the parameters below. - This field is a member of `oneof`_ ``_external_managed_migration_state``. - external_managed_migration_testing_percentage (float): - Determines the fraction of requests that should be processed - by the Global external Application Load Balancer. The value - of this field must be in the range [0, 100]. Session - affinity options will slightly affect this routing behavior, - for more details, see: Session Affinity. This value can only - be set if the loadBalancingScheme in the BackendService is - set to EXTERNAL (when using the classic Application Load - Balancer) and the migration state is TEST_BY_PERCENTAGE. - This field is a member of `oneof`_ ``_external_managed_migration_testing_percentage``. - failover_policy (google.cloud.compute_v1beta.types.BackendServiceFailoverPolicy): - Requires at least one backend instance group to be defined - as a backup (failover) backend. For load balancers that have - configurable failover: `Internal passthrough Network Load - Balancers `__ - and `external passthrough Network Load - Balancers `__. - failoverPolicy cannot be specified with haPolicy. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_failover_policy``. - fingerprint (str): - Fingerprint of this resource. A hash of the - contents stored in this object. This field is - used in optimistic locking. This field will be - ignored when inserting a BackendService. An - up-to-date fingerprint must be provided in order - to update the BackendService, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - BackendService. + Attributes: + max_scaled_in_replicas (google.cloud.compute_v1beta.types.FixedOrPercent): + Maximum allowed number (or %) of VMs that can + be deducted from the peak recommendation during + the window autoscaler looks at when computing + recommendations. Possibly all these VMs can be + deleted at once so user service needs to be + prepared to lose that many VMs in one step. - This field is a member of `oneof`_ ``_fingerprint``. - ha_policy (google.cloud.compute_v1beta.types.BackendServiceHAPolicy): - Configures self-managed High Availability (HA) for External - and Internal Protocol Forwarding. The backends of this - regional backend service must only specify zonal network - endpoint groups (NEGs) of type GCE_VM_IP. When haPolicy is - set for an Internal Passthrough Network Load Balancer, the - regional backend service must set the network field. All - zonal NEGs must belong to the same network. However, - individual NEGs can belong to different subnetworks of that - network. When haPolicy is specified, the set of attached - network endpoints across all backends comprise an High - Availability domain from which one endpoint is selected as - the active endpoint (the leader) that receives all traffic. - haPolicy can be added only at backend service creation time. - Once set up, it cannot be deleted. Note that haPolicy is not - for load balancing, and therefore cannot be specified with - sessionAffinity, connectionTrackingPolicy, and - failoverPolicy. haPolicy requires customers to be - responsible for tracking backend endpoint health and - electing a leader among the healthy endpoints. Therefore, - haPolicy cannot be specified with healthChecks. haPolicy can - only be specified for External Passthrough Network Load - Balancers and Internal Passthrough Network Load Balancers. + This field is a member of `oneof`_ ``_max_scaled_in_replicas``. + time_window_sec (int): + How far back autoscaling looks when computing + recommendations to include directives regarding + slower scale in, as described above. - This field is a member of `oneof`_ ``_ha_policy``. - health_checks (MutableSequence[str]): - The list of URLs to the healthChecks, httpHealthChecks - (legacy), or httpsHealthChecks (legacy) resource for health - checking this backend service. Not all backend services - support legacy health checks. See Load balancer guide. - Currently, at most one health check can be specified for - each backend service. Backend services with instance group - or zonal NEG backends must have a health check unless - haPolicy is specified. Backend services with internet or - serverless NEG backends must not have a health check. - healthChecks[] cannot be specified with haPolicy. - iap (google.cloud.compute_v1beta.types.BackendServiceIAP): - The configurations for Identity-Aware Proxy - on this resource. Not available for internal - passthrough Network Load Balancers and external - passthrough Network Load Balancers. + This field is a member of `oneof`_ ``_time_window_sec``. + """ - This field is a member of `oneof`_ ``_iap``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + max_scaled_in_replicas: "FixedOrPercent" = proto.Field( + proto.MESSAGE, + number=180710123, + optional=True, + message="FixedOrPercent", + ) + time_window_sec: int = proto.Field( + proto.INT32, + number=36405300, + optional=True, + ) - This field is a member of `oneof`_ ``_id``. - ip_address_selection_policy (str): - Specifies a preference for traffic sent from the proxy to - the backend (or from the client to the backend for proxyless - gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 - traffic to the backends of the backend service (Instance - Group, Managed Instance Group, Network Endpoint Group), - regardless of traffic from the client to the proxy. Only - IPv4 health checks are used to check the health of the - backends. This is the default setting. - PREFER_IPV6: - Prioritize the connection to the endpoint's IPv6 address - over its IPv4 address (provided there is a healthy IPv6 - address). - IPV6_ONLY: Only send IPv6 traffic to the - backends of the backend service (Instance Group, Managed - Instance Group, Network Endpoint Group), regardless of - traffic from the client to the proxy. Only IPv6 health - checks are used to check the health of the backends. This - field is applicable to either: - Advanced global external - Application Load Balancer (load balancing scheme - EXTERNAL_MANAGED), - Regional external Application Load - Balancer, - Internal proxy Network Load Balancer (load - balancing scheme INTERNAL_MANAGED), - Regional internal - Application Load Balancer (load balancing scheme - INTERNAL_MANAGED), - Traffic Director with Envoy proxies and - proxyless gRPC (load balancing scheme - INTERNAL_SELF_MANAGED). Check the IpAddressSelectionPolicy - enum for the list of possible values. - This field is a member of `oneof`_ ``_ip_address_selection_policy``. - kind (str): - [Output Only] Type of resource. Always - compute#backendService for backend services. +class AutoscalingPolicyScalingSchedule(proto.Message): + r"""Scaling based on user-defined schedule. The message describes + a single scaling schedule. A scaling schedule changes the + minimum number of VM instances an autoscaler can recommend, + which can trigger scaling out. - This field is a member of `oneof`_ ``_kind``. - load_balancing_scheme (str): - Specifies the load balancer type. A backend - service created for one type of load balancer - cannot be used with another. For more - information, refer to Choosing a load balancer. - Check the LoadBalancingScheme enum for the list - of possible values. - This field is a member of `oneof`_ ``_load_balancing_scheme``. - locality_lb_policies (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfig]): - A list of locality load-balancing policies to be used in - order of preference. When you use localityLbPolicies, you - must set at least one value for either the - localityLbPolicies[].policy or the - localityLbPolicies[].customPolicy field. localityLbPolicies - overrides any value set in the localityLbPolicy field. For - an example of how to use this field, see Define a list of - preferred policies. Caution: This field and its children are - intended for use in a service mesh that includes gRPC - clients only. Envoy proxies can't use backend services that - have this configuration. - locality_lb_policy (str): - The load balancing algorithm used within the scope of the - locality. The possible values are: - ROUND_ROBIN: This is a - simple policy in which each healthy backend is selected in - round robin order. This is the default. - LEAST_REQUEST: An - O(1) algorithm which selects two random healthy hosts and - picks the host which has fewer active requests. - RING_HASH: - The ring/modulo hash load balancer implements consistent - hashing to backends. The algorithm has the property that the - addition/removal of a host from a set of N hosts only - affects 1/N of the requests. - RANDOM: The load balancer - selects a random healthy host. - ORIGINAL_DESTINATION: - Backend host is selected based on the client connection - metadata, i.e., connections are opened to the same address - as the destination address of the incoming connection before - the connection was redirected to the load balancer. - - MAGLEV: used as a drop in replacement for the ring hash load - balancer. Maglev is not as stable as ring hash but has - faster table lookup build times and host selection times. - For more information about Maglev, see Maglev: A Fast and - Reliable Software Network Load Balancer. - - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load - Balancing using weights computed from Backend reported - Custom Metrics. If set, the Backend Service responses are - expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to use for - computing the weights are specified via the customMetrics - field. This field is applicable to either: - A regional - backend service with the service_protocol set to HTTP, - HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - INTERNAL_MANAGED. - A global backend service with the - load_balancing_scheme set to INTERNAL_SELF_MANAGED, - INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is - not configured—that is, if session affinity remains at the - default value of NONE—then the default value for - localityLbPolicy is ROUND_ROBIN. If session affinity is set - to a value other than NONE, then the default value for - localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH - are supported when the backend service is referenced by a - URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. localityLbPolicy - cannot be specified with haPolicy. Check the - LocalityLbPolicy enum for the list of possible values. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_locality_lb_policy``. - log_config (google.cloud.compute_v1beta.types.BackendServiceLogConfig): - This field denotes the logging options for - the load balancer traffic served by this backend - service. If logging is enabled, logs will be - exported to Stackdriver. + Attributes: + description (str): + A description of a scaling schedule. - This field is a member of `oneof`_ ``_log_config``. - max_stream_duration (google.cloud.compute_v1beta.types.Duration): - Specifies the default maximum duration (timeout) for streams - to this service. Duration is computed from the beginning of - the stream until the response has been completely processed, - including all retries. A stream that does not complete in - this duration is closed. If not specified, there will be no - timeout limit, i.e. the maximum duration is infinite. This - value can be overridden in the PathMatcher configuration of - the UrlMap that references this backend service. This field - is only allowed when the loadBalancingScheme of the backend - service is INTERNAL_SELF_MANAGED. + This field is a member of `oneof`_ ``_description``. + disabled (bool): + A boolean value that specifies whether a + scaling schedule can influence autoscaler + recommendations. If set to true, then a scaling + schedule has no effect. This field is optional, + and its value is false by default. - This field is a member of `oneof`_ ``_max_stream_duration``. - metadatas (MutableMapping[str, str]): - Deployment metadata associated with the - resource to be set by a GKE hub controller and - read by the backend RCTH - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + This field is a member of `oneof`_ ``_disabled``. + duration_sec (int): + The duration of time intervals, in seconds, + for which this scaling schedule is to run. The + minimum allowed value is 300. This field is + required. - This field is a member of `oneof`_ ``_name``. - network (str): - The URL of the network to which this backend - service belongs. This field must be set for - Internal Passthrough Network Load Balancers when - the haPolicy is enabled, and for External - Passthrough Network Load Balancers when the - haPolicy fastIpMove is enabled. This field can - only be specified when the load balancing scheme - is set to INTERNAL, or when the load balancing - scheme is set to EXTERNAL and haPolicy - fastIpMove is enabled. + This field is a member of `oneof`_ ``_duration_sec``. + min_required_replicas (int): + The minimum number of VM instances that the + autoscaler will recommend in time intervals + starting according to schedule. This field is + required. - This field is a member of `oneof`_ ``_network``. - network_pass_through_lb_traffic_policy (google.cloud.compute_v1beta.types.BackendServiceNetworkPassThroughLbTrafficPolicy): - Configures traffic steering properties of - internal passthrough Network Load Balancers. - networkPassThroughLbTrafficPolicy cannot be - specified with haPolicy. + This field is a member of `oneof`_ ``_min_required_replicas``. + schedule (str): + The start timestamps of time intervals when this scaling + schedule is to provide a scaling signal. This field uses the + extended cron format (with an optional year field). The + expression can describe a single timestamp if the optional + year is set, in which case the scaling schedule runs once. + The schedule is interpreted with respect to time_zone. This + field is required. Note: These timestamps only describe when + autoscaler starts providing the scaling signal. The VMs need + additional time to become serving. - This field is a member of `oneof`_ ``_network_pass_through_lb_traffic_policy``. - outlier_detection (google.cloud.compute_v1beta.types.OutlierDetection): - Settings controlling the ejection of unhealthy backend - endpoints from the load balancing pool of each individual - proxy instance that processes the traffic for the given - backend service. If not set, this feature is considered - disabled. Results of the outlier detection algorithm - (ejection of endpoints from the load balancing pool and - returning them back to the pool) are executed independently - by each proxy instance of the load balancer. In most cases, - more than one proxy instance handles the traffic received by - a backend service. Thus, it is possible that an unhealthy - endpoint is detected and ejected by only some of the - proxies, and while this happens, other proxies may continue - to send requests to the same unhealthy endpoint until they - detect and eject the unhealthy endpoint. Applicable backend - endpoints can be: - VM instances in an Instance Group - - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - - Endpoints in a Hybrid Connectivity NEG - (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to - Cloud Run, App Engine, or Cloud Functions Services - Private - Service Connect NEGs, that resolve to Google-managed - regional API endpoints or managed services published using - Private Service Connect Applicable backend service types can - be: - A global backend service with the loadBalancingScheme - set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A - regional backend service with the serviceProtocol set to - HTTP, HTTPS, HTTP2 or H2C, and loadBalancingScheme set to - INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for - Serverless NEGs. Not supported when the backend service is - referenced by a URL map that is bound to target gRPC proxy - that has validateForProxyless field set to true. + This field is a member of `oneof`_ ``_schedule``. + time_zone (str): + The time zone to use when interpreting the schedule. The + value of this field must be a time zone name from the tz + database: https://en.wikipedia.org/wiki/Tz_database. This + field is assigned a default value of "UTC" if left empty. - This field is a member of `oneof`_ ``_outlier_detection``. - params (google.cloud.compute_v1beta.types.BackendServiceParams): - Input only. [Input Only] Additional params passed with the - request, but not persisted as part of resource payload. + This field is a member of `oneof`_ ``_time_zone``. + """ - This field is a member of `oneof`_ ``_params``. - port (int): - Deprecated in favor of portName. The TCP port - to connect on the backend. The default value is - 80. For internal passthrough Network Load - Balancers and external passthrough Network Load - Balancers, omit port. + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + disabled: bool = proto.Field( + proto.BOOL, + number=270940796, + optional=True, + ) + duration_sec: int = proto.Field( + proto.INT32, + number=212356902, + optional=True, + ) + min_required_replicas: int = proto.Field( + proto.INT32, + number=365514414, + optional=True, + ) + schedule: str = proto.Field( + proto.STRING, + number=375820951, + optional=True, + ) + time_zone: str = proto.Field( + proto.STRING, + number=36848094, + optional=True, + ) - This field is a member of `oneof`_ ``_port``. - port_name (str): - A named port on a backend instance group representing the - port for communication to the backend VMs in that group. The - named port must be `defined on each backend instance - group `__. - This parameter has no meaning if the backends are NEGs. For - internal passthrough Network Load Balancers and external - passthrough Network Load Balancers, omit port_name. - This field is a member of `oneof`_ ``_port_name``. - protocol (str): - The protocol this BackendService uses to - communicate with backends. Possible values are - HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC. - depending on the chosen load balancer or Traffic - Director configuration. Refer to the - documentation for the load balancers or for - Traffic Director for more information. Must be - set to GRPC when the backend service is - referenced by a URL map that is bound to target - gRPC proxy. Check the Protocol enum for the list - of possible values. +class Backend(proto.Message): + r"""Message containing information of one individual backend. - This field is a member of `oneof`_ ``_protocol``. - region (str): - [Output Only] URL of the region where the regional backend - service resides. This field is not applicable to global - backend services. You must specify this field as part of the - HTTP request URL. It is not settable as a field in the - request body. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_region``. - security_policy (str): - [Output Only] The resource URL for the security policy - associated with this backend service. + Attributes: + balancing_mode (str): + Specifies how to determine whether the + backend of a load balancer can handle additional + traffic or is fully loaded. For usage + guidelines, see Connection balancing mode. - This field is a member of `oneof`_ ``_security_policy``. - security_settings (google.cloud.compute_v1beta.types.SecuritySettings): - This field specifies the security settings that apply to - this backend service. This field is applicable to a global - backend service with the load_balancing_scheme set to - INTERNAL_SELF_MANAGED. + Backends must use compatible balancing modes. + For more information, see Supported balancing + modes and target capacity settings and + Restrictions and guidance for instance groups. - This field is a member of `oneof`_ ``_security_settings``. - self_link (str): - [Output Only] Server-defined URL for the resource. + Note: Currently, if you use the API to configure + incompatible balancing modes, the configuration + might be accepted even though it has no impact + and is ignored. Specifically, + Backend.maxUtilization is ignored when + Backend.balancingMode is RATE. In the future, + this incompatible combination will be rejected. + Check the BalancingMode enum for the list of + possible values. - This field is a member of `oneof`_ ``_self_link``. - service_bindings (MutableSequence[str]): - URLs of networkservices.ServiceBinding resources. Can only - be set if load balancing scheme is INTERNAL_SELF_MANAGED. If - set, lists of backends and health checks must be both empty. - service_lb_policy (str): - URL to networkservices.ServiceLbPolicy resource. Can only be - set if load balancing scheme is EXTERNAL_MANAGED, - INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is - global. + This field is a member of `oneof`_ ``_balancing_mode``. + capacity_scaler (float): + A multiplier applied to the backend's target capacity of its + balancing mode. The default value is 1, which means the + group serves up to 100% of its configured capacity + (depending onbalancingMode). A setting of 0 means the group + is completely drained, offering 0% of its available + capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot + configure a setting larger than 0 and smaller than0.1. You + cannot configure a setting of 0 when there is only one + backend attached to the backend service. - This field is a member of `oneof`_ ``_service_lb_policy``. - session_affinity (str): - Type of session affinity to use. The default is NONE. Only - NONE and HEADER_FIELD are supported when the backend service - is referenced by a URL map that is bound to target gRPC - proxy that has validateForProxyless field set to true. For - more details, see: `Session - Affinity `__. - sessionAffinity cannot be specified with haPolicy. Check the - SessionAffinity enum for the list of possible values. + Not available with backends that don't support using + abalancingMode. This includes backends such as global + internet NEGs, regional serverless NEGs, and PSC NEGs. - This field is a member of `oneof`_ ``_session_affinity``. - strong_session_affinity_cookie (google.cloud.compute_v1beta.types.BackendServiceHttpCookie): - Describes the HTTP cookie used for stateful session - affinity. This field is applicable and required if the - sessionAffinity is set to STRONG_COOKIE_AFFINITY. + This field is a member of `oneof`_ ``_capacity_scaler``. + custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendCustomMetric]): + List of custom metrics that are used for CUSTOM_METRICS + BalancingMode. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - This field is a member of `oneof`_ ``_strong_session_affinity_cookie``. - subsetting (google.cloud.compute_v1beta.types.Subsetting): - subsetting cannot be specified with haPolicy. + This field is a member of `oneof`_ ``_description``. + failover (bool): + This field designates whether this is a + failover backend. More than one failover backend + can be configured for a given BackendService. - This field is a member of `oneof`_ ``_subsetting``. - timeout_sec (int): - The backend service timeout has a different - meaning depending on the type of load balancer. - For more information see, Backend service - settings. The default is 30 seconds. The full - range of timeout values allowed goes from 1 - through 2,147,483,647 seconds. This value can be - overridden in the PathMatcher configuration of - the UrlMap that references this backend service. - Not supported when the backend service is - referenced by a URL map that is bound to target - gRPC proxy that has validateForProxyless field - set to true. Instead, use maxStreamDuration. + This field is a member of `oneof`_ ``_failover``. + group (str): + The fully-qualified URL of aninstance group or network + endpoint group (NEG) resource. To determine what types of + backends a load balancer supports, see the `Backend services + overview `__. - This field is a member of `oneof`_ ``_timeout_sec``. - tls_settings (google.cloud.compute_v1beta.types.BackendServiceTlsSettings): - Configuration for Backend Authenticated TLS - and mTLS. May only be specified when the backend - protocol is SSL, HTTPS or HTTP2. + You must use the *fully-qualified* URL (starting + withhttps://www.googleapis.com/) to specify the instance + group or NEG. Partial URLs are not supported. - This field is a member of `oneof`_ ``_tls_settings``. - used_by (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceUsedBy]): - [Output Only] List of resources referencing given backend - service. + If haPolicy is specified, backends must refer to NEG + resources of type GCE_VM_IP. + + This field is a member of `oneof`_ ``_group``. + max_connections (int): + Defines a target maximum number of + simultaneous connections. For usage guidelines, + seeConnection balancing mode and Utilization + balancing mode. Not available if the + backend'sbalancingMode is RATE. + + This field is a member of `oneof`_ ``_max_connections``. + max_connections_per_endpoint (int): + Defines a target maximum number of + simultaneous connections. For usage guidelines, + seeConnection balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isRATE. + + This field is a member of `oneof`_ ``_max_connections_per_endpoint``. + max_connections_per_instance (int): + Defines a target maximum number of + simultaneous connections. For usage guidelines, + seeConnection balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isRATE. + + This field is a member of `oneof`_ ``_max_connections_per_instance``. + max_in_flight_requests (int): + Defines a maximum number of in-flight + requests for the whole NEG or instance group. + Not available if backend's balancingMode isRATE + or CONNECTION. + + This field is a member of `oneof`_ ``_max_in_flight_requests``. + max_in_flight_requests_per_endpoint (int): + Defines a maximum number of in-flight + requests for a single endpoint. Not available if + backend's balancingMode is RATE or CONNECTION. + + This field is a member of `oneof`_ ``_max_in_flight_requests_per_endpoint``. + max_in_flight_requests_per_instance (int): + Defines a maximum number of in-flight + requests for a single VM. Not available if + backend's balancingMode is RATE or CONNECTION. + + This field is a member of `oneof`_ ``_max_in_flight_requests_per_instance``. + max_rate (int): + Defines a maximum number of HTTP requests per + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. + + This field is a member of `oneof`_ ``_max_rate``. + max_rate_per_endpoint (float): + Defines a maximum target for requests per + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. + + This field is a member of `oneof`_ ``_max_rate_per_endpoint``. + max_rate_per_instance (float): + Defines a maximum target for requests per + second (RPS). For usage guidelines, seeRate + balancing mode and Utilization + balancing mode. + + Not available if the backend's balancingMode + isCONNECTION. + + This field is a member of `oneof`_ ``_max_rate_per_instance``. + max_utilization (float): + Optional parameter to define a target capacity for + theUTILIZATION balancing mode. The valid range is[0.0, 1.0]. + + For usage guidelines, seeUtilization balancing mode. + + This field is a member of `oneof`_ ``_max_utilization``. + preference (str): + This field indicates whether this backend + should be fully utilized before sending traffic + to backends with default preference. The + possible values are: + + - PREFERRED: Backends with this preference + level will be filled up to their capacity + limits first, based on RTT. + - DEFAULT: If preferred backends don't have + enough capacity, backends in this layer + would be used and traffic would be assigned + based on the load balancing algorithm you use. + This is the default + Check the Preference enum for the list of + possible values. + + This field is a member of `oneof`_ ``_preference``. + traffic_duration (str): + Check the TrafficDuration enum for the list + of possible values. + + This field is a member of `oneof`_ ``_traffic_duration``. """ - class CompressionMode(proto.Enum): - r"""Compress text responses using Brotli or gzip compression, - based on the client's Accept-Encoding header. + class BalancingMode(proto.Enum): + r"""Specifies how to determine whether the backend of a load + balancer can handle additional traffic or is fully loaded. For + usage guidelines, see Connection balancing mode. - Values: - UNDEFINED_COMPRESSION_MODE (0): - A value indicating that the enum field is not - set. - AUTOMATIC (165298699): - Automatically uses the best compression based - on the Accept-Encoding header sent by the - client. - DISABLED (516696700): - Disables compression. Existing compressed - responses cached by Cloud CDN will not be served - to clients. - """ - UNDEFINED_COMPRESSION_MODE = 0 - AUTOMATIC = 165298699 - DISABLED = 516696700 + Backends must use compatible balancing modes. For more + information, see Supported balancing modes and target capacity + settings and Restrictions and guidance for instance groups. - class ExternalManagedMigrationState(proto.Enum): - r"""Specifies the canary migration state. Possible values are PREPARE, - TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration - from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to - PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the - loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate traffic by - percentage using externalManagedMigrationTestingPercentage. Rolling - back a migration requires the states to be set in reverse order. So - changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the - state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate some traffic - back to EXTERNAL or PREPARE can be used to migrate all traffic back - to EXTERNAL. + Note: Currently, if you use the API to configure incompatible + balancing modes, the configuration might be accepted even though + it has no impact and is ignored. Specifically, + Backend.maxUtilization is ignored when Backend.balancingMode is + RATE. In the future, this incompatible combination will be + rejected. Values: - UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE (0): + UNDEFINED_BALANCING_MODE (0): A value indicating that the enum field is not set. - PREPARE (399612135): - No description available. - TEST_ALL_TRAFFIC (79728882): - No description available. - TEST_BY_PERCENTAGE (513738389): - No description available. + CONNECTION (246311646): + Balance based on the number of simultaneous + connections. + CUSTOM_METRICS (331575765): + Based on custom defined and reported metrics. + IN_FLIGHT (190040266): + Balance based on the number of in-flight + requests. + RATE (2508000): + Balance based on requests per second (RPS). + UTILIZATION (157008386): + Balance based on the backend utilization. """ - UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE = 0 - PREPARE = 399612135 - TEST_ALL_TRAFFIC = 79728882 - TEST_BY_PERCENTAGE = 513738389 + UNDEFINED_BALANCING_MODE = 0 + CONNECTION = 246311646 + CUSTOM_METRICS = 331575765 + IN_FLIGHT = 190040266 + RATE = 2508000 + UTILIZATION = 157008386 - class IpAddressSelectionPolicy(proto.Enum): - r"""Specifies a preference for traffic sent from the proxy to the - backend (or from the client to the backend for proxyless gRPC). The - possible values are: - IPV4_ONLY: Only send IPv4 traffic to the - backends of the backend service (Instance Group, Managed Instance - Group, Network Endpoint Group), regardless of traffic from the - client to the proxy. Only IPv4 health checks are used to check the - health of the backends. This is the default setting. - PREFER_IPV6: - Prioritize the connection to the endpoint's IPv6 address over its - IPv4 address (provided there is a healthy IPv6 address). - - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend - service (Instance Group, Managed Instance Group, Network Endpoint - Group), regardless of traffic from the client to the proxy. Only - IPv6 health checks are used to check the health of the backends. - This field is applicable to either: - Advanced global external - Application Load Balancer (load balancing scheme EXTERNAL_MANAGED), - - Regional external Application Load Balancer, - Internal proxy - Network Load Balancer (load balancing scheme INTERNAL_MANAGED), - - Regional internal Application Load Balancer (load balancing scheme - INTERNAL_MANAGED), - Traffic Director with Envoy proxies and - proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED). + class Preference(proto.Enum): + r"""This field indicates whether this backend should be fully + utilized before sending traffic to backends with default + preference. The possible values are: + + - PREFERRED: Backends with this preference level will be + filled up to their capacity limits first, based on RTT. + - DEFAULT: If preferred backends don't have enough + capacity, backends in this layer would be used and traffic + would be assigned based on the load balancing algorithm you + use. This is the default Values: - UNDEFINED_IP_ADDRESS_SELECTION_POLICY (0): + UNDEFINED_PREFERENCE (0): A value indicating that the enum field is not set. - IPV4_ONLY (22373798): - Only send IPv4 traffic to the backends of the - Backend Service (Instance Group, Managed - Instance Group, Network Endpoint Group) - regardless of traffic from the client to the - proxy. Only IPv4 health-checks are used to check - the health of the backends. This is the default - setting. - IPV6_ONLY (79632100): - Only send IPv6 traffic to the backends of the - Backend Service (Instance Group, Managed - Instance Group, Network Endpoint Group) - regardless of traffic from the client to the - proxy. Only IPv6 health-checks are used to check - the health of the backends. - IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED (36210144): - Unspecified IP address selection policy. - PREFER_IPV6 (408601302): - Prioritize the connection to the endpoints - IPv6 address over its IPv4 address (provided - there is a healthy IPv6 address). + DEFAULT (115302945): + No preference. + PREFERENCE_UNSPECIFIED (496219571): + If preference is unspecified, we set it to + the DEFAULT value + PREFERRED (418847841): + Traffic will be sent to this backend first. """ - UNDEFINED_IP_ADDRESS_SELECTION_POLICY = 0 - IPV4_ONLY = 22373798 - IPV6_ONLY = 79632100 - IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED = 36210144 - PREFER_IPV6 = 408601302 + UNDEFINED_PREFERENCE = 0 + DEFAULT = 115302945 + PREFERENCE_UNSPECIFIED = 496219571 + PREFERRED = 418847841 - class LoadBalancingScheme(proto.Enum): - r"""Specifies the load balancer type. A backend service created - for one type of load balancer cannot be used with another. For - more information, refer to Choosing a load balancer. + class TrafficDuration(proto.Enum): + r""" Values: - UNDEFINED_LOAD_BALANCING_SCHEME (0): + UNDEFINED_TRAFFIC_DURATION (0): A value indicating that the enum field is not set. - EXTERNAL (35607499): - Signifies that this will be used for classic - Application Load Balancers, global external - proxy Network Load Balancers, or external - passthrough Network Load Balancers. - EXTERNAL_MANAGED (512006923): - Signifies that this will be used for global - external Application Load Balancers, regional - external Application Load Balancers, or regional - external proxy Network Load Balancers. - INTERNAL (279295677): - Signifies that this will be used for internal - passthrough Network Load Balancers. - INTERNAL_MANAGED (37350397): - Signifies that this will be used for internal - Application Load Balancers. - INTERNAL_SELF_MANAGED (236211150): - Signifies that this will be used by Traffic - Director. - INVALID_LOAD_BALANCING_SCHEME (275352060): - No description available. + LONG (2342524): + Most of the requests are expected to take + more than multiple seconds to finish. + SHORT (78875740): + Most requests are expected to finish with a + sub-second latency. + TRAFFIC_DURATION_UNSPECIFIED (265201166): + Traffic duration is unspecified. """ - UNDEFINED_LOAD_BALANCING_SCHEME = 0 - EXTERNAL = 35607499 - EXTERNAL_MANAGED = 512006923 - INTERNAL = 279295677 - INTERNAL_MANAGED = 37350397 - INTERNAL_SELF_MANAGED = 236211150 - INVALID_LOAD_BALANCING_SCHEME = 275352060 + UNDEFINED_TRAFFIC_DURATION = 0 + LONG = 2342524 + SHORT = 78875740 + TRAFFIC_DURATION_UNSPECIFIED = 265201166 - class LocalityLbPolicy(proto.Enum): - r"""The load balancing algorithm used within the scope of the locality. - The possible values are: - ROUND_ROBIN: This is a simple policy in - which each healthy backend is selected in round robin order. This is - the default. - LEAST_REQUEST: An O(1) algorithm which selects two - random healthy hosts and picks the host which has fewer active - requests. - RING_HASH: The ring/modulo hash load balancer implements - consistent hashing to backends. The algorithm has the property that - the addition/removal of a host from a set of N hosts only affects - 1/N of the requests. - RANDOM: The load balancer selects a random - healthy host. - ORIGINAL_DESTINATION: Backend host is selected based - on the client connection metadata, i.e., connections are opened to - the same address as the destination address of the incoming - connection before the connection was redirected to the load - balancer. - MAGLEV: used as a drop in replacement for the ring hash - load balancer. Maglev is not as stable as ring hash but has faster - table lookup build times and host selection times. For more - information about Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted - Round Robin Load Balancing using weights computed from Backend - reported Custom Metrics. If set, the Backend Service responses are - expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to use for computing the - weights are specified via the customMetrics field. This field is - applicable to either: - A regional backend service with the - service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and - load_balancing_scheme set to INTERNAL_MANAGED. - A global backend - service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not - configured—that is, if session affinity remains at the default value - of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. - If session affinity is set to a value other than NONE, then the - default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and - RING_HASH are supported when the backend service is referenced by a - URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. localityLbPolicy cannot be - specified with haPolicy. + balancing_mode: str = proto.Field( + proto.STRING, + number=430286217, + optional=True, + ) + capacity_scaler: float = proto.Field( + proto.FLOAT, + number=315958157, + optional=True, + ) + custom_metrics: MutableSequence["BackendCustomMetric"] = proto.RepeatedField( + proto.MESSAGE, + number=429453813, + message="BackendCustomMetric", + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + failover: bool = proto.Field( + proto.BOOL, + number=138892530, + optional=True, + ) + group: str = proto.Field( + proto.STRING, + number=98629247, + optional=True, + ) + max_connections: int = proto.Field( + proto.INT32, + number=110652154, + optional=True, + ) + max_connections_per_endpoint: int = proto.Field( + proto.INT32, + number=216904604, + optional=True, + ) + max_connections_per_instance: int = proto.Field( + proto.INT32, + number=104671900, + optional=True, + ) + max_in_flight_requests: int = proto.Field( + proto.INT32, + number=273269332, + optional=True, + ) + max_in_flight_requests_per_endpoint: int = proto.Field( + proto.INT32, + number=307928706, + optional=True, + ) + max_in_flight_requests_per_instance: int = proto.Field( + proto.INT32, + number=195696002, + optional=True, + ) + max_rate: int = proto.Field( + proto.INT32, + number=408035035, + optional=True, + ) + max_rate_per_endpoint: float = proto.Field( + proto.FLOAT, + number=129832283, + optional=True, + ) + max_rate_per_instance: float = proto.Field( + proto.FLOAT, + number=17599579, + optional=True, + ) + max_utilization: float = proto.Field( + proto.FLOAT, + number=148192199, + optional=True, + ) + preference: str = proto.Field( + proto.STRING, + number=150781147, + optional=True, + ) + traffic_duration: str = proto.Field( + proto.STRING, + number=11618710, + optional=True, + ) - Values: - UNDEFINED_LOCALITY_LB_POLICY (0): - A value indicating that the enum field is not - set. - INVALID_LB_POLICY (323318707): - No description available. - LEAST_REQUEST (46604921): - An O(1) algorithm which selects two random - healthy hosts and picks the host which has fewer - active requests. - MAGLEV (119180266): - This algorithm implements consistent hashing - to backends. Maglev can be used as a drop in - replacement for the ring hash load balancer. - Maglev is not as stable as ring hash but has - faster table lookup build times and host - selection times. For more information about - Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. - ORIGINAL_DESTINATION (166297216): - Backend host is selected based on the client - connection metadata, i.e., connections are - opened to the same address as the destination - address of the incoming connection before the - connection was redirected to the load balancer. - RANDOM (262527171): - The load balancer selects a random healthy - host. - RING_HASH (432795069): - The ring/modulo hash load balancer implements - consistent hashing to backends. The algorithm - has the property that the addition/removal of a - host from a set of N hosts only affects 1/N of - the requests. - ROUND_ROBIN (153895801): - This is a simple policy in which each healthy - backend is selected in round robin order. This - is the default. - WEIGHTED_GCP_RENDEZVOUS (82501640): - Per-instance weighted Load Balancing via - health check reported weights. In internal - passthrough network load balancing, it is - weighted rendezvous hashing. This option is only - supported in internal passthrough network load - balancing. - WEIGHTED_MAGLEV (254930962): - Per-instance weighted Load Balancing via health check - reported weights. If set, the Backend Service must configure - a non legacy HTTP-based Health Check, and health check - replies are expected to contain non-standard HTTP response - header field X-Load-Balancing-Endpoint-Weight to specify the - per-instance weights. If set, Load Balancing is weighted - based on the per-instance weights reported in the last - processed health check replies, as long as every instance - either reported a valid weight or had UNAVAILABLE_WEIGHT. - Otherwise, Load Balancing remains equal-weight. This option - is only supported in Network Load Balancing. - WEIGHTED_ROUND_ROBIN (5584977): - Per-endpoint weighted round-robin Load - Balancing using weights computed from Backend - reported Custom Metrics. If set, the Backend - Service responses are expected to contain - non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to - use for computing the weights are specified via - the customMetrics fields. - """ - UNDEFINED_LOCALITY_LB_POLICY = 0 - INVALID_LB_POLICY = 323318707 - LEAST_REQUEST = 46604921 - MAGLEV = 119180266 - ORIGINAL_DESTINATION = 166297216 - RANDOM = 262527171 - RING_HASH = 432795069 - ROUND_ROBIN = 153895801 - WEIGHTED_GCP_RENDEZVOUS = 82501640 - WEIGHTED_MAGLEV = 254930962 - WEIGHTED_ROUND_ROBIN = 5584977 - class Protocol(proto.Enum): - r"""The protocol this BackendService uses to communicate with - backends. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, - UDP or GRPC. depending on the chosen load balancer or Traffic - Director configuration. Refer to the documentation for the load - balancers or for Traffic Director for more information. Must be - set to GRPC when the backend service is referenced by a URL map - that is bound to target gRPC proxy. +class BackendBucket(proto.Message): + r"""Represents a Cloud Storage Bucket resource. + + This Cloud Storage bucket resource is referenced by a URL map of + a load balancer. For more information, readBackend Buckets. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bucket_name (str): + Cloud Storage bucket name. + + This field is a member of `oneof`_ ``_bucket_name``. + cdn_policy (google.cloud.compute_v1beta.types.BackendBucketCdnPolicy): + Cloud CDN configuration for this + BackendBucket. + + This field is a member of `oneof`_ ``_cdn_policy``. + compression_mode (str): + Compress text responses using Brotli or gzip + compression, based on the client's + Accept-Encoding header. Check the + CompressionMode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_compression_mode``. + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + custom_response_headers (MutableSequence[str]): + Headers that the Application Load Balancer + should add to proxied responses. + description (str): + An optional textual description of the + resource; provided by the client when the + resource is created. + + This field is a member of `oneof`_ ``_description``. + edge_security_policy (str): + [Output Only] The resource URL for the edge security policy + associated with this backend bucket. + + This field is a member of `oneof`_ ``_edge_security_policy``. + enable_cdn (bool): + If true, enable Cloud CDN for this + BackendBucket. + + This field is a member of `oneof`_ ``_enable_cdn``. + id (int): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. Type of the resource. + + This field is a member of `oneof`_ ``_kind``. + load_balancing_scheme (str): + The value can only be INTERNAL_MANAGED for cross-region + internal layer 7 load balancer. + + If loadBalancingScheme is not specified, the backend bucket + can be used by classic global external load balancers, or + global application external load balancers, or both. Check + the LoadBalancingScheme enum for the list of possible + values. + + This field is a member of `oneof`_ ``_load_balancing_scheme``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + params (google.cloud.compute_v1beta.types.BackendBucketParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. + + This field is a member of `oneof`_ ``_params``. + region (str): + Output only. [Output Only] URL of the region where the + regional backend bucket resides. This field is not + applicable to global backend buckets. You must specify this + field as part of the HTTP request URL. It is not settable as + a field in the request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + used_by (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketUsedBy]): + Output only. [Output Only] List of resources referencing + that backend bucket. + """ + + class CompressionMode(proto.Enum): + r"""Compress text responses using Brotli or gzip compression, + based on the client's Accept-Encoding header. Values: - UNDEFINED_PROTOCOL (0): + UNDEFINED_COMPRESSION_MODE (0): A value indicating that the enum field is not set. - GRPC (2196510): - gRPC (available for Traffic Director). - H2C (70809): - HTTP2 over cleartext - HTTP (2228360): - No description available. - HTTP2 (69079210): - HTTP/2 with SSL. - HTTPS (69079243): - No description available. - SSL (82412): - TCP proxying with SSL. - TCP (82881): - TCP proxying or TCP pass-through. - UDP (83873): - UDP. - UNSPECIFIED (526786327): - If a Backend Service has UNSPECIFIED as its - protocol, it can be used with any L3/L4 - Forwarding Rules. + AUTOMATIC (165298699): + Automatically uses the best compression based + on the Accept-Encoding header sent by the + client. + DISABLED (516696700): + Disables compression. Existing compressed + responses cached by Cloud CDN will not be served + to clients. """ - UNDEFINED_PROTOCOL = 0 - GRPC = 2196510 - H2C = 70809 - HTTP = 2228360 - HTTP2 = 69079210 - HTTPS = 69079243 - SSL = 82412 - TCP = 82881 - UDP = 83873 - UNSPECIFIED = 526786327 + UNDEFINED_COMPRESSION_MODE = 0 + AUTOMATIC = 165298699 + DISABLED = 516696700 - class SessionAffinity(proto.Enum): - r"""Type of session affinity to use. The default is NONE. Only NONE and - HEADER_FIELD are supported when the backend service is referenced by - a URL map that is bound to target gRPC proxy that has - validateForProxyless field set to true. For more details, see: - `Session - Affinity `__. - sessionAffinity cannot be specified with haPolicy. + class LoadBalancingScheme(proto.Enum): + r"""The value can only be INTERNAL_MANAGED for cross-region internal + layer 7 load balancer. + + If loadBalancingScheme is not specified, the backend bucket can be + used by classic global external load balancers, or global + application external load balancers, or both. Values: - UNDEFINED_SESSION_AFFINITY (0): + UNDEFINED_LOAD_BALANCING_SCHEME (0): A value indicating that the enum field is not set. - CLIENT_IP (345665051): - 2-tuple hash on packet's source and - destination IP addresses. Connections from the - same source IP address to the same destination - IP address will be served by the same backend VM - while that VM remains healthy. - CLIENT_IP_NO_DESTINATION (106122516): - 1-tuple hash only on packet's source IP - address. Connections from the same source IP - address will be served by the same backend VM - while that VM remains healthy. This option can - only be used for Internal TCP/UDP Load - Balancing. - CLIENT_IP_PORT_PROTO (221722926): - 5-tuple hash on packet's source and - destination IP addresses, IP protocol, and - source and destination ports. Connections for - the same IP protocol from the same source IP - address and port to the same destination IP - address and port will be served by the same - backend VM while that VM remains healthy. This - option cannot be used for HTTP(S) load - balancing. - CLIENT_IP_PROTO (25322148): - 3-tuple hash on packet's source and - destination IP addresses, and IP protocol. - Connections for the same IP protocol from the - same source IP address to the same destination - IP address will be served by the same backend VM - while that VM remains healthy. This option - cannot be used for HTTP(S) load balancing. - GENERATED_COOKIE (370321204): - Hash based on a cookie generated by the L7 - loadbalancer. Only valid for HTTP(S) load - balancing. - HEADER_FIELD (200737960): - The hash is based on a user specified header - field. - HTTP_COOKIE (494981627): - The hash is based on a user provided cookie. - NONE (2402104): - No session affinity. Connections from the - same client IP may go to any instance in the - pool. - STRONG_COOKIE_AFFINITY (438628091): - Strong cookie-based affinity. Connections - bearing the same cookie will be served by the - same backend VM while that VM remains healthy, - as long as the cookie has not expired. + EXTERNAL_MANAGED (512006923): + Signifies that this will be used for regional + external Application Load Balancers. + INTERNAL_MANAGED (37350397): + Signifies that this will be used for internal + Application Load Balancers. """ - UNDEFINED_SESSION_AFFINITY = 0 - CLIENT_IP = 345665051 - CLIENT_IP_NO_DESTINATION = 106122516 - CLIENT_IP_PORT_PROTO = 221722926 - CLIENT_IP_PROTO = 25322148 - GENERATED_COOKIE = 370321204 - HEADER_FIELD = 200737960 - HTTP_COOKIE = 494981627 - NONE = 2402104 - STRONG_COOKIE_AFFINITY = 438628091 + UNDEFINED_LOAD_BALANCING_SCHEME = 0 + EXTERNAL_MANAGED = 512006923 + INTERNAL_MANAGED = 37350397 - affinity_cookie_ttl_sec: int = proto.Field( - proto.INT32, - number=369996954, + bucket_name: str = proto.Field( + proto.STRING, + number=283610048, optional=True, ) - backends: MutableSequence["Backend"] = proto.RepeatedField( - proto.MESSAGE, - number=510839903, - message="Backend", - ) - cdn_policy: "BackendServiceCdnPolicy" = proto.Field( + cdn_policy: "BackendBucketCdnPolicy" = proto.Field( proto.MESSAGE, number=213976452, optional=True, - message="BackendServiceCdnPolicy", - ) - circuit_breakers: "CircuitBreakers" = proto.Field( - proto.MESSAGE, - number=421340061, - optional=True, - message="CircuitBreakers", + message="BackendBucketCdnPolicy", ) compression_mode: str = proto.Field( proto.STRING, number=95520988, optional=True, ) - connection_draining: "ConnectionDraining" = proto.Field( - proto.MESSAGE, - number=461096747, - optional=True, - message="ConnectionDraining", - ) - connection_tracking_policy: "BackendServiceConnectionTrackingPolicy" = proto.Field( - proto.MESSAGE, - number=143994969, - optional=True, - message="BackendServiceConnectionTrackingPolicy", - ) - consistent_hash: "ConsistentHashLoadBalancerSettings" = proto.Field( - proto.MESSAGE, - number=905883, - optional=True, - message="ConsistentHashLoadBalancerSettings", - ) creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - custom_metrics: MutableSequence["BackendServiceCustomMetric"] = proto.RepeatedField( - proto.MESSAGE, - number=429453813, - message="BackendServiceCustomMetric", - ) - custom_request_headers: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=27977992, - ) custom_response_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=387539094, @@ -17904,218 +19375,61 @@ class SessionAffinity(proto.Enum): number=422937596, optional=True, ) - dynamic_forwarding: "BackendServiceDynamicForwarding" = proto.Field( - proto.MESSAGE, - number=719613, - optional=True, - message="BackendServiceDynamicForwarding", - ) edge_security_policy: str = proto.Field( proto.STRING, number=41036943, optional=True, ) - enable_c_d_n: bool = proto.Field( + enable_cdn: bool = proto.Field( proto.BOOL, - number=250733499, + number=282942321, optional=True, ) - external_managed_migration_state: str = proto.Field( - proto.STRING, - number=66947020, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - external_managed_migration_testing_percentage: float = proto.Field( - proto.FLOAT, - number=507232462, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - failover_policy: "BackendServiceFailoverPolicy" = proto.Field( - proto.MESSAGE, - number=105658655, + load_balancing_scheme: str = proto.Field( + proto.STRING, + number=363890244, optional=True, - message="BackendServiceFailoverPolicy", ) - fingerprint: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=234678500, + number=3373707, optional=True, ) - ha_policy: "BackendServiceHAPolicy" = proto.Field( + params: "BackendBucketParams" = proto.Field( proto.MESSAGE, - number=519879480, + number=78313862, optional=True, - message="BackendServiceHAPolicy", + message="BackendBucketParams", ) - health_checks: MutableSequence[str] = proto.RepeatedField( + region: str = proto.Field( proto.STRING, - number=448370606, - ) - iap: "BackendServiceIAP" = proto.Field( - proto.MESSAGE, - number=104024, + number=138946292, optional=True, - message="BackendServiceIAP", ) - id: int = proto.Field( - proto.UINT64, - number=3355, + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, ) - ip_address_selection_policy: str = proto.Field( - proto.STRING, - number=77600840, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - load_balancing_scheme: str = proto.Field( - proto.STRING, - number=363890244, - optional=True, - ) - locality_lb_policies: MutableSequence[ - "BackendServiceLocalityLoadBalancingPolicyConfig" - ] = proto.RepeatedField( - proto.MESSAGE, - number=140982557, - message="BackendServiceLocalityLoadBalancingPolicyConfig", - ) - locality_lb_policy: str = proto.Field( - proto.STRING, - number=131431487, - optional=True, - ) - log_config: "BackendServiceLogConfig" = proto.Field( - proto.MESSAGE, - number=351299741, - optional=True, - message="BackendServiceLogConfig", - ) - max_stream_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=61428376, - optional=True, - message="Duration", - ) - metadatas: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=8514340, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - network: str = proto.Field( - proto.STRING, - number=232872494, - optional=True, - ) - network_pass_through_lb_traffic_policy: "BackendServiceNetworkPassThroughLbTrafficPolicy" = proto.Field( - proto.MESSAGE, - number=230323750, - optional=True, - message="BackendServiceNetworkPassThroughLbTrafficPolicy", - ) - outlier_detection: "OutlierDetection" = proto.Field( - proto.MESSAGE, - number=354625086, - optional=True, - message="OutlierDetection", - ) - params: "BackendServiceParams" = proto.Field( - proto.MESSAGE, - number=78313862, - optional=True, - message="BackendServiceParams", - ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, - ) - port_name: str = proto.Field( - proto.STRING, - number=41534345, - optional=True, - ) - protocol: str = proto.Field( - proto.STRING, - number=84577944, - optional=True, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - optional=True, - ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - optional=True, - ) - security_settings: "SecuritySettings" = proto.Field( - proto.MESSAGE, - number=478649922, - optional=True, - message="SecuritySettings", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - service_bindings: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=133581016, - ) - service_lb_policy: str = proto.Field( - proto.STRING, - number=94848785, - optional=True, - ) - session_affinity: str = proto.Field( - proto.STRING, - number=463888561, - optional=True, - ) - strong_session_affinity_cookie: "BackendServiceHttpCookie" = proto.Field( - proto.MESSAGE, - number=238195722, - optional=True, - message="BackendServiceHttpCookie", - ) - subsetting: "Subsetting" = proto.Field( - proto.MESSAGE, - number=450283536, - optional=True, - message="Subsetting", - ) - timeout_sec: int = proto.Field( - proto.INT32, - number=79994995, - optional=True, - ) - tls_settings: "BackendServiceTlsSettings" = proto.Field( - proto.MESSAGE, - number=81794791, - optional=True, - message="BackendServiceTlsSettings", - ) - used_by: MutableSequence["BackendServiceUsedBy"] = proto.RepeatedField( + used_by: MutableSequence["BackendBucketUsedBy"] = proto.RepeatedField( proto.MESSAGE, number=389320729, - message="BackendServiceUsedBy", + message="BackendBucketUsedBy", ) -class BackendServiceAggregatedList(proto.Message): - r"""Contains a list of BackendServicesScopedList. +class BackendBucketAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -18125,28 +19439,26 @@ class BackendServiceAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.BackendServicesScopedList]): - A list of BackendServicesScopedList - resources. + items (MutableMapping[str, google.cloud.compute_v1beta.types.BackendBucketsScopedList]): + A list of BackendBucketsScopedList resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -18162,11 +19474,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableMapping[str, "BackendServicesScopedList"] = proto.MapField( + items: MutableMapping[str, "BackendBucketsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, - message="BackendServicesScopedList", + message="BackendBucketsScopedList", ) kind: str = proto.Field( proto.STRING, @@ -18183,10 +19495,6 @@ def raw_page(self): number=456214797, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -18195,43 +19503,45 @@ def raw_page(self): ) -class BackendServiceCdnPolicy(proto.Message): +class BackendBucketCdnPolicy(proto.Message): r"""Message containing Cloud CDN configuration for a backend - service. + bucket. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCdnPolicyBypassCacheOnRequestHeader]): + bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketCdnPolicyBypassCacheOnRequestHeader]): Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. - cache_key_policy (google.cloud.compute_v1beta.types.CacheKeyPolicy): + cache_key_policy (google.cloud.compute_v1beta.types.BackendBucketCdnPolicyCacheKeyPolicy): The CacheKeyPolicy for this CdnPolicy. This field is a member of `oneof`_ ``_cache_key_policy``. cache_mode (str): Specifies the cache setting for all responses from this - backend. The possible values are: USE_ORIGIN_HEADERS - Requires the origin to set valid caching headers to cache - content. Responses without these headers will not be cached - at Google's edge, and will require a full trip to the origin - on every request, potentially impacting performance and - increasing load on the origin server. FORCE_CACHE_ALL Cache + backend. The possible values are:USE_ORIGIN_HEADERS Requires + the origin to set valid caching headers to cache content. + Responses without these headers will not be cached at + Google's edge, and will require a full trip to the origin on + every request, potentially impacting performance and + increasing load on the origin server.FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC + per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), - will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. Check - the CacheMode enum for the list of possible values. + will not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults + to CACHE_ALL_STATIC. Check the CacheMode enum for the list + of possible values. This field is a member of `oneof`_ ``_cache_mode``. client_ttl (int): @@ -18264,17 +19574,19 @@ class BackendServiceCdnPolicy(proto.Message): This field is a member of `oneof`_ ``_default_ttl``. max_ttl (int): Specifies the maximum allowed TTL for cached - content served by this origin. Cache directives - that attempt to set a max-age or s-maxage higher - than this, or an Expires header more than maxTTL - seconds in the future will be capped at the - value of maxTTL, as if it were the value of an - s-maxage Cache-Control directive. Headers sent - to the client will not be modified. Setting a - TTL of "0" means "always revalidate". The - maximum allowed value is 31,622,400s (1 year), - noting that infrequently accessed objects may be - evicted from the cache before the defined TTL. + content served by this origin. + Cache directives that attempt to set a max-age + or s-maxage higher than this, or an Expires + header more than maxTTL seconds in the future + will be capped at the value of maxTTL, as if it + were the value of an s-maxage Cache-Control + directive. + Headers sent to the client will not be modified. + Setting a TTL of "0" means "always revalidate". + The maximum allowed value is 31,622,400s (1 + year), noting that infrequently accessed objects + may be evicted from the cache before the defined + TTL. This field is a member of `oneof`_ ``_max_ttl``. negative_caching (bool): @@ -18297,7 +19609,7 @@ class BackendServiceCdnPolicy(proto.Message): negative_caching_policy. This field is a member of `oneof`_ ``_negative_caching``. - negative_caching_policy (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCdnPolicyNegativeCachingPolicy]): + negative_caching_policy (MutableSequence[google.cloud.compute_v1beta.types.BackendBucketCdnPolicyNegativeCachingPolicy]): Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving @@ -18317,16 +19629,17 @@ class BackendServiceCdnPolicy(proto.Message): Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when - refreshing the cache. This setting defines the - default "max-stale" duration for any cached - responses that do not specify a max-stale - directive. Stale responses that exceed the TTL - configured here will not be served. The default - limit (max-stale) is 86400s (1 day), which will - allow stale content to be served up to this - limit beyond the max-age (or s-maxage) of a - cached response. The maximum allowed value is - 604800 (1 week). Set this to zero (0) to disable + refreshing the cache. + This setting defines the default "max-stale" + duration for any cached responses that do not + specify a max-stale directive. Stale responses + that exceed the TTL configured here will not be + served. The default limit (max-stale) is 86400s + (1 day), which will allow stale content to be + served up to this limit beyond the max-age (or + s-maxage) of a cached response. + The maximum allowed value is 604800 (1 week). + Set this to zero (0) to disable serve-while-stale. This field is a member of `oneof`_ ``_serve_while_stale``. @@ -18348,20 +19661,22 @@ class BackendServiceCdnPolicy(proto.Message): class CacheMode(proto.Enum): r"""Specifies the cache setting for all responses from this backend. The - possible values are: USE_ORIGIN_HEADERS Requires the origin to set + possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting - performance and increasing load on the origin server. - FORCE_CACHE_ALL Cache all content, ignoring any "private", - "no-store" or "no-cache" directives in Cache-Control response - headers. Warning: this may result in Cloud CDN caching private, - per-user (user identifiable) content. CACHE_ALL_STATIC Automatically - cache static content, including common image formats, media (video - and audio), and web assets (JavaScript and CSS). Requests and - responses that are marked as uncacheable, as well as dynamic content - (including HTML), will not be cached. If no value is provided for - cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. + performance and increasing load on the origin server.FORCE_CACHE_ALL + Cache all content, ignoring any "private", "no-store" or "no-cache" + directives in Cache-Control response headers. Warning: this may + result in Cloud CDN caching private, per-user (user identifiable) + content.CACHE_ALL_STATIC Automatically cache static content, + including common image formats, media (video and audio), and web + assets (JavaScript and CSS). Requests and responses that are marked + as uncacheable, as well as dynamic content (including HTML), will + not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults to + CACHE_ALL_STATIC. Values: UNDEFINED_CACHE_MODE (0): @@ -18398,17 +19713,17 @@ class CacheMode(proto.Enum): USE_ORIGIN_HEADERS = 55380261 bypass_cache_on_request_headers: MutableSequence[ - "BackendServiceCdnPolicyBypassCacheOnRequestHeader" + "BackendBucketCdnPolicyBypassCacheOnRequestHeader" ] = proto.RepeatedField( proto.MESSAGE, number=486203082, - message="BackendServiceCdnPolicyBypassCacheOnRequestHeader", + message="BackendBucketCdnPolicyBypassCacheOnRequestHeader", ) - cache_key_policy: "CacheKeyPolicy" = proto.Field( + cache_key_policy: "BackendBucketCdnPolicyCacheKeyPolicy" = proto.Field( proto.MESSAGE, number=159263727, optional=True, - message="CacheKeyPolicy", + message="BackendBucketCdnPolicyCacheKeyPolicy", ) cache_mode: str = proto.Field( proto.STRING, @@ -18436,11 +19751,11 @@ class CacheMode(proto.Enum): optional=True, ) negative_caching_policy: MutableSequence[ - "BackendServiceCdnPolicyNegativeCachingPolicy" + "BackendBucketCdnPolicyNegativeCachingPolicy" ] = proto.RepeatedField( proto.MESSAGE, number=155359996, - message="BackendServiceCdnPolicyNegativeCachingPolicy", + message="BackendBucketCdnPolicyNegativeCachingPolicy", ) request_coalescing: bool = proto.Field( proto.BOOL, @@ -18463,7 +19778,7 @@ class CacheMode(proto.Enum): ) -class BackendServiceCdnPolicyBypassCacheOnRequestHeader(proto.Message): +class BackendBucketCdnPolicyBypassCacheOnRequestHeader(proto.Message): r"""Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting. @@ -18486,7 +19801,32 @@ class BackendServiceCdnPolicyBypassCacheOnRequestHeader(proto.Message): ) -class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): +class BackendBucketCdnPolicyCacheKeyPolicy(proto.Message): + r"""Message containing what to include in the cache key for a + request for Cloud CDN. + + Attributes: + include_http_headers (MutableSequence[str]): + Allows HTTP request headers (by name) to be + used in the cache key. + query_string_whitelist (MutableSequence[str]): + Names of query string parameters to include + in cache keys. Default parameters are always + included. '&' and '=' will be percent encoded + and not treated as delimiters. + """ + + include_http_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2489606, + ) + query_string_whitelist: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=52456496, + ) + + +class BackendBucketCdnPolicyNegativeCachingPolicy(proto.Message): r"""Specify CDN TTLs for response error codes. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -18495,9 +19835,9 @@ class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): code (int): The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, - 404, 405, 410, 421, 451 and 501 are can be - specified as values, and you cannot specify a - status code more than once. + 404, 405, 410, 421, 451 and 501 can be specified + as values, and you cannot specify a status code + more than once. This field is a member of `oneof`_ ``_code``. ttl (int): @@ -18522,928 +19862,1131 @@ class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): ) -class BackendServiceConnectionTrackingPolicy(proto.Message): - r"""Connection Tracking configuration for this BackendService. +class BackendBucketList(proto.Message): + r"""Contains a list of BackendBucket resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - connection_persistence_on_unhealthy_backends (str): - Specifies connection persistence when backends are - unhealthy. The default value is DEFAULT_FOR_PROTOCOL. If set - to DEFAULT_FOR_PROTOCOL, the existing connections persist on - unhealthy backends only for connection-oriented protocols - (TCP and SCTP) and only if the Tracking Mode is - PER_CONNECTION (default tracking mode) or the Session - Affinity is configured for 5-tuple. They do not persist for - UDP. If set to NEVER_PERSIST, after a backend becomes - unhealthy, the existing connections on the unhealthy backend - are never persisted on the unhealthy backend. They are - always diverted to newly selected healthy backends (unless - all backends are unhealthy). If set to ALWAYS_PERSIST, - existing connections always persist on unhealthy backends - regardless of protocol and session affinity. It is generally - not recommended to use this mode overriding the default. For - more details, see `Connection Persistence for Network Load - Balancing `__ - and `Connection Persistence for Internal TCP/UDP Load - Balancing `__. - Check the ConnectionPersistenceOnUnhealthyBackends enum for - the list of possible values. - - This field is a member of `oneof`_ ``_connection_persistence_on_unhealthy_backends``. - enable_strong_affinity (bool): - Enable Strong Session Affinity for external - passthrough Network Load Balancers. This option - is not available publicly. - - This field is a member of `oneof`_ ``_enable_strong_affinity``. - idle_timeout_sec (int): - Specifies how long to keep a Connection Tracking entry while - there is no matching traffic (in seconds). For internal - passthrough Network Load Balancers: - The minimum (default) - is 10 minutes and the maximum is 16 hours. - It can be set - only if Connection Tracking is less than 5-tuple (i.e. - Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or - CLIENT_IP_PROTO, and Tracking Mode is PER_SESSION). For - external passthrough Network Load Balancers the default is - 60 seconds. This option is not available publicly. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_idle_timeout_sec``. - tracking_mode (str): - Specifies the key used for connection tracking. There are - two options: - PER_CONNECTION: This is the default mode. The - Connection Tracking is performed as per the Connection Key - (default Hash Method) for the specific protocol. - - PER_SESSION: The Connection Tracking is performed as per the - configured Session Affinity. It matches the configured - Session Affinity. For more details, see `Tracking Mode for - Network Load - Balancing `__ - and `Tracking Mode for Internal TCP/UDP Load - Balancing `__. - Check the TrackingMode enum for the list of possible values. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): + A list of BackendBucket resources. + kind (str): + Output only. Type of resource. - This field is a member of `oneof`_ ``_tracking_mode``. - """ + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - class ConnectionPersistenceOnUnhealthyBackends(proto.Enum): - r"""Specifies connection persistence when backends are unhealthy. The - default value is DEFAULT_FOR_PROTOCOL. If set to - DEFAULT_FOR_PROTOCOL, the existing connections persist on unhealthy - backends only for connection-oriented protocols (TCP and SCTP) and - only if the Tracking Mode is PER_CONNECTION (default tracking mode) - or the Session Affinity is configured for 5-tuple. They do not - persist for UDP. If set to NEVER_PERSIST, after a backend becomes - unhealthy, the existing connections on the unhealthy backend are - never persisted on the unhealthy backend. They are always diverted - to newly selected healthy backends (unless all backends are - unhealthy). If set to ALWAYS_PERSIST, existing connections always - persist on unhealthy backends regardless of protocol and session - affinity. It is generally not recommended to use this mode - overriding the default. For more details, see `Connection - Persistence for Network Load - Balancing `__ - and `Connection Persistence for Internal TCP/UDP Load - Balancing `__. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Values: - UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS (0): - A value indicating that the enum field is not - set. - ALWAYS_PERSIST (38400900): - No description available. - DEFAULT_FOR_PROTOCOL (145265356): - No description available. - NEVER_PERSIST (138646241): - No description available. - """ - UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS = 0 - ALWAYS_PERSIST = 38400900 - DEFAULT_FOR_PROTOCOL = 145265356 - NEVER_PERSIST = 138646241 + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - class TrackingMode(proto.Enum): - r"""Specifies the key used for connection tracking. There are two - options: - PER_CONNECTION: This is the default mode. The Connection - Tracking is performed as per the Connection Key (default Hash - Method) for the specific protocol. - PER_SESSION: The Connection - Tracking is performed as per the configured Session Affinity. It - matches the configured Session Affinity. For more details, see - `Tracking Mode for Network Load - Balancing `__ - and `Tracking Mode for Internal TCP/UDP Load - Balancing `__. + This field is a member of `oneof`_ ``_warning``. + """ - Values: - UNDEFINED_TRACKING_MODE (0): - A value indicating that the enum field is not - set. - INVALID_TRACKING_MODE (49234371): - No description available. - PER_CONNECTION (85162848): - No description available. - PER_SESSION (182099252): - No description available. - """ - UNDEFINED_TRACKING_MODE = 0 - INVALID_TRACKING_MODE = 49234371 - PER_CONNECTION = 85162848 - PER_SESSION = 182099252 + @property + def raw_page(self): + return self - connection_persistence_on_unhealthy_backends: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=152439033, + number=3355, optional=True, ) - enable_strong_affinity: bool = proto.Field( - proto.BOOL, - number=24539924, + items: MutableSequence["BackendBucket"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="BackendBucket", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - idle_timeout_sec: int = proto.Field( - proto.INT32, - number=24977544, + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, optional=True, ) - tracking_mode: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=127757867, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class BackendServiceCustomMetric(proto.Message): - r"""Custom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy. +class BackendBucketListUsable(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - dry_run (bool): - If true, the metric data is not used for load - balancing. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_dry_run``. - name (str): - Name of a custom utilization signal. The name must be 1-64 - characters long and match the regular expression - `a-z <[-_.a-z0-9]*[a-z0-9]>`__? which means that the first - character must be a lowercase letter, and all following - characters must be a dash, period, underscore, lowercase - letter, or digit, except the last character, which cannot be - a dash, period, or underscore. For usage guidelines, see - Custom Metrics balancing mode. This field can only be used - for a global or regional backend service with the - loadBalancingScheme set to EXTERNAL_MANAGED, - INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): + A list of BackendBucket resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#usableBackendBucketList for lists of usable + backend buckets. - This field is a member of `oneof`_ ``_name``. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - dry_run: bool = proto.Field( - proto.BOOL, - number=323854839, + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) - name: str = proto.Field( + items: MutableSequence["BackendBucket"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="BackendBucket", + ) + kind: str = proto.Field( proto.STRING, - number=3373707, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class BackendServiceDynamicForwarding(proto.Message): - r"""Defines a dynamic forwarding configuration for the backend - service. +class BackendBucketParams(proto.Message): + r"""Additional Backend Bucket parameters. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, + ) + +class BackendBucketUsedBy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ip_port_selection (google.cloud.compute_v1beta.types.BackendServiceDynamicForwardingIpPortSelection): - IP:PORT based dynamic forwarding - configuration. + reference (str): + Output only. [Output Only] Server-defined URL for UrlMaps + referencing that BackendBucket. - This field is a member of `oneof`_ ``_ip_port_selection``. + This field is a member of `oneof`_ ``_reference``. """ - ip_port_selection: "BackendServiceDynamicForwardingIpPortSelection" = proto.Field( - proto.MESSAGE, - number=527934822, + reference: str = proto.Field( + proto.STRING, + number=148586315, optional=True, - message="BackendServiceDynamicForwardingIpPortSelection", ) -class BackendServiceDynamicForwardingIpPortSelection(proto.Message): - r"""Defines a IP:PORT based dynamic forwarding configuration for - the backend service. Some ranges are restricted: Restricted - ranges. - +class BackendBucketsScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - enabled (bool): - A boolean flag enabling IP:PORT based dynamic - forwarding. + backend_buckets (MutableSequence[google.cloud.compute_v1beta.types.BackendBucket]): + A list of BackendBuckets contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. - This field is a member of `oneof`_ ``_enabled``. + This field is a member of `oneof`_ ``_warning``. """ - enabled: bool = proto.Field( - proto.BOOL, - number=1018689, + backend_buckets: MutableSequence["BackendBucket"] = proto.RepeatedField( + proto.MESSAGE, + number=158780702, + message="BackendBucket", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class BackendServiceFailoverPolicy(proto.Message): - r"""For load balancers that have configurable failover: `Internal - passthrough Network Load - Balancers `__ - and `external passthrough Network Load - Balancers `__. - On failover or failback, this field indicates whether connection - draining will be honored. Google Cloud has a fixed connection - draining timeout of 10 minutes. A setting of true terminates - existing TCP connections to the active pool during failover and - failback, immediately draining traffic. A setting of false allows - existing TCP connections to persist, even on VMs no longer in the - active pool, for up to the duration of the connection draining - timeout (10 minutes). - +class BackendCustomMetric(proto.Message): + r"""Custom Metrics are used for CUSTOM_METRICS balancing_mode. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disable_connection_drain_on_failover (bool): - This can be set to true only if the protocol - is TCP. The default is false. + dry_run (bool): + If true, the metric data is collected and + reported to Cloud Monitoring, but is not used + for load balancing. - This field is a member of `oneof`_ ``_disable_connection_drain_on_failover``. - drop_traffic_if_unhealthy (bool): - If set to true, connections to the load balancer are dropped - when all primary and all backup backend VMs are unhealthy.If - set to false, connections are distributed among all primary - VMs when all primary and all backup backend VMs are - unhealthy. For load balancers that have configurable - failover: `Internal passthrough Network Load - Balancers `__ - and `external passthrough Network Load - Balancers `__. - The default is false. + This field is a member of `oneof`_ ``_dry_run``. + max_utilization (float): + Optional parameter to define a target utilization for the + Custom Metrics balancing mode. The valid range is [0.0, + 1.0]. - This field is a member of `oneof`_ ``_drop_traffic_if_unhealthy``. - failover_ratio (float): - The value of the field must be in the range [0, 1]. If the - value is 0, the load balancer performs a failover when the - number of healthy primary VMs equals zero. For all other - values, the load balancer performs a failover when the total - number of healthy primary VMs is less than this ratio. For - load balancers that have configurable failover: `Internal - TCP/UDP Load - Balancing `__ - and `external TCP/UDP Load - Balancing `__. + This field is a member of `oneof`_ ``_max_utilization``. + name (str): + Name of a custom utilization signal. The name must be 1-64 + characters long and match the regular expression + ``[a-z]([-_.a-z0-9]*[a-z0-9])?`` which means that the first + character must be a lowercase letter, and all following + characters must be a dash, period, underscore, lowercase + letter, or digit, except the last character, which cannot be + a dash, period, or underscore. For usage guidelines, see + Custom Metrics balancing mode. This field can only be used + for a global or regional backend service with the + loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED + INTERNAL_SELF_MANAGED. - This field is a member of `oneof`_ ``_failover_ratio``. + This field is a member of `oneof`_ ``_name``. """ - disable_connection_drain_on_failover: bool = proto.Field( + dry_run: bool = proto.Field( proto.BOOL, - number=182150753, + number=323854839, optional=True, ) - drop_traffic_if_unhealthy: bool = proto.Field( - proto.BOOL, - number=112289428, + max_utilization: float = proto.Field( + proto.FLOAT, + number=148192199, optional=True, ) - failover_ratio: float = proto.Field( - proto.FLOAT, - number=212667006, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) -class BackendServiceGroupHealth(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class BackendService(proto.Message): + r"""Represents a Backend Service resource. - Attributes: - annotations (MutableMapping[str, str]): - Metadata defined as annotations on the - network endpoint group. - health_status (MutableSequence[google.cloud.compute_v1beta.types.HealthStatus]): - Health state of the backend instances or - endpoints in requested instance or network - endpoint group, determined based on configured - health checks. - kind (str): - [Output Only] Type of resource. Always - compute#backendServiceGroupHealth for the health of backend - services. + A backend service defines how Google Cloud load balancers distribute + traffic. The backend service configuration contains a set of values, + such as the protocol used to connect to backends, various + distribution and session settings, health checks, and timeouts. + These settings provide fine-grained control over how your load + balancer behaves. Most of the settings have default values that + allow for easy configuration if you need to get started quickly. - This field is a member of `oneof`_ ``_kind``. - """ + Backend services in Google Compute Engine can be either regionally + or globally scoped. - annotations: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=112032548, - ) - health_status: MutableSequence["HealthStatus"] = proto.RepeatedField( - proto.MESSAGE, - number=380545845, - message="HealthStatus", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) + - `Global `__ + - `Regional `__ + For more information, seeBackend Services. -class BackendServiceHAPolicy(proto.Message): - r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fast_i_p_move (str): - Specifies whether fast IP move is enabled, and if so, the - mechanism to achieve it. Supported values are: - DISABLED: - Fast IP Move is disabled. You can only use the - haPolicy.leader API to update the leader. - >GARP_RA: - Provides a method to very quickly define a new network - endpoint as the leader. This method is faster than updating - the leader using the haPolicy.leader API. Fast IP move works - as follows: The VM hosting the network endpoint that should - become the new leader sends either a Gratuitous ARP (GARP) - packet (IPv4) or an ICMPv6 Router Advertisement(RA) packet - (IPv6). Google Cloud immediately but temporarily associates - the forwarding rule IP address with that VM, and both new - and in-flight packets are quickly delivered to that VM. Note - the important properties of the Fast IP Move functionality: - - The GARP/RA-initiated re-routing stays active for - approximately 20 minutes. After triggering fast failover, - you must also appropriately set the haPolicy.leader. - The - new leader instance should continue to send GARP/RA packets - periodically every 10 seconds until at least 10 minutes - after updating the haPolicy.leader (but stop immediately if - it is no longer the leader). - After triggering a fast - failover, we recommend that you wait at least 3 seconds - before sending another GARP/RA packet from a different VM - instance to avoid race conditions. - Don't send GARP/RA - packets from different VM instances at the same time. If - multiple instances continue to send GARP/RA packets, traffic - might be routed to different destinations in an alternating - order. This condition ceases when a single instance issues a - GARP/RA packet. - The GARP/RA request always takes priority - over the leader API. Using the haPolicy.leader API to change - the leader to a different instance will have no effect until - the GARP/RA request becomes inactive. - The GARP/RA packets - should follow the GARP/RA Packet Specifications.. - When - multiple forwarding rules refer to a regional backend - service, you need only send a GARP or RA packet for a single - forwarding rule virtual IP. The virtual IPs for all - forwarding rules targeting the same backend service will - also be moved to the sender of the GARP or RA packet. The - following are the Fast IP Move limitations (that is, when - fastIPMove is not DISABLED): - Multiple forwarding rules - cannot use the same IP address if one of them refers to a - regional backend service with fastIPMove. - The regional - backend service must set the network field, and all NEGs - must belong to that network. However, individual NEGs can - belong to different subnetworks of that network. - The - maximum number of network endpoints across all backends of a - backend service with fastIPMove is 32. - The maximum number - of backend services with fastIPMove that can have the same - network endpoint attached to one of its backends is 64. - - The maximum number of backend services with fastIPMove in a - VPC in a region is 64. - The network endpoints that are - attached to a backend of a backend service with fastIPMove - cannot resolve to Gen3+ machines for IPv6. - Traffic - directed to the leader by a static route next hop will not - be redirected to a new leader by fast failover. Such traffic - will only be redirected once an haPolicy.leader update has - taken effect. Only traffic to the forwarding rule's virtual - IP will be redirected to a new leader by fast failover. - haPolicy.fastIPMove can be set only at backend service - creation time. Once set, it cannot be updated. By default, - fastIpMove is set to DISABLED. Check the FastIPMove enum for - the list of possible values. + affinity_cookie_ttl_sec (int): + Lifetime of cookies in seconds. This setting is applicable + to Application Load Balancers and Traffic Director and + requires GENERATED_COOKIE or HTTP_COOKIE session affinity. - This field is a member of `oneof`_ ``_fast_i_p_move``. - leader (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeader): - Selects one of the network endpoints attached - to the backend NEGs of this service as the - active endpoint (the leader) that receives all - traffic. When the leader changes, there is no - connection draining to persist existing - connections on the old leader. You are - responsible for selecting a suitable endpoint as - the leader. For example, preferring a healthy - endpoint over unhealthy ones. Note that this - service does not track backend endpoint health, - and selects the configured leader - unconditionally. + If set to 0, the cookie is non-persistent and lasts only + until the end of the browser session (or equivalent). The + maximum allowed value is two weeks (1,209,600). - This field is a member of `oneof`_ ``_leader``. - """ + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. - class FastIPMove(proto.Enum): - r"""Specifies whether fast IP move is enabled, and if so, the mechanism - to achieve it. Supported values are: - DISABLED: Fast IP Move is - disabled. You can only use the haPolicy.leader API to update the - leader. - >GARP_RA: Provides a method to very quickly define a new - network endpoint as the leader. This method is faster than updating - the leader using the haPolicy.leader API. Fast IP move works as - follows: The VM hosting the network endpoint that should become the - new leader sends either a Gratuitous ARP (GARP) packet (IPv4) or an - ICMPv6 Router Advertisement(RA) packet (IPv6). Google Cloud - immediately but temporarily associates the forwarding rule IP - address with that VM, and both new and in-flight packets are quickly - delivered to that VM. Note the important properties of the Fast IP - Move functionality: - The GARP/RA-initiated re-routing stays active - for approximately 20 minutes. After triggering fast failover, you - must also appropriately set the haPolicy.leader. - The new leader - instance should continue to send GARP/RA packets periodically every - 10 seconds until at least 10 minutes after updating the - haPolicy.leader (but stop immediately if it is no longer the - leader). - After triggering a fast failover, we recommend that you - wait at least 3 seconds before sending another GARP/RA packet from a - different VM instance to avoid race conditions. - Don't send GARP/RA - packets from different VM instances at the same time. If multiple - instances continue to send GARP/RA packets, traffic might be routed - to different destinations in an alternating order. This condition - ceases when a single instance issues a GARP/RA packet. - The GARP/RA - request always takes priority over the leader API. Using the - haPolicy.leader API to change the leader to a different instance - will have no effect until the GARP/RA request becomes inactive. - - The GARP/RA packets should follow the GARP/RA Packet - Specifications.. - When multiple forwarding rules refer to a - regional backend service, you need only send a GARP or RA packet for - a single forwarding rule virtual IP. The virtual IPs for all - forwarding rules targeting the same backend service will also be - moved to the sender of the GARP or RA packet. The following are the - Fast IP Move limitations (that is, when fastIPMove is not DISABLED): - - Multiple forwarding rules cannot use the same IP address if one of - them refers to a regional backend service with fastIPMove. - The - regional backend service must set the network field, and all NEGs - must belong to that network. However, individual NEGs can belong to - different subnetworks of that network. - The maximum number of - network endpoints across all backends of a backend service with - fastIPMove is 32. - The maximum number of backend services with - fastIPMove that can have the same network endpoint attached to one - of its backends is 64. - The maximum number of backend services with - fastIPMove in a VPC in a region is 64. - The network endpoints that - are attached to a backend of a backend service with fastIPMove - cannot resolve to Gen3+ machines for IPv6. - Traffic directed to the - leader by a static route next hop will not be redirected to a new - leader by fast failover. Such traffic will only be redirected once - an haPolicy.leader update has taken effect. Only traffic to the - forwarding rule's virtual IP will be redirected to a new leader by - fast failover. haPolicy.fastIPMove can be set only at backend - service creation time. Once set, it cannot be updated. By default, - fastIpMove is set to DISABLED. + This field is a member of `oneof`_ ``_affinity_cookie_ttl_sec``. + backends (MutableSequence[google.cloud.compute_v1beta.types.Backend]): + The list of backends that serve this + BackendService. + cdn_policy (google.cloud.compute_v1beta.types.BackendServiceCdnPolicy): + Cloud CDN configuration for this + BackendService. Only available for specified + load balancer types. - Values: - UNDEFINED_FAST_I_P_MOVE (0): - A value indicating that the enum field is not - set. - DISABLED (516696700): - No description available. - GARP_RA (527352630): - No description available. - """ - UNDEFINED_FAST_I_P_MOVE = 0 - DISABLED = 516696700 - GARP_RA = 527352630 + This field is a member of `oneof`_ ``_cdn_policy``. + circuit_breakers (google.cloud.compute_v1beta.types.CircuitBreakers): - fast_i_p_move: str = proto.Field( - proto.STRING, - number=222633817, - optional=True, - ) - leader: "BackendServiceHAPolicyLeader" = proto.Field( - proto.MESSAGE, - number=503858441, - optional=True, - message="BackendServiceHAPolicyLeader", - ) + This field is a member of `oneof`_ ``_circuit_breakers``. + compression_mode (str): + Compress text responses using Brotli or gzip + compression, based on the client's + Accept-Encoding header. Check the + CompressionMode enum for the list of possible + values. + This field is a member of `oneof`_ ``_compression_mode``. + connection_draining (google.cloud.compute_v1beta.types.ConnectionDraining): + connectionDraining cannot be specified with + haPolicy. -class BackendServiceHAPolicyLeader(proto.Message): - r""" + This field is a member of `oneof`_ ``_connection_draining``. + connection_tracking_policy (google.cloud.compute_v1beta.types.BackendServiceConnectionTrackingPolicy): + Connection Tracking configuration for this + BackendService. Connection tracking policy + settings are only available for external + passthrough Network Load Balancers and internal + passthrough Network Load Balancers. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + connectionTrackingPolicy cannot be specified + with haPolicy. - Attributes: - backend_group (str): - A fully-qualified URL (starting with - https://www.googleapis.com/) of the zonal Network Endpoint - Group (NEG) with ``GCE_VM_IP`` endpoints that the leader is - attached to. The leader's backendGroup must already be - specified as a backend of this backend service. Removing a - backend that is designated as the leader's backendGroup is - not permitted. + This field is a member of `oneof`_ ``_connection_tracking_policy``. + consistent_hash (google.cloud.compute_v1beta.types.ConsistentHashLoadBalancerSettings): + Consistent Hash-based load balancing can be used to provide + soft session affinity based on HTTP headers, cookies or + other properties. This load balancing policy is applicable + only for HTTP connections. The affinity to a particular + destination host will be lost when one or more hosts are + added/removed from the destination service. This field + specifies parameters that control consistent hashing. This + field is only applicable whenlocalityLbPolicy is set to + MAGLEV orRING_HASH. - This field is a member of `oneof`_ ``_backend_group``. - network_endpoint (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeaderNetworkEndpoint): - The network endpoint within the - leader.backendGroup that is designated as the - leader. This network endpoint cannot be detached - from the NEG specified in the - haPolicy.leader.backendGroup until the leader is - updated with another network endpoint, or the - leader is removed from the haPolicy. + This field is applicable to either: - This field is a member of `oneof`_ ``_network_endpoint``. - """ + :: - backend_group: str = proto.Field( - proto.STRING, - number=457777428, - optional=True, - ) - network_endpoint: "BackendServiceHAPolicyLeaderNetworkEndpoint" = proto.Field( - proto.MESSAGE, - number=56789126, - optional=True, - message="BackendServiceHAPolicyLeaderNetworkEndpoint", - ) + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED. + This field is a member of `oneof`_ ``_consistent_hash``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. -class BackendServiceHAPolicyLeaderNetworkEndpoint(proto.Message): - r""" + This field is a member of `oneof`_ ``_creation_timestamp``. + custom_metrics (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCustomMetric]): + List of custom metrics that are used for + theWEIGHTED_ROUND_ROBIN locality_lb_policy. + custom_request_headers (MutableSequence[str]): + Headers that the load balancer adds to proxied requests. See + `Creating custom + headers `__. + custom_response_headers (MutableSequence[str]): + Headers that the load balancer adds to proxied responses. + See `Creating custom + headers `__. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_description``. + dynamic_forwarding (google.cloud.compute_v1beta.types.BackendServiceDynamicForwarding): + Dynamic forwarding configuration. This field + is used to configure the backend service with + dynamic forwarding feature which together with + Service Extension allows customized and complex + routing logic. - Attributes: - instance (str): - The name of the VM instance of the leader - network endpoint. The instance must already be - attached to the NEG specified in the - haPolicy.leader.backendGroup. The name must be - 1-63 characters long, and comply with RFC1035. - Authorization requires the following IAM - permission on the specified resource instance: - compute.instances.use + This field is a member of `oneof`_ ``_dynamic_forwarding``. + edge_security_policy (str): + [Output Only] The resource URL for the edge security policy + associated with this backend service. - This field is a member of `oneof`_ ``_instance``. - """ + This field is a member of `oneof`_ ``_edge_security_policy``. + enable_c_d_n (bool): + If true, enables Cloud CDN for the backend + service of a global external Application Load + Balancer. - instance: str = proto.Field( - proto.STRING, - number=18257045, - optional=True, - ) + This field is a member of `oneof`_ ``_enable_c_d_n``. + external_managed_migration_state (str): + Specifies the canary migration state. Possible values are + PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, + the state must be changed to PREPARE. The state must be + changed to TEST_ALL_TRAFFIC before the loadBalancingScheme + can be changed to EXTERNAL_MANAGED. Optionally, the + TEST_BY_PERCENTAGE state can be used to migrate traffic by + percentage using externalManagedMigrationTestingPercentage. -class BackendServiceHttpCookie(proto.Message): - r"""The HTTP cookie used for stateful session affinity. + Rolling back a migration requires the states to be set in + reverse order. So changing the scheme from EXTERNAL_MANAGED + to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC + at the same time. Optionally, the TEST_BY_PERCENTAGE state + can be used to migrate some traffic back to EXTERNAL or + PREPARE can be used to migrate all traffic back to EXTERNAL. + Check the ExternalManagedMigrationState enum for the list of + possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_external_managed_migration_state``. + external_managed_migration_testing_percentage (float): + Determines the fraction of requests that should be processed + by the Global external Application Load Balancer. - Attributes: - name (str): - Name of the cookie. + The value of this field must be in the range [0, 100]. - This field is a member of `oneof`_ ``_name``. - path (str): - Path to set for the cookie. + Session affinity options will slightly affect this routing + behavior, for more details, see:Session Affinity. - This field is a member of `oneof`_ ``_path``. - ttl (google.cloud.compute_v1beta.types.Duration): - Lifetime of the cookie. + This value can only be set if the loadBalancingScheme in the + BackendService is set to EXTERNAL (when using the classic + Application Load Balancer) and the migration state is + TEST_BY_PERCENTAGE. - This field is a member of `oneof`_ ``_ttl``. - """ + This field is a member of `oneof`_ ``_external_managed_migration_testing_percentage``. + failover_policy (google.cloud.compute_v1beta.types.BackendServiceFailoverPolicy): + Requires at least one backend instance group to be defined + as a backup (failover) backend. For load balancers that have + configurable failover: `Internal passthrough Network Load + Balancers `__ + and `external passthrough Network Load + Balancers `__. - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - path: str = proto.Field( - proto.STRING, - number=3433509, - optional=True, - ) - ttl: "Duration" = proto.Field( - proto.MESSAGE, - number=115180, - optional=True, - message="Duration", - ) + failoverPolicy cannot be specified with haPolicy. + This field is a member of `oneof`_ ``_failover_policy``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a BackendService. An + up-to-date fingerprint must be provided in order + to update the BackendService, otherwise the + request will fail with error 412 + conditionNotMet. -class BackendServiceIAP(proto.Message): - r"""Identity-Aware Proxy + To see the latest fingerprint, make a get() + request to retrieve a BackendService. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_fingerprint``. + ha_policy (google.cloud.compute_v1beta.types.BackendServiceHAPolicy): + Configures self-managed High Availability (HA) for External + and Internal Protocol Forwarding. - Attributes: - enabled (bool): - Whether the serving infrastructure will - authenticate and authorize all incoming - requests. + The backends of this regional backend service must only + specify zonal network endpoint groups (NEGs) of type + GCE_VM_IP. - This field is a member of `oneof`_ ``_enabled``. - oauth2_client_id (str): - OAuth2 client ID to use for the - authentication flow. + When haPolicy is set for an Internal Passthrough Network + Load Balancer, the regional backend service must set the + network field. All zonal NEGs must belong to the same + network. However, individual NEGs can belong to different + subnetworks of that network. - This field is a member of `oneof`_ ``_oauth2_client_id``. - oauth2_client_secret (str): - OAuth2 client secret to use for the - authentication flow. For security reasons, this - value cannot be retrieved via the API. Instead, - the SHA-256 hash of the value is returned in the - oauth2ClientSecretSha256 field. @InputOnly + When haPolicy is specified, the set of attached network + endpoints across all backends comprise an High Availability + domain from which one endpoint is selected as the active + endpoint (the leader) that receives all traffic. - This field is a member of `oneof`_ ``_oauth2_client_secret``. - oauth2_client_secret_sha256 (str): - [Output Only] SHA256 hash value for the field - oauth2_client_secret above. + haPolicy can be added only at backend service creation time. + Once set up, it cannot be deleted. - This field is a member of `oneof`_ ``_oauth2_client_secret_sha256``. - """ + Note that haPolicy is not for load balancing, and therefore + cannot be specified with sessionAffinity, + connectionTrackingPolicy, and failoverPolicy. - enabled: bool = proto.Field( - proto.BOOL, - number=1018689, - optional=True, - ) - oauth2_client_id: str = proto.Field( - proto.STRING, - number=314017611, - optional=True, - ) - oauth2_client_secret: str = proto.Field( - proto.STRING, - number=50999520, - optional=True, - ) - oauth2_client_secret_sha256: str = proto.Field( - proto.STRING, - number=112903782, - optional=True, - ) + haPolicy requires customers to be responsible for tracking + backend endpoint health and electing a leader among the + healthy endpoints. Therefore, haPolicy cannot be specified + with healthChecks. + haPolicy can only be specified for External Passthrough + Network Load Balancers and Internal Passthrough Network Load + Balancers. -class BackendServiceList(proto.Message): - r"""Contains a list of BackendService resources. + This field is a member of `oneof`_ ``_ha_policy``. + health_checks (MutableSequence[str]): + The list of URLs to the healthChecks, httpHealthChecks + (legacy), or httpsHealthChecks (legacy) resource for health + checking this backend service. Not all backend services + support legacy health checks. See Load balancer guide. + Currently, at most one health check can be specified for + each backend service. Backend services with instance group + or zonal NEG backends must have a health check unless + haPolicy is specified. Backend services with internet or + serverless NEG backends must not have a health check. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + healthChecks[] cannot be specified with haPolicy. + iap (google.cloud.compute_v1beta.types.BackendServiceIAP): + The configurations for Identity-Aware Proxy + on this resource. Not available for internal + passthrough Network Load Balancers and external + passthrough Network Load Balancers. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + This field is a member of `oneof`_ ``_iap``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): - A list of BackendService resources. + ip_address_selection_policy (str): + Specifies a preference for traffic sent from the proxy to + the backend (or from the client to the backend for proxyless + gRPC). The possible values are: + + :: + + - IPV4_ONLY: Only send IPv4 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv4 + health checks are used to check the health of the backends. This is the + default setting. + - PREFER_IPV6: Prioritize the connection to the endpoint's + IPv6 address over its IPv4 address (provided there is a healthy IPv6 + address). + - IPV6_ONLY: Only send IPv6 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv6 + health checks are used to check the health of the backends. + + This field is applicable to either: + + :: + + - Advanced global external Application Load Balancer (load balancing + scheme EXTERNAL_MANAGED), + - Regional external Application Load + Balancer, + - Internal proxy Network Load Balancer (load balancing + scheme INTERNAL_MANAGED), + - Regional internal Application Load + Balancer (load balancing scheme INTERNAL_MANAGED), + - Traffic + Director with Envoy proxies and proxyless gRPC (load balancing scheme + INTERNAL_SELF_MANAGED). + + Check the IpAddressSelectionPolicy enum for the list of + possible values. + + This field is a member of `oneof`_ ``_ip_address_selection_policy``. kind (str): - [Output Only] Type of resource. Always - compute#backendServiceList for lists of backend services. + Output only. [Output Only] Type of resource. Always + compute#backendService for backend services. This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + load_balancing_scheme (str): + Specifies the load balancer type. A backend + service created for one type of load balancer + cannot be used with another. For more + information, refer toChoosing + a load balancer. + Check the LoadBalancingScheme enum for the list + of possible values. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_load_balancing_scheme``. + locality_lb_policies (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfig]): + A list of locality load-balancing policies to be used in + order of preference. When you use localityLbPolicies, you + must set at least one value for either the + localityLbPolicies[].policy or the + localityLbPolicies[].customPolicy field. localityLbPolicies + overrides any value set in the localityLbPolicy field. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + For an example of how to use this field, seeDefine a list of + preferred policies. - This field is a member of `oneof`_ ``_warning``. - """ + Caution: This field and its children are intended for use in + a service mesh that includes gRPC clients only. Envoy + proxies can't use backend services that have this + configuration. + locality_lb_policy (str): + The load balancing algorithm used within the scope of the + locality. The possible values are: + + :: + + - ROUND_ROBIN: This is a simple policy in which each healthy + backend is selected in round robin order. This is the default. + - LEAST_REQUEST: An O(1) algorithm which + selects two random healthy hosts and picks the host which has fewer active + requests. + - RING_HASH: The ring/modulo hash load balancer implements + consistent hashing to backends. The algorithm has the property that the + addition/removal of a host from a set of N hosts only affects 1/N of the + requests. + - RANDOM: The load balancer selects a random healthy + host. + - ORIGINAL_DESTINATION: Backend host is selected + based on the client connection metadata, i.e., connections are opened to + the same address as the destination address of the incoming connection + before the connection was redirected to the load balancer. + - MAGLEV: used as a drop in replacement for the ring hash + load balancer. Maglev is not as stable as ring hash but has faster table + lookup build times and host selection times. For more information about + Maglev, see Maglev: + A Fast and Reliable Software Network Load Balancer. + - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin + Load Balancing using weights computed from Backend reported Custom Metrics. + If set, the Backend Service responses are expected to contain non-standard + HTTP response header field Endpoint-Load-Metrics. The reported + metrics to use for computing the weights are specified via thecustomMetrics field. + + This field is applicable to either: + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or + EXTERNAL_MANAGED. + + + If sessionAffinity is not configured—that is, if session + affinity remains at the default value of NONE—then the + default value for localityLbPolicy + is ROUND_ROBIN. If session affinity is set to a value other + than NONE, + then the default value for localityLbPolicy isMAGLEV. + + Only ROUND_ROBIN and RING_HASH are supported + when the backend service is referenced by a URL map that is bound to + target gRPC proxy that has validateForProxyless field set to true. + + localityLbPolicy cannot be specified with haPolicy. + + Check the LocalityLbPolicy enum for the list of possible + values. - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_locality_lb_policy``. + log_config (google.cloud.compute_v1beta.types.BackendServiceLogConfig): + This field denotes the logging options for + the load balancer traffic served by this backend + service. If logging is enabled, logs will be + exported to Stackdriver. - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["BackendService"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="BackendService", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + This field is a member of `oneof`_ ``_log_config``. + max_stream_duration (google.cloud.compute_v1beta.types.Duration): + Specifies the default maximum duration (timeout) for streams + to this service. Duration is computed from the beginning of + the stream until the response has been completely processed, + including all retries. A stream that does not complete in + this duration is closed. + If not specified, there will be no timeout limit, i.e. the + maximum duration is infinite. -class BackendServiceListUsable(proto.Message): - r"""Contains a list of usable BackendService resources. + This value can be overridden in the PathMatcher + configuration of the UrlMap that references this backend + service. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is only allowed when the loadBalancingScheme of + the backend service is INTERNAL_SELF_MANAGED. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + This field is a member of `oneof`_ ``_max_stream_duration``. + metadatas (MutableMapping[str, str]): + Deployment metadata associated with the + resource to be set by a GKE hub controller and + read by the backend RCTH + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): - A list of BackendService resources. - kind (str): - [Output Only] Type of resource. Always - compute#usableBackendServiceList for lists of usable backend - services. + This field is a member of `oneof`_ ``_name``. + network (str): + The URL of the network to which this backend + service belongs. + This field must be set for Internal Passthrough + Network Load Balancers when the haPolicy is + enabled, and for External Passthrough Network + Load Balancers when the haPolicy fastIpMove is + enabled. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field can only be specified when the load + balancing scheme is set toINTERNAL, or when the + load balancing scheme is set toEXTERNAL and + haPolicy fastIpMove is enabled. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_network``. + network_pass_through_lb_traffic_policy (google.cloud.compute_v1beta.types.BackendServiceNetworkPassThroughLbTrafficPolicy): + Configures traffic steering properties of + internal passthrough Network Load Balancers. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + networkPassThroughLbTrafficPolicy cannot be + specified with haPolicy. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_network_pass_through_lb_traffic_policy``. + outlier_detection (google.cloud.compute_v1beta.types.OutlierDetection): + Settings controlling the ejection of unhealthy backend + endpoints from the load balancing pool of each individual + proxy instance that processes the traffic for the given + backend service. If not set, this feature is considered + disabled. - @property - def raw_page(self): - return self + Results of the outlier detection algorithm (ejection of + endpoints from the load balancing pool and returning them + back to the pool) are executed independently by each proxy + instance of the load balancer. In most cases, more than one + proxy instance handles the traffic received by a backend + service. Thus, it is possible that an unhealthy endpoint is + detected and ejected by only some of the proxies, and while + this happens, other proxies may continue to send requests to + the same unhealthy endpoint until they detect and eject the + unhealthy endpoint. + + Applicable backend endpoints can be: + + :: + + - VM instances in an Instance Group + - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) + - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) + - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud + Functions Services + - Private Service Connect NEGs, that resolve to + Google-managed regional API endpoints or managed services published using + Private Service Connect + + Applicable backend service types can be: + + :: + + - A global backend service with the loadBalancingScheme set to + INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. + - A regional backend + service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and + loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not + supported for Serverless NEGs. + + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["BackendService"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="BackendService", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + This field is a member of `oneof`_ ``_outlier_detection``. + params (google.cloud.compute_v1beta.types.BackendServiceParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. + This field is a member of `oneof`_ ``_params``. + port (int): + Deprecated in favor of portName. The TCP port + to connect on the backend. The default value is + 80. For internal passthrough Network Load + Balancers and external passthrough Network Load + Balancers, omit port. -class BackendServiceLocalityLoadBalancingPolicyConfig(proto.Message): - r"""Container for either a built-in LB policy supported by gRPC - or Envoy or a custom one implemented by the end user. + This field is a member of `oneof`_ ``_port``. + port_name (str): + A named port on a backend instance group representing the + port for communication to the backend VMs in that group. The + named port must be `defined on each backend instance + group `__. + This parameter has no meaning if the backends are NEGs. For + internal passthrough Network Load Balancers and external + passthrough Network Load Balancers, omit port_name. + This field is a member of `oneof`_ ``_port_name``. + protocol (str): + The protocol this BackendService uses to + communicate with backends. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Possible values are HTTP, HTTPS, HTTP2, H2C, + TCP, SSL, UDP or GRPC. depending on the chosen + load balancer or Traffic Director configuration. + Refer to the documentation for the load + balancers or for Traffic Director for more + information. - Attributes: - custom_policy (google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy): + Must be set to GRPC when the backend service is + referenced by a URL map that is bound to target + gRPC proxy. + Check the Protocol enum for the list of possible + values. - This field is a member of `oneof`_ ``_custom_policy``. - policy (google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfigPolicy): + This field is a member of `oneof`_ ``_protocol``. + region (str): + Output only. [Output Only] URL of the region where the + regional backend service resides. This field is not + applicable to global backend services. You must specify this + field as part of the HTTP request URL. It is not settable as + a field in the request body. - This field is a member of `oneof`_ ``_policy``. - """ + This field is a member of `oneof`_ ``_region``. + security_policy (str): + [Output Only] The resource URL for the security policy + associated with this backend service. - custom_policy: "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" = ( - proto.Field( - proto.MESSAGE, - number=4818368, - optional=True, - message="BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", - ) - ) - policy: "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" = proto.Field( - proto.MESSAGE, - number=91071794, - optional=True, - message="BackendServiceLocalityLoadBalancingPolicyConfigPolicy", - ) + This field is a member of `oneof`_ ``_security_policy``. + security_settings (google.cloud.compute_v1beta.types.SecuritySettings): + This field specifies the security settings that apply to + this backend service. This field is applicable to a global + backend service with the load_balancing_scheme set to + INTERNAL_SELF_MANAGED. + This field is a member of `oneof`_ ``_security_settings``. + self_link (str): + [Output Only] Server-defined URL for the resource. -class BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy(proto.Message): - r"""The configuration for a custom policy implemented by the user - and deployed with the client. + This field is a member of `oneof`_ ``_self_link``. + service_bindings (MutableSequence[str]): + URLs of networkservices.ServiceBinding resources. + Can only be set if load balancing scheme is + INTERNAL_SELF_MANAGED. If set, lists of backends and health + checks must be both empty. + service_lb_policy (str): + URL to networkservices.ServiceLbPolicy resource. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Can only be set if load balancing scheme is + EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED + and the scope is global. - Attributes: - data (str): - An optional, arbitrary JSON object with - configuration data, understood by a locally - installed custom policy implementation. + This field is a member of `oneof`_ ``_service_lb_policy``. + session_affinity (str): + Type of session affinity to use. The default is NONE. - This field is a member of `oneof`_ ``_data``. - name (str): - Identifies the custom policy. The value - should match the name of a custom implementation - registered on the gRPC clients. It should follow - protocol buffer message naming conventions and - include the full path (for example, - myorg.CustomLbPolicy). The maximum length is 256 - characters. Do not specify the same custom - policy more than once for a backend. If you do, - the configuration is rejected. For an example of - how to use this field, see Use a custom policy. + Only NONE and HEADER_FIELD are supported when the backend + service is referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field set to true. - This field is a member of `oneof`_ ``_name``. - """ + For more details, see: `Session + Affinity `__. - data: str = proto.Field( - proto.STRING, - number=3076010, - optional=True, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) + sessionAffinity cannot be specified with haPolicy. Check the + SessionAffinity enum for the list of possible values. + This field is a member of `oneof`_ ``_session_affinity``. + strong_session_affinity_cookie (google.cloud.compute_v1beta.types.BackendServiceHttpCookie): + Describes the HTTP cookie used for stateful session + affinity. This field is applicable and required if the + sessionAffinity is set toSTRONG_COOKIE_AFFINITY. -class BackendServiceLocalityLoadBalancingPolicyConfigPolicy(proto.Message): - r"""The configuration for a built-in load balancing policy. + This field is a member of `oneof`_ ``_strong_session_affinity_cookie``. + subsetting (google.cloud.compute_v1beta.types.Subsetting): + subsetting cannot be specified with haPolicy. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_subsetting``. + timeout_sec (int): + The backend service timeout has a different + meaning depending on the type of load balancer. + For more information see, Backend service + settings. + The default is 30 seconds. + The full range of timeout values allowed goes + from 1 through 2,147,483,647 seconds. - Attributes: - name (str): - The name of a locality load-balancing policy. Valid values - include ROUND_ROBIN and, for Java clients, LEAST_REQUEST. - For information about these values, see the description of - localityLbPolicy. Do not specify the same policy more than - once for a backend. If you do, the configuration is - rejected. Check the Name enum for the list of possible - values. + This value can be overridden in the PathMatcher + configuration of the UrlMap that references this + backend service. - This field is a member of `oneof`_ ``_name``. + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. Instead, use maxStreamDuration. + + This field is a member of `oneof`_ ``_timeout_sec``. + tls_settings (google.cloud.compute_v1beta.types.BackendServiceTlsSettings): + Configuration for Backend Authenticated TLS + and mTLS. May only be specified when the backend + protocol is SSL, HTTPS or HTTP2. + + This field is a member of `oneof`_ ``_tls_settings``. + used_by (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceUsedBy]): + Output only. [Output Only] List of resources referencing + given backend service. """ - class Name(proto.Enum): - r"""The name of a locality load-balancing policy. Valid values include - ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information - about these values, see the description of localityLbPolicy. Do not - specify the same policy more than once for a backend. If you do, the - configuration is rejected. + class CompressionMode(proto.Enum): + r"""Compress text responses using Brotli or gzip compression, + based on the client's Accept-Encoding header. Values: - UNDEFINED_NAME (0): + UNDEFINED_COMPRESSION_MODE (0): + A value indicating that the enum field is not + set. + AUTOMATIC (165298699): + Automatically uses the best compression based + on the Accept-Encoding header sent by the + client. + DISABLED (516696700): + Disables compression. Existing compressed + responses cached by Cloud CDN will not be served + to clients. + """ + UNDEFINED_COMPRESSION_MODE = 0 + AUTOMATIC = 165298699 + DISABLED = 516696700 + + class ExternalManagedMigrationState(proto.Enum): + r"""Specifies the canary migration state. Possible values are PREPARE, + TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state + must be changed to PREPARE. The state must be changed to + TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to + EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be + used to migrate traffic by percentage using + externalManagedMigrationTestingPercentage. + + Rolling back a migration requires the states to be set in reverse + order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL + requires the state to be set to TEST_ALL_TRAFFIC at the same time. + Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some + traffic back to EXTERNAL or PREPARE can be used to migrate all + traffic back to EXTERNAL. + + Values: + UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE (0): + A value indicating that the enum field is not + set. + PREPARE (399612135): + No description available. + TEST_ALL_TRAFFIC (79728882): + No description available. + TEST_BY_PERCENTAGE (513738389): + No description available. + """ + UNDEFINED_EXTERNAL_MANAGED_MIGRATION_STATE = 0 + PREPARE = 399612135 + TEST_ALL_TRAFFIC = 79728882 + TEST_BY_PERCENTAGE = 513738389 + + class IpAddressSelectionPolicy(proto.Enum): + r"""Specifies a preference for traffic sent from the proxy to the + backend (or from the client to the backend for proxyless gRPC). The + possible values are: + + :: + + - IPV4_ONLY: Only send IPv4 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv4 + health checks are used to check the health of the backends. This is the + default setting. + - PREFER_IPV6: Prioritize the connection to the endpoint's + IPv6 address over its IPv4 address (provided there is a healthy IPv6 + address). + - IPV6_ONLY: Only send IPv6 traffic to the backends of the + backend service (Instance Group, Managed Instance Group, Network Endpoint + Group), regardless of traffic from the client to the proxy. Only IPv6 + health checks are used to check the health of the backends. + + This field is applicable to either: + + :: + + - Advanced global external Application Load Balancer (load balancing + scheme EXTERNAL_MANAGED), + - Regional external Application Load + Balancer, + - Internal proxy Network Load Balancer (load balancing + scheme INTERNAL_MANAGED), + - Regional internal Application Load + Balancer (load balancing scheme INTERNAL_MANAGED), + - Traffic + Director with Envoy proxies and proxyless gRPC (load balancing scheme + INTERNAL_SELF_MANAGED). + + Values: + UNDEFINED_IP_ADDRESS_SELECTION_POLICY (0): + A value indicating that the enum field is not + set. + IPV4_ONLY (22373798): + Only send IPv4 traffic to the backends of the + Backend Service (Instance Group, Managed + Instance Group, Network Endpoint Group) + regardless of traffic from the client to the + proxy. Only IPv4 health-checks are used to check + the health of the backends. This is the default + setting. + IPV6_ONLY (79632100): + Only send IPv6 traffic to the backends of the + Backend Service (Instance Group, Managed + Instance Group, Network Endpoint Group) + regardless of traffic from the client to the + proxy. Only IPv6 health-checks are used to check + the health of the backends. + IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED (36210144): + Unspecified IP address selection policy. + PREFER_IPV6 (408601302): + Prioritize the connection to the endpoints + IPv6 address over its IPv4 address (provided + there is a healthy IPv6 address). + """ + UNDEFINED_IP_ADDRESS_SELECTION_POLICY = 0 + IPV4_ONLY = 22373798 + IPV6_ONLY = 79632100 + IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED = 36210144 + PREFER_IPV6 = 408601302 + + class LoadBalancingScheme(proto.Enum): + r"""Specifies the load balancer type. A backend service + created for one type of load balancer cannot be used with + another. For more information, refer toChoosing + a load balancer. + + Values: + UNDEFINED_LOAD_BALANCING_SCHEME (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + Signifies that this will be used for classic + Application Load Balancers, global external + proxy Network Load Balancers, or external + passthrough Network Load Balancers. + EXTERNAL_MANAGED (512006923): + Signifies that this will be used for global + external Application Load Balancers, regional + external Application Load Balancers, or regional + external proxy Network Load Balancers. + INTERNAL (279295677): + Signifies that this will be used for internal + passthrough Network Load Balancers. + INTERNAL_MANAGED (37350397): + Signifies that this will be used for internal + Application Load Balancers. + INTERNAL_SELF_MANAGED (236211150): + Signifies that this will be used by Traffic + Director. + INVALID_LOAD_BALANCING_SCHEME (275352060): + No description available. + """ + UNDEFINED_LOAD_BALANCING_SCHEME = 0 + EXTERNAL = 35607499 + EXTERNAL_MANAGED = 512006923 + INTERNAL = 279295677 + INTERNAL_MANAGED = 37350397 + INTERNAL_SELF_MANAGED = 236211150 + INVALID_LOAD_BALANCING_SCHEME = 275352060 + + class LocalityLbPolicy(proto.Enum): + r"""The load balancing algorithm used within the scope of the locality. + The possible values are: + + :: + + - ROUND_ROBIN: This is a simple policy in which each healthy + backend is selected in round robin order. This is the default. + - LEAST_REQUEST: An O(1) algorithm which + selects two random healthy hosts and picks the host which has fewer active + requests. + - RING_HASH: The ring/modulo hash load balancer implements + consistent hashing to backends. The algorithm has the property that the + addition/removal of a host from a set of N hosts only affects 1/N of the + requests. + - RANDOM: The load balancer selects a random healthy + host. + - ORIGINAL_DESTINATION: Backend host is selected + based on the client connection metadata, i.e., connections are opened to + the same address as the destination address of the incoming connection + before the connection was redirected to the load balancer. + - MAGLEV: used as a drop in replacement for the ring hash + load balancer. Maglev is not as stable as ring hash but has faster table + lookup build times and host selection times. For more information about + Maglev, see Maglev: + A Fast and Reliable Software Network Load Balancer. + - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin + Load Balancing using weights computed from Backend reported Custom Metrics. + If set, the Backend Service responses are expected to contain non-standard + HTTP response header field Endpoint-Load-Metrics. The reported + metrics to use for computing the weights are specified via thecustomMetrics field. + + This field is applicable to either: + - A regional backend service with the service_protocol set to HTTP, + HTTPS, HTTP2 or H2C, and load_balancing_scheme set to + INTERNAL_MANAGED. + - A global backend service with the + load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or + EXTERNAL_MANAGED. + + + If sessionAffinity is not configured—that is, if session + affinity remains at the default value of NONE—then the + default value for localityLbPolicy + is ROUND_ROBIN. If session affinity is set to a value other + than NONE, + then the default value for localityLbPolicy isMAGLEV. + + Only ROUND_ROBIN and RING_HASH are supported + when the backend service is referenced by a URL map that is bound to + target gRPC proxy that has validateForProxyless field set to true. + + localityLbPolicy cannot be specified with haPolicy. + + Values: + UNDEFINED_LOCALITY_LB_POLICY (0): A value indicating that the enum field is not set. INVALID_LB_POLICY (323318707): @@ -19459,8 +21002,10 @@ class Name(proto.Enum): Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about - Maglev, see Maglev: A Fast and Reliable Software - Network Load Balancer. + Maglev, seeMaglev: + + A Fast and Reliable Software Network Load + Balancer. ORIGINAL_DESTINATION (166297216): Backend host is selected based on the client connection metadata, i.e., connections are @@ -19484,9 +21029,9 @@ class Name(proto.Enum): Per-instance weighted Load Balancing via health check reported weights. In internal passthrough network load balancing, it is - weighted rendezvous hashing. This option is only - supported in internal passthrough network load - balancing. + weighted rendezvous hashing. + This option is only supported in internal + passthrough network load balancing. WEIGHTED_MAGLEV (254930962): Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure @@ -19505,11 +21050,11 @@ class Name(proto.Enum): reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field - Endpoint-Load-Metrics. The reported metrics to - use for computing the weights are specified via - the customMetrics fields. + Endpoint-Load-Metrics. The reported metrics + to use for computing the weights are specified + via the customMetrics fields. """ - UNDEFINED_NAME = 0 + UNDEFINED_LOCALITY_LB_POLICY = 0 INVALID_LB_POLICY = 323318707 LEAST_REQUEST = 46604921 MAGLEV = 119180266 @@ -19521,398 +21066,482 @@ class Name(proto.Enum): WEIGHTED_MAGLEV = 254930962 WEIGHTED_ROUND_ROBIN = 5584977 - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - - -class BackendServiceLogConfig(proto.Message): - r"""The available logging options for the load balancer traffic - served by this backend service. + class Protocol(proto.Enum): + r"""The protocol this BackendService uses to communicate + with backends. + Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or + GRPC. depending on the chosen load balancer or Traffic Director + configuration. Refer to the documentation for the load balancers + or for Traffic Director for more information. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Must be set to GRPC when the backend service is referenced by a + URL map that is bound to target gRPC proxy. - Attributes: - enable (bool): - Denotes whether to enable logging for the - load balancer traffic served by this backend - service. The default value is false. + Values: + UNDEFINED_PROTOCOL (0): + A value indicating that the enum field is not + set. + GRPC (2196510): + gRPC (available for Traffic Director). + H2C (70809): + HTTP2 over cleartext + HTTP (2228360): + No description available. + HTTP2 (69079210): + HTTP/2 with SSL. + HTTPS (69079243): + No description available. + SSL (82412): + TCP proxying with SSL. + TCP (82881): + TCP proxying or TCP pass-through. + UDP (83873): + UDP. + UNSPECIFIED (526786327): + If a Backend Service has UNSPECIFIED as its + protocol, it can be used with any L3/L4 + Forwarding Rules. + """ + UNDEFINED_PROTOCOL = 0 + GRPC = 2196510 + H2C = 70809 + HTTP = 2228360 + HTTP2 = 69079210 + HTTPS = 69079243 + SSL = 82412 + TCP = 82881 + UDP = 83873 + UNSPECIFIED = 526786327 - This field is a member of `oneof`_ ``_enable``. - optional_fields (MutableSequence[str]): - This field can only be specified if logging - is enabled for this backend service and - "logConfig.optionalMode" was set to CUSTOM. - Contains a list of optional fields you want to - include in the logs. For example: - serverInstance, serverGkeDetails.cluster, - serverGkeDetails.pod.podNamespace - optional_mode (str): - This field can only be specified if logging is enabled for - this backend service. Configures whether all, none or a - subset of optional fields should be added to the reported - logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, - CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the - OptionalMode enum for the list of possible values. + class SessionAffinity(proto.Enum): + r"""Type of session affinity to use. The default is NONE. - This field is a member of `oneof`_ ``_optional_mode``. - sample_rate (float): - This field can only be specified if logging is enabled for - this backend service. The value of the field must be in [0, - 1]. This configures the sampling rate of requests to the - load balancer where 1.0 means all logged requests are - reported and 0.0 means no logged requests are reported. The - default value is 1.0. + Only NONE and HEADER_FIELD are supported when the backend service is + referenced by a URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. - This field is a member of `oneof`_ ``_sample_rate``. - """ + For more details, see: `Session + Affinity `__. - class OptionalMode(proto.Enum): - r"""This field can only be specified if logging is enabled for this - backend service. Configures whether all, none or a subset of - optional fields should be added to the reported logs. One of - [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is - EXCLUDE_ALL_OPTIONAL. + sessionAffinity cannot be specified with haPolicy. Values: - UNDEFINED_OPTIONAL_MODE (0): + UNDEFINED_SESSION_AFFINITY (0): A value indicating that the enum field is not set. - CUSTOM (388595569): - A subset of optional fields. - EXCLUDE_ALL_OPTIONAL (168636099): - None optional fields. - INCLUDE_ALL_OPTIONAL (535606965): - All optional fields. + CLIENT_IP (345665051): + 2-tuple hash on packet's source and + destination IP addresses. Connections from the + same source IP address to the same destination + IP address will be served by the same backend VM + while that VM remains healthy. + CLIENT_IP_NO_DESTINATION (106122516): + 1-tuple hash only on packet's source IP + address. Connections from the same source IP + address will be served by the same backend VM + while that VM remains healthy. This option can + only be used for Internal TCP/UDP Load + Balancing. + CLIENT_IP_PORT_PROTO (221722926): + 5-tuple hash on packet's source and + destination IP addresses, IP protocol, and + source and destination ports. Connections for + the same IP protocol from the same source IP + address and port to the same destination IP + address and port will be served by the same + backend VM while that VM remains healthy. This + option cannot be used for HTTP(S) load + balancing. + CLIENT_IP_PROTO (25322148): + 3-tuple hash on packet's source and + destination IP addresses, and IP protocol. + Connections for the same IP protocol from the + same source IP address to the same destination + IP address will be served by the same backend VM + while that VM remains healthy. This option + cannot be used for HTTP(S) load balancing. + GENERATED_COOKIE (370321204): + Hash based on a cookie generated by the L7 + loadbalancer. Only valid for HTTP(S) load + balancing. + HEADER_FIELD (200737960): + The hash is based on a user specified header + field. + HTTP_COOKIE (494981627): + The hash is based on a user provided cookie. + NONE (2402104): + No session affinity. Connections from the + same client IP may go to any instance in the + pool. + STRONG_COOKIE_AFFINITY (438628091): + Strong cookie-based affinity. Connections + bearing the same cookie will be served by the + same backend VM while that VM remains healthy, + as long as the cookie has not expired. """ - UNDEFINED_OPTIONAL_MODE = 0 - CUSTOM = 388595569 - EXCLUDE_ALL_OPTIONAL = 168636099 - INCLUDE_ALL_OPTIONAL = 535606965 + UNDEFINED_SESSION_AFFINITY = 0 + CLIENT_IP = 345665051 + CLIENT_IP_NO_DESTINATION = 106122516 + CLIENT_IP_PORT_PROTO = 221722926 + CLIENT_IP_PROTO = 25322148 + GENERATED_COOKIE = 370321204 + HEADER_FIELD = 200737960 + HTTP_COOKIE = 494981627 + NONE = 2402104 + STRONG_COOKIE_AFFINITY = 438628091 - enable: bool = proto.Field( - proto.BOOL, - number=311764355, + affinity_cookie_ttl_sec: int = proto.Field( + proto.INT32, + number=369996954, optional=True, ) - optional_fields: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=528589944, + backends: MutableSequence["Backend"] = proto.RepeatedField( + proto.MESSAGE, + number=510839903, + message="Backend", ) - optional_mode: str = proto.Field( + cdn_policy: "BackendServiceCdnPolicy" = proto.Field( + proto.MESSAGE, + number=213976452, + optional=True, + message="BackendServiceCdnPolicy", + ) + circuit_breakers: "CircuitBreakers" = proto.Field( + proto.MESSAGE, + number=421340061, + optional=True, + message="CircuitBreakers", + ) + compression_mode: str = proto.Field( proto.STRING, - number=128697122, + number=95520988, optional=True, ) - sample_rate: float = proto.Field( - proto.FLOAT, - number=153193045, + connection_draining: "ConnectionDraining" = proto.Field( + proto.MESSAGE, + number=461096747, optional=True, + message="ConnectionDraining", ) - - -class BackendServiceNetworkPassThroughLbTrafficPolicy(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - zonal_affinity (google.cloud.compute_v1beta.types.BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity): - When configured, new connections are load - balanced across healthy backend endpoints in the - local zone. - - This field is a member of `oneof`_ ``_zonal_affinity``. - """ - - zonal_affinity: "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity" = ( - proto.Field( - proto.MESSAGE, - number=536266051, - optional=True, - message="BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", - ) + connection_tracking_policy: "BackendServiceConnectionTrackingPolicy" = proto.Field( + proto.MESSAGE, + number=143994969, + optional=True, + message="BackendServiceConnectionTrackingPolicy", ) - - -class BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - spillover (str): - This field indicates whether zonal affinity is enabled or - not. The possible values are: - ZONAL_AFFINITY_DISABLED: - Default Value. Zonal Affinity is disabled. The load balancer - distributes new connections to all healthy backend endpoints - across all zones. - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal - Affinity is enabled. The load balancer distributes new - connections to all healthy backend endpoints in the local - zone only. If there are no healthy backend endpoints in the - local zone, the load balancer distributes new connections to - all backend endpoints in the local zone. - - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is enabled. - The load balancer distributes new connections to all healthy - backend endpoints in the local zone only. If there aren't - enough healthy backend endpoints in the local zone, the load - balancer distributes new connections to all healthy backend - endpoints across all zones. Check the Spillover enum for the - list of possible values. - - This field is a member of `oneof`_ ``_spillover``. - spillover_ratio (float): - The value of the field must be in [0, 1]. When the ratio of - the count of healthy backend endpoints in a zone to the - count of backend endpoints in that same zone is equal to or - above this threshold, the load balancer distributes new - connections to all healthy endpoints in the local zone only. - When the ratio of the count of healthy backend endpoints in - a zone to the count of backend endpoints in that same zone - is below this threshold, the load balancer distributes all - new connections to all healthy endpoints across all zones. - - This field is a member of `oneof`_ ``_spillover_ratio``. - """ - - class Spillover(proto.Enum): - r"""This field indicates whether zonal affinity is enabled or not. The - possible values are: - ZONAL_AFFINITY_DISABLED: Default Value. Zonal - Affinity is disabled. The load balancer distributes new connections - to all healthy backend endpoints across all zones. - - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is enabled. The load - balancer distributes new connections to all healthy backend - endpoints in the local zone only. If there are no healthy backend - endpoints in the local zone, the load balancer distributes new - connections to all backend endpoints in the local zone. - - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is enabled. The load - balancer distributes new connections to all healthy backend - endpoints in the local zone only. If there aren't enough healthy - backend endpoints in the local zone, the load balancer distributes - new connections to all healthy backend endpoints across all zones. - - Values: - UNDEFINED_SPILLOVER (0): - A value indicating that the enum field is not - set. - ZONAL_AFFINITY_DISABLED (230207960): - No description available. - ZONAL_AFFINITY_SPILL_CROSS_ZONE (251048410): - No description available. - ZONAL_AFFINITY_STAY_WITHIN_ZONE (12177782): - No description available. - """ - UNDEFINED_SPILLOVER = 0 - ZONAL_AFFINITY_DISABLED = 230207960 - ZONAL_AFFINITY_SPILL_CROSS_ZONE = 251048410 - ZONAL_AFFINITY_STAY_WITHIN_ZONE = 12177782 - - spillover: str = proto.Field( + consistent_hash: "ConsistentHashLoadBalancerSettings" = proto.Field( + proto.MESSAGE, + number=905883, + optional=True, + message="ConsistentHashLoadBalancerSettings", + ) + creation_timestamp: str = proto.Field( proto.STRING, - number=505501440, + number=30525366, optional=True, ) - spillover_ratio: float = proto.Field( + custom_metrics: MutableSequence["BackendServiceCustomMetric"] = proto.RepeatedField( + proto.MESSAGE, + number=429453813, + message="BackendServiceCustomMetric", + ) + custom_request_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=27977992, + ) + custom_response_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=387539094, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + dynamic_forwarding: "BackendServiceDynamicForwarding" = proto.Field( + proto.MESSAGE, + number=719613, + optional=True, + message="BackendServiceDynamicForwarding", + ) + edge_security_policy: str = proto.Field( + proto.STRING, + number=41036943, + optional=True, + ) + enable_c_d_n: bool = proto.Field( + proto.BOOL, + number=250733499, + optional=True, + ) + external_managed_migration_state: str = proto.Field( + proto.STRING, + number=66947020, + optional=True, + ) + external_managed_migration_testing_percentage: float = proto.Field( proto.FLOAT, - number=135580172, + number=507232462, optional=True, ) - - -class BackendServiceParams(proto.Message): - r"""Additional Backend Service parameters. - - Attributes: - resource_manager_tags (MutableMapping[str, str]): - Tag keys/values directly bound to this resource. Tag keys - and values have the same definition as resource manager - tags. The field is allowed for INSERT only. The keys/values - to set on the resource should be specified in either ID { : - } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. - """ - - resource_manager_tags: MutableMapping[str, str] = proto.MapField( + failover_policy: "BackendServiceFailoverPolicy" = proto.Field( + proto.MESSAGE, + number=105658655, + optional=True, + message="BackendServiceFailoverPolicy", + ) + fingerprint: str = proto.Field( proto.STRING, + number=234678500, + optional=True, + ) + ha_policy: "BackendServiceHAPolicy" = proto.Field( + proto.MESSAGE, + number=519879480, + optional=True, + message="BackendServiceHAPolicy", + ) + health_checks: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=377671164, + number=448370606, ) - - -class BackendServiceReference(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - backend_service (str): - - This field is a member of `oneof`_ ``_backend_service``. - """ - - backend_service: str = proto.Field( + iap: "BackendServiceIAP" = proto.Field( + proto.MESSAGE, + number=104024, + optional=True, + message="BackendServiceIAP", + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + ip_address_selection_policy: str = proto.Field( proto.STRING, - number=306946058, + number=77600840, optional=True, ) - - -class BackendServiceTlsSettings(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - authentication_config (str): - Reference to the BackendAuthenticationConfig - resource from the networksecurity.googleapis.com - namespace. Can be used in authenticating TLS - connections to the backend, as specified by the - authenticationMode field. Can only be specified - if authenticationMode is not NONE. - - This field is a member of `oneof`_ ``_authentication_config``. - sni (str): - Server Name Indication - see RFC3546 section 3.1. If set, - the load balancer sends this string as the SNI hostname in - the TLS connection to the backend, and requires that this - string match a Subject Alternative Name (SAN) in the - backend's server certificate. With a Regional Internet NEG - backend, if the SNI is specified here, the load balancer - uses it regardless of whether the Regional Internet NEG is - specified with FQDN or IP address and port. When both sni - and subjectAltNames[] are specified, the load balancer - matches the backend certificate's SAN only to - subjectAltNames[]. - - This field is a member of `oneof`_ ``_sni``. - subject_alt_names (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceTlsSettingsSubjectAltName]): - A list of Subject Alternative Names (SANs) that the Load - Balancer verifies during a TLS handshake with the backend. - When the server presents its X.509 certificate to the Load - Balancer, the Load Balancer inspects the certificate's SAN - field, and requires that at least one SAN match one of the - subjectAltNames in the list. This field is limited to 5 - entries. When both sni and subjectAltNames[] are specified, - the load balancer matches the backend certificate's SAN only - to subjectAltNames[]. - """ - - authentication_config: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=408053481, + number=3292052, optional=True, ) - sni: str = proto.Field( + load_balancing_scheme: str = proto.Field( proto.STRING, - number=114030, + number=363890244, optional=True, ) - subject_alt_names: MutableSequence[ - "BackendServiceTlsSettingsSubjectAltName" + locality_lb_policies: MutableSequence[ + "BackendServiceLocalityLoadBalancingPolicyConfig" ] = proto.RepeatedField( proto.MESSAGE, - number=330029535, - message="BackendServiceTlsSettingsSubjectAltName", + number=140982557, + message="BackendServiceLocalityLoadBalancingPolicyConfig", ) - - -class BackendServiceTlsSettingsSubjectAltName(proto.Message): - r"""A Subject Alternative Name that the load balancer matches - against the SAN field in the TLS certificate provided by the - backend, specified as either a DNS name or a URI, in accordance - with RFC 5280 4.2.1.6 - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - dns_name (str): - The SAN specified as a DNS Name. - - This field is a member of `oneof`_ ``_dns_name``. - uniform_resource_identifier (str): - The SAN specified as a URI. - - This field is a member of `oneof`_ ``_uniform_resource_identifier``. - """ - - dns_name: str = proto.Field( + locality_lb_policy: str = proto.Field( proto.STRING, - number=411992033, + number=131431487, optional=True, ) - uniform_resource_identifier: str = proto.Field( + log_config: "BackendServiceLogConfig" = proto.Field( + proto.MESSAGE, + number=351299741, + optional=True, + message="BackendServiceLogConfig", + ) + max_stream_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=61428376, + optional=True, + message="Duration", + ) + metadatas: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=491409007, + proto.STRING, + number=8514340, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - - -class BackendServiceUsedBy(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - reference (str): - [Output Only] Server-defined URL for resources referencing - given BackendService like UrlMaps, TargetTcpProxies, - TargetSslProxies and ForwardingRule. - - This field is a member of `oneof`_ ``_reference``. - """ - - reference: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=148586315, + number=232872494, optional=True, ) - - -class BackendServicesGetEffectiveSecurityPoliciesResponse(proto.Message): - r""" - - Attributes: - security_policies (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicy]): - Effective security policies for the backend - service. - """ - - security_policies: MutableSequence["SecurityPolicy"] = proto.RepeatedField( + network_pass_through_lb_traffic_policy: "BackendServiceNetworkPassThroughLbTrafficPolicy" = proto.Field( proto.MESSAGE, - number=127783791, - message="SecurityPolicy", + number=230323750, + optional=True, + message="BackendServiceNetworkPassThroughLbTrafficPolicy", + ) + outlier_detection: "OutlierDetection" = proto.Field( + proto.MESSAGE, + number=354625086, + optional=True, + message="OutlierDetection", + ) + params: "BackendServiceParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="BackendServiceParams", + ) + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + port_name: str = proto.Field( + proto.STRING, + number=41534345, + optional=True, + ) + protocol: str = proto.Field( + proto.STRING, + number=84577944, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, + optional=True, + ) + security_settings: "SecuritySettings" = proto.Field( + proto.MESSAGE, + number=478649922, + optional=True, + message="SecuritySettings", + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + service_bindings: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=133581016, + ) + service_lb_policy: str = proto.Field( + proto.STRING, + number=94848785, + optional=True, + ) + session_affinity: str = proto.Field( + proto.STRING, + number=463888561, + optional=True, + ) + strong_session_affinity_cookie: "BackendServiceHttpCookie" = proto.Field( + proto.MESSAGE, + number=238195722, + optional=True, + message="BackendServiceHttpCookie", + ) + subsetting: "Subsetting" = proto.Field( + proto.MESSAGE, + number=450283536, + optional=True, + message="Subsetting", + ) + timeout_sec: int = proto.Field( + proto.INT32, + number=79994995, + optional=True, + ) + tls_settings: "BackendServiceTlsSettings" = proto.Field( + proto.MESSAGE, + number=81794791, + optional=True, + message="BackendServiceTlsSettings", + ) + used_by: MutableSequence["BackendServiceUsedBy"] = proto.RepeatedField( + proto.MESSAGE, + number=389320729, + message="BackendServiceUsedBy", ) -class BackendServicesScopedList(proto.Message): - r""" +class BackendServiceAggregatedList(proto.Message): + r"""Contains a list of BackendServicesScopedList. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_services (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): - A list of BackendServices contained in this - scope. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.BackendServicesScopedList]): + A list of BackendServicesScopedList + resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of backend services when the list is empty. + [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ - backend_services: MutableSequence["BackendService"] = proto.RepeatedField( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "BackendServicesScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, - number=388522409, - message="BackendService", + number=100526016, + message="BackendServicesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, ) warning: "Warning" = proto.Field( proto.MESSAGE, @@ -19922,3111 +21551,2825 @@ class BackendServicesScopedList(proto.Message): ) -class BfdPacket(proto.Message): - r""" +class BackendServiceCdnPolicy(proto.Message): + r"""Message containing Cloud CDN configuration for a backend + service. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - authentication_present (bool): - The Authentication Present bit of the BFD - packet. This is specified in section 4.1 of - RFC5880 + bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCdnPolicyBypassCacheOnRequestHeader]): + Bypass the cache when the specified request + headers are matched - e.g. Pragma or + Authorization headers. Up to 5 headers can be + specified. The cache is bypassed for all + cdnPolicy.cacheMode settings. + cache_key_policy (google.cloud.compute_v1beta.types.CacheKeyPolicy): + The CacheKeyPolicy for this CdnPolicy. - This field is a member of `oneof`_ ``_authentication_present``. - control_plane_independent (bool): - The Control Plane Independent bit of the BFD - packet. This is specified in section 4.1 of - RFC5880 + This field is a member of `oneof`_ ``_cache_key_policy``. + cache_mode (str): + Specifies the cache setting for all responses from this + backend. The possible values are:USE_ORIGIN_HEADERS Requires + the origin to set valid caching headers to cache content. + Responses without these headers will not be cached at + Google's edge, and will require a full trip to the origin on + every request, potentially impacting performance and + increasing load on the origin server.FORCE_CACHE_ALL Cache + all content, ignoring any "private", "no-store" or + "no-cache" directives in Cache-Control response headers. + Warning: this may result in Cloud CDN caching private, + per-user (user identifiable) content.CACHE_ALL_STATIC + Automatically cache static content, including common image + formats, media (video and audio), and web assets (JavaScript + and CSS). Requests and responses that are marked as + uncacheable, as well as dynamic content (including HTML), + will not be cached. - This field is a member of `oneof`_ ``_control_plane_independent``. - demand (bool): - The demand bit of the BFD packet. This is - specified in section 4.1 of RFC5880 - - This field is a member of `oneof`_ ``_demand``. - diagnostic (str): - The diagnostic code specifies the local - system's reason for the last change in session - state. This allows remote systems to determine - the reason that the previous session failed, for - example. These diagnostic codes are specified in - section 4.1 of RFC5880 Check the Diagnostic enum - for the list of possible values. - - This field is a member of `oneof`_ ``_diagnostic``. - final (bool): - The Final bit of the BFD packet. This is - specified in section 4.1 of RFC5880 - - This field is a member of `oneof`_ ``_final``. - length (int): - The length of the BFD Control packet in - bytes. This is specified in section 4.1 of - RFC5880 - - This field is a member of `oneof`_ ``_length``. - min_echo_rx_interval_ms (int): - The Required Min Echo RX Interval value in - the BFD packet. This is specified in section 4.1 - of RFC5880 - - This field is a member of `oneof`_ ``_min_echo_rx_interval_ms``. - min_rx_interval_ms (int): - The Required Min RX Interval value in the BFD - packet. This is specified in section 4.1 of - RFC5880 - - This field is a member of `oneof`_ ``_min_rx_interval_ms``. - min_tx_interval_ms (int): - The Desired Min TX Interval value in the BFD - packet. This is specified in section 4.1 of - RFC5880 + If no value is provided for cdnPolicy.cacheMode, it defaults + to CACHE_ALL_STATIC. Check the CacheMode enum for the list + of possible values. - This field is a member of `oneof`_ ``_min_tx_interval_ms``. - multiplier (int): - The detection time multiplier of the BFD - packet. This is specified in section 4.1 of - RFC5880 + This field is a member of `oneof`_ ``_cache_mode``. + client_ttl (int): + Specifies a separate client (e.g. browser client) maximum + TTL. This is used to clamp the max-age (or Expires) value + sent to the client. With FORCE_CACHE_ALL, the lesser of + client_ttl and default_ttl is used for the response max-age + directive, along with a "public" directive. For cacheable + content in CACHE_ALL_STATIC mode, client_ttl clamps the + max-age from the origin (if specified), or else sets the + response max-age directive to the lesser of the client_ttl + and default_ttl, and also ensures a "public" cache-control + directive is present. If a client TTL is not specified, a + default value (1 hour) will be used. The maximum allowed + value is 31,622,400s (1 year). - This field is a member of `oneof`_ ``_multiplier``. - multipoint (bool): - The multipoint bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + This field is a member of `oneof`_ ``_client_ttl``. + default_ttl (int): + Specifies the default TTL for cached content served by this + origin for responses that do not have an existing valid TTL + (max-age or s-maxage). Setting a TTL of "0" means "always + revalidate". The value of defaultTTL cannot be set to a + value greater than that of maxTTL, but can be equal. When + the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will + overwrite the TTL set in all responses. The maximum allowed + value is 31,622,400s (1 year), noting that infrequently + accessed objects may be evicted from the cache before the + defined TTL. - This field is a member of `oneof`_ ``_multipoint``. - my_discriminator (int): - The My Discriminator value in the BFD packet. - This is specified in section 4.1 of RFC5880 + This field is a member of `oneof`_ ``_default_ttl``. + max_ttl (int): + Specifies the maximum allowed TTL for cached + content served by this origin. + Cache directives that attempt to set a max-age + or s-maxage higher than this, or an Expires + header more than maxTTL seconds in the future + will be capped at the value of maxTTL, as if it + were the value of an s-maxage Cache-Control + directive. + Headers sent to the client will not be modified. + Setting a TTL of "0" means "always revalidate". + The maximum allowed value is 31,622,400s (1 + year), noting that infrequently accessed objects + may be evicted from the cache before the defined + TTL. - This field is a member of `oneof`_ ``_my_discriminator``. - poll (bool): - The Poll bit of the BFD packet. This is - specified in section 4.1 of RFC5880 + This field is a member of `oneof`_ ``_max_ttl``. + negative_caching (bool): + Negative caching allows per-status code TTLs to be set, in + order to apply fine-grained caching for common errors or + redirects. This can reduce the load on your origin and + improve end-user experience by reducing response latency. + When the cache mode is set to CACHE_ALL_STATIC or + USE_ORIGIN_HEADERS, negative caching applies to responses + with the specified response code that lack any + Cache-Control, Expires, or Pragma: no-cache directives. When + the cache mode is set to FORCE_CACHE_ALL, negative caching + applies to all responses with the specified response code, + and override any caching headers. By default, Cloud CDN will + apply the following default TTLs to these status codes: HTTP + 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m + HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal + Reasons): 120s HTTP 405 (Method Not Found), 501 (Not + Implemented): 60s. These defaults can be overridden in + negative_caching_policy. - This field is a member of `oneof`_ ``_poll``. - state (str): - The current BFD session state as seen by the - transmitting system. These states are specified - in section 4.1 of RFC5880 Check the State enum - for the list of possible values. + This field is a member of `oneof`_ ``_negative_caching``. + negative_caching_policy (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceCdnPolicyNegativeCachingPolicy]): + Sets a cache TTL for the specified HTTP status code. + negative_caching must be enabled to configure + negative_caching_policy. Omitting the policy and leaving + negative_caching enabled will use Cloud CDN's default cache + TTLs. Note that when specifying an explicit + negative_caching_policy, you should take care to specify a + cache TTL for all response codes that you wish to cache. + Cloud CDN will not apply any default negative caching when a + policy exists. + request_coalescing (bool): + If true then Cloud CDN will combine multiple + concurrent cache fill requests into a small + number of requests to the origin. - This field is a member of `oneof`_ ``_state``. - version (int): - The version number of the BFD protocol, as - specified in section 4.1 of RFC5880. + This field is a member of `oneof`_ ``_request_coalescing``. + serve_while_stale (int): + Serve existing content from the cache (if + available) when revalidating content with the + origin, or when an error is encountered when + refreshing the cache. + This setting defines the default "max-stale" + duration for any cached responses that do not + specify a max-stale directive. Stale responses + that exceed the TTL configured here will not be + served. The default limit (max-stale) is 86400s + (1 day), which will allow stale content to be + served up to this limit beyond the max-age (or + s-maxage) of a cached response. + The maximum allowed value is 604800 (1 week). + Set this to zero (0) to disable + serve-while-stale. - This field is a member of `oneof`_ ``_version``. - your_discriminator (int): - The Your Discriminator value in the BFD - packet. This is specified in section 4.1 of - RFC5880 + This field is a member of `oneof`_ ``_serve_while_stale``. + signed_url_cache_max_age_sec (int): + Maximum number of seconds the response to a signed URL + request will be considered fresh. After this time period, + the response will be revalidated before being served. + Defaults to 1hr (3600s). When serving responses to signed + URL requests, Cloud CDN will internally behave as though all + responses from this backend had a "Cache-Control: public, + max-age=[TTL]" header, regardless of any existing + Cache-Control header. The actual headers served in responses + will not be altered. - This field is a member of `oneof`_ ``_your_discriminator``. + This field is a member of `oneof`_ ``_signed_url_cache_max_age_sec``. + signed_url_key_names (MutableSequence[str]): + [Output Only] Names of the keys for signing request URLs. """ - class Diagnostic(proto.Enum): - r"""The diagnostic code specifies the local system's reason for - the last change in session state. This allows remote systems to - determine the reason that the previous session failed, for - example. These diagnostic codes are specified in section 4.1 of - RFC5880 - - Values: - UNDEFINED_DIAGNOSTIC (0): - A value indicating that the enum field is not - set. - ADMINISTRATIVELY_DOWN (121685798): - No description available. - CONCATENATED_PATH_DOWN (26186892): - No description available. - CONTROL_DETECTION_TIME_EXPIRED (135478383): - No description available. - DIAGNOSTIC_UNSPECIFIED (58720895): - No description available. - ECHO_FUNCTION_FAILED (220687466): - No description available. - FORWARDING_PLANE_RESET (19715882): - No description available. - NEIGHBOR_SIGNALED_SESSION_DOWN (374226742): - No description available. - NO_DIAGNOSTIC (222503141): - No description available. - PATH_DOWN (290605180): - No description available. - REVERSE_CONCATENATED_PATH_DOWN (479337129): - No description available. - """ - UNDEFINED_DIAGNOSTIC = 0 - ADMINISTRATIVELY_DOWN = 121685798 - CONCATENATED_PATH_DOWN = 26186892 - CONTROL_DETECTION_TIME_EXPIRED = 135478383 - DIAGNOSTIC_UNSPECIFIED = 58720895 - ECHO_FUNCTION_FAILED = 220687466 - FORWARDING_PLANE_RESET = 19715882 - NEIGHBOR_SIGNALED_SESSION_DOWN = 374226742 - NO_DIAGNOSTIC = 222503141 - PATH_DOWN = 290605180 - REVERSE_CONCATENATED_PATH_DOWN = 479337129 - - class State(proto.Enum): - r"""The current BFD session state as seen by the transmitting - system. These states are specified in section 4.1 of RFC5880 + class CacheMode(proto.Enum): + r"""Specifies the cache setting for all responses from this backend. The + possible values are:USE_ORIGIN_HEADERS Requires the origin to set + valid caching headers to cache content. Responses without these + headers will not be cached at Google's edge, and will require a full + trip to the origin on every request, potentially impacting + performance and increasing load on the origin server.FORCE_CACHE_ALL + Cache all content, ignoring any "private", "no-store" or "no-cache" + directives in Cache-Control response headers. Warning: this may + result in Cloud CDN caching private, per-user (user identifiable) + content.CACHE_ALL_STATIC Automatically cache static content, + including common image formats, media (video and audio), and web + assets (JavaScript and CSS). Requests and responses that are marked + as uncacheable, as well as dynamic content (including HTML), will + not be cached. + + If no value is provided for cdnPolicy.cacheMode, it defaults to + CACHE_ALL_STATIC. Values: - UNDEFINED_STATE (0): + UNDEFINED_CACHE_MODE (0): A value indicating that the enum field is not set. - ADMIN_DOWN (128544690): - No description available. - DOWN (2104482): - No description available. - INIT (2252048): - No description available. - STATE_UNSPECIFIED (470755401): - No description available. - UP (2715): + CACHE_ALL_STATIC (355027945): + Automatically cache static content, including + common image formats, media (video and audio), + and web assets (JavaScript and CSS). Requests + and responses that are marked as uncacheable, as + well as dynamic content (including HTML), will + not be cached. + FORCE_CACHE_ALL (486026928): + Cache all content, ignoring any "private", + "no-store" or "no-cache" directives in + Cache-Control response headers. Warning: this + may result in Cloud CDN caching private, + per-user (user identifiable) content. + INVALID_CACHE_MODE (381295560): No description available. + USE_ORIGIN_HEADERS (55380261): + Requires the origin to set valid caching + headers to cache content. Responses without + these headers will not be cached at Google's + edge, and will require a full trip to the origin + on every request, potentially impacting + performance and increasing load on the origin + server. """ - UNDEFINED_STATE = 0 - ADMIN_DOWN = 128544690 - DOWN = 2104482 - INIT = 2252048 - STATE_UNSPECIFIED = 470755401 - UP = 2715 + UNDEFINED_CACHE_MODE = 0 + CACHE_ALL_STATIC = 355027945 + FORCE_CACHE_ALL = 486026928 + INVALID_CACHE_MODE = 381295560 + USE_ORIGIN_HEADERS = 55380261 - authentication_present: bool = proto.Field( - proto.BOOL, - number=105974260, - optional=True, - ) - control_plane_independent: bool = proto.Field( - proto.BOOL, - number=62363573, - optional=True, + bypass_cache_on_request_headers: MutableSequence[ + "BackendServiceCdnPolicyBypassCacheOnRequestHeader" + ] = proto.RepeatedField( + proto.MESSAGE, + number=486203082, + message="BackendServiceCdnPolicyBypassCacheOnRequestHeader", ) - demand: bool = proto.Field( - proto.BOOL, - number=275180107, + cache_key_policy: "CacheKeyPolicy" = proto.Field( + proto.MESSAGE, + number=159263727, optional=True, + message="CacheKeyPolicy", ) - diagnostic: str = proto.Field( + cache_mode: str = proto.Field( proto.STRING, - number=62708647, - optional=True, - ) - final: bool = proto.Field( - proto.BOOL, - number=97436022, + number=28877888, optional=True, ) - length: int = proto.Field( - proto.UINT32, - number=504249062, + client_ttl: int = proto.Field( + proto.INT32, + number=29034360, optional=True, ) - min_echo_rx_interval_ms: int = proto.Field( - proto.UINT32, - number=97286868, + default_ttl: int = proto.Field( + proto.INT32, + number=100253422, optional=True, ) - min_rx_interval_ms: int = proto.Field( - proto.UINT32, - number=463399028, + max_ttl: int = proto.Field( + proto.INT32, + number=307578001, optional=True, ) - min_tx_interval_ms: int = proto.Field( - proto.UINT32, - number=526023602, + negative_caching: bool = proto.Field( + proto.BOOL, + number=336110005, optional=True, ) - multiplier: int = proto.Field( - proto.UINT32, - number=191331777, - optional=True, + negative_caching_policy: MutableSequence[ + "BackendServiceCdnPolicyNegativeCachingPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=155359996, + message="BackendServiceCdnPolicyNegativeCachingPolicy", ) - multipoint: bool = proto.Field( + request_coalescing: bool = proto.Field( proto.BOOL, - number=191421431, + number=532808276, optional=True, ) - my_discriminator: int = proto.Field( - proto.UINT32, - number=76663113, + serve_while_stale: int = proto.Field( + proto.INT32, + number=236682203, optional=True, ) - poll: bool = proto.Field( - proto.BOOL, - number=3446719, + signed_url_cache_max_age_sec: int = proto.Field( + proto.INT64, + number=269374534, optional=True, ) - state: str = proto.Field( + signed_url_key_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=109757585, + number=371848885, + ) + + +class BackendServiceCdnPolicyBypassCacheOnRequestHeader(proto.Message): + r"""Bypass the cache when the specified request headers are present, + e.g. Pragma or Authorization headers. Values are case insensitive. + The presence of such a header overrides the cache_mode setting. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + header_name (str): + The header field name to match on when + bypassing cache. Values are case-insensitive. + + This field is a member of `oneof`_ ``_header_name``. + """ + + header_name: str = proto.Field( + proto.STRING, + number=110223613, optional=True, ) - version: int = proto.Field( - proto.UINT32, - number=351608024, + + +class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): + r"""Specify CDN TTLs for response error codes. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + code (int): + The HTTP status code to define a TTL against. + Only HTTP status codes 300, 301, 302, 307, 308, + 404, 405, 410, 421, 451 and 501 can be specified + as values, and you cannot specify a status code + more than once. + + This field is a member of `oneof`_ ``_code``. + ttl (int): + The TTL (in seconds) for which to cache + responses with the corresponding status code. + The maximum allowed value is 1800s (30 minutes), + noting that infrequently accessed objects may be + evicted from the cache before the defined TTL. + + This field is a member of `oneof`_ ``_ttl``. + """ + + code: int = proto.Field( + proto.INT32, + number=3059181, optional=True, ) - your_discriminator: int = proto.Field( - proto.UINT32, - number=515634064, + ttl: int = proto.Field( + proto.INT32, + number=115180, optional=True, ) -class BfdStatus(proto.Message): - r"""Next free: 15 +class BackendServiceConnectionTrackingPolicy(proto.Message): + r"""Connection Tracking configuration for this BackendService. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bfd_session_initialization_mode (str): - The BFD session initialization mode for this - BGP peer. If set to ACTIVE, the Cloud Router - will initiate the BFD session for this BGP peer. - If set to PASSIVE, the Cloud Router will wait - for the peer router to initiate the BFD session - for this BGP peer. If set to DISABLED, BFD is - disabled for this BGP peer. Check the - BfdSessionInitializationMode enum for the list - of possible values. + connection_persistence_on_unhealthy_backends (str): + Specifies connection persistence when backends are + unhealthy. The default value is DEFAULT_FOR_PROTOCOL. + + If set to DEFAULT_FOR_PROTOCOL, the existing connections + persist on unhealthy backends only for connection-oriented + protocols (TCP and SCTP) and only if the Tracking Mode + isPER_CONNECTION (default tracking mode) or the Session + Affinity is configured for 5-tuple. They do not persist + forUDP. + + If set to NEVER_PERSIST, after a backend becomes unhealthy, + the existing connections on the unhealthy backend are never + persisted on the unhealthy backend. They are always diverted + to newly selected healthy backends (unless all backends are + unhealthy). + + If set to ALWAYS_PERSIST, existing connections always + persist on unhealthy backends regardless of protocol and + session affinity. It is generally not recommended to use + this mode overriding the default. + + For more details, see `Connection Persistence for Network + Load + Balancing `__ + and `Connection Persistence for Internal TCP/UDP Load + Balancing `__. + Check the ConnectionPersistenceOnUnhealthyBackends enum for + the list of possible values. - This field is a member of `oneof`_ ``_bfd_session_initialization_mode``. - config_update_timestamp_micros (int): - Unix timestamp of the most recent config - update. + This field is a member of `oneof`_ ``_connection_persistence_on_unhealthy_backends``. + enable_strong_affinity (bool): + Enable Strong Session Affinity for external + passthrough Network Load Balancers. This option + is not available publicly. - This field is a member of `oneof`_ ``_config_update_timestamp_micros``. - control_packet_counts (google.cloud.compute_v1beta.types.BfdStatusPacketCounts): - Control packet counts for the current BFD - session. + This field is a member of `oneof`_ ``_enable_strong_affinity``. + idle_timeout_sec (int): + Specifies how long to keep a Connection Tracking entry while + there is no matching traffic (in seconds). - This field is a member of `oneof`_ ``_control_packet_counts``. - control_packet_intervals (MutableSequence[google.cloud.compute_v1beta.types.PacketIntervals]): - Inter-packet time interval statistics for - control packets. - local_diagnostic (str): - The diagnostic code specifies the local - system's reason for the last change in session - state. This allows remote systems to determine - the reason that the previous session failed, for - example. These diagnostic codes are specified in - section 4.1 of RFC5880 Check the LocalDiagnostic - enum for the list of possible values. + For internal passthrough Network Load Balancers: - This field is a member of `oneof`_ ``_local_diagnostic``. - local_state (str): - The current BFD session state as seen by the - transmitting system. These states are specified - in section 4.1 of RFC5880 Check the LocalState - enum for the list of possible values. + :: - This field is a member of `oneof`_ ``_local_state``. - negotiated_local_control_tx_interval_ms (int): - Negotiated transmit interval for control - packets. + - The minimum (default) is 10 minutes and the maximum is 16 hours. + - It can be set only if Connection Tracking is less than 5-tuple + (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or CLIENT_IP_PROTO, and Tracking + Mode is PER_SESSION). - This field is a member of `oneof`_ ``_negotiated_local_control_tx_interval_ms``. - rx_packet (google.cloud.compute_v1beta.types.BfdPacket): - The most recent Rx control packet for this - BFD session. + For external passthrough Network Load Balancers the default + is 60 seconds. This option is not available publicly. - This field is a member of `oneof`_ ``_rx_packet``. - tx_packet (google.cloud.compute_v1beta.types.BfdPacket): - The most recent Tx control packet for this - BFD session. + This field is a member of `oneof`_ ``_idle_timeout_sec``. + tracking_mode (str): + Specifies the key used for connection tracking. There are + two options: - This field is a member of `oneof`_ ``_tx_packet``. - uptime_ms (int): - Session uptime in milliseconds. Value will be - 0 if session is not up. + :: - This field is a member of `oneof`_ ``_uptime_ms``. + - PER_CONNECTION: This is the default mode. The Connection + Tracking is performed as per the Connection Key (default Hash Method) for + the specific protocol. + - PER_SESSION: The Connection Tracking is performed as per + the configured Session Affinity. It matches the configured Session + Affinity. + + For more details, see `Tracking Mode for Network Load + Balancing `__ + and `Tracking Mode for Internal TCP/UDP Load + Balancing `__. + Check the TrackingMode enum for the list of possible values. + + This field is a member of `oneof`_ ``_tracking_mode``. """ - class BfdSessionInitializationMode(proto.Enum): - r"""The BFD session initialization mode for this BGP peer. If set - to ACTIVE, the Cloud Router will initiate the BFD session for - this BGP peer. If set to PASSIVE, the Cloud Router will wait for - the peer router to initiate the BFD session for this BGP peer. - If set to DISABLED, BFD is disabled for this BGP peer. + class ConnectionPersistenceOnUnhealthyBackends(proto.Enum): + r"""Specifies connection persistence when backends are unhealthy. The + default value is DEFAULT_FOR_PROTOCOL. + + If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on + unhealthy backends only for connection-oriented protocols (TCP and + SCTP) and only if the Tracking Mode isPER_CONNECTION (default + tracking mode) or the Session Affinity is configured for 5-tuple. + They do not persist forUDP. + + If set to NEVER_PERSIST, after a backend becomes unhealthy, the + existing connections on the unhealthy backend are never persisted on + the unhealthy backend. They are always diverted to newly selected + healthy backends (unless all backends are unhealthy). + + If set to ALWAYS_PERSIST, existing connections always persist on + unhealthy backends regardless of protocol and session affinity. It + is generally not recommended to use this mode overriding the + default. + + For more details, see `Connection Persistence for Network Load + Balancing `__ + and `Connection Persistence for Internal TCP/UDP Load + Balancing `__. Values: - UNDEFINED_BFD_SESSION_INITIALIZATION_MODE (0): + UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS (0): A value indicating that the enum field is not set. - ACTIVE (314733318): + ALWAYS_PERSIST (38400900): No description available. - DISABLED (516696700): + DEFAULT_FOR_PROTOCOL (145265356): No description available. - PASSIVE (462813959): + NEVER_PERSIST (138646241): No description available. """ - UNDEFINED_BFD_SESSION_INITIALIZATION_MODE = 0 - ACTIVE = 314733318 - DISABLED = 516696700 - PASSIVE = 462813959 + UNDEFINED_CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS = 0 + ALWAYS_PERSIST = 38400900 + DEFAULT_FOR_PROTOCOL = 145265356 + NEVER_PERSIST = 138646241 - class LocalDiagnostic(proto.Enum): - r"""The diagnostic code specifies the local system's reason for - the last change in session state. This allows remote systems to - determine the reason that the previous session failed, for - example. These diagnostic codes are specified in section 4.1 of - RFC5880 + class TrackingMode(proto.Enum): + r"""Specifies the key used for connection tracking. There are two + options: + + :: + + - PER_CONNECTION: This is the default mode. The Connection + Tracking is performed as per the Connection Key (default Hash Method) for + the specific protocol. + - PER_SESSION: The Connection Tracking is performed as per + the configured Session Affinity. It matches the configured Session + Affinity. + + For more details, see `Tracking Mode for Network Load + Balancing `__ + and `Tracking Mode for Internal TCP/UDP Load + Balancing `__. Values: - UNDEFINED_LOCAL_DIAGNOSTIC (0): + UNDEFINED_TRACKING_MODE (0): A value indicating that the enum field is not set. - ADMINISTRATIVELY_DOWN (121685798): - No description available. - CONCATENATED_PATH_DOWN (26186892): - No description available. - CONTROL_DETECTION_TIME_EXPIRED (135478383): - No description available. - DIAGNOSTIC_UNSPECIFIED (58720895): - No description available. - ECHO_FUNCTION_FAILED (220687466): - No description available. - FORWARDING_PLANE_RESET (19715882): - No description available. - NEIGHBOR_SIGNALED_SESSION_DOWN (374226742): + INVALID_TRACKING_MODE (49234371): No description available. - NO_DIAGNOSTIC (222503141): + PER_CONNECTION (85162848): No description available. - PATH_DOWN (290605180): - No description available. - REVERSE_CONCATENATED_PATH_DOWN (479337129): - No description available. - """ - UNDEFINED_LOCAL_DIAGNOSTIC = 0 - ADMINISTRATIVELY_DOWN = 121685798 - CONCATENATED_PATH_DOWN = 26186892 - CONTROL_DETECTION_TIME_EXPIRED = 135478383 - DIAGNOSTIC_UNSPECIFIED = 58720895 - ECHO_FUNCTION_FAILED = 220687466 - FORWARDING_PLANE_RESET = 19715882 - NEIGHBOR_SIGNALED_SESSION_DOWN = 374226742 - NO_DIAGNOSTIC = 222503141 - PATH_DOWN = 290605180 - REVERSE_CONCATENATED_PATH_DOWN = 479337129 - - class LocalState(proto.Enum): - r"""The current BFD session state as seen by the transmitting - system. These states are specified in section 4.1 of RFC5880 - - Values: - UNDEFINED_LOCAL_STATE (0): - A value indicating that the enum field is not - set. - ADMIN_DOWN (128544690): - No description available. - DOWN (2104482): - No description available. - INIT (2252048): - No description available. - STATE_UNSPECIFIED (470755401): - No description available. - UP (2715): + PER_SESSION (182099252): No description available. """ - UNDEFINED_LOCAL_STATE = 0 - ADMIN_DOWN = 128544690 - DOWN = 2104482 - INIT = 2252048 - STATE_UNSPECIFIED = 470755401 - UP = 2715 + UNDEFINED_TRACKING_MODE = 0 + INVALID_TRACKING_MODE = 49234371 + PER_CONNECTION = 85162848 + PER_SESSION = 182099252 - bfd_session_initialization_mode: str = proto.Field( + connection_persistence_on_unhealthy_backends: str = proto.Field( proto.STRING, - number=218156954, - optional=True, - ) - config_update_timestamp_micros: int = proto.Field( - proto.INT64, - number=457195569, + number=152439033, optional=True, ) - control_packet_counts: "BfdStatusPacketCounts" = proto.Field( - proto.MESSAGE, - number=132573561, + enable_strong_affinity: bool = proto.Field( + proto.BOOL, + number=24539924, optional=True, - message="BfdStatusPacketCounts", - ) - control_packet_intervals: MutableSequence["PacketIntervals"] = proto.RepeatedField( - proto.MESSAGE, - number=500806649, - message="PacketIntervals", ) - local_diagnostic: str = proto.Field( - proto.STRING, - number=463737083, + idle_timeout_sec: int = proto.Field( + proto.INT32, + number=24977544, optional=True, ) - local_state: str = proto.Field( + tracking_mode: str = proto.Field( proto.STRING, - number=149195453, + number=127757867, optional=True, ) - negotiated_local_control_tx_interval_ms: int = proto.Field( - proto.UINT32, - number=21768340, + + +class BackendServiceCustomMetric(proto.Message): + r"""Custom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dry_run (bool): + If true, the metric data is not used for load + balancing. + + This field is a member of `oneof`_ ``_dry_run``. + name (str): + Name of a custom utilization signal. The name must be 1-64 + characters long and match the regular expression + ``[a-z]([-_.a-z0-9]*[a-z0-9])?`` which means that the first + character must be a lowercase letter, and all following + characters must be a dash, period, underscore, lowercase + letter, or digit, except the last character, which cannot be + a dash, period, or underscore. For usage guidelines, see + Custom Metrics balancing mode. This field can only be used + for a global or regional backend service with the + loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED + INTERNAL_SELF_MANAGED. + + This field is a member of `oneof`_ ``_name``. + """ + + dry_run: bool = proto.Field( + proto.BOOL, + number=323854839, optional=True, ) - rx_packet: "BfdPacket" = proto.Field( - proto.MESSAGE, - number=505069729, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, - message="BfdPacket", ) - tx_packet: "BfdPacket" = proto.Field( + + +class BackendServiceDynamicForwarding(proto.Message): + r"""Defines a dynamic forwarding configuration for the backend + service. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + ip_port_selection (google.cloud.compute_v1beta.types.BackendServiceDynamicForwardingIpPortSelection): + IP:PORT based dynamic forwarding + configuration. + + This field is a member of `oneof`_ ``_ip_port_selection``. + """ + + ip_port_selection: "BackendServiceDynamicForwardingIpPortSelection" = proto.Field( proto.MESSAGE, - number=111386275, + number=527934822, optional=True, - message="BfdPacket", + message="BackendServiceDynamicForwardingIpPortSelection", ) - uptime_ms: int = proto.Field( - proto.INT64, - number=125398365, + + +class BackendServiceDynamicForwardingIpPortSelection(proto.Message): + r"""Defines a IP:PORT based dynamic forwarding configuration for + the backend service. Some ranges are restricted: Restricted + ranges. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + enabled (bool): + A boolean flag enabling IP:PORT based dynamic + forwarding. + + This field is a member of `oneof`_ ``_enabled``. + """ + + enabled: bool = proto.Field( + proto.BOOL, + number=1018689, optional=True, ) -class BfdStatusPacketCounts(proto.Message): - r""" +class BackendServiceFailoverPolicy(proto.Message): + r"""For load balancers that have configurable failover: `Internal + passthrough Network Load + Balancers `__ + and `external passthrough Network Load + Balancers `__. + On failover or failback, this field indicates whether connection + draining will be honored. Google Cloud has a fixed connection + draining timeout of 10 minutes. A setting of true terminates + existing TCP connections to the active pool during failover and + failback, immediately draining traffic. A setting of false allows + existing TCP connections to persist, even on VMs no longer in the + active pool, for up to the duration of the connection draining + timeout (10 minutes). + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - num_rx (int): - Number of packets received since the - beginning of the current BFD session. - - This field is a member of `oneof`_ ``_num_rx``. - num_rx_rejected (int): - Number of packets received that were rejected - because of errors since the beginning of the - current BFD session. + disable_connection_drain_on_failover (bool): + This can be set to true only if the protocol + isTCP. + The default is false. - This field is a member of `oneof`_ ``_num_rx_rejected``. - num_rx_successful (int): - Number of packets received that were - successfully processed since the beginning of - the current BFD session. + This field is a member of `oneof`_ ``_disable_connection_drain_on_failover``. + drop_traffic_if_unhealthy (bool): + If set to true, connections to the load balancer are dropped + when all primary and all backup backend VMs are unhealthy.If + set to false, connections are distributed among all primary + VMs when all primary and all backup backend VMs are + unhealthy. For load balancers that have configurable + failover: `Internal passthrough Network Load + Balancers `__ + and `external passthrough Network Load + Balancers `__. + The default is false. - This field is a member of `oneof`_ ``_num_rx_successful``. - num_tx (int): - Number of packets transmitted since the - beginning of the current BFD session. + This field is a member of `oneof`_ ``_drop_traffic_if_unhealthy``. + failover_ratio (float): + The value of the field must be in the range[0, 1]. If the + value is 0, the load balancer performs a failover when the + number of healthy primary VMs equals zero. For all other + values, the load balancer performs a failover when the total + number of healthy primary VMs is less than this ratio. For + load balancers that have configurable failover: `Internal + TCP/UDP Load + Balancing `__ + and `external TCP/UDP Load + Balancing `__. - This field is a member of `oneof`_ ``_num_tx``. + This field is a member of `oneof`_ ``_failover_ratio``. """ - num_rx: int = proto.Field( - proto.UINT32, - number=39375263, - optional=True, - ) - num_rx_rejected: int = proto.Field( - proto.UINT32, - number=281007902, + disable_connection_drain_on_failover: bool = proto.Field( + proto.BOOL, + number=182150753, optional=True, ) - num_rx_successful: int = proto.Field( - proto.UINT32, - number=455361850, + drop_traffic_if_unhealthy: bool = proto.Field( + proto.BOOL, + number=112289428, optional=True, ) - num_tx: int = proto.Field( - proto.UINT32, - number=39375325, + failover_ratio: float = proto.Field( + proto.FLOAT, + number=212667006, optional=True, ) -class BgpRoute(proto.Message): +class BackendServiceGroupHealth(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - as_paths (MutableSequence[google.cloud.compute_v1beta.types.BgpRouteAsPath]): - [Output only] AS-PATH for the route - communities (MutableSequence[str]): - [Output only] BGP communities in human-readable A:B format. - destination (google.cloud.compute_v1beta.types.BgpRouteNetworkLayerReachabilityInformation): - [Output only] Destination IP range for the route, in - human-readable CIDR format - - This field is a member of `oneof`_ ``_destination``. - med (int): - [Output only] BGP multi-exit discriminator - - This field is a member of `oneof`_ ``_med``. - origin (str): - [Output only] BGP origin (EGP, IGP or INCOMPLETE) Check the - Origin enum for the list of possible values. + annotations (MutableMapping[str, str]): + Metadata defined as annotations on the + network endpoint group. + health_status (MutableSequence[google.cloud.compute_v1beta.types.HealthStatus]): + Health state of the backend instances or + endpoints in requested instance or network + endpoint group, determined based on configured + health checks. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#backendServiceGroupHealth for the health of + backend services. - This field is a member of `oneof`_ ``_origin``. + This field is a member of `oneof`_ ``_kind``. """ - class Origin(proto.Enum): - r"""[Output only] BGP origin (EGP, IGP or INCOMPLETE) - - Values: - UNDEFINED_ORIGIN (0): - A value indicating that the enum field is not - set. - BGP_ORIGIN_EGP (378906473): - No description available. - BGP_ORIGIN_IGP (378910317): - No description available. - BGP_ORIGIN_INCOMPLETE (452839811): - No description available. - """ - UNDEFINED_ORIGIN = 0 - BGP_ORIGIN_EGP = 378906473 - BGP_ORIGIN_IGP = 378910317 - BGP_ORIGIN_INCOMPLETE = 452839811 - - as_paths: MutableSequence["BgpRouteAsPath"] = proto.RepeatedField( - proto.MESSAGE, - number=137568929, - message="BgpRouteAsPath", - ) - communities: MutableSequence[str] = proto.RepeatedField( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=188262983, + proto.STRING, + number=112032548, ) - destination: "BgpRouteNetworkLayerReachabilityInformation" = proto.Field( + health_status: MutableSequence["HealthStatus"] = proto.RepeatedField( proto.MESSAGE, - number=180765710, - optional=True, - message="BgpRouteNetworkLayerReachabilityInformation", - ) - med: int = proto.Field( - proto.UINT32, - number=107980, - optional=True, + number=380545845, + message="HealthStatus", ) - origin: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=65122086, + number=3292052, optional=True, ) -class BgpRouteAsPath(proto.Message): +class BackendServiceHAPolicy(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - asns (MutableSequence[int]): - [Output only] ASNs in the path segment. When type is - SEQUENCE, these are ordered. - asns32 (MutableSequence[int]): - [Output only] ASNs in the path segment. This field is for - better support of 32 bit ASNs as the other asns field - suffers from overflow when the ASN is larger. When type is - SEQUENCE, these are ordered. - type_ (str): - [Output only] Type of AS-PATH segment (SEQUENCE or SET) - Check the Type enum for the list of possible values. + fast_i_p_move (str): + Specifies whether fast IP move is enabled, and if so, the + mechanism to achieve it. + + Supported values are: + + :: + + - DISABLED: Fast IP Move is disabled. You can only use the + haPolicy.leader API to update the leader. + - >GARP_RA: Provides a method to very quickly define a new network + endpoint as the leader. This method is faster than updating the leader + using the haPolicy.leader API. Fast IP move works as follows: The VM + hosting the network endpoint that should become the new leader sends + either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router + Advertisement(RA) packet (IPv6). Google Cloud immediately but + temporarily associates the forwarding rule IP address with that VM, and + both new and in-flight packets are quickly delivered to that VM. + + Note the important properties of the Fast IP Move + functionality: + + :: + + - The GARP/RA-initiated re-routing stays active for approximately 20 + minutes. After triggering fast failover, you must also + appropriately set the haPolicy.leader. + - The new leader instance should continue to send GARP/RA packets + periodically every 10 seconds until at least 10 minutes after updating + the haPolicy.leader (but stop immediately if it is no longer the leader). + - After triggering a fast failover, we recommend that you wait at least + 3 seconds before sending another GARP/RA packet from a different VM + instance to avoid race conditions. + - Don't send GARP/RA packets from different VM + instances at the same time. If multiple instances continue to send + GARP/RA packets, traffic might be routed to different destinations in an + alternating order. This condition ceases when a single instance + issues a GARP/RA packet. + - The GARP/RA request always takes priority over the leader API. + Using the haPolicy.leader API to change the leader to a different + instance will have no effect until the GARP/RA request becomes + inactive. + - The GARP/RA packets should follow the GARP/RA + Packet Specifications.. + - When multiple forwarding rules refer to a regional backend service, + you need only send a GARP or RA packet for a single forwarding rule + virtual IP. The virtual IPs for all forwarding rules targeting the same + backend service will also be moved to the sender of the GARP or RA + packet. + + The following are the Fast IP Move limitations (that is, + when fastIPMove is not DISABLED): + + :: + + - Multiple forwarding rules cannot use the same IP address if one of + them refers to a regional backend service with fastIPMove. + - The regional backend service must set the network field, and all + NEGs must belong to that network. However, individual + NEGs can belong to different subnetworks of that network. + - The maximum number of network endpoints across all backends of a + backend service with fastIPMove is 32. + - The maximum number of backend services with fastIPMove that can have + the same network endpoint attached to one of its backends is 64. + - The maximum number of backend services with fastIPMove in a VPC in a + region is 64. + - The network endpoints that are attached to a backend of a backend + service with fastIPMove cannot resolve to Gen3+ machines for IPv6. + - Traffic directed to the leader by a static route next hop will not be + redirected to a new leader by fast failover. Such traffic will only be + redirected once an haPolicy.leader update has taken effect. Only traffic + to the forwarding rule's virtual IP will be redirected to a new leader by + fast failover. - This field is a member of `oneof`_ ``_type``. + haPolicy.fastIPMove can be set only at backend service + creation time. Once set, it cannot be updated. + + By default, fastIpMove is set to DISABLED. Check the + FastIPMove enum for the list of possible values. + + This field is a member of `oneof`_ ``_fast_i_p_move``. + leader (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeader): + Selects one of the network endpoints attached + to the backend NEGs of this service as the + active endpoint (the leader) that receives all + traffic. + + When the leader changes, there is no connection + draining to persist existing connections on the + old leader. + + You are responsible for selecting a suitable + endpoint as the leader. For example, preferring + a healthy endpoint over unhealthy ones. Note + that this service does not track backend + endpoint health, and selects the configured + leader unconditionally. + + This field is a member of `oneof`_ ``_leader``. """ - class Type(proto.Enum): - r"""[Output only] Type of AS-PATH segment (SEQUENCE or SET) + class FastIPMove(proto.Enum): + r"""Specifies whether fast IP move is enabled, and if so, the mechanism + to achieve it. + + Supported values are: + + :: + + - DISABLED: Fast IP Move is disabled. You can only use the + haPolicy.leader API to update the leader. + - >GARP_RA: Provides a method to very quickly define a new network + endpoint as the leader. This method is faster than updating the leader + using the haPolicy.leader API. Fast IP move works as follows: The VM + hosting the network endpoint that should become the new leader sends + either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router + Advertisement(RA) packet (IPv6). Google Cloud immediately but + temporarily associates the forwarding rule IP address with that VM, and + both new and in-flight packets are quickly delivered to that VM. + + Note the important properties of the Fast IP Move functionality: + + :: + + - The GARP/RA-initiated re-routing stays active for approximately 20 + minutes. After triggering fast failover, you must also + appropriately set the haPolicy.leader. + - The new leader instance should continue to send GARP/RA packets + periodically every 10 seconds until at least 10 minutes after updating + the haPolicy.leader (but stop immediately if it is no longer the leader). + - After triggering a fast failover, we recommend that you wait at least + 3 seconds before sending another GARP/RA packet from a different VM + instance to avoid race conditions. + - Don't send GARP/RA packets from different VM + instances at the same time. If multiple instances continue to send + GARP/RA packets, traffic might be routed to different destinations in an + alternating order. This condition ceases when a single instance + issues a GARP/RA packet. + - The GARP/RA request always takes priority over the leader API. + Using the haPolicy.leader API to change the leader to a different + instance will have no effect until the GARP/RA request becomes + inactive. + - The GARP/RA packets should follow the GARP/RA + Packet Specifications.. + - When multiple forwarding rules refer to a regional backend service, + you need only send a GARP or RA packet for a single forwarding rule + virtual IP. The virtual IPs for all forwarding rules targeting the same + backend service will also be moved to the sender of the GARP or RA + packet. + + The following are the Fast IP Move limitations (that is, when + fastIPMove is not DISABLED): + + :: + + - Multiple forwarding rules cannot use the same IP address if one of + them refers to a regional backend service with fastIPMove. + - The regional backend service must set the network field, and all + NEGs must belong to that network. However, individual + NEGs can belong to different subnetworks of that network. + - The maximum number of network endpoints across all backends of a + backend service with fastIPMove is 32. + - The maximum number of backend services with fastIPMove that can have + the same network endpoint attached to one of its backends is 64. + - The maximum number of backend services with fastIPMove in a VPC in a + region is 64. + - The network endpoints that are attached to a backend of a backend + service with fastIPMove cannot resolve to Gen3+ machines for IPv6. + - Traffic directed to the leader by a static route next hop will not be + redirected to a new leader by fast failover. Such traffic will only be + redirected once an haPolicy.leader update has taken effect. Only traffic + to the forwarding rule's virtual IP will be redirected to a new leader by + fast failover. + + haPolicy.fastIPMove can be set only at backend service creation + time. Once set, it cannot be updated. + + By default, fastIpMove is set to DISABLED. Values: - UNDEFINED_TYPE (0): + UNDEFINED_FAST_I_P_MOVE (0): A value indicating that the enum field is not set. - AS_PATH_TYPE_SEQUENCE (362887609): + DISABLED (516696700): No description available. - AS_PATH_TYPE_SET (302584650): + GARP_RA (527352630): No description available. """ - UNDEFINED_TYPE = 0 - AS_PATH_TYPE_SEQUENCE = 362887609 - AS_PATH_TYPE_SET = 302584650 + UNDEFINED_FAST_I_P_MOVE = 0 + DISABLED = 516696700 + GARP_RA = 527352630 - asns: MutableSequence[int] = proto.RepeatedField( - proto.INT32, - number=3003767, - ) - asns32: MutableSequence[int] = proto.RepeatedField( - proto.UINT32, - number=202267158, - ) - type_: str = proto.Field( + fast_i_p_move: str = proto.Field( proto.STRING, - number=3575610, + number=222633817, optional=True, ) + leader: "BackendServiceHAPolicyLeader" = proto.Field( + proto.MESSAGE, + number=503858441, + optional=True, + message="BackendServiceHAPolicyLeader", + ) -class BgpRouteNetworkLayerReachabilityInformation(proto.Message): - r"""Network Layer Reachability Information (NLRI) for a route. +class BackendServiceHAPolicyLeader(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - path_id (int): - If the BGP session supports multiple paths - (RFC 7911), the path identifier for this route. + backend_group (str): + A fully-qualified URL (starting with + https://www.googleapis.com/) of the zonal Network Endpoint + Group (NEG) with ``GCE_VM_IP`` endpoints that the leader is + attached to. - This field is a member of `oneof`_ ``_path_id``. - prefix (str): - Human readable CIDR notation for a prefix. - E.g. 10.42.0.0/16. + The leader's backendGroup must already be specified as a + backend of this backend service. Removing a backend that is + designated as the leader's backendGroup is not permitted. - This field is a member of `oneof`_ ``_prefix``. + This field is a member of `oneof`_ ``_backend_group``. + network_endpoint (google.cloud.compute_v1beta.types.BackendServiceHAPolicyLeaderNetworkEndpoint): + The network endpoint within the + leader.backendGroup that is designated as the + leader. + + This network endpoint cannot be detached from + the NEG specified in the + haPolicy.leader.backendGroup until the leader is + updated with another network endpoint, or the + leader is removed from the haPolicy. + + This field is a member of `oneof`_ ``_network_endpoint``. """ - path_id: int = proto.Field( - proto.UINT32, - number=282287989, + backend_group: str = proto.Field( + proto.STRING, + number=457777428, optional=True, ) - prefix: str = proto.Field( - proto.STRING, - number=93631122, + network_endpoint: "BackendServiceHAPolicyLeaderNetworkEndpoint" = proto.Field( + proto.MESSAGE, + number=56789126, optional=True, + message="BackendServiceHAPolicyLeaderNetworkEndpoint", ) -class Binding(proto.Message): - r"""Associates ``members``, or principals, with a ``role``. +class BackendServiceHAPolicyLeaderNetworkEndpoint(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - binding_id (str): - - This field is a member of `oneof`_ ``_binding_id``. - condition (google.cloud.compute_v1beta.types.Expr): - The condition that is associated with this binding. If the - condition evaluates to ``true``, then this binding applies - to the current request. If the condition evaluates to - ``false``, then this binding does not apply to the current - request. However, a different role binding might grant the - same role to one or more of the principals in this binding. - To learn which resources support conditions in their IAM - policies, see the `IAM - documentation `__. + instance (str): + The name of the VM instance of the leader + network endpoint. The instance must already be + attached to the NEG specified in the + haPolicy.leader.backendGroup. - This field is a member of `oneof`_ ``_condition``. - members (MutableSequence[str]): - Specifies the principals requesting access for a Google - Cloud resource. ``members`` can have the following values: - \* ``allUsers``: A special identifier that represents anyone - who is on the internet; with or without a Google account. \* - ``allAuthenticatedUsers``: A special identifier that - represents anyone who is authenticated with a Google account - or a service account. Does not include identities that come - from external identity providers (IdPs) through identity - federation. \* ``user:{emailid}``: An email address that - represents a specific Google account. For example, - ``alice@example.com`` . \* ``serviceAccount:{emailid}``: An - email address that represents a Google service account. For - example, ``my-other-app@appspot.gserviceaccount.com``. \* - ``serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]``: - An identifier for a `Kubernetes service - account `__. - For example, - ``my-project.svc.id.goog[my-namespace/my-kubernetes-sa]``. - \* ``group:{emailid}``: An email address that represents a - Google group. For example, ``admins@example.com``. \* - ``domain:{domain}``: The G Suite domain (primary) that - represents all the users of that domain. For example, - ``google.com`` or ``example.com``. \* - ``principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: - A single identity in a workforce identity pool. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}``: - All workforce identities in a group. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: - All workforce identities with a specific attribute value. \* - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*``: - All identities in a workforce identity pool. \* - ``principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}``: - A single identity in a workload identity pool. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}``: - A workload identity pool group. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: - All identities in a workload identity pool with a certain - attribute. \* - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*``: - All identities in a workload identity pool. \* - ``deleted:user:{emailid}?uid={uniqueid}``: An email address - (plus unique identifier) representing a user that has been - recently deleted. For example, - ``alice@example.com?uid=123456789012345678901``. If the user - is recovered, this value reverts to ``user:{emailid}`` and - the recovered user retains the role in the binding. \* - ``deleted:serviceAccount:{emailid}?uid={uniqueid}``: An - email address (plus unique identifier) representing a - service account that has been recently deleted. For example, - ``my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901``. - If the service account is undeleted, this value reverts to - ``serviceAccount:{emailid}`` and the undeleted service - account retains the role in the binding. \* - ``deleted:group:{emailid}?uid={uniqueid}``: An email address - (plus unique identifier) representing a Google group that - has been recently deleted. For example, - ``admins@example.com?uid=123456789012345678901``. If the - group is recovered, this value reverts to - ``group:{emailid}`` and the recovered group retains the role - in the binding. \* - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: - Deleted single identity in a workforce identity pool. For - example, - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value``. - role (str): - Role that is assigned to the list of ``members``, or - principals. For example, ``roles/viewer``, ``roles/editor``, - or ``roles/owner``. For an overview of the IAM roles and - permissions, see the `IAM - documentation `__. - For a list of the available pre-defined roles, see - `here `__. + The name must be 1-63 characters long, and + comply with RFC1035. Authorization requires the + following IAM permission on the specified + resource instance: compute.instances.use - This field is a member of `oneof`_ ``_role``. + This field is a member of `oneof`_ ``_instance``. """ - binding_id: str = proto.Field( - proto.STRING, - number=441088277, - optional=True, - ) - condition: "Expr" = proto.Field( - proto.MESSAGE, - number=212430107, - optional=True, - message="Expr", - ) - members: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=412010777, - ) - role: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=3506294, + number=18257045, optional=True, ) -class BulkInsertDiskRequest(proto.Message): - r"""A request message for Disks.BulkInsert. See the method - description for details. - +class BackendServiceHttpCookie(proto.Message): + r"""The HTTP cookie used for stateful session affinity. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bulk_insert_disk_resource_resource (google.cloud.compute_v1beta.types.BulkInsertDiskResource): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + name (str): + Name of the cookie. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_name``. + path (str): + Path to set for the cookie. + + This field is a member of `oneof`_ ``_path``. + ttl (google.cloud.compute_v1beta.types.Duration): + Lifetime of the cookie. + + This field is a member of `oneof`_ ``_ttl``. """ - bulk_insert_disk_resource_resource: "BulkInsertDiskResource" = proto.Field( - proto.MESSAGE, - number=289799382, - message="BulkInsertDiskResource", - ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - request_id: str = proto.Field( + path: str = proto.Field( proto.STRING, - number=37109963, + number=3433509, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + ttl: "Duration" = proto.Field( + proto.MESSAGE, + number=115180, + optional=True, + message="Duration", ) -class BulkInsertDiskResource(proto.Message): - r"""A transient resource used in compute.disks.bulkInsert and - compute.regionDisks.bulkInsert. It is only used to process - requests and is not persisted. - +class BackendServiceIAP(proto.Message): + r"""Identity-Aware Proxy .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - source_consistency_group_policy (str): - The URL of the DiskConsistencyGroupPolicy for - the group of disks to clone. This may be a full - or partial URL, such as: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy - - This field is a member of `oneof`_ ``_source_consistency_group_policy``. - """ - - source_consistency_group_policy: str = proto.Field( - proto.STRING, - number=19616093, - optional=True, - ) - + enabled (bool): + Whether the serving infrastructure will + authenticate and authorize all incoming + requests. -class BulkInsertInstanceRequest(proto.Message): - r"""A request message for Instances.BulkInsert. See the method - description for details. + This field is a member of `oneof`_ ``_enabled``. + oauth2_client_id (str): + OAuth2 client ID to use for the + authentication flow. + This field is a member of `oneof`_ ``_oauth2_client_id``. + oauth2_client_secret (str): + OAuth2 client secret to use for the + authentication flow. For security reasons, this + value cannot be retrieved via the API. Instead, + the SHA-256 hash of the value is returned in the + oauth2ClientSecretSha256 field. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + @InputOnly - Attributes: - bulk_insert_instance_resource_resource (google.cloud.compute_v1beta.types.BulkInsertInstanceResource): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_oauth2_client_secret``. + oauth2_client_secret_sha256 (str): + Output only. [Output Only] SHA256 hash value for the field + oauth2_client_secret above. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_oauth2_client_secret_sha256``. """ - bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( - proto.MESSAGE, - number=41427278, - message="BulkInsertInstanceResource", + enabled: bool = proto.Field( + proto.BOOL, + number=1018689, + optional=True, ) - project: str = proto.Field( + oauth2_client_id: str = proto.Field( proto.STRING, - number=227560217, + number=314017611, + optional=True, ) - request_id: str = proto.Field( + oauth2_client_secret: str = proto.Field( proto.STRING, - number=37109963, + number=50999520, optional=True, ) - zone: str = proto.Field( + oauth2_client_secret_sha256: str = proto.Field( proto.STRING, - number=3744684, + number=112903782, + optional=True, ) -class BulkInsertInstanceResource(proto.Message): - r"""A transient resource used in compute.instances.bulkInsert and - compute.regionInstances.bulkInsert . This resource is not - persisted anywhere, it is used only for processing the requests. - +class BackendServiceList(proto.Message): + r"""Contains a list of BackendService resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - count (int): - The maximum number of instances to create. - - This field is a member of `oneof`_ ``_count``. - instance_properties (google.cloud.compute_v1beta.types.InstanceProperties): - The instance properties defining the VM - instances to be created. Required if - sourceInstanceTemplate is not provided. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_instance_properties``. - location_policy (google.cloud.compute_v1beta.types.LocationPolicy): - Policy for choosing target zone. For more - information, see Create VMs in bulk. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): + A list of BackendService resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#backendServiceList for lists of backend + services. - This field is a member of `oneof`_ ``_location_policy``. - min_count (int): - The minimum number of instances to create. If no min_count - is specified then count is used as the default value. If - min_count instances cannot be created, then no instances - will be created and instances already created will be - deleted. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_min_count``. - name_pattern (str): - The string pattern used for the names of the VMs. Either - name_pattern or per_instance_properties must be set. The - pattern must contain one continuous sequence of placeholder - hash characters (#) with each character corresponding to one - digit of the generated instance name. Example: a - name_pattern of inst-#### generates instance names such as - inst-0001 and inst-0002. If existing instances in the same - project and zone have names that match the name pattern then - the generated instance numbers start after the biggest - existing number. For example, if there exists an instance - with name inst-0050, then instance names generated using the - pattern inst-#### begin with inst-0051. The name pattern - placeholder #...# can contain up to 18 characters. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_name_pattern``. - per_instance_properties (MutableMapping[str, google.cloud.compute_v1beta.types.BulkInsertInstanceResourcePerInstanceProperties]): - Per-instance properties to be set on individual instances. - Keys of this map specify requested instance names. Can be - empty if name_pattern is used. - source_instance_template (str): - Specifies the instance template from which to - create instances. You may combine - sourceInstanceTemplate with instanceProperties - to override specific values from an existing - instance template. Bulk API follows the - semantics of JSON Merge Patch described by RFC - 7396. It can be a full or partial URL. For - example, the following are all valid URLs to an - instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate This - field is optional. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_source_instance_template``. + This field is a member of `oneof`_ ``_warning``. """ - count: int = proto.Field( - proto.INT64, - number=94851343, - optional=True, - ) - instance_properties: "InstanceProperties" = proto.Field( - proto.MESSAGE, - number=215355165, + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, - message="InstanceProperties", ) - location_policy: "LocationPolicy" = proto.Field( + items: MutableSequence["BackendService"] = proto.RepeatedField( proto.MESSAGE, - number=465689852, - optional=True, - message="LocationPolicy", - ) - min_count: int = proto.Field( - proto.INT64, - number=523228386, - optional=True, + number=100526016, + message="BackendService", ) - name_pattern: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=413815260, + number=3292052, optional=True, ) - per_instance_properties: MutableMapping[ - str, "BulkInsertInstanceResourcePerInstanceProperties" - ] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=108502267, - message="BulkInsertInstanceResourcePerInstanceProperties", - ) - source_instance_template: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=332423616, + number=79797525, optional=True, ) - - -class BulkInsertInstanceResourcePerInstanceProperties(proto.Message): - r"""Per-instance properties to be set on individual instances. To - be extended in the future. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - hostname (str): - Specifies the hostname of the instance. More details in: - https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention - - This field is a member of `oneof`_ ``_hostname``. - name (str): - This field is only temporary. It will be - removed. Do not use it. - - This field is a member of `oneof`_ ``_name``. - """ - - hostname: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=237067315, + number=456214797, optional=True, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class BulkInsertOperationStatus(proto.Message): - r""" +class BackendServiceListUsable(proto.Message): + r"""Contains a list of usable BackendService resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - created_vm_count (int): - [Output Only] Count of VMs successfully created so far. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_created_vm_count``. - deleted_vm_count (int): - [Output Only] Count of VMs that got deleted during rollback. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): + A list of BackendService resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#usableBackendServiceList for lists of usable + backend services. - This field is a member of `oneof`_ ``_deleted_vm_count``. - failed_to_create_vm_count (int): - [Output Only] Count of VMs that started creating but - encountered an error. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_failed_to_create_vm_count``. - status (str): - [Output Only] Creation status of BulkInsert operation - - information if the flow is rolling forward or rolling back. - Check the Status enum for the list of possible values. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_status``. - target_vm_count (int): - [Output Only] Count of VMs originally planned to be created. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_target_vm_count``. + This field is a member of `oneof`_ ``_warning``. """ - class Status(proto.Enum): - r"""[Output Only] Creation status of BulkInsert operation - information - if the flow is rolling forward or rolling back. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - CREATING (455564985): - Rolling forward - creating VMs. - DONE (2104194): - Done - ROLLING_BACK (259411649): - Rolling back - cleaning up after an error. - STATUS_UNSPECIFIED (42133066): - No description available. - """ - UNDEFINED_STATUS = 0 - CREATING = 455564985 - DONE = 2104194 - ROLLING_BACK = 259411649 - STATUS_UNSPECIFIED = 42133066 + @property + def raw_page(self): + return self - created_vm_count: int = proto.Field( - proto.INT32, - number=396924158, + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) - deleted_vm_count: int = proto.Field( - proto.INT32, - number=271756013, + items: MutableSequence["BackendService"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="BackendService", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - failed_to_create_vm_count: int = proto.Field( - proto.INT32, - number=58384104, + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, optional=True, ) - status: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=181260274, + number=456214797, optional=True, ) - target_vm_count: int = proto.Field( - proto.INT32, - number=532975733, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class BulkInsertRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.BulkInsert. See the method - description for details. +class BackendServiceLocalityLoadBalancingPolicyConfig(proto.Message): + r"""Container for either a built-in LB policy supported by gRPC + or Envoy or a custom one implemented by the end user. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bulk_insert_disk_resource_resource (google.cloud.compute_v1beta.types.BulkInsertDiskResource): - The body resource for this request - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + custom_policy (google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy): - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_custom_policy``. + policy (google.cloud.compute_v1beta.types.BackendServiceLocalityLoadBalancingPolicyConfigPolicy): + + This field is a member of `oneof`_ ``_policy``. """ - bulk_insert_disk_resource_resource: "BulkInsertDiskResource" = proto.Field( - proto.MESSAGE, - number=289799382, - message="BulkInsertDiskResource", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + custom_policy: "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" = ( + proto.Field( + proto.MESSAGE, + number=4818368, + optional=True, + message="BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", + ) ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + policy: "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" = proto.Field( + proto.MESSAGE, + number=91071794, optional=True, + message="BackendServiceLocalityLoadBalancingPolicyConfigPolicy", ) -class BulkInsertRegionInstanceRequest(proto.Message): - r"""A request message for RegionInstances.BulkInsert. See the - method description for details. +class BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy(proto.Message): + r"""The configuration for a custom policy implemented by the user + and deployed with the client. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bulk_insert_instance_resource_resource (google.cloud.compute_v1beta.types.BulkInsertInstanceResource): - The body resource for this request - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( - proto.MESSAGE, - number=41427278, - message="BulkInsertInstanceResource", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - - -class BulkSetLabelsDiskRequest(proto.Message): - r"""A request message for Disks.BulkSetLabels. See the method - description for details. + data (str): + An optional, arbitrary JSON object with + configuration data, understood by a locally + installed custom policy implementation. + This field is a member of `oneof`_ ``_data``. + name (str): + Identifies the custom policy. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + The value should match the name of a custom + implementation registered on the gRPC clients. + It should follow protocol buffer message naming + conventions and include the full path (for + example, myorg.CustomLbPolicy). The maximum + length is 256 characters. - Attributes: - bulk_zone_set_labels_request_resource (google.cloud.compute_v1beta.types.BulkZoneSetLabelsRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Do not specify the same custom policy more than + once for a backend. If you do, the configuration + is rejected. - This field is a member of `oneof`_ ``_request_id``. - resource (str): - Name or id of the resource for this request. + For an example of how to use this field, seeUse + a custom policy. - This field is a member of `oneof`_ ``_resource``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_name``. """ - bulk_zone_set_labels_request_resource: "BulkZoneSetLabelsRequest" = proto.Field( - proto.MESSAGE, - number=531305115, - message="BulkZoneSetLabelsRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + data: str = proto.Field( proto.STRING, - number=37109963, + number=3076010, optional=True, ) - resource: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=195806222, + number=3373707, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class BulkSetLabelsRequest(proto.Message): - r""" +class BackendServiceLocalityLoadBalancingPolicyConfigPolicy(proto.Message): + r"""The configuration for a built-in load balancing policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - label_fingerprint (str): - The fingerprint of the previous set of labels - for this resource, used to detect conflicts. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You may optionally provide an - up-to-date fingerprint hash in order to update - or change labels. Make a get() request to the - resource to get the latest fingerprint. - - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - The labels to set for this resource. - """ - - label_fingerprint: str = proto.Field( - proto.STRING, - number=178124825, - optional=True, - ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, - ) - - -class BulkZoneSetLabelsRequest(proto.Message): - r""" + name (str): + The name of a locality load-balancing policy. Valid values + include ROUND_ROBIN and, for Java clients, LEAST_REQUEST. + For information about these values, see the description of + localityLbPolicy. - Attributes: - requests (MutableSequence[google.cloud.compute_v1beta.types.BulkSetLabelsRequest]): + Do not specify the same policy more than once for a backend. + If you do, the configuration is rejected. Check the Name + enum for the list of possible values. + This field is a member of `oneof`_ ``_name``. """ - requests: MutableSequence["BulkSetLabelsRequest"] = proto.RepeatedField( - proto.MESSAGE, - number=143613892, - message="BulkSetLabelsRequest", - ) - - -class BundledLocalSsds(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + class Name(proto.Enum): + r"""The name of a locality load-balancing policy. Valid values include + ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information + about these values, see the description of localityLbPolicy. - Attributes: - default_interface (str): - The default disk interface if the interface - is not specified. + Do not specify the same policy more than once for a backend. If you + do, the configuration is rejected. - This field is a member of `oneof`_ ``_default_interface``. - partition_count (int): - The number of partitions. + Values: + UNDEFINED_NAME (0): + A value indicating that the enum field is not + set. + INVALID_LB_POLICY (323318707): + No description available. + LEAST_REQUEST (46604921): + An O(1) algorithm which selects two random + healthy hosts and picks the host which has fewer + active requests. + MAGLEV (119180266): + This algorithm implements consistent hashing + to backends. Maglev can be used as a drop in + replacement for the ring hash load balancer. + Maglev is not as stable as ring hash but has + faster table lookup build times and host + selection times. For more information about + Maglev, seeMaglev: - This field is a member of `oneof`_ ``_partition_count``. - """ + A Fast and Reliable Software Network Load + Balancer. + ORIGINAL_DESTINATION (166297216): + Backend host is selected based on the client + connection metadata, i.e., connections are + opened to the same address as the destination + address of the incoming connection before the + connection was redirected to the load balancer. + RANDOM (262527171): + The load balancer selects a random healthy + host. + RING_HASH (432795069): + The ring/modulo hash load balancer implements + consistent hashing to backends. The algorithm + has the property that the addition/removal of a + host from a set of N hosts only affects 1/N of + the requests. + ROUND_ROBIN (153895801): + This is a simple policy in which each healthy + backend is selected in round robin order. This + is the default. + WEIGHTED_GCP_RENDEZVOUS (82501640): + Per-instance weighted Load Balancing via + health check reported weights. In internal + passthrough network load balancing, it is + weighted rendezvous hashing. + This option is only supported in internal + passthrough network load balancing. + WEIGHTED_MAGLEV (254930962): + Per-instance weighted Load Balancing via health check + reported weights. If set, the Backend Service must configure + a non legacy HTTP-based Health Check, and health check + replies are expected to contain non-standard HTTP response + header field X-Load-Balancing-Endpoint-Weight to specify the + per-instance weights. If set, Load Balancing is weighted + based on the per-instance weights reported in the last + processed health check replies, as long as every instance + either reported a valid weight or had UNAVAILABLE_WEIGHT. + Otherwise, Load Balancing remains equal-weight. This option + is only supported in Network Load Balancing. + WEIGHTED_ROUND_ROBIN (5584977): + Per-endpoint weighted round-robin Load + Balancing using weights computed from Backend + reported Custom Metrics. If set, the Backend + Service responses are expected to contain + non-standard HTTP response header field + Endpoint-Load-Metrics. The reported metrics + to use for computing the weights are specified + via the customMetrics fields. + """ + UNDEFINED_NAME = 0 + INVALID_LB_POLICY = 323318707 + LEAST_REQUEST = 46604921 + MAGLEV = 119180266 + ORIGINAL_DESTINATION = 166297216 + RANDOM = 262527171 + RING_HASH = 432795069 + ROUND_ROBIN = 153895801 + WEIGHTED_GCP_RENDEZVOUS = 82501640 + WEIGHTED_MAGLEV = 254930962 + WEIGHTED_ROUND_ROBIN = 5584977 - default_interface: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=17309883, - optional=True, - ) - partition_count: int = proto.Field( - proto.INT32, - number=408514426, + number=3373707, optional=True, ) -class CacheInvalidationRule(proto.Message): - r""" +class BackendServiceLogConfig(proto.Message): + r"""The available logging options for the load balancer traffic + served by this backend service. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cache_tags (MutableSequence[str]): - A list of cache tags used to identify cached objects. - - Cache tags are specified when the response is first cached, - by setting the ``Cache-Tag`` response header at the origin. - - Multiple cache tags in the same invalidation request are - treated as Boolean ``OR`` - for example, - ``tag1 OR tag2 OR tag3``. - If other fields are also - specified, these are treated as Boolean ``AND`` with any - tags. Up to 10 tags can be specified in a single - invalidation request. - host (str): - If set, this invalidation rule will only - apply to requests with a Host header matching - host. + enable (bool): + Denotes whether to enable logging for the + load balancer traffic served by this backend + service. The default value is false. - This field is a member of `oneof`_ ``_host``. - path (str): + This field is a member of `oneof`_ ``_enable``. + optional_fields (MutableSequence[str]): + This field can only be specified if logging + is enabled for this backend service and + "logConfig.optionalMode" was set to CUSTOM. + Contains a list of optional fields you want to + include in the logs. For example: - This field is a member of `oneof`_ ``_path``. + serverInstance, serverGkeDetails.cluster, + serverGkeDetails.pod.podNamespace + optional_mode (str): + This field can only be specified if logging is enabled for + this backend service. Configures whether all, none or a + subset of optional fields should be added to the reported + logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, + CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the + OptionalMode enum for the list of possible values. + + This field is a member of `oneof`_ ``_optional_mode``. + sample_rate (float): + This field can only be specified if logging is enabled for + this backend service. The value of the field must be in [0, + 1]. This configures the sampling rate of requests to the + load balancer where 1.0 means all logged requests are + reported and 0.0 means no logged requests are reported. The + default value is 1.0. + + This field is a member of `oneof`_ ``_sample_rate``. """ - cache_tags: MutableSequence[str] = proto.RepeatedField( + class OptionalMode(proto.Enum): + r"""This field can only be specified if logging is enabled for this + backend service. Configures whether all, none or a subset of + optional fields should be added to the reported logs. One of + [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is + EXCLUDE_ALL_OPTIONAL. + + Values: + UNDEFINED_OPTIONAL_MODE (0): + A value indicating that the enum field is not + set. + CUSTOM (388595569): + A subset of optional fields. + EXCLUDE_ALL_OPTIONAL (168636099): + None optional fields. + INCLUDE_ALL_OPTIONAL (535606965): + All optional fields. + """ + UNDEFINED_OPTIONAL_MODE = 0 + CUSTOM = 388595569 + EXCLUDE_ALL_OPTIONAL = 168636099 + INCLUDE_ALL_OPTIONAL = 535606965 + + enable: bool = proto.Field( + proto.BOOL, + number=311764355, + optional=True, + ) + optional_fields: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=29073078, + number=528589944, ) - host: str = proto.Field( + optional_mode: str = proto.Field( proto.STRING, - number=3208616, + number=128697122, optional=True, ) - path: str = proto.Field( - proto.STRING, - number=3433509, + sample_rate: float = proto.Field( + proto.FLOAT, + number=153193045, optional=True, ) -class CacheKeyPolicy(proto.Message): - r"""Message containing what to include in the cache key for a - request for Cloud CDN. - +class BackendServiceNetworkPassThroughLbTrafficPolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - include_host (bool): - If true, requests to different hosts will be - cached separately. + zonal_affinity (google.cloud.compute_v1beta.types.BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity): + When configured, new connections are load + balanced across healthy backend endpoints in the + local zone. - This field is a member of `oneof`_ ``_include_host``. - include_http_headers (MutableSequence[str]): - Allows HTTP request headers (by name) to be - used in the cache key. - include_named_cookies (MutableSequence[str]): - Allows HTTP cookies (by name) to be used in - the cache key. The name=value pair will be used - in the cache key Cloud CDN generates. - include_protocol (bool): - If true, http and https requests will be - cached separately. + This field is a member of `oneof`_ ``_zonal_affinity``. + """ - This field is a member of `oneof`_ ``_include_protocol``. - include_query_string (bool): - If true, include query string parameters in the cache key - according to query_string_whitelist and - query_string_blacklist. If neither is set, the entire query - string will be included. If false, the query string will be - excluded from the cache key entirely. + zonal_affinity: "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity" = ( + proto.Field( + proto.MESSAGE, + number=536266051, + optional=True, + message="BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", + ) + ) - This field is a member of `oneof`_ ``_include_query_string``. - query_string_blacklist (MutableSequence[str]): - Names of query string parameters to exclude in cache keys. - All other parameters will be included. Either specify - query_string_whitelist or query_string_blacklist, not both. - '&' and '=' will be percent encoded and not treated as - delimiters. - query_string_whitelist (MutableSequence[str]): - Names of query string parameters to include in cache keys. - All other parameters will be excluded. Either specify - query_string_whitelist or query_string_blacklist, not both. - '&' and '=' will be percent encoded and not treated as - delimiters. + +class BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + spillover (str): + This field indicates whether zonal affinity is enabled or + not. The possible values are: + + :: + + - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity + is disabled. The load balancer distributes new connections to all + healthy backend endpoints across all zones. + - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there are no healthy + backend endpoints in the local zone, the load balancer distributes + new connections to all backend endpoints in the local zone. + - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there aren't enough + healthy backend endpoints in the local zone, the load balancer + distributes new connections to all healthy backend endpoints across all + zones. + + Check the Spillover enum for the list of possible values. + + This field is a member of `oneof`_ ``_spillover``. + spillover_ratio (float): + The value of the field must be in [0, 1]. When the ratio of + the count of healthy backend endpoints in a zone to the + count of backend endpoints in that same zone is equal to or + above this threshold, the load balancer distributes new + connections to all healthy endpoints in the local zone only. + When the ratio of the count of healthy backend endpoints in + a zone to the count of backend endpoints in that same zone + is below this threshold, the load balancer distributes all + new connections to all healthy endpoints across all zones. + + This field is a member of `oneof`_ ``_spillover_ratio``. """ - include_host: bool = proto.Field( - proto.BOOL, - number=486867679, - optional=True, - ) - include_http_headers: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=2489606, - ) - include_named_cookies: MutableSequence[str] = proto.RepeatedField( + class Spillover(proto.Enum): + r"""This field indicates whether zonal affinity is enabled or not. The + possible values are: + + :: + + - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity + is disabled. The load balancer distributes new connections to all + healthy backend endpoints across all zones. + - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there are no healthy + backend endpoints in the local zone, the load balancer distributes + new connections to all backend endpoints in the local zone. + - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is + enabled. The load balancer distributes new connections to all healthy + backend endpoints in the local zone only. If there aren't enough + healthy backend endpoints in the local zone, the load balancer + distributes new connections to all healthy backend endpoints across all + zones. + + Values: + UNDEFINED_SPILLOVER (0): + A value indicating that the enum field is not + set. + ZONAL_AFFINITY_DISABLED (230207960): + No description available. + ZONAL_AFFINITY_SPILL_CROSS_ZONE (251048410): + No description available. + ZONAL_AFFINITY_STAY_WITHIN_ZONE (12177782): + No description available. + """ + UNDEFINED_SPILLOVER = 0 + ZONAL_AFFINITY_DISABLED = 230207960 + ZONAL_AFFINITY_SPILL_CROSS_ZONE = 251048410 + ZONAL_AFFINITY_STAY_WITHIN_ZONE = 12177782 + + spillover: str = proto.Field( proto.STRING, - number=87316530, - ) - include_protocol: bool = proto.Field( - proto.BOOL, - number=303507535, + number=505501440, optional=True, ) - include_query_string: bool = proto.Field( - proto.BOOL, - number=474036639, + spillover_ratio: float = proto.Field( + proto.FLOAT, + number=135580172, optional=True, ) - query_string_blacklist: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=354964742, - ) - query_string_whitelist: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=52456496, - ) -class CalendarModeAdviceRequest(proto.Message): - r"""A request to recommend the best way to consume the specified - resources in the future. +class BackendServiceParams(proto.Message): + r"""Additional Backend Service parameters. Attributes: - future_resources_specs (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesSpec]): - Specification of resources to create in the - future. The key of the map is an arbitrary - string specified by the caller. Value of the map - is a specification of required resources and - their constraints. Currently only one value is - allowed in this map. + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ - future_resources_specs: MutableMapping[str, "FutureResourcesSpec"] = proto.MapField( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - proto.MESSAGE, - number=255012610, - message="FutureResourcesSpec", + proto.STRING, + number=377671164, ) -class CalendarModeAdviceResponse(proto.Message): - r"""A response containing the recommended way of creating the - specified resources in the future. It contains (will contain) - multiple recommendations that can be analyzed by the customer - and the best one can be picked. +class BackendServiceReference(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - recommendations (MutableSequence[google.cloud.compute_v1beta.types.CalendarModeRecommendation]): - Recommendations where, how and when to create - the requested resources in order to maximize - their obtainability and minimize cost. + backend_service (str): + + This field is a member of `oneof`_ ``_backend_service``. """ - recommendations: MutableSequence[ - "CalendarModeRecommendation" - ] = proto.RepeatedField( - proto.MESSAGE, - number=324515802, - message="CalendarModeRecommendation", + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + optional=True, ) -class CalendarModeAdviceRpcRequest(proto.Message): - r"""A request message for Advice.CalendarMode. See the method - description for details. +class BackendServiceTlsSettings(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - calendar_mode_advice_request_resource (google.cloud.compute_v1beta.types.CalendarModeAdviceRequest): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ + authentication_config (str): + Reference to the BackendAuthenticationConfig + resource from the networksecurity.googleapis.com + namespace. Can be used in authenticating TLS + connections to the backend, as specified by the + authenticationMode field. Can only be specified + if authenticationMode is not NONE. - calendar_mode_advice_request_resource: "CalendarModeAdviceRequest" = proto.Field( - proto.MESSAGE, - number=162098922, - message="CalendarModeAdviceRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_authentication_config``. + identity (str): + Assigns the Managed Identity for the BackendService + Workload. + Use this property to configure the load balancer back-end to + use certificates and roots of trust provisioned by the + Managed Workload Identity system. -class CalendarModeRecommendation(proto.Message): - r"""A single recommendation to create requested resources. - Contains detailed recommendations for every future resources - specification specified in CalendarModeAdviceRequest. + The ``identity`` property is the fully-specified SPIFFE ID + to use in the SVID presented by the Load Balancer Workload. - Attributes: - recommendations_per_spec (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesRecommendation]): - Recommendations for every future resource - specification passed in - CalendarModeAdviceRequest. Keys of the map - correspond to keys specified in the request. - """ + The SPIFFE ID must be a resource starting with the + ``trustDomain`` property value, followed by the path to the + Managed Workload Identity. - recommendations_per_spec: MutableMapping[ - str, "FutureResourcesRecommendation" - ] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=61331554, - message="FutureResourcesRecommendation", - ) + Supported SPIFFE ID format: + :: -class CancelFutureReservationRequest(proto.Message): - r"""A request message for FutureReservations.Cancel. See the - method description for details. + - ///ns//sa/ + The Trust Domain within the Managed Identity must refer to a + valid Workload Identity Pool. The TrustConfig and + CertificateIssuanceConfig will be inherited from the + Workload Identity Pool. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Restrictions: - Attributes: - future_reservation (str): - Name of the future reservation to retrieve. - Name should conform to RFC1035. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + :: - This field is a member of `oneof`_ ``_request_id``. - zone (str): - Name of the zone for this request. Name - should conform to RFC1035. + - If you set the `identity` property, you cannot manually set + the following fields: + - tlsSettings.sni + - tlsSettings.subjectAltNames + - tlsSettings.authenticationConfig + + When defining a ``identity`` for a RegionBackendServices, + the corresponding Workload Identity Pool must have a ca_pool + configured in the same region. + + The system will set up a + read-onlytlsSettings.authenticationConfig for the Managed + Identity. + + This field is a member of `oneof`_ ``_identity``. + sni (str): + Server Name Indication - see RFC3546 section 3.1. If set, + the load balancer sends this string as the SNI hostname in + the TLS connection to the backend, and requires that this + string match a Subject Alternative Name (SAN) in the + backend's server certificate. With a Regional Internet NEG + backend, if the SNI is specified here, the load balancer + uses it regardless of whether the Regional Internet NEG is + specified with FQDN or IP address and port. When both sni + and subjectAltNames[] are specified, the load balancer + matches the backend certificate's SAN only to + subjectAltNames[]. + + This field is a member of `oneof`_ ``_sni``. + subject_alt_names (MutableSequence[google.cloud.compute_v1beta.types.BackendServiceTlsSettingsSubjectAltName]): + A list of Subject Alternative Names (SANs) that the Load + Balancer verifies during a TLS handshake with the backend. + When the server presents its X.509 certificate to the Load + Balancer, the Load Balancer inspects the certificate's SAN + field, and requires that at least one SAN match one of the + subjectAltNames in the list. This field is limited to 5 + entries. When both sni and subjectAltNames[] are specified, + the load balancer matches the backend certificate's SAN only + to subjectAltNames[]. """ - future_reservation: str = proto.Field( + authentication_config: str = proto.Field( proto.STRING, - number=56206160, + number=408053481, + optional=True, ) - project: str = proto.Field( + identity: str = proto.Field( proto.STRING, - number=227560217, + number=401109182, + optional=True, ) - request_id: str = proto.Field( + sni: str = proto.Field( proto.STRING, - number=37109963, + number=114030, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + subject_alt_names: MutableSequence[ + "BackendServiceTlsSettingsSubjectAltName" + ] = proto.RepeatedField( + proto.MESSAGE, + number=330029535, + message="BackendServiceTlsSettingsSubjectAltName", ) -class CancelInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - InstanceGroupManagerResizeRequests.Cancel. See the method - description for details. +class BackendServiceTlsSettingsSubjectAltName(proto.Message): + r"""A Subject Alternative Name that the load balancer matches + against the SAN field in the TLS certificate provided by the + backend, specified as either a DNS name or a URI, in accordance + with RFC 5280 4.2.1.6 .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035 or be a resource - ID. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + dns_name (str): + The SAN specified as a DNS Name. - This field is a member of `oneof`_ ``_request_id``. - resize_request (str): - The name of the resize request to cancel. The - name should conform to RFC1035 or be a resource - ID. - zone (str): - The name of the zone where the managed - instance group is located. The name should - conform to RFC1035. + This field is a member of `oneof`_ ``_dns_name``. + uniform_resource_identifier (str): + The SAN specified as a URI. + + This field is a member of `oneof`_ ``_uniform_resource_identifier``. """ - instance_group_manager: str = proto.Field( + dns_name: str = proto.Field( proto.STRING, - number=249363395, + number=411992033, + optional=True, ) - project: str = proto.Field( + uniform_resource_identifier: str = proto.Field( proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - resize_request: str = proto.Field( - proto.STRING, - number=216941060, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + number=491409007, + optional=True, ) -class CancelRegionInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagerResizeRequests.Cancel. See the method - description for details. - +class BackendServiceUsedBy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. - project (str): - Project ID for this request. - region (str): - The name of the region scoping this request. - Name should conform to RFC1035. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + reference (str): + Output only. [Output Only] Server-defined URL for resources + referencing given BackendService like UrlMaps, + TargetTcpProxies, TargetSslProxies and ForwardingRule. - This field is a member of `oneof`_ ``_request_id``. - resize_request (str): - The name of the resize request to cancel. - Name should conform to RFC1035 or be a resource - ID. + This field is a member of `oneof`_ ``_reference``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + reference: str = proto.Field( proto.STRING, - number=37109963, + number=148586315, optional=True, ) - resize_request: str = proto.Field( - proto.STRING, - number=216941060, - ) -class CircuitBreakers(proto.Message): - r"""Settings controlling the volume of requests, connections and - retries to this backend service. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class BackendServicesGetEffectiveSecurityPoliciesResponse(proto.Message): + r""" Attributes: - connect_timeout (google.cloud.compute_v1beta.types.Duration): - The timeout for new network connections to - hosts. + security_policies (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicy]): + Effective security policies for the backend + service. + """ - This field is a member of `oneof`_ ``_connect_timeout``. - max_connections (int): - The maximum number of connections to the - backend service. If not specified, there is no - limit. Not supported when the backend service is - referenced by a URL map that is bound to target - gRPC proxy that has validateForProxyless field - set to true. + security_policies: MutableSequence["SecurityPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=127783791, + message="SecurityPolicy", + ) - This field is a member of `oneof`_ ``_max_connections``. - max_pending_requests (int): - The maximum number of pending requests - allowed to the backend service. If not - specified, there is no limit. Not supported when - the backend service is referenced by a URL map - that is bound to target gRPC proxy that has - validateForProxyless field set to true. - This field is a member of `oneof`_ ``_max_pending_requests``. - max_requests (int): - The maximum number of parallel requests that - allowed to the backend service. If not - specified, there is no limit. +class BackendServicesScopedList(proto.Message): + r""" - This field is a member of `oneof`_ ``_max_requests``. - max_requests_per_connection (int): - Maximum requests for a single connection to - the backend service. This parameter is respected - by both the HTTP/1.1 and HTTP/2 implementations. - If not specified, there is no limit. Setting - this parameter to 1 will effectively disable - keep alive. Not supported when the backend - service is referenced by a URL map that is bound - to target gRPC proxy that has - validateForProxyless field set to true. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_max_requests_per_connection``. - max_retries (int): - The maximum number of parallel retries - allowed to the backend cluster. If not - specified, the default is 1. Not supported when - the backend service is referenced by a URL map - that is bound to target gRPC proxy that has - validateForProxyless field set to true. + Attributes: + backend_services (MutableSequence[google.cloud.compute_v1beta.types.BackendService]): + A list of BackendServices contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. - This field is a member of `oneof`_ ``_max_retries``. + This field is a member of `oneof`_ ``_warning``. """ - connect_timeout: "Duration" = proto.Field( + backend_services: MutableSequence["BackendService"] = proto.RepeatedField( proto.MESSAGE, - number=495510284, - optional=True, - message="Duration", - ) - max_connections: int = proto.Field( - proto.INT32, - number=110652154, - optional=True, - ) - max_pending_requests: int = proto.Field( - proto.INT32, - number=375558887, - optional=True, - ) - max_requests: int = proto.Field( - proto.INT32, - number=28097599, - optional=True, - ) - max_requests_per_connection: int = proto.Field( - proto.INT32, - number=361630528, - optional=True, + number=388522409, + message="BackendService", ) - max_retries: int = proto.Field( - proto.INT32, - number=55546219, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class CloneRulesFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.CloneRules. See the - method description for details. - +class BfdPacket(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to update. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + authentication_present (bool): + The Authentication Present bit of the BFD + packet. This is specified in section 4.1 + ofRFC5880 - This field is a member of `oneof`_ ``_request_id``. - source_firewall_policy (str): - The firewall policy from which to copy rules. + This field is a member of `oneof`_ ``_authentication_present``. + control_plane_independent (bool): + The Control Plane Independent bit of the BFD + packet. This is specified in section 4.1 + ofRFC5880 - This field is a member of `oneof`_ ``_source_firewall_policy``. - """ + This field is a member of `oneof`_ ``_control_plane_independent``. + demand (bool): + The demand bit of the BFD packet. This is + specified in section 4.1 ofRFC5880 - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - source_firewall_policy: str = proto.Field( - proto.STRING, - number=25013549, - optional=True, - ) + This field is a member of `oneof`_ ``_demand``. + diagnostic (str): + The diagnostic code specifies the local + system's reason for the last change in session + state. This allows remote systems to determine + the reason that the previous session failed, for + example. These diagnostic codes are specified in + section 4.1 ofRFC5880 + Check the Diagnostic enum for the list of + possible values. + This field is a member of `oneof`_ ``_diagnostic``. + final (bool): + The Final bit of the BFD packet. This is + specified in section 4.1 ofRFC5880 -class CloneRulesNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.CloneRules. See - the method description for details. + This field is a member of `oneof`_ ``_final``. + length (int): + The length of the BFD Control packet in + bytes. This is specified in section 4.1 + ofRFC5880 + This field is a member of `oneof`_ ``_length``. + min_echo_rx_interval_ms (int): + The Required Min Echo RX Interval value in + the BFD packet. This is specified in section 4.1 + ofRFC5880 - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_min_echo_rx_interval_ms``. + min_rx_interval_ms (int): + The Required Min RX Interval value in the BFD + packet. This is specified in section 4.1 + ofRFC5880 - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_min_rx_interval_ms``. + min_tx_interval_ms (int): + The Desired Min TX Interval value in the BFD + packet. This is specified in section 4.1 + ofRFC5880 - This field is a member of `oneof`_ ``_request_id``. - source_firewall_policy (str): - The firewall policy from which to copy rules. + This field is a member of `oneof`_ ``_min_tx_interval_ms``. + multiplier (int): + The detection time multiplier of the BFD + packet. This is specified in section 4.1 + ofRFC5880 - This field is a member of `oneof`_ ``_source_firewall_policy``. - """ + This field is a member of `oneof`_ ``_multiplier``. + multipoint (bool): + The multipoint bit of the BFD packet. This is + specified in section 4.1 ofRFC5880 - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - source_firewall_policy: str = proto.Field( - proto.STRING, - number=25013549, - optional=True, - ) + This field is a member of `oneof`_ ``_multipoint``. + my_discriminator (int): + The My Discriminator value in the BFD packet. + This is specified in section 4.1 ofRFC5880 + This field is a member of `oneof`_ ``_my_discriminator``. + poll (bool): + The Poll bit of the BFD packet. This is + specified in section 4.1 ofRFC5880 -class CloneRulesRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.CloneRules. See the method - description for details. + This field is a member of `oneof`_ ``_poll``. + state (str): + The current BFD session state as seen by the + transmitting system. These states are specified + in section 4.1 ofRFC5880 Check the State enum + for the list of possible values. + This field is a member of `oneof`_ ``_state``. + version (int): + The version number of the BFD protocol, as + specified in section 4.1 ofRFC5880. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_version``. + your_discriminator (int): + The Your Discriminator value in the BFD + packet. This is specified in section 4.1 + ofRFC5880 - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_your_discriminator``. + """ - This field is a member of `oneof`_ ``_request_id``. - source_firewall_policy (str): - The firewall policy from which to copy rules. + class Diagnostic(proto.Enum): + r"""The diagnostic code specifies the local system's reason for + the last change in session state. This allows remote systems to + determine the reason that the previous session failed, for + example. These diagnostic codes are specified in section 4.1 + ofRFC5880 - This field is a member of `oneof`_ ``_source_firewall_policy``. - """ + Values: + UNDEFINED_DIAGNOSTIC (0): + A value indicating that the enum field is not + set. + ADMINISTRATIVELY_DOWN (121685798): + No description available. + CONCATENATED_PATH_DOWN (26186892): + No description available. + CONTROL_DETECTION_TIME_EXPIRED (135478383): + No description available. + DIAGNOSTIC_UNSPECIFIED (58720895): + No description available. + ECHO_FUNCTION_FAILED (220687466): + No description available. + FORWARDING_PLANE_RESET (19715882): + No description available. + NEIGHBOR_SIGNALED_SESSION_DOWN (374226742): + No description available. + NO_DIAGNOSTIC (222503141): + No description available. + PATH_DOWN (290605180): + No description available. + REVERSE_CONCATENATED_PATH_DOWN (479337129): + No description available. + """ + UNDEFINED_DIAGNOSTIC = 0 + ADMINISTRATIVELY_DOWN = 121685798 + CONCATENATED_PATH_DOWN = 26186892 + CONTROL_DETECTION_TIME_EXPIRED = 135478383 + DIAGNOSTIC_UNSPECIFIED = 58720895 + ECHO_FUNCTION_FAILED = 220687466 + FORWARDING_PLANE_RESET = 19715882 + NEIGHBOR_SIGNALED_SESSION_DOWN = 374226742 + NO_DIAGNOSTIC = 222503141 + PATH_DOWN = 290605180 + REVERSE_CONCATENATED_PATH_DOWN = 479337129 - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, + class State(proto.Enum): + r"""The current BFD session state as seen by the transmitting + system. These states are specified in section 4.1 ofRFC5880 + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ADMIN_DOWN (128544690): + No description available. + DOWN (2104482): + No description available. + INIT (2252048): + No description available. + STATE_UNSPECIFIED (470755401): + No description available. + UP (2715): + No description available. + """ + UNDEFINED_STATE = 0 + ADMIN_DOWN = 128544690 + DOWN = 2104482 + INIT = 2252048 + STATE_UNSPECIFIED = 470755401 + UP = 2715 + + authentication_present: bool = proto.Field( + proto.BOOL, + number=105974260, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + control_plane_independent: bool = proto.Field( + proto.BOOL, + number=62363573, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + demand: bool = proto.Field( + proto.BOOL, + number=275180107, + optional=True, ) - request_id: str = proto.Field( + diagnostic: str = proto.Field( proto.STRING, - number=37109963, + number=62708647, optional=True, ) - source_firewall_policy: str = proto.Field( + final: bool = proto.Field( + proto.BOOL, + number=97436022, + optional=True, + ) + length: int = proto.Field( + proto.UINT32, + number=504249062, + optional=True, + ) + min_echo_rx_interval_ms: int = proto.Field( + proto.UINT32, + number=97286868, + optional=True, + ) + min_rx_interval_ms: int = proto.Field( + proto.UINT32, + number=463399028, + optional=True, + ) + min_tx_interval_ms: int = proto.Field( + proto.UINT32, + number=526023602, + optional=True, + ) + multiplier: int = proto.Field( + proto.UINT32, + number=191331777, + optional=True, + ) + multipoint: bool = proto.Field( + proto.BOOL, + number=191421431, + optional=True, + ) + my_discriminator: int = proto.Field( + proto.UINT32, + number=76663113, + optional=True, + ) + poll: bool = proto.Field( + proto.BOOL, + number=3446719, + optional=True, + ) + state: str = proto.Field( proto.STRING, - number=25013549, + number=109757585, + optional=True, + ) + version: int = proto.Field( + proto.UINT32, + number=351608024, + optional=True, + ) + your_discriminator: int = proto.Field( + proto.UINT32, + number=515634064, optional=True, ) -class Commitment(proto.Message): - r"""Represents a regional resource-based commitment resource. - Creating this commitment resource means that you are purchasing - a resource-based committed use contract, with an explicit start - and end time. You can purchase resource-based commitments for - both hardware and software resources. For more information, read - Resource-based committed use discounts - +class BfdStatus(proto.Message): + r"""Next free: 15 .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - auto_renew (bool): - Specifies whether to automatically renew the - commitment at the end of its current term. The - default value is false. If you set the field to - true, each time your commitment reaches the end - of its term, Compute Engine automatically renews - it for another term. You can update this field - anytime before the commitment expires. For - example, if the commitment is set to expire at - 12 AM UTC-8 on January 3, 2027, you can update - this field until 11:59 PM UTC-8 on January 2, - 2027. - - This field is a member of `oneof`_ ``_auto_renew``. - category (str): - The category of the commitment; specifies - whether the commitment is for hardware or - software resources. Category MACHINE specifies - that you are committing to hardware machine - resources such as VCPU or MEMORY, listed in - resources. Category LICENSE specifies that you - are committing to software licenses, listed in - licenseResources. Note that if you specify - MACHINE commitments, then you must also specify - a type to indicate the machine series of the - hardware resource that you are committing to. - Check the Category enum for the list of possible - values. - - This field is a member of `oneof`_ ``_category``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + bfd_session_initialization_mode (str): + The BFD session initialization mode for this + BGP peer. If set to ACTIVE, the Cloud Router + will initiate the BFD session for this BGP peer. + If set to PASSIVE, the Cloud Router will wait + for the peer router to initiate the BFD session + for this BGP peer. If set to DISABLED, BFD is + disabled for this BGP peer. + Check the BfdSessionInitializationMode enum for + the list of possible values. - This field is a member of `oneof`_ ``_creation_timestamp``. - custom_end_timestamp (str): - [Input Only] Optional, specifies the requested commitment - end time in RFC3339 text format. Use this option when the - desired commitment's end date is later than the start date + - term duration. + This field is a member of `oneof`_ ``_bfd_session_initialization_mode``. + config_update_timestamp_micros (int): + Unix timestamp of the most recent config + update. - This field is a member of `oneof`_ ``_custom_end_timestamp``. - description (str): - An optional description of the commitment. - You can provide this property when you create - the resource. + This field is a member of `oneof`_ ``_config_update_timestamp_micros``. + control_packet_counts (google.cloud.compute_v1beta.types.BfdStatusPacketCounts): + Control packet counts for the current BFD + session. - This field is a member of `oneof`_ ``_description``. - end_timestamp (str): - [Output Only] Commitment end time in RFC3339 text format. - - This field is a member of `oneof`_ ``_end_timestamp``. - existing_reservations (MutableSequence[str]): - - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#commitment for commitments. - - This field is a member of `oneof`_ ``_kind``. - license_resource (google.cloud.compute_v1beta.types.LicenseResourceCommitment): - The license specification required as part of - a license commitment. - - This field is a member of `oneof`_ ``_license_resource``. - merge_source_commitments (MutableSequence[str]): - The list of source commitments that you are - merging to create the new merged commitment. For - more information, see Merging commitments. - name (str): - Name of the commitment. You must specify a name when you - purchase the commitment. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - - This field is a member of `oneof`_ ``_name``. - plan (str): - The minimum time duration that you commit to purchasing - resources. The plan that you choose determines the preset - term length of the commitment (which is 1 year or 3 years) - and affects the discount rate that you receive for your - resources. Committing to a longer time duration typically - gives you a higher discount rate. The supported values for - this field are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH - (3 years). Check the Plan enum for the list of possible - values. - - This field is a member of `oneof`_ ``_plan``. - region (str): - [Output Only] URL of the region where the commitment and - committed resources are located. - - This field is a member of `oneof`_ ``_region``. - reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): - The list of new reservations that you want to - create and attach to this commitment. You must - attach reservations to your commitment if your - commitment specifies any GPUs or Local SSD - disks. For more information, see Attach - reservations to resource-based commitments. - Specify this property only if you want to create - new reservations to attach. To attach existing - reservations, specify the existingReservations - property instead. - resource_status (google.cloud.compute_v1beta.types.CommitmentResourceStatus): - [Output Only] Status information for Commitment resource. - - This field is a member of `oneof`_ ``_resource_status``. - resources (MutableSequence[google.cloud.compute_v1beta.types.ResourceCommitment]): - The list of all the hardware resources, with - their types and amounts, that you want to commit - to. Specify as a separate entry in the list for - each individual resource type. - self_link (str): - [Output Only] Server-defined URL for the resource. + This field is a member of `oneof`_ ``_control_packet_counts``. + control_packet_intervals (MutableSequence[google.cloud.compute_v1beta.types.PacketIntervals]): + Inter-packet time interval statistics for + control packets. + local_diagnostic (str): + The diagnostic code specifies the local + system's reason for the last change in session + state. This allows remote systems to determine + the reason that the previous session failed, for + example. These diagnostic codes are specified in + section 4.1 ofRFC5880 + Check the LocalDiagnostic enum for the list of + possible values. - This field is a member of `oneof`_ ``_self_link``. - split_source_commitment (str): - The source commitment from which you are - transferring resources to create the new split - commitment. For more information, see Split - commitments. + This field is a member of `oneof`_ ``_local_diagnostic``. + local_state (str): + The current BFD session state as seen by the + transmitting system. These states are specified + in section 4.1 ofRFC5880 Check the LocalState + enum for the list of possible values. - This field is a member of `oneof`_ ``_split_source_commitment``. - start_timestamp (str): - [Output Only] Commitment start time in RFC3339 text format. + This field is a member of `oneof`_ ``_local_state``. + negotiated_local_control_tx_interval_ms (int): + Negotiated transmit interval for control + packets. - This field is a member of `oneof`_ ``_start_timestamp``. - status (str): - [Output Only] Status of the commitment with regards to - eventual expiration (each commitment has an end date - defined). Status can be one of the following values: - NOT_YET_ACTIVE, ACTIVE, or EXPIRED. Check the Status enum - for the list of possible values. + This field is a member of `oneof`_ ``_negotiated_local_control_tx_interval_ms``. + rx_packet (google.cloud.compute_v1beta.types.BfdPacket): + The most recent Rx control packet for this + BFD session. - This field is a member of `oneof`_ ``_status``. - status_message (str): - [Output Only] An optional, human-readable explanation of the - status. + This field is a member of `oneof`_ ``_rx_packet``. + tx_packet (google.cloud.compute_v1beta.types.BfdPacket): + The most recent Tx control packet for this + BFD session. - This field is a member of `oneof`_ ``_status_message``. - type_ (str): - The type of commitment; specifies the machine series for - which you want to commit to purchasing resources. The choice - of machine series affects the discount rate and the eligible - resource types. The type must be one of the following: - ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3, - ACCELERATOR_OPTIMIZED_A3_MEGA, COMPUTE_OPTIMIZED, - COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, - COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, - GENERAL_PURPOSE, GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, - GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, - GENERAL_PURPOSE_T2D, GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, - MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4, - STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED - specifies a commitment that applies only to eligible - resources of memory optimized M1 and M2 machine series. Type - GENERAL_PURPOSE specifies a commitment that applies only to - eligible resources of general purpose N1 machine series. - Check the Type enum for the list of possible values. + This field is a member of `oneof`_ ``_tx_packet``. + uptime_ms (int): + Session uptime in milliseconds. Value will be + 0 if session is not up. - This field is a member of `oneof`_ ``_type``. + This field is a member of `oneof`_ ``_uptime_ms``. """ - class Category(proto.Enum): - r"""The category of the commitment; specifies whether the - commitment is for hardware or software resources. Category - MACHINE specifies that you are committing to hardware machine - resources such as VCPU or MEMORY, listed in resources. Category - LICENSE specifies that you are committing to software licenses, - listed in licenseResources. Note that if you specify MACHINE - commitments, then you must also specify a type to indicate the - machine series of the hardware resource that you are committing - to. + class BfdSessionInitializationMode(proto.Enum): + r"""The BFD session initialization mode for this BGP peer. + If set to ACTIVE, the Cloud Router will initiate the BFD session + for this BGP peer. If set to PASSIVE, the Cloud Router will wait + for the peer router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for this BGP peer. Values: - UNDEFINED_CATEGORY (0): + UNDEFINED_BFD_SESSION_INITIALIZATION_MODE (0): A value indicating that the enum field is not set. - CATEGORY_UNSPECIFIED (509189462): + ACTIVE (314733318): No description available. - LICENSE (347869217): + DISABLED (516696700): No description available. - MACHINE (469553191): + PASSIVE (462813959): No description available. """ - UNDEFINED_CATEGORY = 0 - CATEGORY_UNSPECIFIED = 509189462 - LICENSE = 347869217 - MACHINE = 469553191 + UNDEFINED_BFD_SESSION_INITIALIZATION_MODE = 0 + ACTIVE = 314733318 + DISABLED = 516696700 + PASSIVE = 462813959 - class Plan(proto.Enum): - r"""The minimum time duration that you commit to purchasing resources. - The plan that you choose determines the preset term length of the - commitment (which is 1 year or 3 years) and affects the discount - rate that you receive for your resources. Committing to a longer - time duration typically gives you a higher discount rate. The - supported values for this field are TWELVE_MONTH (1 year), and - THIRTY_SIX_MONTH (3 years). + class LocalDiagnostic(proto.Enum): + r"""The diagnostic code specifies the local system's reason for + the last change in session state. This allows remote systems to + determine the reason that the previous session failed, for + example. These diagnostic codes are specified in section 4.1 + ofRFC5880 Values: - UNDEFINED_PLAN (0): + UNDEFINED_LOCAL_DIAGNOSTIC (0): A value indicating that the enum field is not set. - INVALID (530283991): + ADMINISTRATIVELY_DOWN (121685798): No description available. - THIRTY_SIX_MONTH (266295942): + CONCATENATED_PATH_DOWN (26186892): No description available. - TWELVE_MONTH (173083962): + CONTROL_DETECTION_TIME_EXPIRED (135478383): No description available. - """ - UNDEFINED_PLAN = 0 - INVALID = 530283991 - THIRTY_SIX_MONTH = 266295942 - TWELVE_MONTH = 173083962 - - class Status(proto.Enum): - r"""[Output Only] Status of the commitment with regards to eventual - expiration (each commitment has an end date defined). Status can be - one of the following values: NOT_YET_ACTIVE, ACTIVE, or EXPIRED. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): + DIAGNOSTIC_UNSPECIFIED (58720895): No description available. - CANCELLED (41957681): - Deprecate CANCELED status. Will use separate - status to differentiate cancel by mergeCud or - manual cancellation. - CREATING (455564985): + ECHO_FUNCTION_FAILED (220687466): No description available. - EXPIRED (482489093): + FORWARDING_PLANE_RESET (19715882): No description available. - NOT_YET_ACTIVE (20607337): + NEIGHBOR_SIGNALED_SESSION_DOWN (374226742): + No description available. + NO_DIAGNOSTIC (222503141): + No description available. + PATH_DOWN (290605180): + No description available. + REVERSE_CONCATENATED_PATH_DOWN (479337129): No description available. """ - UNDEFINED_STATUS = 0 - ACTIVE = 314733318 - CANCELLED = 41957681 - CREATING = 455564985 - EXPIRED = 482489093 - NOT_YET_ACTIVE = 20607337 + UNDEFINED_LOCAL_DIAGNOSTIC = 0 + ADMINISTRATIVELY_DOWN = 121685798 + CONCATENATED_PATH_DOWN = 26186892 + CONTROL_DETECTION_TIME_EXPIRED = 135478383 + DIAGNOSTIC_UNSPECIFIED = 58720895 + ECHO_FUNCTION_FAILED = 220687466 + FORWARDING_PLANE_RESET = 19715882 + NEIGHBOR_SIGNALED_SESSION_DOWN = 374226742 + NO_DIAGNOSTIC = 222503141 + PATH_DOWN = 290605180 + REVERSE_CONCATENATED_PATH_DOWN = 479337129 - class Type(proto.Enum): - r"""The type of commitment; specifies the machine series for which you - want to commit to purchasing resources. The choice of machine series - affects the discount rate and the eligible resource types. The type - must be one of the following: ACCELERATOR_OPTIMIZED, - ACCELERATOR_OPTIMIZED_A3, ACCELERATOR_OPTIMIZED_A3_MEGA, - COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, - COMPUTE_OPTIMIZED_C3D, COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE, - GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_N2, - GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D, - GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED, MEMORY_OPTIMIZED_M3, - MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For example, type - MEMORY_OPTIMIZED specifies a commitment that applies only to - eligible resources of memory optimized M1 and M2 machine series. - Type GENERAL_PURPOSE specifies a commitment that applies only to - eligible resources of general purpose N1 machine series. + class LocalState(proto.Enum): + r"""The current BFD session state as seen by the transmitting + system. These states are specified in section 4.1 ofRFC5880 Values: - UNDEFINED_TYPE (0): + UNDEFINED_LOCAL_STATE (0): A value indicating that the enum field is not set. - ACCELERATOR_OPTIMIZED (280848403): - No description available. - ACCELERATOR_OPTIMIZED_A3 (158574526): - No description available. - ACCELERATOR_OPTIMIZED_A3_MEGA (156517459): - No description available. - ACCELERATOR_OPTIMIZED_A3_ULTRA (27812811): - No description available. - ACCELERATOR_OPTIMIZED_A4 (158574527): - No description available. - COMPUTE_OPTIMIZED (158349023): - No description available. - COMPUTE_OPTIMIZED_C2D (383246453): - No description available. - COMPUTE_OPTIMIZED_C3 (428004784): - No description available. - COMPUTE_OPTIMIZED_C3D (383246484): - No description available. - COMPUTE_OPTIMIZED_H3 (428004939): - No description available. - COMPUTE_OPTIMIZED_H4D (383251320): - No description available. - GENERAL_PURPOSE (299793543): - No description available. - GENERAL_PURPOSE_C4 (301911817): - No description available. - GENERAL_PURPOSE_C4A (232460888): - No description available. - GENERAL_PURPOSE_C4D (232460891): - No description available. - GENERAL_PURPOSE_E2 (301911877): - No description available. - GENERAL_PURPOSE_N2 (301912156): - No description available. - GENERAL_PURPOSE_N2D (232471400): - No description available. - GENERAL_PURPOSE_N4 (301912158): - No description available. - GENERAL_PURPOSE_T2D (232477166): - No description available. - GRAPHICS_OPTIMIZED (68500563): - No description available. - MEMORY_OPTIMIZED (281753417): - No description available. - MEMORY_OPTIMIZED_M3 (276301372): - No description available. - MEMORY_OPTIMIZED_M4 (276301373): - No description available. - MEMORY_OPTIMIZED_M4_6TB (210543650): + ADMIN_DOWN (128544690): No description available. - MEMORY_OPTIMIZED_X4_16TB (183089120): + DOWN (2104482): No description available. - MEMORY_OPTIMIZED_X4_24TB (183116989): + INIT (2252048): No description available. - MEMORY_OPTIMIZED_X4_32TB (183144858): + STATE_UNSPECIFIED (470755401): No description available. - STORAGE_OPTIMIZED_Z3 (316796085): + UP (2715): No description available. - TYPE_UNSPECIFIED (437714322): - Note for internal users: When adding a new enum Type for v1, - make sure to also add it in the comment for the - ``optional Type type`` definition. This ensures that the - public documentation displays the new enum Type. """ - UNDEFINED_TYPE = 0 - ACCELERATOR_OPTIMIZED = 280848403 - ACCELERATOR_OPTIMIZED_A3 = 158574526 - ACCELERATOR_OPTIMIZED_A3_MEGA = 156517459 - ACCELERATOR_OPTIMIZED_A3_ULTRA = 27812811 - ACCELERATOR_OPTIMIZED_A4 = 158574527 - COMPUTE_OPTIMIZED = 158349023 - COMPUTE_OPTIMIZED_C2D = 383246453 - COMPUTE_OPTIMIZED_C3 = 428004784 - COMPUTE_OPTIMIZED_C3D = 383246484 - COMPUTE_OPTIMIZED_H3 = 428004939 - COMPUTE_OPTIMIZED_H4D = 383251320 - GENERAL_PURPOSE = 299793543 - GENERAL_PURPOSE_C4 = 301911817 - GENERAL_PURPOSE_C4A = 232460888 - GENERAL_PURPOSE_C4D = 232460891 - GENERAL_PURPOSE_E2 = 301911877 - GENERAL_PURPOSE_N2 = 301912156 - GENERAL_PURPOSE_N2D = 232471400 - GENERAL_PURPOSE_N4 = 301912158 - GENERAL_PURPOSE_T2D = 232477166 - GRAPHICS_OPTIMIZED = 68500563 - MEMORY_OPTIMIZED = 281753417 - MEMORY_OPTIMIZED_M3 = 276301372 - MEMORY_OPTIMIZED_M4 = 276301373 - MEMORY_OPTIMIZED_M4_6TB = 210543650 - MEMORY_OPTIMIZED_X4_16TB = 183089120 - MEMORY_OPTIMIZED_X4_24TB = 183116989 - MEMORY_OPTIMIZED_X4_32TB = 183144858 - STORAGE_OPTIMIZED_Z3 = 316796085 - TYPE_UNSPECIFIED = 437714322 + UNDEFINED_LOCAL_STATE = 0 + ADMIN_DOWN = 128544690 + DOWN = 2104482 + INIT = 2252048 + STATE_UNSPECIFIED = 470755401 + UP = 2715 - auto_renew: bool = proto.Field( - proto.BOOL, - number=495520765, - optional=True, - ) - category: str = proto.Field( - proto.STRING, - number=50511102, - optional=True, - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - custom_end_timestamp: str = proto.Field( - proto.STRING, - number=181770852, - optional=True, - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - end_timestamp: str = proto.Field( - proto.STRING, - number=468096690, - optional=True, - ) - existing_reservations: MutableSequence[str] = proto.RepeatedField( + bfd_session_initialization_mode: str = proto.Field( proto.STRING, - number=493028443, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, + number=218156954, optional=True, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + config_update_timestamp_micros: int = proto.Field( + proto.INT64, + number=457195569, optional=True, ) - license_resource: "LicenseResourceCommitment" = proto.Field( + control_packet_counts: "BfdStatusPacketCounts" = proto.Field( proto.MESSAGE, - number=437955148, + number=132573561, optional=True, - message="LicenseResourceCommitment", + message="BfdStatusPacketCounts", ) - merge_source_commitments: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=188093761, + control_packet_intervals: MutableSequence["PacketIntervals"] = proto.RepeatedField( + proto.MESSAGE, + number=500806649, + message="PacketIntervals", ) - name: str = proto.Field( + local_diagnostic: str = proto.Field( proto.STRING, - number=3373707, + number=463737083, optional=True, ) - plan: str = proto.Field( + local_state: str = proto.Field( proto.STRING, - number=3443497, + number=149195453, optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + negotiated_local_control_tx_interval_ms: int = proto.Field( + proto.UINT32, + number=21768340, optional=True, ) - reservations: MutableSequence["Reservation"] = proto.RepeatedField( - proto.MESSAGE, - number=399717927, - message="Reservation", - ) - resource_status: "CommitmentResourceStatus" = proto.Field( + rx_packet: "BfdPacket" = proto.Field( proto.MESSAGE, - number=249429315, + number=505069729, optional=True, - message="CommitmentResourceStatus", + message="BfdPacket", ) - resources: MutableSequence["ResourceCommitment"] = proto.RepeatedField( + tx_packet: "BfdPacket" = proto.Field( proto.MESSAGE, - number=164412965, - message="ResourceCommitment", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - split_source_commitment: str = proto.Field( - proto.STRING, - number=402611156, - optional=True, - ) - start_timestamp: str = proto.Field( - proto.STRING, - number=83645817, - optional=True, - ) - status: str = proto.Field( - proto.STRING, - number=181260274, - optional=True, - ) - status_message: str = proto.Field( - proto.STRING, - number=297428154, + number=111386275, optional=True, + message="BfdPacket", ) - type_: str = proto.Field( - proto.STRING, - number=3575610, + uptime_ms: int = proto.Field( + proto.INT64, + number=125398365, optional=True, ) -class CommitmentAggregatedList(proto.Message): +class BfdStatusPacketCounts(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.CommitmentsScopedList]): - A list of CommitmentsScopedList resources. - kind (str): - [Output Only] Type of resource. Always - compute#commitmentAggregatedList for aggregated lists of - commitments. + num_rx (int): + Number of packets received since the + beginning of the current BFD session. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_num_rx``. + num_rx_rejected (int): + Number of packets received that were rejected + because of errors since the beginning of the + current BFD session. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_num_rx_rejected``. + num_rx_successful (int): + Number of packets received that were + successfully processed since the beginning of + the current BFD session. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_num_rx_successful``. + num_tx (int): + Number of packets transmitted since the + beginning of the current BFD session. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_num_tx``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, + num_rx: int = proto.Field( + proto.UINT32, + number=39375263, optional=True, ) - items: MutableMapping[str, "CommitmentsScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="CommitmentsScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + num_rx_rejected: int = proto.Field( + proto.UINT32, + number=281007902, optional=True, ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, + num_rx_successful: int = proto.Field( + proto.UINT32, + number=455361850, optional=True, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + num_tx: int = proto.Field( + proto.UINT32, + number=39375325, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) -class CommitmentList(proto.Message): - r"""Contains a list of Commitment resources. +class BgpRoute(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): - A list of Commitment resources. - kind (str): - [Output Only] Type of resource. Always - compute#commitmentList for lists of commitments. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + as_paths (MutableSequence[google.cloud.compute_v1beta.types.BgpRouteAsPath]): + Output only. [Output only] AS-PATH for the route + communities (MutableSequence[str]): + Output only. [Output only] BGP communities in human-readable + A:B format. + destination (google.cloud.compute_v1beta.types.BgpRouteNetworkLayerReachabilityInformation): + Output only. [Output only] Destination IP range for the + route, in human-readable CIDR format - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_destination``. + med (int): + Output only. [Output only] BGP multi-exit discriminator - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_med``. + origin (str): + Output only. [Output only] BGP origin (EGP, IGP or + INCOMPLETE) Check the Origin enum for the list of possible + values. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_origin``. """ - @property - def raw_page(self): - return self + class Origin(proto.Enum): + r"""Output only. [Output only] BGP origin (EGP, IGP or INCOMPLETE) - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Commitment"] = proto.RepeatedField( + Values: + UNDEFINED_ORIGIN (0): + A value indicating that the enum field is not + set. + BGP_ORIGIN_EGP (378906473): + No description available. + BGP_ORIGIN_IGP (378910317): + No description available. + BGP_ORIGIN_INCOMPLETE (452839811): + No description available. + """ + UNDEFINED_ORIGIN = 0 + BGP_ORIGIN_EGP = 378906473 + BGP_ORIGIN_IGP = 378910317 + BGP_ORIGIN_INCOMPLETE = 452839811 + + as_paths: MutableSequence["BgpRouteAsPath"] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="Commitment", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, + number=137568929, + message="BgpRouteAsPath", ) - next_page_token: str = proto.Field( + communities: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=79797525, - optional=True, + number=188262983, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + destination: "BgpRouteNetworkLayerReachabilityInformation" = proto.Field( + proto.MESSAGE, + number=180765710, optional=True, + message="BgpRouteNetworkLayerReachabilityInformation", ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + med: int = proto.Field( + proto.UINT32, + number=107980, optional=True, - message="Warning", ) - - -class CommitmentResourceStatus(proto.Message): - r"""[Output Only] Contains output only fields. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - custom_term_eligibility_end_timestamp (str): - [Output Only] Indicates the end time of customer's - eligibility to send custom term requests in RFC3339 text - format. Term extension requests that (not the end time in - the request) after this time will be rejected. - - This field is a member of `oneof`_ ``_custom_term_eligibility_end_timestamp``. - """ - - custom_term_eligibility_end_timestamp: str = proto.Field( + origin: str = proto.Field( proto.STRING, - number=363976187, + number=65122086, optional=True, ) -class CommitmentsScopedList(proto.Message): +class BgpRouteAsPath(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - commitments (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): - [Output Only] The list of commitments contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of commitments when the list is empty. - - This field is a member of `oneof`_ ``_warning``. - """ - - commitments: MutableSequence["Commitment"] = proto.RepeatedField( - proto.MESSAGE, - number=450664446, - message="Commitment", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) - - -class ConfidentialInstanceConfig(proto.Message): - r"""A set of Confidential Instance options. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - confidential_instance_type (str): - Defines the type of technology used by the - confidential instance. Check the - ConfidentialInstanceType enum for the list of - possible values. - - This field is a member of `oneof`_ ``_confidential_instance_type``. - enable_confidential_compute (bool): - Defines whether the instance should have - confidential compute enabled. + asns (MutableSequence[int]): + Output only. [Output only] ASNs in the path segment. When + type is SEQUENCE, these are ordered. + asns32 (MutableSequence[int]): + Output only. [Output only] ASNs in the path segment. This + field is for better support of 32 bit ASNs as the other asns + field suffers from overflow when the ASN is larger. When + type is SEQUENCE, these are ordered. + type_ (str): + Output only. [Output only] Type of AS-PATH segment (SEQUENCE + or SET) Check the Type enum for the list of possible values. - This field is a member of `oneof`_ ``_enable_confidential_compute``. + This field is a member of `oneof`_ ``_type``. """ - class ConfidentialInstanceType(proto.Enum): - r"""Defines the type of technology used by the confidential - instance. + class Type(proto.Enum): + r"""Output only. [Output only] Type of AS-PATH segment (SEQUENCE or SET) Values: - UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE (0): + UNDEFINED_TYPE (0): A value indicating that the enum field is not set. - CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED (115021829): - No type specified. Do not use this value. - SEV (81988): - AMD Secure Encrypted Virtualization. - SEV_SNP (21753562): - AMD Secure Encrypted Virtualization - Secure - Nested Paging. - TDX (82920): - Intel Trust Domain eXtension. + AS_PATH_TYPE_SEQUENCE (362887609): + No description available. + AS_PATH_TYPE_SET (302584650): + No description available. """ - UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE = 0 - CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 115021829 - SEV = 81988 - SEV_SNP = 21753562 - TDX = 82920 + UNDEFINED_TYPE = 0 + AS_PATH_TYPE_SEQUENCE = 362887609 + AS_PATH_TYPE_SET = 302584650 - confidential_instance_type: str = proto.Field( - proto.STRING, - number=43484717, - optional=True, + asns: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=3003767, ) - enable_confidential_compute: bool = proto.Field( - proto.BOOL, - number=102135228, - optional=True, + asns32: MutableSequence[int] = proto.RepeatedField( + proto.UINT32, + number=202267158, ) - - -class ConnectionDraining(proto.Message): - r"""Message containing connection draining configuration. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - draining_timeout_sec (int): - Configures a duration timeout for existing - requests on a removed backend instance. For - supported load balancers and protocols, as - described in Enabling connection draining. - - This field is a member of `oneof`_ ``_draining_timeout_sec``. - """ - - draining_timeout_sec: int = proto.Field( - proto.INT32, - number=225127070, + type_: str = proto.Field( + proto.STRING, + number=3575610, optional=True, ) -class ConsistentHashLoadBalancerSettings(proto.Message): - r"""This message defines settings for a consistent hash style - load balancer. - +class BgpRouteNetworkLayerReachabilityInformation(proto.Message): + r"""Network Layer Reachability Information (NLRI) for a route. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - http_cookie (google.cloud.compute_v1beta.types.ConsistentHashLoadBalancerSettingsHttpCookie): - Hash is based on HTTP Cookie. This field describes a HTTP - cookie that will be used as the hash key for the consistent - hash load balancer. If the cookie is not present, it will be - generated. This field is applicable if the sessionAffinity - is set to HTTP_COOKIE. Not supported when the backend - service is referenced by a URL map that is bound to target - gRPC proxy that has validateForProxyless field set to true. - - This field is a member of `oneof`_ ``_http_cookie``. - http_header_name (str): - The hash based on the value of the specified header field. - This field is applicable if the sessionAffinity is set to - HEADER_FIELD. + path_id (int): + If the BGP session supports multiple paths + (RFC 7911), the path identifier for this route. - This field is a member of `oneof`_ ``_http_header_name``. - minimum_ring_size (int): - The minimum number of virtual nodes to use - for the hash ring. Defaults to 1024. Larger ring - sizes result in more granular load - distributions. If the number of hosts in the - load balancing pool is larger than the ring - size, each host will be assigned a single - virtual node. + This field is a member of `oneof`_ ``_path_id``. + prefix (str): + Human readable CIDR notation for a prefix. + E.g. 10.42.0.0/16. - This field is a member of `oneof`_ ``_minimum_ring_size``. + This field is a member of `oneof`_ ``_prefix``. """ - http_cookie: "ConsistentHashLoadBalancerSettingsHttpCookie" = proto.Field( - proto.MESSAGE, - number=6673915, + path_id: int = proto.Field( + proto.UINT32, + number=282287989, optional=True, - message="ConsistentHashLoadBalancerSettingsHttpCookie", ) - http_header_name: str = proto.Field( + prefix: str = proto.Field( proto.STRING, - number=234798022, - optional=True, - ) - minimum_ring_size: int = proto.Field( - proto.INT64, - number=234380735, + number=93631122, optional=True, ) -class ConsistentHashLoadBalancerSettingsHttpCookie(proto.Message): - r"""The information about the HTTP Cookie on which the hash - function is based for load balancing policies that use a - consistent hash. - +class Binding(proto.Message): + r"""Associates ``members``, or principals, with a ``role``. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Name of the cookie. + binding_id (str): - This field is a member of `oneof`_ ``_name``. - path (str): - Path to set for the cookie. + This field is a member of `oneof`_ ``_binding_id``. + condition (google.cloud.compute_v1beta.types.Expr): + The condition that is associated with this binding. - This field is a member of `oneof`_ ``_path``. - ttl (google.cloud.compute_v1beta.types.Duration): - Lifetime of the cookie. + If the condition evaluates to ``true``, then this binding + applies to the current request. - This field is a member of `oneof`_ ``_ttl``. + If the condition evaluates to ``false``, then this binding + does not apply to the current request. However, a different + role binding might grant the same role to one or more of the + principals in this binding. + + To learn which resources support conditions in their IAM + policies, see the `IAM + documentation `__. + + This field is a member of `oneof`_ ``_condition``. + members (MutableSequence[str]): + Specifies the principals requesting access for a Google + Cloud resource. ``members`` can have the following values: + + - ``allUsers``: A special identifier that represents anyone + who is on the internet; with or without a Google account. + + - ``allAuthenticatedUsers``: A special identifier that + represents anyone who is authenticated with a Google + account or a service account. Does not include identities + that come from external identity providers (IdPs) through + identity federation. + + - ``user:{emailid}``: An email address that represents a + specific Google account. For example, + ``alice@example.com`` . + + - ``serviceAccount:{emailid}``: An email address that + represents a Google service account. For example, + ``my-other-app@appspot.gserviceaccount.com``. + + - ``serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]``: + An identifier for a `Kubernetes service + account `__. + For example, + ``my-project.svc.id.goog[my-namespace/my-kubernetes-sa]``. + + - ``group:{emailid}``: An email address that represents a + Google group. For example, ``admins@example.com``. + + - ``domain:{domain}``: The G Suite domain (primary) that + represents all the users of that domain. For example, + ``google.com`` or ``example.com``. + + - ``principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: + A single identity in a workforce identity pool. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}``: + All workforce identities in a group. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: + All workforce identities with a specific attribute value. + + - ``principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*``: + All identities in a workforce identity pool. + + - ``principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}``: + A single identity in a workload identity pool. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}``: + A workload identity pool group. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}``: + All identities in a workload identity pool with a certain + attribute. + + - ``principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*``: + All identities in a workload identity pool. + + - ``deleted:user:{emailid}?uid={uniqueid}``: An email + address (plus unique identifier) representing a user that + has been recently deleted. For example, + ``alice@example.com?uid=123456789012345678901``. If the + user is recovered, this value reverts to + ``user:{emailid}`` and the recovered user retains the role + in the binding. + + - ``deleted:serviceAccount:{emailid}?uid={uniqueid}``: An + email address (plus unique identifier) representing a + service account that has been recently deleted. For + example, + ``my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901``. + If the service account is undeleted, this value reverts to + ``serviceAccount:{emailid}`` and the undeleted service + account retains the role in the binding. + + - ``deleted:group:{emailid}?uid={uniqueid}``: An email + address (plus unique identifier) representing a Google + group that has been recently deleted. For example, + ``admins@example.com?uid=123456789012345678901``. If the + group is recovered, this value reverts to + ``group:{emailid}`` and the recovered group retains the + role in the binding. + + - ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}``: + Deleted single identity in a workforce identity pool. For + example, + ``deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value``. + role (str): + Role that is assigned to the list of ``members``, or + principals. For example, ``roles/viewer``, ``roles/editor``, + or ``roles/owner``. + + For an overview of the IAM roles and permissions, see the + `IAM + documentation `__. + For a list of the available pre-defined roles, see + `here `__. + + This field is a member of `oneof`_ ``_role``. """ - name: str = proto.Field( + binding_id: str = proto.Field( proto.STRING, - number=3373707, + number=441088277, optional=True, ) - path: str = proto.Field( - proto.STRING, - number=3433509, + condition: "Expr" = proto.Field( + proto.MESSAGE, + number=212430107, optional=True, + message="Expr", ) - ttl: "Duration" = proto.Field( - proto.MESSAGE, - number=115180, + members: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=412010777, + ) + role: str = proto.Field( + proto.STRING, + number=3506294, optional=True, - message="Duration", ) -class CopyRulesOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.CopyRules. - See the method description for details. +class BulkInsertDiskRequest(proto.Message): + r"""A request message for Disks.BulkInsert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + bulk_insert_disk_resource_resource (google.cloud.compute_v1beta.types.BulkInsertDiskResource): + The body resource for this request + project (str): + Project ID for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to update. - source_security_policy (str): - The security policy from which to copy rules. - - This field is a member of `oneof`_ ``_source_security_policy``. + zone (str): + The name of the zone for this request. """ + bulk_insert_disk_resource_resource: "BulkInsertDiskResource" = proto.Field( + proto.MESSAGE, + number=289799382, + message="BulkInsertDiskResource", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) - source_security_policy: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=234793709, - optional=True, + number=3744684, ) -class CorsPolicy(proto.Message): - r"""The specification for allowing client-side cross-origin - requests. For more information about the W3C recommendation for - cross-origin resource sharing (CORS), see Fetch API Living - Standard. +class BulkInsertDiskResource(proto.Message): + r"""A transient resource used in compute.disks.bulkInsert and + compute.regionDisks.bulkInsert. It is only used to process + requests and is not persisted. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - allow_credentials (bool): - In response to a preflight request, setting - this to true indicates that the actual request - can include user credentials. This field - translates to the - Access-Control-Allow-Credentials header. Default - is false. + source_consistency_group_policy (str): + The URL of the DiskConsistencyGroupPolicy for + the group of disks to clone. This may be a full + or partial URL, such as: - This field is a member of `oneof`_ ``_allow_credentials``. - allow_headers (MutableSequence[str]): - Specifies the content for the - Access-Control-Allow-Headers header. - allow_methods (MutableSequence[str]): - Specifies the content for the - Access-Control-Allow-Methods header. - allow_origin_regexes (MutableSequence[str]): - Specifies a regular expression that matches allowed origins. - For more information, see regular expression syntax . An - origin is allowed if it matches either an item in - allowOrigins or an item in allowOriginRegexes. Regular - expressions can only be used when the loadBalancingScheme is - set to INTERNAL_SELF_MANAGED. - allow_origins (MutableSequence[str]): - Specifies the list of origins that is allowed - to do CORS requests. An origin is allowed if it - matches either an item in allowOrigins or an - item in allowOriginRegexes. - disabled (bool): - If true, disables the CORS policy. The - default value is false, which indicates that the - CORS policy is in effect. - This field is a member of `oneof`_ ``_disabled``. - expose_headers (MutableSequence[str]): - Specifies the content for the - Access-Control-Expose-Headers header. - max_age (int): - Specifies how long results of a preflight - request can be cached in seconds. This field - translates to the Access-Control-Max-Age header. + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - This field is a member of `oneof`_ ``_max_age``. + - + projects/project/regions/region/resourcePolicies/resourcePolicy + + - + regions/region/resourcePolicies/resourcePolicy + + This field is a member of `oneof`_ ``_source_consistency_group_policy``. """ - allow_credentials: bool = proto.Field( - proto.BOOL, - number=481263366, - optional=True, - ) - allow_headers: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=45179024, - ) - allow_methods: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=205405372, - ) - allow_origin_regexes: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=215385810, - ) - allow_origins: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=194914071, - ) - disabled: bool = proto.Field( - proto.BOOL, - number=270940796, - optional=True, - ) - expose_headers: MutableSequence[str] = proto.RepeatedField( + source_consistency_group_policy: str = proto.Field( proto.STRING, - number=247604747, - ) - max_age: int = proto.Field( - proto.INT32, - number=307559332, + number=19616093, optional=True, ) -class CreateInstancesInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.CreateInstances. - See the method description for details. +class BulkInsertInstanceRequest(proto.Message): + r"""A request message for Instances.BulkInsert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. - instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersCreateInstancesRequest): + bulk_insert_instance_resource_resource (google.cloud.compute_v1beta.types.BulkInsertInstanceResource): The body resource for this request project (str): Project ID for this request. @@ -23035,32 +24378,31 @@ class CreateInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. The request ID must be a valid UUID - with the exception that zero UUID is not - supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of the zone for this request. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - instance_group_managers_create_instances_request_resource: "InstanceGroupManagersCreateInstancesRequest" = proto.Field( + bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( proto.MESSAGE, - number=24558867, - message="InstanceGroupManagersCreateInstancesRequest", + number=41427278, + message="BulkInsertInstanceResource", ) project: str = proto.Field( proto.STRING, @@ -23077,209 +24419,339 @@ class CreateInstancesInstanceGroupManagerRequest(proto.Message): ) -class CreateInstancesRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.CreateInstances. See the method - description for details. +class BulkInsertInstanceResource(proto.Message): + r"""A transient resource used in compute.instances.bulkInsert and + compute.regionInstances.bulkInsert . This resource is not + persisted anywhere, it is used only for processing the requests. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. - project (str): - Project ID for this request. - region (str): - The name of the region where the managed - instance group is located. It should conform to - RFC1035. - region_instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. The request ID must be a valid UUID - with the exception that zero UUID is not - supported ( - 00000000-0000-0000-0000-000000000000). + count (int): + The maximum number of instances to create. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_count``. + instance_properties (google.cloud.compute_v1beta.types.InstanceProperties): + The instance properties defining the VM + instances to be created. Required if + sourceInstanceTemplate is not provided. - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - region_instance_group_managers_create_instances_request_resource: "RegionInstanceGroupManagersCreateInstancesRequest" = proto.Field( - proto.MESSAGE, - number=359014280, - message="RegionInstanceGroupManagersCreateInstancesRequest", + This field is a member of `oneof`_ ``_instance_properties``. + location_policy (google.cloud.compute_v1beta.types.LocationPolicy): + Policy for choosing target zone. For more + information, seeCreate VMs in bulk. + + This field is a member of `oneof`_ ``_location_policy``. + min_count (int): + The minimum number of instances to create. If no min_count + is specified then count is used as the default value. + Ifmin_count instances cannot be created, then no instances + will be created and instances already created will be + deleted. + + This field is a member of `oneof`_ ``_min_count``. + name_pattern (str): + The string pattern used for the names of the VMs. Either + name_pattern or per_instance_properties must be set. The + pattern must contain one continuous sequence of placeholder + hash characters (#) with each character corresponding to one + digit of the generated instance name. Example: a + name_pattern of inst-#### generates instance names such + asinst-0001 and inst-0002. If existing instances in the same + project and zone have names that match the name pattern then + the generated instance numbers start after the biggest + existing number. For example, if there exists an instance + with nameinst-0050, then instance names generated using the + patterninst-#### begin with inst-0051. The name pattern + placeholder #...# can contain up to 18 characters. + + This field is a member of `oneof`_ ``_name_pattern``. + per_instance_properties (MutableMapping[str, google.cloud.compute_v1beta.types.BulkInsertInstanceResourcePerInstanceProperties]): + Per-instance properties to be set on individual instances. + Keys of this map specify requested instance names. Can be + empty if name_pattern is used. + source_instance_template (str): + Specifies the instance template from which to + create instances. You may combine + sourceInstanceTemplate withinstanceProperties to + override specific values from an existing + instance template. Bulk API follows the + semantics of JSON Merge Patch described by RFC + 7396. + + It can be a full or partial URL. For example, + the following are all valid URLs to an instance + template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate + + This field is optional. + + This field is a member of `oneof`_ ``_source_instance_template``. + """ + + count: int = proto.Field( + proto.INT64, + number=94851343, + optional=True, ) - request_id: str = proto.Field( + instance_properties: "InstanceProperties" = proto.Field( + proto.MESSAGE, + number=215355165, + optional=True, + message="InstanceProperties", + ) + location_policy: "LocationPolicy" = proto.Field( + proto.MESSAGE, + number=465689852, + optional=True, + message="LocationPolicy", + ) + min_count: int = proto.Field( + proto.INT64, + number=523228386, + optional=True, + ) + name_pattern: str = proto.Field( proto.STRING, - number=37109963, + number=413815260, + optional=True, + ) + per_instance_properties: MutableMapping[ + str, "BulkInsertInstanceResourcePerInstanceProperties" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=108502267, + message="BulkInsertInstanceResourcePerInstanceProperties", + ) + source_instance_template: str = proto.Field( + proto.STRING, + number=332423616, optional=True, ) -class CreateMembersInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.CreateMembers. See - the method description for details. +class BulkInsertInstanceResourcePerInstanceProperties(proto.Message): + r"""Per-instance properties to be set on individual instances. + To be extended in the future. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_group (str): - Name of the group resource to create members - for. - interconnect_groups_create_members_request_resource (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersRequest): - The body resource for this request - project (str): - Project ID for this request. + hostname (str): + Specifies the hostname of the instance. More details in: + https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention + + This field is a member of `oneof`_ ``_hostname``. + name (str): + Output only. This field is only temporary. It + will be removed. Do not use it. + + This field is a member of `oneof`_ ``_name``. """ - interconnect_group: str = proto.Field( + hostname: str = proto.Field( proto.STRING, - number=388651918, + number=237067315, + optional=True, ) - interconnect_groups_create_members_request_resource: "InterconnectGroupsCreateMembersRequest" = proto.Field( - proto.MESSAGE, - number=348323437, - message="InterconnectGroupsCreateMembersRequest", + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, ) - project: str = proto.Field( + + +class BulkInsertOperationStatus(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + created_vm_count (int): + [Output Only] Count of VMs successfully created so far. + + This field is a member of `oneof`_ ``_created_vm_count``. + deleted_vm_count (int): + [Output Only] Count of VMs that got deleted during rollback. + + This field is a member of `oneof`_ ``_deleted_vm_count``. + failed_to_create_vm_count (int): + [Output Only] Count of VMs that started creating but + encountered an error. + + This field is a member of `oneof`_ ``_failed_to_create_vm_count``. + status (str): + [Output Only] Creation status of BulkInsert operation - + information if the flow is rolling forward or rolling back. + Check the Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. + target_vm_count (int): + [Output Only] Count of VMs originally planned to be created. + + This field is a member of `oneof`_ ``_target_vm_count``. + """ + + class Status(proto.Enum): + r"""[Output Only] Creation status of BulkInsert operation - information + if the flow is rolling forward or rolling back. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + CREATING (455564985): + Rolling forward - creating VMs. + DONE (2104194): + Done + ROLLING_BACK (259411649): + Rolling back - cleaning up after an error. + STATUS_UNSPECIFIED (42133066): + No description available. + """ + UNDEFINED_STATUS = 0 + CREATING = 455564985 + DONE = 2104194 + ROLLING_BACK = 259411649 + STATUS_UNSPECIFIED = 42133066 + + created_vm_count: int = proto.Field( + proto.INT32, + number=396924158, + optional=True, + ) + deleted_vm_count: int = proto.Field( + proto.INT32, + number=271756013, + optional=True, + ) + failed_to_create_vm_count: int = proto.Field( + proto.INT32, + number=58384104, + optional=True, + ) + status: str = proto.Field( proto.STRING, - number=227560217, + number=181260274, + optional=True, + ) + target_vm_count: int = proto.Field( + proto.INT32, + number=532975733, + optional=True, ) -class CreateSnapshotDiskRequest(proto.Message): - r"""A request message for Disks.CreateSnapshot. See the method +class BulkInsertRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.BulkInsert. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the persistent disk to snapshot. - guest_flush (bool): - [Input Only] Whether to attempt an application consistent - snapshot by informing the OS to prepare for the snapshot - process. - - This field is a member of `oneof`_ ``_guest_flush``. + bulk_insert_disk_resource_resource (google.cloud.compute_v1beta.types.BulkInsertDiskResource): + The body resource for this request project (str): Project ID for this request. + region (str): + The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): - The body resource for this request - zone (str): - The name of the zone for this request. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, - ) - guest_flush: bool = proto.Field( - proto.BOOL, - number=385550813, - optional=True, + bulk_insert_disk_resource_resource: "BulkInsertDiskResource" = proto.Field( + proto.MESSAGE, + number=289799382, + message="BulkInsertDiskResource", ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot_resource: "Snapshot" = proto.Field( - proto.MESSAGE, - number=481319977, - message="Snapshot", - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class CreateSnapshotRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.CreateSnapshot. See the +class BulkInsertRegionInstanceRequest(proto.Message): + r"""A request message for RegionInstances.BulkInsert. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the regional persistent disk to - snapshot. + bulk_insert_instance_resource_resource (google.cloud.compute_v1beta.types.BulkInsertInstanceResource): + The body resource for this request project (str): Project ID for this request. region (str): - Name of the region for this request. + The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): - The body resource for this request """ - disk: str = proto.Field( - proto.STRING, - number=3083677, + bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( + proto.MESSAGE, + number=41427278, + message="BulkInsertInstanceResource", ) project: str = proto.Field( proto.STRING, @@ -23294,609 +24766,340 @@ class CreateSnapshotRegionDiskRequest(proto.Message): number=37109963, optional=True, ) - snapshot_resource: "Snapshot" = proto.Field( - proto.MESSAGE, - number=481319977, - message="Snapshot", - ) -class CrossSiteNetwork(proto.Message): - r"""A resource that represents a cross-site network. You can use - cross-site networks to connect your on-premises networks to each - other through Interconnect connections. +class BulkSetLabelsDiskRequest(proto.Message): + r"""A request message for Disks.BulkSetLabels. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of the cross-site - network. - - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#crossSiteNetwork for cross-site networks. - - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + bulk_zone_set_labels_request_resource (google.cloud.compute_v1beta.types.BulkZoneSetLabelsRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_name``. - self_link (str): - [Output Only] Server-defined URL for the resource. + This field is a member of `oneof`_ ``_request_id``. + resource (str): + Name or id of the resource for this request. - This field is a member of `oneof`_ ``_self_link``. + This field is a member of `oneof`_ ``_resource``. + zone (str): + The name of the zone for this request. """ - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, + bulk_zone_set_labels_request_resource: "BulkZoneSetLabelsRequest" = proto.Field( + proto.MESSAGE, + number=531305115, + message="BulkZoneSetLabelsRequest", ) - description: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=227560217, ) - kind: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3292052, + number=37109963, optional=True, ) - name: str = proto.Field( + resource: str = proto.Field( proto.STRING, - number=3373707, + number=195806222, optional=True, ) - self_link: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=3744684, ) -class CrossSiteNetworkList(proto.Message): - r"""Response to the list request that contains a list of - cross-site networks. - +class BulkSetLabelsRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.CrossSiteNetwork]): - A list of CrossSiteNetwork resources. - kind (str): - [Output Only] Type of the resource. Always - compute#crossSiteNetwork for cross-site networks. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + label_fingerprint (str): + The fingerprint of the previous set of labels + for this resource, used to detect conflicts. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You may optionally provide an + up-to-date fingerprint hash in order to update + or change labels. Make a get() request to the + resource to get the latest fingerprint. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + The labels to set for this resource. """ - @property - def raw_page(self): - return self - - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["CrossSiteNetwork"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="CrossSiteNetwork", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, - number=79797525, + number=178124825, optional=True, ) - self_link: str = proto.Field( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=456214797, - optional=True, - ) - unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=500195327, ) -class CustomErrorResponsePolicy(proto.Message): - r"""Specifies the custom error response policy that must be - applied when the backend service or backend bucket responds with - an error. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class BulkZoneSetLabelsRequest(proto.Message): + r""" Attributes: - error_response_rules (MutableSequence[google.cloud.compute_v1beta.types.CustomErrorResponsePolicyCustomErrorResponseRule]): - Specifies rules for returning error - responses. In a given policy, if you specify - rules for both a range of error codes as well as - rules for specific error codes then rules with - specific error codes have a higher priority. For - example, assume that you configure a rule for - 401 (Un-authorized) code, and another for all 4 - series error codes (4XX). If the backend service - returns a 401, then the rule for 401 will be - applied. However if the backend service returns - a 403, the rule for 4xx takes effect. - error_service (str): - The full or partial URL to the BackendBucket resource that - contains the custom error content. Examples are: - - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - - - compute/v1/projects/project/global/backendBuckets/myBackendBucket - - global/backendBuckets/myBackendBucket If errorService is - not specified at lower levels like pathMatcher, pathRule and - routeRule, an errorService specified at a higher level in - the UrlMap will be used. If - UrlMap.defaultCustomErrorResponsePolicy contains one or more - errorResponseRules[], it must specify errorService. If load - balancer cannot reach the backendBucket, a simple Not Found - Error will be returned, with the original response code (or - overrideResponseCode if configured). errorService is not - supported for internal or regional HTTP/HTTPS load - balancers. + requests (MutableSequence[google.cloud.compute_v1beta.types.BulkSetLabelsRequest]): - This field is a member of `oneof`_ ``_error_service``. """ - error_response_rules: MutableSequence[ - "CustomErrorResponsePolicyCustomErrorResponseRule" - ] = proto.RepeatedField( + requests: MutableSequence["BulkSetLabelsRequest"] = proto.RepeatedField( proto.MESSAGE, - number=14620304, - message="CustomErrorResponsePolicyCustomErrorResponseRule", - ) - error_service: str = proto.Field( - proto.STRING, - number=164214654, - optional=True, + number=143613892, + message="BulkSetLabelsRequest", ) -class CustomErrorResponsePolicyCustomErrorResponseRule(proto.Message): - r"""Specifies the mapping between the response code that will be - returned along with the custom error content and the response - code returned by the backend service. - +class BundledLocalSsds(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - match_response_codes (MutableSequence[str]): - Valid values include: - A number between 400 - and 599: For example 401 or 503, in which case - the load balancer applies the policy if the - error code exactly matches this value. - 5xx: - Load Balancer will apply the policy if the - backend service responds with any response code - in the range of 500 to 599. - 4xx: Load Balancer - will apply the policy if the backend service - responds with any response code in the range of - 400 to 499. Values must be unique within - matchResponseCodes and across all - errorResponseRules of CustomErrorResponsePolicy. - override_response_code (int): - The HTTP status code returned with the - response containing the custom error content. If - overrideResponseCode is not supplied, the same - response code returned by the original backend - bucket or backend service is returned to the - client. + default_interface (str): + The default disk interface if the interface + is not specified. - This field is a member of `oneof`_ ``_override_response_code``. - path (str): - The full path to a file within backendBucket - . For example: /errors/defaultError.html path - must start with a leading slash. path cannot - have trailing slashes. If the file is not - available in backendBucket or the load balancer - cannot reach the BackendBucket, a simple Not - Found Error is returned to the client. The value - must be from 1 to 1024 characters + This field is a member of `oneof`_ ``_default_interface``. + partition_count (int): + The number of partitions. - This field is a member of `oneof`_ ``_path``. + This field is a member of `oneof`_ ``_partition_count``. """ - match_response_codes: MutableSequence[str] = proto.RepeatedField( + default_interface: str = proto.Field( proto.STRING, - number=104973410, - ) - override_response_code: int = proto.Field( - proto.INT32, - number=530328568, + number=17309883, optional=True, ) - path: str = proto.Field( - proto.STRING, - number=3433509, + partition_count: int = proto.Field( + proto.INT32, + number=408514426, optional=True, ) -class CustomerEncryptionKey(proto.Message): +class CacheInvalidationRule(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - kms_key_name (str): - The name of the encryption key that is stored in Google - Cloud KMS. For example: "kmsKeyName": - "projects/kms_project_id/locations/region/keyRings/ - key_region/cryptoKeys/key The fully-qualifed key name may be - returned for resource GET requests. For example: - "kmsKeyName": - "projects/kms_project_id/locations/region/keyRings/ - key_region/cryptoKeys/key /cryptoKeyVersions/1 + cache_tags (MutableSequence[str]): + A list of cache tags used to identify cached objects. - This field is a member of `oneof`_ ``_kms_key_name``. - kms_key_service_account (str): - The service account being used for the encryption request - for the given KMS key. If absent, the Compute Engine default - service account is used. For example: - "kmsKeyServiceAccount": - "name@project_id.iam.gserviceaccount.com/ + :: - This field is a member of `oneof`_ ``_kms_key_service_account``. - raw_key (str): - Specifies a 256-bit customer-supplied - encryption key, encoded in RFC 4648 base64 to - either encrypt or decrypt this resource. You can - provide either the rawKey or the - rsaEncryptedKey. For example: "rawKey": - "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=". + - Cache tags are specified when the response is first cached, by setting + the `Cache-Tag` response header at the origin. + - Multiple cache tags in the same invalidation request are treated as + Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. + - If other fields are also specified, these are treated as Boolean `AND` + with any tags. - This field is a member of `oneof`_ ``_raw_key``. - rsa_encrypted_key (str): - Specifies an RFC 4648 base64 encoded, - RSA-wrapped 2048-bit customer-supplied - encryption key to either encrypt or decrypt this - resource. You can provide either the rawKey or - the rsaEncryptedKey. For example: - "rsaEncryptedKey": - "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH - z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD - D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" - The key must meet the following requirements - before you can provide it to Compute Engine: 1. - The key is wrapped using a RSA public key - certificate provided by Google. 2. After being - wrapped, the key must be encoded in RFC 4648 - base64 encoding. Gets the RSA public key - certificate provided by Google at: - https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem + Up to 10 tags can be specified in a single invalidation + request. + host (str): + If set, this invalidation rule will only + apply to requests with a Host header matching + host. - This field is a member of `oneof`_ ``_rsa_encrypted_key``. - sha256 (str): - [Output only] The RFC 4648 base64 encoded SHA-256 hash of - the customer-supplied encryption key that protects this - resource. + This field is a member of `oneof`_ ``_host``. + path (str): - This field is a member of `oneof`_ ``_sha256``. + This field is a member of `oneof`_ ``_path``. """ - kms_key_name: str = proto.Field( - proto.STRING, - number=484373913, - optional=True, - ) - kms_key_service_account: str = proto.Field( - proto.STRING, - number=209986261, - optional=True, - ) - raw_key: str = proto.Field( + cache_tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=449196488, - optional=True, + number=29073078, ) - rsa_encrypted_key: str = proto.Field( + host: str = proto.Field( proto.STRING, - number=335487397, + number=3208616, optional=True, ) - sha256: str = proto.Field( + path: str = proto.Field( proto.STRING, - number=170112551, + number=3433509, optional=True, ) -class CustomerEncryptionKeyProtectedDisk(proto.Message): - r""" +class CacheKeyPolicy(proto.Message): + r"""Message containing what to include in the cache key for a + request for Cloud CDN. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Decrypts data associated with the disk with a - customer-supplied encryption key. + include_host (bool): + If true, requests to different hosts will be + cached separately. - This field is a member of `oneof`_ ``_disk_encryption_key``. - source (str): - Specifies a valid partial or full URL to an existing - Persistent Disk resource. This field is only applicable for - persistent disks. For example: "source": - "/compute/v1/projects/project_id/zones/zone/disks/ disk_name + This field is a member of `oneof`_ ``_include_host``. + include_http_headers (MutableSequence[str]): + Allows HTTP request headers (by name) to be + used in the cache key. + include_named_cookies (MutableSequence[str]): + Allows HTTP cookies (by name) to be used in + the cache key. The name=value pair will be used + in the cache key Cloud CDN generates. + include_protocol (bool): + If true, http and https requests will be + cached separately. - This field is a member of `oneof`_ ``_source``. + This field is a member of `oneof`_ ``_include_protocol``. + include_query_string (bool): + If true, include query string parameters in the cache key + according to query_string_whitelist and + query_string_blacklist. If neither is set, the entire query + string will be included. If false, the query string will be + excluded from the cache key entirely. + + This field is a member of `oneof`_ ``_include_query_string``. + query_string_blacklist (MutableSequence[str]): + Names of query string parameters to exclude in cache keys. + All other parameters will be included. Either specify + query_string_whitelist or query_string_blacklist, not both. + '&' and '=' will be percent encoded and not treated as + delimiters. + query_string_whitelist (MutableSequence[str]): + Names of query string parameters to include in cache keys. + All other parameters will be excluded. Either specify + query_string_whitelist or query_string_blacklist, not both. + '&' and '=' will be percent encoded and not treated as + delimiters. """ - disk_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=271660677, + include_host: bool = proto.Field( + proto.BOOL, + number=486867679, optional=True, - message="CustomerEncryptionKey", ) - source: str = proto.Field( + include_http_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=177235995, - optional=True, + number=2489606, ) - - -class Data(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - key (str): - [Output Only] A key that provides more detail on the warning - being returned. For example, for warnings where there are no - results in a list request for a particular zone, this key - might be scope and the key value might be the zone name. - Other examples might be a key indicating a deprecated - resource and a suggested replacement, or a warning about - invalid network settings (for example, if an instance - attempts to perform IP forwarding but is not enabled for IP - forwarding). - - This field is a member of `oneof`_ ``_key``. - value (str): - [Output Only] A warning data value corresponding to the key. - - This field is a member of `oneof`_ ``_value``. - """ - - key: str = proto.Field( + include_named_cookies: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=106079, + number=87316530, + ) + include_protocol: bool = proto.Field( + proto.BOOL, + number=303507535, optional=True, ) - value: str = proto.Field( - proto.STRING, - number=111972721, + include_query_string: bool = proto.Field( + proto.BOOL, + number=474036639, optional=True, ) + query_string_blacklist: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=354964742, + ) + query_string_whitelist: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=52456496, + ) -class Date(proto.Message): - r"""Represents a whole or partial calendar date, such as a birthday. The - time of day and time zone are either specified elsewhere or are - insignificant. The date is relative to the Gregorian Calendar. This - can represent one of the following: \* A full date, with non-zero - year, month, and day values. \* A month and day, with a zero year - (for example, an anniversary). \* A year on its own, with a zero - month and a zero day. \* A year and month, with a zero day (for - example, a credit card expiration date). Related types: \* - google.type.TimeOfDay \* google.type.DateTime \* - google.protobuf.Timestamp - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class CalendarModeAdviceRequest(proto.Message): + r"""A request to recommend the best way to consume the specified + resources in the future. Attributes: - day (int): - Day of a month. Must be from 1 to 31 and - valid for the year and month, or 0 to specify a - year by itself or a year and month where the day - isn't significant. - - This field is a member of `oneof`_ ``_day``. - month (int): - Month of a year. Must be from 1 to 12, or 0 - to specify a year without a month and day. - - This field is a member of `oneof`_ ``_month``. - year (int): - Year of the date. Must be from 1 to 9999, or - 0 to specify a date without a year. - - This field is a member of `oneof`_ ``_year``. + future_resources_specs (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesSpec]): + Specification of resources to create in the + future. The key of the map is an arbitrary + string specified by the caller. Value of the map + is a specification of required resources and + their constraints. Currently only one value is + allowed in this map. """ - day: int = proto.Field( - proto.INT32, - number=99228, - optional=True, - ) - month: int = proto.Field( - proto.INT32, - number=104080000, - optional=True, - ) - year: int = proto.Field( - proto.INT32, - number=3704893, - optional=True, + future_resources_specs: MutableMapping[str, "FutureResourcesSpec"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=255012610, + message="FutureResourcesSpec", ) -class DeleteAccessConfigInstanceRequest(proto.Message): - r"""A request message for Instances.DeleteAccessConfig. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class CalendarModeAdviceResponse(proto.Message): + r"""A response containing the recommended way of creating the + specified resources in the future. It contains (will contain) + multiple recommendations that can be analyzed by the customer + and the best one can be picked. Attributes: - access_config (str): - The name of the access config to delete. - instance (str): - The instance name for this request. - network_interface (str): - The name of the network interface. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + recommendations (MutableSequence[google.cloud.compute_v1beta.types.CalendarModeRecommendation]): + Recommendations where, how and when to create + the requested resources in order to maximize + their obtainability and minimize cost. """ - access_config: str = proto.Field( - proto.STRING, - number=72856189, - ) - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - network_interface: str = proto.Field( - proto.STRING, - number=365387880, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + recommendations: MutableSequence[ + "CalendarModeRecommendation" + ] = proto.RepeatedField( + proto.MESSAGE, + number=324515802, + message="CalendarModeRecommendation", ) -class DeleteAddressRequest(proto.Message): - r"""A request message for Addresses.Delete. See the method +class CalendarModeAdviceRpcRequest(proto.Message): + r"""A request message for Advice.CalendarMode. See the method description for details. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Attributes: - address (str): - Name of the address resource to delete. + calendar_mode_advice_request_resource (google.cloud.compute_v1beta.types.CalendarModeAdviceRequest): + The body resource for this request project (str): Project ID for this request. region (str): Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. """ - address: str = proto.Field( - proto.STRING, - number=462920692, + calendar_mode_advice_request_resource: "CalendarModeAdviceRequest" = proto.Field( + proto.MESSAGE, + number=162098922, + message="CalendarModeAdviceRequest", ) project: str = proto.Field( proto.STRING, @@ -23906,23 +25109,42 @@ class DeleteAddressRequest(proto.Message): proto.STRING, number=138946292, ) - request_id: str = proto.Field( + + +class CalendarModeRecommendation(proto.Message): + r"""A single recommendation to create requested resources. + Contains detailed recommendations for every future resources + specification specified in CalendarModeAdviceRequest. + + Attributes: + recommendations_per_spec (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesRecommendation]): + Recommendations for every future resource + specification passed in + CalendarModeAdviceRequest. Keys of the map + correspond to keys specified in the request. + """ + + recommendations_per_spec: MutableMapping[ + str, "FutureResourcesRecommendation" + ] = proto.MapField( proto.STRING, - number=37109963, - optional=True, + proto.MESSAGE, + number=61331554, + message="FutureResourcesRecommendation", ) -class DeleteAutoscalerRequest(proto.Message): - r"""A request message for Autoscalers.Delete. See the method - description for details. +class CancelFutureReservationRequest(proto.Message): + r"""A request message for FutureReservations.Cancel. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - autoscaler (str): - Name of the autoscaler to delete. + future_reservation (str): + Name of the future reservation to retrieve. + Name should conform to RFC1035. project (str): Project ID for this request. request_id (str): @@ -23930,26 +25152,31 @@ class DeleteAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - Name of the zone for this request. + Name of the zone for this request. Name + should conform to RFC1035. """ - autoscaler: str = proto.Field( + future_reservation: str = proto.Field( proto.STRING, - number=517258967, + number=56206160, ) project: str = proto.Field( proto.STRING, @@ -23966,16 +25193,19 @@ class DeleteAutoscalerRequest(proto.Message): ) -class DeleteBackendBucketRequest(proto.Message): - r"""A request message for BackendBuckets.Delete. See the method +class CancelInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + InstanceGroupManagerResizeRequests.Cancel. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_bucket (str): - Name of the BackendBucket resource to delete. + instance_group_manager (str): + The name of the managed instance group. + The name should conform to RFC1035 or be a + resource ID. project (str): Project ID for this request. request_id (str): @@ -23983,24 +25213,36 @@ class DeleteBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + resize_request (str): + The name of the resize request to cancel. + The name should conform to RFC1035 or be a + resource ID. + zone (str): + The name of thezone where the managed + instance group is located. The name should + conform to RFC1035. """ - backend_bucket: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=91714037, + number=249363395, ) project: str = proto.Field( proto.STRING, @@ -24011,89 +25253,133 @@ class DeleteBackendBucketRequest(proto.Message): number=37109963, optional=True, ) + resize_request: str = proto.Field( + proto.STRING, + number=216941060, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DeleteBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.Delete. See the method +class CancelRegionInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagerResizeRequests.Cancel. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (str): - Name of the BackendService resource to - delete. + instance_group_manager (str): + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. + region (str): + The name of the region + scoping this request. Name should conform to + RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + resize_request (str): + The name of the resize request to cancel. + Name should conform to RFC1035 or be a resource + ID. """ - backend_service: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=306946058, + number=249363395, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) + resize_request: str = proto.Field( + proto.STRING, + number=216941060, + ) -class DeleteCrossSiteNetworkRequest(proto.Message): - r"""A request message for CrossSiteNetworks.Delete. See the - method description for details. +class CancelRequestRemovePeeringNetworkRequest(proto.Message): + r"""A request message for Networks.CancelRequestRemovePeering. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cross_site_network (str): - Name of the cross-site network to delete. + network (str): + Name of the network resource to remove + peering from. + networks_cancel_request_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksCancelRequestRemovePeeringRequest): + The body resource for this request project (str): Project ID for this request. request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - cross_site_network: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=108192469, + number=232872494, + ) + networks_cancel_request_remove_peering_request_resource: "NetworksCancelRequestRemovePeeringRequest" = proto.Field( + proto.MESSAGE, + number=177326909, + message="NetworksCancelRequestRemovePeeringRequest", ) project: str = proto.Field( proto.STRING, @@ -24106,16 +25392,14 @@ class DeleteCrossSiteNetworkRequest(proto.Message): ) -class DeleteDiskRequest(proto.Message): - r"""A request message for Disks.Delete. See the method +class CancelRolloutRequest(proto.Message): + r"""A request message for Rollouts.Cancel. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the persistent disk to delete. project (str): Project ID for this request. request_id (str): @@ -24123,27 +25407,36 @@ class DeleteDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + rollback (bool): + Optional. If true, then the ongoing rollout + must be rolled back. Else, just cancel the + rollout without taking any further actions. Note + that products must support at least one of these + options, however, it does not need to support + both. + + This field is a member of `oneof`_ ``_rollback``. + rollout (str): + Name of the Rollout resource to cancel. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, - ) project: str = proto.Field( proto.STRING, number=227560217, @@ -24153,266 +25446,182 @@ class DeleteDiskRequest(proto.Message): number=37109963, optional=True, ) - zone: str = proto.Field( + rollback: bool = proto.Field( + proto.BOOL, + number=277151460, + optional=True, + ) + rollout: str = proto.Field( proto.STRING, - number=3744684, + number=303366577, ) -class DeleteExternalVpnGatewayRequest(proto.Message): - r"""A request message for ExternalVpnGateways.Delete. See the - method description for details. +class CircuitBreakers(proto.Message): + r"""Settings controlling the volume of requests, connections and + retries to this backend service. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - external_vpn_gateway (str): - Name of the externalVpnGateways to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + connect_timeout (google.cloud.compute_v1beta.types.Duration): + The timeout for new network connections to + hosts. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_connect_timeout``. + max_connections (int): + The maximum number of connections to the + backend service. If not specified, there is no + limit. - external_vpn_gateway: str = proto.Field( - proto.STRING, - number=109898629, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. + This field is a member of `oneof`_ ``_max_connections``. + max_pending_requests (int): + The maximum number of pending requests + allowed to the backend service. If not + specified, there is no limit. -class DeleteFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.Delete. See the method - description for details. + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. + This field is a member of `oneof`_ ``_max_pending_requests``. + max_requests (int): + The maximum number of parallel requests that + allowed to the backend service. If not + specified, there is no limit. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to delete. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - - -class DeleteFirewallRequest(proto.Message): - r"""A request message for Firewalls.Delete. See the method - description for details. + This field is a member of `oneof`_ ``_max_requests``. + max_requests_per_connection (int): + Maximum requests for a single connection to + the backend service. This parameter is respected + by both the HTTP/1.1 and HTTP/2 implementations. + If not specified, there is no limit. Setting + this parameter to 1 will effectively disable + keep alive. + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_max_requests_per_connection``. + max_retries (int): + The maximum number of parallel retries + allowed to the backend cluster. If not + specified, the default is 1. - Attributes: - firewall (str): - Name of the firewall rule to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Not supported when the backend service is + referenced by a URL map that is bound to target + gRPC proxy that has validateForProxyless field + set to true. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_max_retries``. """ - firewall: str = proto.Field( - proto.STRING, - number=511016192, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + connect_timeout: "Duration" = proto.Field( + proto.MESSAGE, + number=495510284, + optional=True, + message="Duration", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + max_connections: int = proto.Field( + proto.INT32, + number=110652154, optional=True, ) - - -class DeleteForwardingRuleRequest(proto.Message): - r"""A request message for ForwardingRules.Delete. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - forwarding_rule (str): - Name of the ForwardingRule resource to - delete. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - forwarding_rule: str = proto.Field( - proto.STRING, - number=269964030, + max_pending_requests: int = proto.Field( + proto.INT32, + number=375558887, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + max_requests: int = proto.Field( + proto.INT32, + number=28097599, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + max_requests_per_connection: int = proto.Field( + proto.INT32, + number=361630528, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + max_retries: int = proto.Field( + proto.INT32, + number=55546219, optional=True, ) -class DeleteFutureReservationRequest(proto.Message): - r"""A request message for FutureReservations.Delete. See the +class CloneRulesFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.CloneRules. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - future_reservation (str): - Name of the future reservation to retrieve. - Name should conform to RFC1035. - project (str): - Project ID for this request. + firewall_policy (str): + Name of the firewall policy to update. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - zone (str): - Name of the zone for this request. Name - should conform to RFC1035. + source_firewall_policy (str): + The firewall policy from which to copy rules. + + This field is a member of `oneof`_ ``_source_firewall_policy``. """ - future_reservation: str = proto.Field( - proto.STRING, - number=56206160, - ) - project: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=227560217, + number=498173265, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone: str = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, - number=3744684, + number=25013549, + optional=True, ) -class DeleteGlobalAddressRequest(proto.Message): - r"""A request message for GlobalAddresses.Delete. See the method - description for details. +class CloneRulesNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.CloneRules. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address (str): - Name of the address resource to delete. + firewall_policy (str): + Name of the firewall policy to update. project (str): Project ID for this request. request_id (str): @@ -24420,24 +25629,32 @@ class DeleteGlobalAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + source_firewall_policy (str): + The firewall policy from which to copy rules. + + This field is a member of `oneof`_ ``_source_firewall_policy``. """ - address: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=462920692, + number=498173265, ) project: str = proto.Field( proto.STRING, @@ -24448,1281 +25665,1483 @@ class DeleteGlobalAddressRequest(proto.Message): number=37109963, optional=True, ) - - -class DeleteGlobalForwardingRuleRequest(proto.Message): - r"""A request message for GlobalForwardingRules.Delete. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - forwarding_rule (str): - Name of the ForwardingRule resource to - delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - forwarding_rule: str = proto.Field( - proto.STRING, - number=269964030, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, - number=37109963, + number=25013549, optional=True, ) -class DeleteGlobalNetworkEndpointGroupRequest(proto.Message): - r"""A request message for GlobalNetworkEndpointGroups.Delete. See - the method description for details. +class CloneRulesRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.CloneRules. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group to - delete. It should comply with RFC1035. + firewall_policy (str): + Name of the firewall policy to update. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + source_firewall_policy (str): + The firewall policy from which to copy rules. + + This field is a member of `oneof`_ ``_source_firewall_policy``. """ - network_endpoint_group: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=433907078, + number=498173265, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - - -class DeleteGlobalOperationRequest(proto.Message): - r"""A request message for GlobalOperations.Delete. See the method - description for details. - - Attributes: - operation (str): - Name of the Operations resource to delete, or - its unique numeric identifier. - project (str): - Project ID for this request. - """ - - operation: str = proto.Field( - proto.STRING, - number=52090215, - ) - project: str = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, - number=227560217, + number=25013549, + optional=True, ) -class DeleteGlobalOperationResponse(proto.Message): - r"""A response message for GlobalOperations.Delete. See the - method description for details. - - """ - +class Commitment(proto.Message): + r"""Represents a regional resource-based commitment resource. -class DeleteGlobalOrganizationOperationRequest(proto.Message): - r"""A request message for GlobalOrganizationOperations.Delete. - See the method description for details. + Creating this commitment resource means that you are purchasing + a resource-based committed use contract, with an explicit start + and end time. You can purchase resource-based commitments for + both hardware and software resources. For more information, read + Resource-based committed use discounts .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - operation (str): - Name of the Operations resource to delete, or - its unique numeric identifier. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. - """ - - operation: str = proto.Field( - proto.STRING, - number=52090215, - ) - parent_id: str = proto.Field( - proto.STRING, - number=459714768, - optional=True, - ) + auto_renew (bool): + Specifies whether to automatically renew the + commitment at the end of its current term. The + default value is false. If you set the field to + true, each time your commitment reaches the end + of its term, Compute Engine automatically renews + it for another term. You can update this field + anytime before the commitment expires. For + example, if the commitment is set to expire at + 12 AM UTC-8 on January 3, 2027, you can update + this field until 11:59 PM UTC-8 on January 2, + 2027. + This field is a member of `oneof`_ ``_auto_renew``. + category (str): + The category of the commitment; specifies + whether the commitment is for hardware or + software resources. Category MACHINE specifies + that you are committing to hardware machine + resources such asVCPU or MEMORY, listed in + resources. Category LICENSE specifies that you + are committing to software licenses, listed in + licenseResources. + Note that if you specify MACHINE commitments, + then you must also specify a type to indicate + the machine series of the hardware resource that + you are committing to. Check the Category enum + for the list of possible values. -class DeleteGlobalOrganizationOperationResponse(proto.Message): - r"""A response message for GlobalOrganizationOperations.Delete. - See the method description for details. + This field is a member of `oneof`_ ``_category``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - """ + This field is a member of `oneof`_ ``_creation_timestamp``. + custom_end_timestamp (str): + [Input Only] Optional, specifies the requested commitment + end time inRFC3339 text format. Use this option when the + desired commitment's end date is later than the start date + + term duration. + This field is a member of `oneof`_ ``_custom_end_timestamp``. + description (str): + An optional description of the commitment. + You can provide this property when you create + the resource. -class DeleteGlobalPublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for GlobalPublicDelegatedPrefixes.Delete. - See the method description for details. + This field is a member of `oneof`_ ``_description``. + end_timestamp (str): + Output only. [Output Only] Commitment end time inRFC3339 + text format. + This field is a member of `oneof`_ ``_end_timestamp``. + existing_reservations (MutableSequence[str]): - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - Attributes: - project (str): - Project ID for this request. - public_delegated_prefix (str): - Name of the PublicDelegatedPrefix resource to - delete. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#commitment for commitments. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_kind``. + license_resource (google.cloud.compute_v1beta.types.LicenseResourceCommitment): + The license specification required as part of + a license commitment. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - public_delegated_prefix: str = proto.Field( - proto.STRING, - number=204238440, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_license_resource``. + merge_source_commitments (MutableSequence[str]): + The list of source commitments that you are + merging to create the new merged commitment. For + more information, see Merging commitments. + name (str): + Name of the commitment. You must specify a name when you + purchase the commitment. The name must be 1-63 characters + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + This field is a member of `oneof`_ ``_name``. + plan (str): + The minimum time duration that you commit to purchasing + resources. The plan that you choose determines the preset + term length of the commitment (which is 1 year or 3 years) + and affects the discount rate that you receive for your + resources. Committing to a longer time duration typically + gives you a higher discount rate. The supported values for + this field are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 + years). Check the Plan enum for the list of possible values. -class DeleteHealthCheckRequest(proto.Message): - r"""A request message for HealthChecks.Delete. See the method - description for details. + This field is a member of `oneof`_ ``_plan``. + region (str): + Output only. [Output Only] URL of the region where the + commitment and committed resources are located. + This field is a member of `oneof`_ ``_region``. + reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): + The list of new reservations that you want to + create and attach to this commitment. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You must attach reservations to your commitment + if your commitment specifies any GPUs or Local + SSD disks. For more information, see Attach + reservations to resource-based commitments. - Attributes: - health_check (str): - Name of the HealthCheck resource to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Specify this property only if you want to create + new reservations to attach. To attach existing + reservations, specify theexistingReservations + property instead. + resource_status (google.cloud.compute_v1beta.types.CommitmentResourceStatus): + Output only. [Output Only] Status information for Commitment + resource. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_resource_status``. + resources (MutableSequence[google.cloud.compute_v1beta.types.ResourceCommitment]): + The list of all the hardware resources, with + their types and amounts, that you want to commit + to. Specify as a separate entry in the list for + each individual resource type. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. - health_check: str = proto.Field( - proto.STRING, - number=308876645, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_self_link``. + split_source_commitment (str): + The source commitment from which you are + transferring resources to create the new split + commitment. For more information, see Split + commitments. + This field is a member of `oneof`_ ``_split_source_commitment``. + start_timestamp (str): + Output only. [Output Only] Commitment start time inRFC3339 + text format. -class DeleteImageRequest(proto.Message): - r"""A request message for Images.Delete. See the method - description for details. + This field is a member of `oneof`_ ``_start_timestamp``. + status (str): + Output only. [Output Only] Status of the commitment with + regards to eventual expiration (each commitment has an end + date defined). Status can be one of the following values: + NOT_YET_ACTIVE, ACTIVE, orEXPIRED. Check the Status enum for + the list of possible values. + This field is a member of `oneof`_ ``_status``. + status_message (str): + Output only. [Output Only] An optional, human-readable + explanation of the status. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_status_message``. + type_ (str): + The type of commitment; specifies the machine series for + which you want to commit to purchasing resources. The choice + of machine series affects the discount rate and the eligible + resource types. - Attributes: - image (str): - Name of the image resource to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + The type must be one of the following:ACCELERATOR_OPTIMIZED, + ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, + COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, + COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, + GENERAL_PURPOSE,GENERAL_PURPOSE_C4, + GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, + GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, + GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, + GRAPHICS_OPTIMIZED_G4,MEMORY_OPTIMIZED, + MEMORY_OPTIMIZED_M3,MEMORY_OPTIMIZED_X4, + STORAGE_OPTIMIZED_Z3. For example, type MEMORY_OPTIMIZED + specifies a commitment that applies only to eligible + resources of memory optimized M1 and M2 machine series. Type + GENERAL_PURPOSE specifies a commitment that applies only to + eligible resources of general purpose N1 machine series. + Check the Type enum for the list of possible values. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_type``. """ - image: str = proto.Field( - proto.STRING, - number=100313435, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + class Category(proto.Enum): + r"""The category of the commitment; specifies whether the + commitment is for hardware or software resources. Category + MACHINE specifies that you are committing to hardware machine + resources such asVCPU or MEMORY, listed in resources. Category + LICENSE specifies that you are committing to software licenses, + listed in licenseResources. + Note that if you specify MACHINE commitments, then you must also + specify a type to indicate the machine series of the hardware + resource that you are committing to. + Values: + UNDEFINED_CATEGORY (0): + A value indicating that the enum field is not + set. + CATEGORY_UNSPECIFIED (509189462): + No description available. + LICENSE (347869217): + No description available. + MACHINE (469553191): + No description available. + """ + UNDEFINED_CATEGORY = 0 + CATEGORY_UNSPECIFIED = 509189462 + LICENSE = 347869217 + MACHINE = 469553191 -class DeleteInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.Delete. See the - method description for details. + class Plan(proto.Enum): + r"""The minimum time duration that you commit to purchasing resources. + The plan that you choose determines the preset term length of the + commitment (which is 1 year or 3 years) and affects the discount + rate that you receive for your resources. Committing to a longer + time duration typically gives you a higher discount rate. The + supported values for this field are TWELVE_MONTH (1 year), + andTHIRTY_SIX_MONTH (3 years). + Values: + UNDEFINED_PLAN (0): + A value indicating that the enum field is not + set. + INVALID (530283991): + No description available. + THIRTY_SIX_MONTH (266295942): + No description available. + TWELVE_MONTH (173083962): + No description available. + """ + UNDEFINED_PLAN = 0 + INVALID = 530283991 + THIRTY_SIX_MONTH = 266295942 + TWELVE_MONTH = 173083962 - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + class Status(proto.Enum): + r"""Output only. [Output Only] Status of the commitment with regards to + eventual expiration (each commitment has an end date defined). + Status can be one of the following values: NOT_YET_ACTIVE, ACTIVE, + orEXPIRED. - Attributes: - instance_group_manager (str): - The name of the managed instance group to - delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + No description available. + CANCELLED (41957681): + Deprecate CANCELED status. Will use separate + status to differentiate cancel by mergeCud or + manual cancellation. + CREATING (455564985): + No description available. + EXPIRED (482489093): + No description available. + NOT_YET_ACTIVE (20607337): + No description available. + """ + UNDEFINED_STATUS = 0 + ACTIVE = 314733318 + CANCELLED = 41957681 + CREATING = 455564985 + EXPIRED = 482489093 + NOT_YET_ACTIVE = 20607337 - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located. - """ + class Type(proto.Enum): + r"""The type of commitment; specifies the machine series for which you + want to commit to purchasing resources. The choice of machine series + affects the discount rate and the eligible resource types. + + The type must be one of the following:ACCELERATOR_OPTIMIZED, + ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, + COMPUTE_OPTIMIZED_C2D, COMPUTE_OPTIMIZED_C3, + COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, + GENERAL_PURPOSE,GENERAL_PURPOSE_C4, + GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, + GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, + GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, + GRAPHICS_OPTIMIZED_G4,MEMORY_OPTIMIZED, + MEMORY_OPTIMIZED_M3,MEMORY_OPTIMIZED_X4, STORAGE_OPTIMIZED_Z3. For + example, type MEMORY_OPTIMIZED specifies a commitment that applies + only to eligible resources of memory optimized M1 and M2 machine + series. Type GENERAL_PURPOSE specifies a commitment that applies + only to eligible resources of general purpose N1 machine series. - instance_group_manager: str = proto.Field( + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + ACCELERATOR_OPTIMIZED (280848403): + No description available. + ACCELERATOR_OPTIMIZED_A3 (158574526): + No description available. + ACCELERATOR_OPTIMIZED_A3_MEGA (156517459): + No description available. + ACCELERATOR_OPTIMIZED_A3_ULTRA (27812811): + No description available. + ACCELERATOR_OPTIMIZED_A4 (158574527): + No description available. + COMPUTE_OPTIMIZED (158349023): + No description available. + COMPUTE_OPTIMIZED_C2D (383246453): + No description available. + COMPUTE_OPTIMIZED_C3 (428004784): + No description available. + COMPUTE_OPTIMIZED_C3D (383246484): + No description available. + COMPUTE_OPTIMIZED_H3 (428004939): + No description available. + COMPUTE_OPTIMIZED_H4D (383251320): + No description available. + GENERAL_PURPOSE (299793543): + No description available. + GENERAL_PURPOSE_C4 (301911817): + No description available. + GENERAL_PURPOSE_C4A (232460888): + No description available. + GENERAL_PURPOSE_C4D (232460891): + No description available. + GENERAL_PURPOSE_E2 (301911877): + No description available. + GENERAL_PURPOSE_N2 (301912156): + No description available. + GENERAL_PURPOSE_N2D (232471400): + No description available. + GENERAL_PURPOSE_N4 (301912158): + No description available. + GENERAL_PURPOSE_N4D (232471462): + No description available. + GENERAL_PURPOSE_T2D (232477166): + No description available. + GRAPHICS_OPTIMIZED (68500563): + No description available. + GRAPHICS_OPTIMIZED_G4 (54029369): + No description available. + MEMORY_OPTIMIZED (281753417): + No description available. + MEMORY_OPTIMIZED_M3 (276301372): + No description available. + MEMORY_OPTIMIZED_M4 (276301373): + No description available. + MEMORY_OPTIMIZED_M4_6TB (210543650): + No description available. + MEMORY_OPTIMIZED_X4_16TB (183089120): + No description available. + MEMORY_OPTIMIZED_X4_24TB (183116989): + No description available. + MEMORY_OPTIMIZED_X4_32TB (183144858): + No description available. + STORAGE_OPTIMIZED_Z3 (316796085): + No description available. + TYPE_UNSPECIFIED (437714322): + Note for internal users: When adding a new enum Type for v1, + make sure to also add it in the comment for the + ``optional Type type`` definition. This ensures that the + public documentation displays the new enum Type. + """ + UNDEFINED_TYPE = 0 + ACCELERATOR_OPTIMIZED = 280848403 + ACCELERATOR_OPTIMIZED_A3 = 158574526 + ACCELERATOR_OPTIMIZED_A3_MEGA = 156517459 + ACCELERATOR_OPTIMIZED_A3_ULTRA = 27812811 + ACCELERATOR_OPTIMIZED_A4 = 158574527 + COMPUTE_OPTIMIZED = 158349023 + COMPUTE_OPTIMIZED_C2D = 383246453 + COMPUTE_OPTIMIZED_C3 = 428004784 + COMPUTE_OPTIMIZED_C3D = 383246484 + COMPUTE_OPTIMIZED_H3 = 428004939 + COMPUTE_OPTIMIZED_H4D = 383251320 + GENERAL_PURPOSE = 299793543 + GENERAL_PURPOSE_C4 = 301911817 + GENERAL_PURPOSE_C4A = 232460888 + GENERAL_PURPOSE_C4D = 232460891 + GENERAL_PURPOSE_E2 = 301911877 + GENERAL_PURPOSE_N2 = 301912156 + GENERAL_PURPOSE_N2D = 232471400 + GENERAL_PURPOSE_N4 = 301912158 + GENERAL_PURPOSE_N4D = 232471462 + GENERAL_PURPOSE_T2D = 232477166 + GRAPHICS_OPTIMIZED = 68500563 + GRAPHICS_OPTIMIZED_G4 = 54029369 + MEMORY_OPTIMIZED = 281753417 + MEMORY_OPTIMIZED_M3 = 276301372 + MEMORY_OPTIMIZED_M4 = 276301373 + MEMORY_OPTIMIZED_M4_6TB = 210543650 + MEMORY_OPTIMIZED_X4_16TB = 183089120 + MEMORY_OPTIMIZED_X4_24TB = 183116989 + MEMORY_OPTIMIZED_X4_32TB = 183144858 + STORAGE_OPTIMIZED_Z3 = 316796085 + TYPE_UNSPECIFIED = 437714322 + + auto_renew: bool = proto.Field( + proto.BOOL, + number=495520765, + optional=True, + ) + category: str = proto.Field( proto.STRING, - number=249363395, + number=50511102, + optional=True, ) - project: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=227560217, + number=30525366, + optional=True, ) - request_id: str = proto.Field( + custom_end_timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=181770852, optional=True, ) - zone: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=3744684, + number=422937596, + optional=True, ) - - -class DeleteInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - InstanceGroupManagerResizeRequests.Delete. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035 or be a resource - ID. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - resize_request (str): - The name of the resize request to delete. The - name should conform to RFC1035 or be a resource - ID. - zone (str): - The name of the zone where the managed - instance group is located. The name should - conform to RFC1035. - """ - - instance_group_manager: str = proto.Field( + end_timestamp: str = proto.Field( proto.STRING, - number=249363395, + number=468096690, + optional=True, ) - project: str = proto.Field( + existing_reservations: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=493028443, ) - request_id: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - resize_request: str = proto.Field( + license_resource: "LicenseResourceCommitment" = proto.Field( + proto.MESSAGE, + number=437955148, + optional=True, + message="LicenseResourceCommitment", + ) + merge_source_commitments: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=216941060, + number=188093761, ) - zone: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=3744684, + number=3373707, + optional=True, + ) + plan: str = proto.Field( + proto.STRING, + number=3443497, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + reservations: MutableSequence["Reservation"] = proto.RepeatedField( + proto.MESSAGE, + number=399717927, + message="Reservation", + ) + resource_status: "CommitmentResourceStatus" = proto.Field( + proto.MESSAGE, + number=249429315, + optional=True, + message="CommitmentResourceStatus", + ) + resources: MutableSequence["ResourceCommitment"] = proto.RepeatedField( + proto.MESSAGE, + number=164412965, + message="ResourceCommitment", + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + split_source_commitment: str = proto.Field( + proto.STRING, + number=402611156, + optional=True, + ) + start_timestamp: str = proto.Field( + proto.STRING, + number=83645817, + optional=True, + ) + status: str = proto.Field( + proto.STRING, + number=181260274, + optional=True, + ) + status_message: str = proto.Field( + proto.STRING, + number=297428154, + optional=True, + ) + type_: str = proto.Field( + proto.STRING, + number=3575610, + optional=True, ) -class DeleteInstanceGroupRequest(proto.Message): - r"""A request message for InstanceGroups.Delete. See the method - description for details. - +class CommitmentAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group (str): - The name of the instance group to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the instance group - is located. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.CommitmentsScopedList]): + A list of CommitmentsScopedList resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#commitmentAggregatedList for aggregated lists + of commitments. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=81095253, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "CommitmentsScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="CommitmentsScopedList", ) - request_id: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - zone: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=3744684, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class DeleteInstanceRequest(proto.Message): - r"""A request message for Instances.Delete. See the method - description for details. - +class CommitmentList(proto.Message): + r"""Contains a list of Commitment resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance resource to delete. - no_graceful_shutdown (bool): - If set to true, Graceful Shutdown is skipped. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_no_graceful_shutdown``. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): + A list of Commitment resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#commitmentList for lists of commitments. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=18257045, - ) - no_graceful_shutdown: bool = proto.Field( - proto.BOOL, - number=336255890, + number=3355, optional=True, ) - project: str = proto.Field( + items: MutableSequence["Commitment"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Commitment", + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class DeleteInstanceTemplateRequest(proto.Message): - r"""A request message for InstanceTemplates.Delete. See the - method description for details. - +class CommitmentResourceStatus(proto.Message): + r"""[Output Only] Contains output only fields. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template (str): - The name of the instance template to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + custom_term_eligibility_end_timestamp (str): + Output only. [Output Only] Indicates the end time of + customer's eligibility to send custom term requests in + RFC3339 text format. Term extension requests that (not the + end time in the request) after this time will be rejected. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_custom_term_eligibility_end_timestamp``. """ - instance_template: str = proto.Field( - proto.STRING, - number=309248228, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + custom_term_eligibility_end_timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=363976187, optional=True, ) -class DeleteInstancesInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.DeleteInstances. - See the method description for details. - +class CommitmentsScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. - instance_group_managers_delete_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersDeleteInstancesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + commitments (MutableSequence[google.cloud.compute_v1beta.types.Commitment]): + [Output Only] The list of commitments contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of commitments when the list is empty. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - instance_group_managers_delete_instances_request_resource: "InstanceGroupManagersDeleteInstancesRequest" = proto.Field( + commitments: MutableSequence["Commitment"] = proto.RepeatedField( proto.MESSAGE, - number=166421252, - message="InstanceGroupManagersDeleteInstancesRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + number=450664446, + message="Commitment", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + message="Warning", ) -class DeleteInstancesRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.DeleteInstances. See the method - description for details. +class CompositeHealthCheck(proto.Message): + r"""Represents a composite health check. + + A composite health check resource specifies the health source + resources and the health destination resource to which the + aggregated health result from the health source resources is + delivered. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group. - project (str): - Project ID for this request. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a CompositeHealthCheck. + An up-to-date fingerprint must be provided in + order to patch the CompositeHealthCheck; + Otherwise, the request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + CompositeHealthCheck. + + This field is a member of `oneof`_ ``_fingerprint``. + health_destination (str): + URL to the destination resource. Must be set. Must be + aForwardingRule. The ForwardingRule must have load balancing + scheme INTERNAL orINTERNAL_MANAGED and must be regional and + in the same region as the CompositeHealthCheck (cross-region + deployment forINTERNAL_MANAGED is not supported). Can be + mutated. + + This field is a member of `oneof`_ ``_health_destination``. + health_sources (MutableSequence[str]): + URLs to the HealthSource resources whose + results are AND'ed. I.e. he aggregated result is + is HEALTHY only if all sources are HEALTHY. Must + have at least 1. Must not have more than 10. + Must be regional and in the same region as + theCompositeHealthCheck. Can be mutated. + id (int): + Output only. [Output Only] A unique identifier for this + resource type. The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#compositeHealthCheck for composite health + checks. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. region (str): - Name of the region scoping this request. - region_instance_group_managers_delete_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Output only. [Output Only] URL of the region where the + composite health check resides. This field applies only to + the regional resource. You must specify this field as part + of the HTTP request URL. It is not settable as a field in + the request body. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_region``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL with id for + the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. """ - instance_group_manager: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=249363395, + number=30525366, + optional=True, ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - region: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=138946292, + number=234678500, + optional=True, ) - region_instance_group_managers_delete_instances_request_resource: "RegionInstanceGroupManagersDeleteInstancesRequest" = proto.Field( - proto.MESSAGE, - number=500876665, - message="RegionInstanceGroupManagersDeleteInstancesRequest", + health_destination: str = proto.Field( + proto.STRING, + number=311098027, + optional=True, ) - request_id: str = proto.Field( + health_sources: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, + number=397879509, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - - -class DeleteInstantSnapshotRequest(proto.Message): - r"""A request message for InstantSnapshots.Delete. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instant_snapshot (str): - Name of the InstantSnapshot resource to - delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. - """ - - instant_snapshot: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=391638626, + number=3292052, + optional=True, ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - request_id: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=37109963, + number=138946292, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, ) -class DeleteInterconnectAttachmentGroupRequest(proto.Message): - r"""A request message for InterconnectAttachmentGroups.Delete. - See the method description for details. - +class CompositeHealthCheckAggregatedList(proto.Message): + r"""Contains a list of CompositeHealthChecksScopedList. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_attachment_group (str): - Name of the InterconnectAttachmentGroup - resource to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.CompositeHealthChecksScopedList]): + A list of CompositeHealthChecksScopedList + resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - interconnect_attachment_group: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=75905012, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "CompositeHealthChecksScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="CompositeHealthChecksScopedList", ) - request_id: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - - -class DeleteInterconnectAttachmentRequest(proto.Message): - r"""A request message for InterconnectAttachments.Delete. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - interconnect_attachment (str): - Name of the interconnect attachment to - delete. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - interconnect_attachment: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=308135284, + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - region: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=138946292, + number=243372063, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class DeleteInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.Delete. See the - method description for details. - +class CompositeHealthCheckList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_group (str): - Name of the InterconnectGroup resource to - delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.CompositeHealthCheck]): + A list of CompositeHealthCheck resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#compositeHealthCheck for composite health + checks. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - interconnect_group: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=388651918, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableSequence["CompositeHealthCheck"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="CompositeHealthCheck", + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class DeleteInterconnectRequest(proto.Message): - r"""A request message for Interconnects.Delete. See the method - description for details. - +class CompositeHealthChecksScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect (str): - Name of the interconnect to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + composite_health_checks (MutableSequence[google.cloud.compute_v1beta.types.CompositeHealthCheck]): + A list of CompositeHealthChecks contained in + this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of composite health checks when the list is + empty. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_warning``. """ - interconnect: str = proto.Field( - proto.STRING, - number=224601230, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + composite_health_checks: MutableSequence[ + "CompositeHealthCheck" + ] = proto.RepeatedField( + proto.MESSAGE, + number=517891062, + message="CompositeHealthCheck", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class DeleteLicenseRequest(proto.Message): - r"""A request message for Licenses.Delete. See the method - description for details. - +class ConfidentialInstanceConfig(proto.Message): + r"""A set of Confidential Instance options. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - license_ (str): - Name of the license resource to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + confidential_instance_type (str): + Defines the type of technology used by the + confidential instance. Check the + ConfidentialInstanceType enum for the list of + possible values. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_confidential_instance_type``. + enable_confidential_compute (bool): + Defines whether the instance should have + confidential compute enabled. + + This field is a member of `oneof`_ ``_enable_confidential_compute``. """ - license_: str = proto.Field( - proto.STRING, - number=166757441, - ) - project: str = proto.Field( + class ConfidentialInstanceType(proto.Enum): + r"""Defines the type of technology used by the confidential + instance. + + Values: + UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE (0): + A value indicating that the enum field is not + set. + CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED (115021829): + No type specified. Do not use this value. + SEV (81988): + AMD Secure Encrypted Virtualization. + SEV_SNP (21753562): + AMD Secure Encrypted Virtualization - Secure + Nested Paging. + TDX (82920): + Intel Trust Domain eXtension. + """ + UNDEFINED_CONFIDENTIAL_INSTANCE_TYPE = 0 + CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 115021829 + SEV = 81988 + SEV_SNP = 21753562 + TDX = 82920 + + confidential_instance_type: str = proto.Field( proto.STRING, - number=227560217, + number=43484717, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + enable_confidential_compute: bool = proto.Field( + proto.BOOL, + number=102135228, optional=True, ) -class DeleteMachineImageRequest(proto.Message): - r"""A request message for MachineImages.Delete. See the method - description for details. - +class ConnectionDraining(proto.Message): + r"""Message containing connection draining configuration. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - machine_image (str): - The name of the machine image to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + draining_timeout_sec (int): + Configures a duration timeout for existing + requests on a removed backend instance. For + supported load balancers and protocols, as + described inEnabling connection draining. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_draining_timeout_sec``. """ - machine_image: str = proto.Field( - proto.STRING, - number=69189475, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + draining_timeout_sec: int = proto.Field( + proto.INT32, + number=225127070, optional=True, ) -class DeleteNetworkAttachmentRequest(proto.Message): - r"""A request message for NetworkAttachments.Delete. See the - method description for details. +class ConsistentHashLoadBalancerSettings(proto.Message): + r"""This message defines settings for a consistent hash style + load balancer. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_attachment (str): - Name of the NetworkAttachment resource to - delete. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + http_cookie (google.cloud.compute_v1beta.types.ConsistentHashLoadBalancerSettingsHttpCookie): + Hash is based on HTTP Cookie. This field describes a HTTP + cookie that will be used as the hash key for the consistent + hash load balancer. If the cookie is not present, it will be + generated. This field is applicable if the sessionAffinity + is set to HTTP_COOKIE. - This field is a member of `oneof`_ ``_request_id``. + Not supported when the backend service is referenced by a + URL map that is bound to target gRPC proxy that has + validateForProxyless field set to true. + + This field is a member of `oneof`_ ``_http_cookie``. + http_header_name (str): + The hash based on the value of the specified header field. + This field is applicable if the sessionAffinity is set + toHEADER_FIELD. + + This field is a member of `oneof`_ ``_http_header_name``. + minimum_ring_size (int): + The minimum number of virtual nodes to use + for the hash ring. Defaults to + 1024. Larger ring sizes result in more granular + load distributions. If the number of hosts + in the load balancing pool is larger than + the ring size, each host will be assigned a + single virtual node. + + This field is a member of `oneof`_ ``_minimum_ring_size``. """ - network_attachment: str = proto.Field( - proto.STRING, - number=224644052, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + http_cookie: "ConsistentHashLoadBalancerSettingsHttpCookie" = proto.Field( + proto.MESSAGE, + number=6673915, + optional=True, + message="ConsistentHashLoadBalancerSettingsHttpCookie", ) - region: str = proto.Field( + http_header_name: str = proto.Field( proto.STRING, - number=138946292, + number=234798022, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + minimum_ring_size: int = proto.Field( + proto.INT64, + number=234380735, optional=True, ) -class DeleteNetworkEdgeSecurityServiceRequest(proto.Message): - r"""A request message for NetworkEdgeSecurityServices.Delete. See - the method description for details. +class ConsistentHashLoadBalancerSettingsHttpCookie(proto.Message): + r"""The information about the HTTP Cookie on which the hash + function is based for load balancing policies that use a + consistent hash. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_edge_security_service (str): - Name of the network edge security service to - delete. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + name (str): + Name of the cookie. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_name``. + path (str): + Path to set for the cookie. + + This field is a member of `oneof`_ ``_path``. + ttl (google.cloud.compute_v1beta.types.Duration): + Lifetime of the cookie. + + This field is a member of `oneof`_ ``_ttl``. """ - network_edge_security_service: str = proto.Field( - proto.STRING, - number=157011879, - ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - region: str = proto.Field( + path: str = proto.Field( proto.STRING, - number=138946292, + number=3433509, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + ttl: "Duration" = proto.Field( + proto.MESSAGE, + number=115180, optional=True, + message="Duration", ) -class DeleteNetworkEndpointGroupRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.Delete. See the - method description for details. +class CopyRulesOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.CopyRules. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group to - delete. It should comply with RFC1035. - project (str): - Project ID for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + security_policy (str): + Name of the security policy to update. + source_security_policy (str): + The security policy from which to copy rules. + + This field is a member of `oneof`_ ``_source_security_policy``. """ - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=3744684, + number=171082513, + ) + source_security_policy: str = proto.Field( + proto.STRING, + number=234793709, + optional=True, ) -class DeleteNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.Delete. See the - method description for details. +class CorsPolicy(proto.Message): + r"""The specification for allowing client-side cross-origin + requests. For more information about the W3C recommendation for + cross-origin resource sharing (CORS), see Fetch API Living + Standard. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to delete. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + allow_credentials (bool): + In response to a preflight request, setting + this to true indicates that + the actual request can include user credentials. + This field translates to the + Access-Control-Allow-Credentials header. - This field is a member of `oneof`_ ``_request_id``. + Default is false. + + This field is a member of `oneof`_ ``_allow_credentials``. + allow_headers (MutableSequence[str]): + Specifies the content for the + Access-Control-Allow-Headers header. + allow_methods (MutableSequence[str]): + Specifies the content for the + Access-Control-Allow-Methods header. + allow_origin_regexes (MutableSequence[str]): + Specifies a regular expression that matches allowed origins. + For more information, see regular expression syntax. + + An origin is allowed if it matches either an item + inallowOrigins or an item inallowOriginRegexes. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + allow_origins (MutableSequence[str]): + Specifies the list of origins that is allowed + to do CORS requests. + An origin is allowed if it matches either an + item inallowOrigins or an item + inallowOriginRegexes. + disabled (bool): + If true, disables the CORS policy. + The default value is false, which indicates that + the CORS policy is in effect. + + This field is a member of `oneof`_ ``_disabled``. + expose_headers (MutableSequence[str]): + Specifies the content for the + Access-Control-Expose-Headers header. + max_age (int): + Specifies how long results of a preflight + request can be cached in seconds. This field + translates to the Access-Control-Max-Age header. + + This field is a member of `oneof`_ ``_max_age``. """ - firewall_policy: str = proto.Field( + allow_credentials: bool = proto.Field( + proto.BOOL, + number=481263366, + optional=True, + ) + allow_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=498173265, + number=45179024, ) - project: str = proto.Field( + allow_methods: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=205405372, ) - request_id: str = proto.Field( + allow_origin_regexes: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, + number=215385810, + ) + allow_origins: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=194914071, + ) + disabled: bool = proto.Field( + proto.BOOL, + number=270940796, + optional=True, + ) + expose_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=247604747, + ) + max_age: int = proto.Field( + proto.INT32, + number=307559332, optional=True, ) -class DeleteNetworkInterfaceInstanceRequest(proto.Message): - r"""A request message for Instances.DeleteNetworkInterface. See - the method description for details. +class CreateInstancesInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.CreateInstances. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - The instance name for this request stored as resource_id. - Name should conform to RFC1035 or be an unsigned long - integer. - network_interface_name (str): - The name of the dynamic network interface to - be deleted from the instance. + instance_group_manager (str): + The name of the managed instance group. + It should conform to RFC1035. + instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersCreateInstancesRequest): + The body resource for this request project (str): Project ID for this request. request_id (str): @@ -25730,30 +27149,35 @@ class DeleteNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone for this request. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ - instance: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=18257045, + number=249363395, ) - network_interface_name: str = proto.Field( - proto.STRING, - number=381342722, + instance_group_managers_create_instances_request_resource: "InstanceGroupManagersCreateInstancesRequest" = proto.Field( + proto.MESSAGE, + number=24558867, + message="InstanceGroupManagersCreateInstancesRequest", ) project: str = proto.Field( proto.STRING, @@ -25770,46 +27194,65 @@ class DeleteNetworkInterfaceInstanceRequest(proto.Message): ) -class DeleteNetworkRequest(proto.Message): - r"""A request message for Networks.Delete. See the method +class CreateInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.CreateInstances. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network (str): - Name of the network to delete. + instance_group_manager (str): + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. + region (str): + The name of theregion + where the managed instance group is located. + It should conform to RFC1035. + region_instance_group_managers_create_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest): + The body resource for this request request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - network: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=232872494, + number=249363395, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_group_managers_create_instances_request_resource: "RegionInstanceGroupManagersCreateInstancesRequest" = proto.Field( + proto.MESSAGE, + number=359014280, + message="RegionInstanceGroupManagersCreateInstancesRequest", + ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -25817,16 +27260,51 @@ class DeleteNetworkRequest(proto.Message): ) -class DeleteNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.Delete. See the method +class CreateMembersInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.CreateMembers. See + the method description for details. + + Attributes: + interconnect_group (str): + Name of the group resource to create members + for. + interconnect_groups_create_members_request_resource (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersRequest): + The body resource for this request + project (str): + Project ID for this request. + """ + + interconnect_group: str = proto.Field( + proto.STRING, + number=388651918, + ) + interconnect_groups_create_members_request_resource: "InterconnectGroupsCreateMembersRequest" = proto.Field( + proto.MESSAGE, + number=348323437, + message="InterconnectGroupsCreateMembersRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class CreateSnapshotDiskRequest(proto.Message): + r"""A request message for Disks.CreateSnapshot. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - node_group (str): - Name of the NodeGroup resource to delete. + disk (str): + Name of the persistent disk to snapshot. + guest_flush (bool): + [Input Only] Whether to attempt an application consistent + snapshot by informing the OS to prepare for the snapshot + process. + + This field is a member of `oneof`_ ``_guest_flush``. project (str): Project ID for this request. request_id (str): @@ -25834,26 +27312,37 @@ class DeleteNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): + The body resource for this request zone (str): The name of the zone for this request. """ - node_group: str = proto.Field( + disk: str = proto.Field( proto.STRING, - number=469958146, + number=3083677, + ) + guest_flush: bool = proto.Field( + proto.BOOL, + number=385550813, + optional=True, ) project: str = proto.Field( proto.STRING, @@ -25864,49 +27353,61 @@ class DeleteNodeGroupRequest(proto.Message): number=37109963, optional=True, ) + snapshot_resource: "Snapshot" = proto.Field( + proto.MESSAGE, + number=481319977, + message="Snapshot", + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class DeleteNodeTemplateRequest(proto.Message): - r"""A request message for NodeTemplates.Delete. See the method - description for details. +class CreateSnapshotRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.CreateSnapshot. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - node_template (str): - Name of the NodeTemplate resource to delete. + disk (str): + Name of the regional persistent disk to + snapshot. project (str): Project ID for this request. region (str): - The name of the region for this request. + Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): + The body resource for this request """ - node_template: str = proto.Field( + disk: str = proto.Field( proto.STRING, - number=323154455, + number=3083677, ) project: str = proto.Field( proto.STRING, @@ -25921,331 +27422,666 @@ class DeleteNodeTemplateRequest(proto.Message): number=37109963, optional=True, ) + snapshot_resource: "Snapshot" = proto.Field( + proto.MESSAGE, + number=481319977, + message="Snapshot", + ) -class DeleteNodesNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.DeleteNodes. See the method - description for details. +class CrossSiteNetwork(proto.Message): + r"""A resource that represents a cross-site network. + + You can use cross-site networks to connect your on-premises + networks to each other through Interconnect connections. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - node_group (str): - Name of the NodeGroup resource whose nodes - will be deleted. - node_groups_delete_nodes_request_resource (google.cloud.compute_v1beta.types.NodeGroupsDeleteNodesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of the cross-site + network. + + This field is a member of `oneof`_ ``_description``. + id (int): + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#crossSiteNetwork for cross-site networks. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. """ - node_group: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=469958146, + number=30525366, + optional=True, ) - node_groups_delete_nodes_request_resource: "NodeGroupsDeleteNodesRequest" = ( - proto.Field( - proto.MESSAGE, - number=183298962, - message="NodeGroupsDeleteNodesRequest", - ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, ) - project: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=37109963, + number=3373707, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, ) -class DeleteOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.Delete. - See the method description for details. +class CrossSiteNetworkList(proto.Message): + r"""Response to the list request that contains a list of + cross-site networks. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to delete. - """ - - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) + etag (str): + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. -class DeletePacketMirroringRequest(proto.Message): - r"""A request message for PacketMirrorings.Delete. See the method - description for details. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.CrossSiteNetwork]): + A list of CrossSiteNetwork resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#crossSiteNetwork for cross-site networks. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. - Attributes: - packet_mirroring (str): - Name of the PacketMirroring resource to - delete. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_warning``. """ - packet_mirroring: str = proto.Field( - proto.STRING, - number=22305996, + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, ) - project: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=227560217, + number=3355, + optional=True, ) - region: str = proto.Field( + items: MutableSequence["CrossSiteNetwork"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="CrossSiteNetwork", + ) + kind: str = proto.Field( proto.STRING, - number=138946292, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class DeletePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.DeletePerInstanceConfigs. See the method - description for details. +class CustomErrorResponsePolicy(proto.Message): + r"""Specifies the custom error response policy that must be + applied when the backend service or backend bucket responds with + an error. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. - instance_group_managers_delete_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersDeletePerInstanceConfigsReq): - The body resource for this request - project (str): - Project ID for this request. - zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + error_response_rules (MutableSequence[google.cloud.compute_v1beta.types.CustomErrorResponsePolicyCustomErrorResponseRule]): + Specifies rules for returning error + responses. + In a given policy, if you specify rules for both + a range of error codes as well as rules for + specific error codes then rules with specific + error codes have a higher priority. For example, + assume that you configure a rule for 401 + (Un-authorized) code, and another for all 4 + series error codes (4XX). If the backend service + returns a401, then the rule for 401 will be + applied. However if the backend service returns + a 403, the rule for4xx takes effect. + error_service (str): + The full or partial URL to the BackendBucket resource that + contains the custom error content. Examples are: + + :: + + - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket + - compute/v1/projects/project/global/backendBuckets/myBackendBucket + - global/backendBuckets/myBackendBucket + + If errorService is not specified at lower levels + likepathMatcher, pathRule and routeRule, an errorService + specified at a higher level in theUrlMap will be used. + IfUrlMap.defaultCustomErrorResponsePolicy contains one or + moreerrorResponseRules[], it must specifyerrorService. + + If load balancer cannot reach the backendBucket, a simple + Not Found Error will be returned, with the original response + code (oroverrideResponseCode if configured). + + errorService is not supported for internal or + regionalHTTP/HTTPS load balancers. + + This field is a member of `oneof`_ ``_error_service``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - instance_group_managers_delete_per_instance_configs_req_resource: "InstanceGroupManagersDeletePerInstanceConfigsReq" = proto.Field( + error_response_rules: MutableSequence[ + "CustomErrorResponsePolicyCustomErrorResponseRule" + ] = proto.RepeatedField( proto.MESSAGE, - number=362427680, - message="InstanceGroupManagersDeletePerInstanceConfigsReq", + number=14620304, + message="CustomErrorResponsePolicyCustomErrorResponseRule", ) - project: str = proto.Field( + error_service: str = proto.Field( proto.STRING, - number=227560217, + number=164214654, + optional=True, ) - zone: str = proto.Field( + + +class CustomErrorResponsePolicyCustomErrorResponseRule(proto.Message): + r"""Specifies the mapping between the response code that will be + returned along with the custom error content and the response + code returned by the backend service. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + match_response_codes (MutableSequence[str]): + Valid values include: + + + - A number between 400 and 599: For example + 401 or 503, in which case the load balancer + applies the policy if the error code exactly + matches this value. + - 5xx: Load Balancer will apply the policy + if the backend service responds with any + response code in the range of 500 to 599. + - 4xx: Load + Balancer will apply the policy if the + backend service responds with any response + code in the range of 400 to + 499. + + Values must be unique within matchResponseCodes + and across allerrorResponseRules + ofCustomErrorResponsePolicy. + override_response_code (int): + The HTTP status code returned with the + response containing the custom error content. If + overrideResponseCode is not supplied, the same + response code returned by the original backend + bucket or backend service is returned to the + client. + + This field is a member of `oneof`_ ``_override_response_code``. + path (str): + The full path to a file within backendBucket + . For example:/errors/defaultError.html + path must start + with a leading slash. path cannot have trailing + slashes. + + If the file is not available in backendBucket + or the load balancer cannot reach the + BackendBucket, a simpleNot Found Error is + returned to the client. + + The value must + be from 1 to 1024 characters + + This field is a member of `oneof`_ ``_path``. + """ + + match_response_codes: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3744684, + number=104973410, + ) + override_response_code: int = proto.Field( + proto.INT32, + number=530328568, + optional=True, + ) + path: str = proto.Field( + proto.STRING, + number=3433509, + optional=True, ) -class DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.DeletePerInstanceConfigs. See the - method description for details. +class CustomerEncryptionKey(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request, - should conform to RFC1035. - region_instance_group_manager_delete_instance_config_req_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq): - The body resource for this request + kms_key_name (str): + The name of the encryption key that is stored in Google + Cloud KMS. For example: + + "kmsKeyName": + "projects/kms_project_id/locations/region/keyRings/ + key_region/cryptoKeys/key + + The fully-qualifed key name may be returned for resource GET + requests. For example: + + "kmsKeyName": + "projects/kms_project_id/locations/region/keyRings/ + key_region/cryptoKeys/key /cryptoKeyVersions/1 + + This field is a member of `oneof`_ ``_kms_key_name``. + kms_key_service_account (str): + The service account being used for the encryption request + for the given KMS key. If absent, the Compute Engine default + service account is used. For example: + + "kmsKeyServiceAccount": + "name@project_id.iam.gserviceaccount.com/ + + This field is a member of `oneof`_ ``_kms_key_service_account``. + raw_key (str): + Specifies a 256-bit customer-supplied + encryption key, encoded in RFC + 4648 base64 to either encrypt or decrypt this + resource. You can provide either the rawKey or + thersaEncryptedKey. For example: + + "rawKey": + + "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=". + + This field is a member of `oneof`_ ``_raw_key``. + rsa_encrypted_key (str): + Specifies an RFC 4648 base64 encoded, + RSA-wrapped 2048-bit customer-supplied + encryption key to either encrypt or decrypt this + resource. You can provide either the rawKey or + thersaEncryptedKey. For example: + + "rsaEncryptedKey": + + "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH + z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD + D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" + + The key must meet the following requirements + before you can provide it to Compute Engine: + + 1. The key is wrapped using a RSA public key + certificate provided by Google. + 2. After being wrapped, the key must be + encoded in RFC 4648 base64 encoding. + + Gets the RSA public key certificate provided by + Google at: + + https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem + + This field is a member of `oneof`_ ``_rsa_encrypted_key``. + sha256 (str): + [Output only] TheRFC 4648 base64 encoded SHA-256 hash of the + customer-supplied encryption key that protects this + resource. + + This field is a member of `oneof`_ ``_sha256``. """ - instance_group_manager: str = proto.Field( + kms_key_name: str = proto.Field( proto.STRING, - number=249363395, + number=484373913, + optional=True, ) - project: str = proto.Field( + kms_key_service_account: str = proto.Field( proto.STRING, - number=227560217, + number=209986261, + optional=True, ) - region: str = proto.Field( + raw_key: str = proto.Field( proto.STRING, - number=138946292, + number=449196488, + optional=True, ) - region_instance_group_manager_delete_instance_config_req_resource: "RegionInstanceGroupManagerDeleteInstanceConfigReq" = proto.Field( + rsa_encrypted_key: str = proto.Field( + proto.STRING, + number=335487397, + optional=True, + ) + sha256: str = proto.Field( + proto.STRING, + number=170112551, + optional=True, + ) + + +class CustomerEncryptionKeyProtectedDisk(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Decrypts data associated with the disk with + acustomer-supplied encryption key. + + This field is a member of `oneof`_ ``_disk_encryption_key``. + source (str): + Specifies a valid partial or full URL to an existing + Persistent Disk resource. This field is only applicable for + persistent disks. For example: + + "source": "/compute/v1/projects/project_id/zones/zone/disks/ + disk_name + + This field is a member of `oneof`_ ``_source``. + """ + + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, - number=740741, - message="RegionInstanceGroupManagerDeleteInstanceConfigReq", + number=271660677, + optional=True, + message="CustomerEncryptionKey", + ) + source: str = proto.Field( + proto.STRING, + number=177235995, + optional=True, ) -class DeletePublicAdvertisedPrefixeRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.Delete. See - the method description for details. +class Data(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + key (str): + [Output Only] A key that provides more detail on the warning + being returned. For example, for warnings where there are no + results in a list request for a particular zone, this key + might be scope and the key value might be the zone name. + Other examples might be a key indicating a deprecated + resource and a suggested replacement, or a warning about + invalid network settings (for example, if an instance + attempts to perform IP forwarding but is not enabled for IP + forwarding). + + This field is a member of `oneof`_ ``_key``. + value (str): + [Output Only] A warning data value corresponding to the key. + + This field is a member of `oneof`_ ``_value``. + """ + + key: str = proto.Field( + proto.STRING, + number=106079, + optional=True, + ) + value: str = proto.Field( + proto.STRING, + number=111972721, + optional=True, + ) + + +class Date(proto.Message): + r"""Represents a whole or partial calendar date, such as a birthday. The + time of day and time zone are either specified elsewhere or are + insignificant. The date is relative to the Gregorian Calendar. This + can represent one of the following: + + - A full date, with non-zero year, month, and day values. + - A month and day, with a zero year (for example, an anniversary). + - A year on its own, with a zero month and a zero day. + - A year and month, with a zero day (for example, a credit card + expiration date). + + Related types: + + - google.type.TimeOfDay + - google.type.DateTime + - google.protobuf.Timestamp + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + day (int): + Day of a month. Must be from 1 to 31 and + valid for the year and month, or 0 to specify a + year by itself or a year and month where the day + isn't significant. + + This field is a member of `oneof`_ ``_day``. + month (int): + Month of a year. Must be from 1 to 12, or 0 + to specify a year without a month and day. + + This field is a member of `oneof`_ ``_month``. + year (int): + Year of the date. Must be from 1 to 9999, or + 0 to specify a date without a year. + + This field is a member of `oneof`_ ``_year``. + """ + + day: int = proto.Field( + proto.INT32, + number=99228, + optional=True, + ) + month: int = proto.Field( + proto.INT32, + number=104080000, + optional=True, + ) + year: int = proto.Field( + proto.INT32, + number=3704893, + optional=True, + ) + + +class DeleteAccessConfigInstanceRequest(proto.Message): + r"""A request message for Instances.DeleteAccessConfig. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + access_config (str): + The name of the access config to delete. + instance (str): + The instance name for this request. + network_interface (str): + The name of the network interface. project (str): Project ID for this request. - public_advertised_prefix (str): - Name of the PublicAdvertisedPrefix resource - to delete. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - project: str = proto.Field( + access_config: str = proto.Field( proto.STRING, - number=227560217, + number=72856189, ) - public_advertised_prefix: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=101874590, + number=18257045, + ) + network_interface: str = proto.Field( + proto.STRING, + number=365387880, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DeletePublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.Delete. See the - method description for details. +class DeleteAddressRequest(proto.Message): + r"""A request message for Addresses.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + address (str): + Name of the address resource to delete. project (str): Project ID for this request. - public_delegated_prefix (str): - Name of the PublicDelegatedPrefix resource to - delete. region (str): - Name of the region of this request. + Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - project: str = proto.Field( + address: str = proto.Field( proto.STRING, - number=227560217, + number=462920692, ) - public_delegated_prefix: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=204238440, + number=227560217, ) region: str = proto.Field( proto.STRING, @@ -26258,9 +28094,9 @@ class DeletePublicDelegatedPrefixeRequest(proto.Message): ) -class DeleteRegionAutoscalerRequest(proto.Message): - r"""A request message for RegionAutoscalers.Delete. See the - method description for details. +class DeleteAutoscalerRequest(proto.Message): + r"""A request message for Autoscalers.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -26270,26 +28106,30 @@ class DeleteRegionAutoscalerRequest(proto.Message): Name of the autoscaler to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + Name of the zone for this request. """ autoscaler: str = proto.Field( @@ -26300,64 +28140,61 @@ class DeleteRegionAutoscalerRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DeleteRegionBackendServiceRequest(proto.Message): - r"""A request message for RegionBackendServices.Delete. See the - method description for details. +class DeleteBackendBucketRequest(proto.Message): + r"""A request message for BackendBuckets.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (str): - Name of the BackendService resource to - delete. + backend_bucket (str): + Name of the BackendBucket resource to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - backend_service: str = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, - number=306946058, + number=91714037, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26365,53 +28202,51 @@ class DeleteRegionBackendServiceRequest(proto.Message): ) -class DeleteRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.Delete. See the method +class DeleteBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the regional persistent disk to + backend_service (str): + Name of the BackendService resource to delete. project (str): Project ID for this request. - region (str): - Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - disk: str = proto.Field( + backend_service: str = proto.Field( proto.STRING, - number=3083677, + number=306946058, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26419,52 +28254,47 @@ class DeleteRegionDiskRequest(proto.Message): ) -class DeleteRegionHealthCheckRequest(proto.Message): - r"""A request message for RegionHealthChecks.Delete. See the +class DeleteCrossSiteNetworkRequest(proto.Message): + r"""A request message for CrossSiteNetworks.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check (str): - Name of the HealthCheck resource to delete. + cross_site_network (str): + Name of the cross-site network to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. """ - health_check: str = proto.Field( + cross_site_network: str = proto.Field( proto.STRING, - number=308876645, + number=108192469, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26472,107 +28302,107 @@ class DeleteRegionHealthCheckRequest(proto.Message): ) -class DeleteRegionHealthCheckServiceRequest(proto.Message): - r"""A request message for RegionHealthCheckServices.Delete. See - the method description for details. +class DeleteDiskRequest(proto.Message): + r"""A request message for Disks.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check_service (str): - Name of the HealthCheckService to delete. The - name must be 1-63 characters long, and comply - with RFC1035. + disk (str): + Name of the persistent disk to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - health_check_service: str = proto.Field( + disk: str = proto.Field( proto.STRING, - number=408374747, + number=3083677, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - - -class DeleteRegionHealthSourceRequest(proto.Message): - r"""A request message for RegionHealthSources.Delete. See the + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class DeleteExternalVpnGatewayRequest(proto.Message): + r"""A request message for ExternalVpnGateways.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_source (str): - Name of the HealthSource resource to delete. + external_vpn_gateway (str): + Name of the externalVpnGateways to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - health_source: str = proto.Field( + external_vpn_gateway: str = proto.Field( proto.STRING, - number=376521566, + number=109898629, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26580,51 +28410,43 @@ class DeleteRegionHealthSourceRequest(proto.Message): ) -class DeleteRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.Delete. See - the method description for details. +class DeleteFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group to delete. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. + firewall_policy (str): + Name of the firewall policy to delete. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=138946292, + number=498173265, ) request_id: str = proto.Field( proto.STRING, @@ -26633,107 +28455,99 @@ class DeleteRegionInstanceGroupManagerRequest(proto.Message): ) -class DeleteRegionInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagerResizeRequests.Delete. See the method +class DeleteFirewallRequest(proto.Message): + r"""A request message for Firewalls.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. + firewall (str): + Name of the firewall rule to delete. project (str): Project ID for this request. - region (str): - The name of the region scoping this request. - Name should conform to RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - resize_request (str): - The name of the resize request to delete. - Name should conform to RFC1035 or be a resource - ID. """ - instance_group_manager: str = proto.Field( + firewall: str = proto.Field( proto.STRING, - number=249363395, + number=511016192, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resize_request: str = proto.Field( - proto.STRING, - number=216941060, - ) -class DeleteRegionInstanceTemplateRequest(proto.Message): - r"""A request message for RegionInstanceTemplates.Delete. See the - method description for details. +class DeleteForwardingRuleRequest(proto.Message): + r"""A request message for ForwardingRules.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template (str): - The name of the instance template to delete. + forwarding_rule (str): + Name of the ForwardingRule resource to + delete. project (str): Project ID for this request. region (str): - The name of the region for this request. + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - instance_template: str = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, - number=309248228, + number=269964030, ) project: str = proto.Field( proto.STRING, @@ -26750,106 +28564,109 @@ class DeleteRegionInstanceTemplateRequest(proto.Message): ) -class DeleteRegionInstantSnapshotRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.Delete. See the +class DeleteFutureReservationRequest(proto.Message): + r"""A request message for FutureReservations.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instant_snapshot (str): - Name of the InstantSnapshot resource to - delete. + future_reservation (str): + Name of the future reservation to retrieve. + Name should conform to RFC1035. project (str): Project ID for this request. - region (str): - The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + Name of the zone for this request. Name + should conform to RFC1035. """ - instant_snapshot: str = proto.Field( + future_reservation: str = proto.Field( proto.STRING, - number=391638626, + number=56206160, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DeleteRegionMultiMigRequest(proto.Message): - r"""A request message for RegionMultiMigs.Delete. See the method +class DeleteGlobalAddressRequest(proto.Message): + r"""A request message for GlobalAddresses.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - multi_mig (str): - Name of the multi-MIG to delete. + address (str): + Name of the address resource to delete. project (str): Project ID for this request. - region (str): - Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - multi_mig: str = proto.Field( + address: str = proto.Field( proto.STRING, - number=403990085, + number=462920692, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26857,55 +28674,51 @@ class DeleteRegionMultiMigRequest(proto.Message): ) -class DeleteRegionNetworkEndpointGroupRequest(proto.Message): - r"""A request message for RegionNetworkEndpointGroups.Delete. See - the method description for details. +class DeleteGlobalForwardingRuleRequest(proto.Message): + r"""A request message for GlobalForwardingRules.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group to - delete. It should comply with RFC1035. + forwarding_rule (str): + Name of the ForwardingRule resource to + delete. project (str): Project ID for this request. - region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group: str = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, - number=433907078, + number=269964030, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26913,52 +28726,51 @@ class DeleteRegionNetworkEndpointGroupRequest(proto.Message): ) -class DeleteRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for RegionNetworkFirewallPolicies.Delete. - See the method description for details. +class DeleteGlobalNetworkEndpointGroupRequest(proto.Message): + r"""A request message for GlobalNetworkEndpointGroups.Delete. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to delete. + network_endpoint_group (str): + The name of the network endpoint group to + delete. It should comply with RFC1035. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy: str = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, - number=498173265, + number=433907078, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -26966,106 +28778,114 @@ class DeleteRegionNetworkFirewallPolicyRequest(proto.Message): ) -class DeleteRegionNetworkPolicyRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.Delete. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class DeleteGlobalOperationRequest(proto.Message): + r"""A request message for GlobalOperations.Delete. See the method + description for details. Attributes: - network_policy (str): - Name of the network policy resource to - delete. + operation (str): + Name of the Operations resource to delete, or + its unique numeric identifier. project (str): Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. """ - network_policy: str = proto.Field( + operation: str = proto.Field( proto.STRING, - number=504961123, + number=52090215, ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( + + +class DeleteGlobalOperationResponse(proto.Message): + r"""A response message for GlobalOperations.Delete. See the + method description for details. + + """ + + +class DeleteGlobalOrganizationOperationRequest(proto.Message): + r"""A request message for GlobalOrganizationOperations.Delete. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + operation (str): + Name of the Operations resource to delete, or + its unique numeric identifier. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. + """ + + operation: str = proto.Field( proto.STRING, - number=138946292, + number=52090215, ) - request_id: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=37109963, + number=459714768, optional=True, ) -class DeleteRegionNotificationEndpointRequest(proto.Message): - r"""A request message for RegionNotificationEndpoints.Delete. See - the method description for details. +class DeleteGlobalOrganizationOperationResponse(proto.Message): + r"""A response message for GlobalOrganizationOperations.Delete. + See the method description for details. + + """ + + +class DeleteGlobalPublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for GlobalPublicDelegatedPrefixes.Delete. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - notification_endpoint (str): - Name of the NotificationEndpoint resource to - delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. + public_delegated_prefix (str): + Name of the PublicDelegatedPrefix resource to + delete. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - notification_endpoint: str = proto.Field( - proto.STRING, - number=376807017, - ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, - number=138946292, + number=204238440, ) request_id: str = proto.Field( proto.STRING, @@ -27074,439 +28894,581 @@ class DeleteRegionNotificationEndpointRequest(proto.Message): ) -class DeleteRegionOperationRequest(proto.Message): - r"""A request message for RegionOperations.Delete. See the method - description for details. +class DeleteGlobalVmExtensionPolicyRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.Delete. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - operation (str): - Name of the Operations resource to delete, or - its unique numeric identifier. + global_vm_extension_policy (str): + Name of the global VM extension policy to + purge scoped resources for. + global_vm_extension_policy_rollout_operation_rollout_input_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - operation: str = proto.Field( + global_vm_extension_policy: str = proto.Field( proto.STRING, - number=52090215, + number=8334110, + ) + global_vm_extension_policy_rollout_operation_rollout_input_resource: "GlobalVmExtensionPolicyRolloutOperationRolloutInput" = proto.Field( + proto.MESSAGE, + number=147209176, + message="GlobalVmExtensionPolicyRolloutOperationRolloutInput", ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=138946292, + number=37109963, + optional=True, ) -class DeleteRegionOperationResponse(proto.Message): - r"""A response message for RegionOperations.Delete. See the - method description for details. - - """ - - -class DeleteRegionSecurityPolicyRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.Delete. See the - method description for details. +class DeleteHealthCheckRequest(proto.Message): + r"""A request message for HealthChecks.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + health_check (str): + Name of the HealthCheck resource to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to delete. """ - project: str = proto.Field( + health_check: str = proto.Field( proto.STRING, - number=227560217, + number=308876645, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) -class DeleteRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.Delete. See the method +class DeleteImageRequest(proto.Message): + r"""A request message for Images.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + image (str): + Name of the image resource to delete. project (str): Project ID for this request. - region (str): - The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - snapshot (str): - Name of the snapshot resource to delete. """ - project: str = proto.Field( + image: str = proto.Field( proto.STRING, - number=227560217, + number=100313435, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot: str = proto.Field( - proto.STRING, - number=284874180, - ) -class DeleteRegionSslCertificateRequest(proto.Message): - r"""A request message for RegionSslCertificates.Delete. See the +class DeleteInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_group_manager (str): + The name of the managed instance group to + delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - ssl_certificate (str): - Name of the SslCertificate resource to - delete. + zone (str): + The name of thezone where the managed + instance group is located. """ - project: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=227560217, + number=249363395, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_certificate: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=46443492, + number=3744684, ) -class DeleteRegionSslPolicyRequest(proto.Message): - r"""A request message for RegionSslPolicies.Delete. See the - method description for details. +class DeleteInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + InstanceGroupManagerResizeRequests.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_group_manager (str): + The name of the managed instance group. + The name should conform to RFC1035 or be a + resource ID. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - ssl_policy (str): - Name of the SSL policy to delete. The name - must be 1-63 characters long, and comply with - RFC1035. + resize_request (str): + The name of the resize request to delete. + The name should conform to RFC1035 or be a + resource ID. + zone (str): + The name of thezone where the managed + instance group is located. The name should + conform to RFC1035. """ - project: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=227560217, + number=249363395, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy: str = proto.Field( + resize_request: str = proto.Field( proto.STRING, - number=295190213, + number=216941060, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class DeleteRegionTargetHttpProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpProxies.Delete. See the - method description for details. +class DeleteInstanceGroupRequest(proto.Message): + r"""A request message for InstanceGroups.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_group (str): + The name of the instance group to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_http_proxy (str): - Name of the TargetHttpProxy resource to - delete. + zone (str): + The name of the zone + where the instance group is located. """ - project: str = proto.Field( + instance_group: str = proto.Field( proto.STRING, - number=227560217, + number=81095253, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=206872421, + number=3744684, ) -class DeleteRegionTargetHttpsProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpsProxies.Delete. See - the method description for details. +class DeleteInstanceRequest(proto.Message): + r"""A request message for Instances.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance (str): + Name of the instance resource to delete. + no_graceful_shutdown (bool): + If set to true, Graceful Shutdown is skipped. + + This field is a member of `oneof`_ ``_no_graceful_shutdown``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_https_proxy (str): - Name of the TargetHttpsProxy resource to - delete. + zone (str): + The name of the zone for this request. """ - project: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=227560217, + number=18257045, ) - region: str = proto.Field( + no_graceful_shutdown: bool = proto.Field( + proto.BOOL, + number=336255890, + optional=True, + ) + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=52336748, + number=3744684, ) -class DeleteRegionTargetTcpProxyRequest(proto.Message): - r"""A request message for RegionTargetTcpProxies.Delete. See the +class DeleteInstanceTemplateRequest(proto.Message): + r"""A request message for InstanceTemplates.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_template (str): + The name of the instance template to delete. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_tcp_proxy (str): - Name of the TargetTcpProxy resource to - delete. """ - project: str = proto.Field( + instance_template: str = proto.Field( proto.STRING, - number=227560217, + number=309248228, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy: str = proto.Field( - proto.STRING, - number=503065442, - ) -class DeleteRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.Delete. See the method - description for details. +class DeleteInstancesInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.DeleteInstances. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_group_manager (str): + The name of the managed instance group. + instance_group_managers_delete_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersDeleteInstancesRequest): + The body resource for this request project (str): Project ID for this request. - region (str): + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of thezone where the managed + instance group is located. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + instance_group_managers_delete_instances_request_resource: "InstanceGroupManagersDeleteInstancesRequest" = proto.Field( + proto.MESSAGE, + number=166421252, + message="InstanceGroupManagersDeleteInstancesRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class DeleteInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.DeleteInstances. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_group_manager (str): + Name of the managed instance group. + project (str): + Project ID for this request. + region (str): Name of the region scoping this request. + region_instance_group_managers_delete_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest): + The body resource for this request request_id (str): - begin_interface: MixerMutationRequestBuilder Request ID to - support idempotency. + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap resource to delete. """ + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -27515,25 +29477,29 @@ class DeleteRegionUrlMapRequest(proto.Message): proto.STRING, number=138946292, ) + region_instance_group_managers_delete_instances_request_resource: "RegionInstanceGroupManagersDeleteInstancesRequest" = proto.Field( + proto.MESSAGE, + number=500876665, + message="RegionInstanceGroupManagersDeleteInstancesRequest", + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map: str = proto.Field( - proto.STRING, - number=367020684, - ) -class DeleteReservationRequest(proto.Message): - r"""A request message for Reservations.Delete. See the method +class DeleteInstantSnapshotRequest(proto.Message): + r"""A request message for InstantSnapshots.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instant_snapshot (str): + Name of the InstantSnapshot resource to + delete. project (str): Project ID for this request. request_id (str): @@ -27541,25 +29507,31 @@ class DeleteReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - reservation (str): - Name of the reservation to delete. zone (str): - Name of the zone for this request. + The name of the zone for this request. """ + instant_snapshot: str = proto.Field( + proto.STRING, + number=391638626, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -27569,82 +29541,72 @@ class DeleteReservationRequest(proto.Message): number=37109963, optional=True, ) - reservation: str = proto.Field( - proto.STRING, - number=47530956, - ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class DeleteResourcePolicyRequest(proto.Message): - r"""A request message for ResourcePolicies.Delete. See the method - description for details. +class DeleteInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for InterconnectAttachmentGroups.Delete. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + interconnect_attachment_group (str): + Name of the InterconnectAttachmentGroup + resource to delete. project (str): Project ID for this request. - region (str): - Name of the region for this request. request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. - resource_policy (str): - Name of the resource policy to delete. """ - project: str = proto.Field( + interconnect_attachment_group: str = proto.Field( proto.STRING, - number=227560217, + number=75905012, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource_policy: str = proto.Field( - proto.STRING, - number=159240835, - ) -class DeleteRoutePolicyRouterRequest(proto.Message): - r"""A request message for Routers.DeleteRoutePolicy. See the +class DeleteInterconnectAttachmentRequest(proto.Message): + r"""A request message for InterconnectAttachments.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - policy (str): - The Policy name for this request. Name must - conform to RFC1035 - - This field is a member of `oneof`_ ``_policy``. + interconnect_attachment (str): + Name of the interconnect attachment to + delete. project (str): Project ID for this request. region (str): @@ -27654,28 +29616,28 @@ class DeleteRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - router (str): - Name of the Router resource where Route - Policy is defined. """ - policy: str = proto.Field( + interconnect_attachment: str = proto.Field( proto.STRING, - number=91071794, - optional=True, + number=308135284, ) project: str = proto.Field( proto.STRING, @@ -27690,20 +29652,67 @@ class DeleteRoutePolicyRouterRequest(proto.Message): number=37109963, optional=True, ) - router: str = proto.Field( + + +class DeleteInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.Delete. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + interconnect_group (str): + Name of the InterconnectGroup resource to + delete. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder + + This field is a member of `oneof`_ ``_request_id``. + """ + + interconnect_group: str = proto.Field( proto.STRING, - number=148608841, + number=388651918, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class DeleteRouteRequest(proto.Message): - r"""A request message for Routes.Delete. See the method +class DeleteInterconnectRequest(proto.Message): + r"""A request message for Interconnects.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + interconnect (str): + Name of the interconnect to delete. project (str): Project ID for this request. request_id (str): @@ -27711,23 +29720,29 @@ class DeleteRouteRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - route (str): - Name of the Route resource to delete. """ + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -27737,73 +29752,69 @@ class DeleteRouteRequest(proto.Message): number=37109963, optional=True, ) - route: str = proto.Field( - proto.STRING, - number=108704329, - ) -class DeleteRouterRequest(proto.Message): - r"""A request message for Routers.Delete. See the method +class DeleteLicenseRequest(proto.Message): + r"""A request message for Licenses.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + license_ (str): + Name of the license resource to delete. project (str): Project ID for this request. - region (str): - Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - router (str): - Name of the Router resource to delete. """ - project: str = proto.Field( + license_: str = proto.Field( proto.STRING, - number=227560217, + number=166757441, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - router: str = proto.Field( - proto.STRING, - number=148608841, - ) -class DeleteSecurityPolicyRequest(proto.Message): - r"""A request message for SecurityPolicies.Delete. See the method +class DeleteMachineImageRequest(proto.Message): + r"""A request message for MachineImages.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + machine_image (str): + The name of the machine image to delete. project (str): Project ID for this request. request_id (str): @@ -27811,23 +29822,29 @@ class DeleteSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to delete. """ + machine_image: str = proto.Field( + proto.STRING, + number=69189475, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -27837,47 +29854,48 @@ class DeleteSecurityPolicyRequest(proto.Message): number=37109963, optional=True, ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) -class DeleteServiceAttachmentRequest(proto.Message): - r"""A request message for ServiceAttachments.Delete. See the +class DeleteNetworkAttachmentRequest(proto.Message): + r"""A request message for NetworkAttachments.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + network_attachment (str): + Name of the NetworkAttachment resource to + delete. project (str): Project ID for this request. region (str): Name of the region of this request. request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. - service_attachment (str): - Name of the ServiceAttachment resource to - delete. """ + network_attachment: str = proto.Field( + proto.STRING, + number=224644052, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -27891,60 +29909,59 @@ class DeleteServiceAttachmentRequest(proto.Message): number=37109963, optional=True, ) - service_attachment: str = proto.Field( - proto.STRING, - number=338957549, - ) -class DeleteSignedUrlKeyBackendBucketRequest(proto.Message): - r"""A request message for BackendBuckets.DeleteSignedUrlKey. See +class DeleteNetworkEdgeSecurityServiceRequest(proto.Message): + r"""A request message for NetworkEdgeSecurityServices.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_bucket (str): - Name of the BackendBucket resource to which - the Signed URL Key should be added. The name - should conform to RFC1035. - key_name (str): - The name of the Signed URL Key to delete. + network_edge_security_service (str): + Name of the network edge security service to + delete. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket: str = proto.Field( - proto.STRING, - number=91714037, - ) - key_name: str = proto.Field( + network_edge_security_service: str = proto.Field( proto.STRING, - number=500938859, + number=157011879, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -27952,20 +29969,17 @@ class DeleteSignedUrlKeyBackendBucketRequest(proto.Message): ) -class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.DeleteSignedUrlKey. See - the method description for details. +class DeleteNetworkEndpointGroupRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (str): - Name of the BackendService resource to which - the Signed URL Key should be added. The name - should conform to RFC1035. - key_name (str): - The name of the Signed URL Key to delete. + network_endpoint_group (str): + The name of the network endpoint group to + delete. It should comply with RFC1035. project (str): Project ID for this request. request_id (str): @@ -27973,28 +29987,32 @@ class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ - backend_service: str = proto.Field( - proto.STRING, - number=306946058, - ) - key_name: str = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, - number=500938859, + number=433907078, ) project: str = proto.Field( proto.STRING, @@ -28005,16 +30023,22 @@ class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DeleteSnapshotRequest(proto.Message): - r"""A request message for Snapshots.Delete. See the method - description for details. +class DeleteNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + firewall_policy (str): + Name of the firewall policy to delete. project (str): Project ID for this request. request_id (str): @@ -28022,23 +30046,29 @@ class DeleteSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - snapshot (str): - Name of the Snapshot resource to delete. """ + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28048,20 +30078,23 @@ class DeleteSnapshotRequest(proto.Message): number=37109963, optional=True, ) - snapshot: str = proto.Field( - proto.STRING, - number=284874180, - ) -class DeleteSslCertificateRequest(proto.Message): - r"""A request message for SslCertificates.Delete. See the method - description for details. +class DeleteNetworkInterfaceInstanceRequest(proto.Message): + r"""A request message for Instances.DeleteNetworkInterface. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance (str): + The instance name for this request stored as resource_id. + Name should conform to RFC1035 or be an unsigned long + integer. + network_interface_name (str): + The name of the dynamic network interface to + be deleted from the instance. project (str): Project ID for this request. request_id (str): @@ -28069,24 +30102,35 @@ class DeleteSslCertificateRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - ssl_certificate (str): - Name of the SslCertificate resource to - delete. + zone (str): + The name of the zone for this request. """ + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + network_interface_name: str = proto.Field( + proto.STRING, + number=381342722, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28096,20 +30140,22 @@ class DeleteSslCertificateRequest(proto.Message): number=37109963, optional=True, ) - ssl_certificate: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=46443492, + number=3744684, ) -class DeleteSslPolicyRequest(proto.Message): - r"""A request message for SslPolicies.Delete. See the method +class DeleteNetworkRequest(proto.Message): + r"""A request message for Networks.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + network (str): + Name of the network to delete. project (str): Project ID for this request. request_id (str): @@ -28117,25 +30163,29 @@ class DeleteSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - ssl_policy (str): - Name of the SSL policy to delete. The name - must be 1-63 characters long, and comply with - RFC1035. """ + network: str = proto.Field( + proto.STRING, + number=232872494, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28145,20 +30195,18 @@ class DeleteSslPolicyRequest(proto.Message): number=37109963, optional=True, ) - ssl_policy: str = proto.Field( - proto.STRING, - number=295190213, - ) -class DeleteStoragePoolRequest(proto.Message): - r"""A request message for StoragePools.Delete. See the method +class DeleteNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + node_group (str): + Name of the NodeGroup resource to delete. project (str): Project ID for this request. request_id (str): @@ -28166,25 +30214,31 @@ class DeleteStoragePoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - storage_pool (str): - Name of the storage pool to delete. zone (str): The name of the zone for this request. """ + node_group: str = proto.Field( + proto.STRING, + number=469958146, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28194,50 +30248,54 @@ class DeleteStoragePoolRequest(proto.Message): number=37109963, optional=True, ) - storage_pool: str = proto.Field( - proto.STRING, - number=360473440, - ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class DeleteSubnetworkRequest(proto.Message): - r"""A request message for Subnetworks.Delete. See the method +class DeleteNodeTemplateRequest(proto.Message): + r"""A request message for NodeTemplates.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + node_template (str): + Name of the NodeTemplate resource to delete. project (str): Project ID for this request. region (str): - Name of the region scoping this request. + The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - subnetwork (str): - Name of the Subnetwork resource to delete. """ + node_template: str = proto.Field( + proto.STRING, + number=323154455, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28251,20 +30309,21 @@ class DeleteSubnetworkRequest(proto.Message): number=37109963, optional=True, ) - subnetwork: str = proto.Field( - proto.STRING, - number=307827694, - ) -class DeleteTargetGrpcProxyRequest(proto.Message): - r"""A request message for TargetGrpcProxies.Delete. See the - method description for details. +class DeleteNodesNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.DeleteNodes. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + node_group (str): + Name of the NodeGroup resource whose nodes + will be deleted. + node_groups_delete_nodes_request_resource (google.cloud.compute_v1beta.types.NodeGroupsDeleteNodesRequest): + The body resource for this request project (str): Project ID for this request. request_id (str): @@ -28272,24 +30331,38 @@ class DeleteTargetGrpcProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_grpc_proxy (str): - Name of the TargetGrpcProxy resource to - delete. + zone (str): + The name of the zone for this request. """ + node_group: str = proto.Field( + proto.STRING, + number=469958146, + ) + node_groups_delete_nodes_request_resource: "NodeGroupsDeleteNodesRequest" = ( + proto.Field( + proto.MESSAGE, + number=183298962, + message="NodeGroupsDeleteNodesRequest", + ) + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28299,155 +30372,147 @@ class DeleteTargetGrpcProxyRequest(proto.Message): number=37109963, optional=True, ) - target_grpc_proxy: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=5020283, + number=3744684, ) -class DeleteTargetHttpProxyRequest(proto.Message): - r"""A request message for TargetHttpProxies.Delete. See the - method description for details. +class DeleteOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.Delete. + 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. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_http_proxy (str): - Name of the TargetHttpProxy resource to - delete. + security_policy (str): + Name of the security policy to delete. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=206872421, + number=171082513, ) -class DeleteTargetHttpsProxyRequest(proto.Message): - r"""A request message for TargetHttpsProxies.Delete. See the - method description for details. +class DeletePacketMirroringRequest(proto.Message): + r"""A request message for PacketMirrorings.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + packet_mirroring (str): + Name of the PacketMirroring resource to + delete. project (str): Project ID for this request. + region (str): + Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_https_proxy (str): - Name of the TargetHttpsProxy resource to - delete. """ + packet_mirroring: str = proto.Field( + proto.STRING, + number=22305996, + ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy: str = proto.Field( - proto.STRING, - number=52336748, - ) -class DeleteTargetInstanceRequest(proto.Message): - r"""A request message for TargetInstances.Delete. See the method +class DeletePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.DeletePerInstanceConfigs. See the method description for details. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Attributes: + instance_group_manager (str): + The name of the managed instance group. + It should conform to RFC1035. + instance_group_managers_delete_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersDeletePerInstanceConfigsReq): + The body resource for this request project (str): Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - target_instance (str): - Name of the TargetInstance resource to - delete. zone (str): - Name of the zone scoping this request. + The name of thezone + where the managed instance + group is located. + It should conform to RFC1035. """ - project: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=227560217, + number=249363395, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, + instance_group_managers_delete_per_instance_configs_req_resource: "InstanceGroupManagersDeletePerInstanceConfigsReq" = proto.Field( + proto.MESSAGE, + number=362427680, + message="InstanceGroupManagersDeletePerInstanceConfigsReq", ) - target_instance: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=289769347, + number=227560217, ) zone: str = proto.Field( proto.STRING, @@ -28455,40 +30520,28 @@ class DeleteTargetInstanceRequest(proto.Message): ) -class DeleteTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.Delete. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.DeletePerInstanceConfigs. See the + method description for details. Attributes: + instance_group_manager (str): + The name of the managed instance group. It + should conform to RFC1035. project (str): Project ID for this request. region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - target_pool (str): - Name of the TargetPool resource to delete. + Name of the region scoping this request, + should conform to RFC1035. + region_instance_group_manager_delete_instance_config_req_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq): + The body resource for this request """ + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28497,20 +30550,16 @@ class DeleteTargetPoolRequest(proto.Message): proto.STRING, number=138946292, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - target_pool: str = proto.Field( - proto.STRING, - number=62796298, + region_instance_group_manager_delete_instance_config_req_resource: "RegionInstanceGroupManagerDeleteInstanceConfigReq" = proto.Field( + proto.MESSAGE, + number=740741, + message="RegionInstanceGroupManagerDeleteInstanceConfigReq", ) -class DeleteTargetSslProxyRequest(proto.Message): - r"""A request message for TargetSslProxies.Delete. See the method - description for details. +class DeletePublicAdvertisedPrefixeRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.Delete. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -28518,47 +30567,51 @@ class DeleteTargetSslProxyRequest(proto.Message): Attributes: project (str): Project ID for this request. + public_advertised_prefix (str): + Name of the PublicAdvertisedPrefix resource + to delete. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_ssl_proxy (str): - Name of the TargetSslProxy resource to - delete. """ project: str = proto.Field( proto.STRING, number=227560217, ) + public_advertised_prefix: str = proto.Field( + proto.STRING, + number=101874590, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxy: str = proto.Field( - proto.STRING, - number=338795853, - ) -class DeleteTargetTcpProxyRequest(proto.Message): - r"""A request message for TargetTcpProxies.Delete. See the method - description for details. +class DeletePublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -28566,78 +30619,96 @@ class DeleteTargetTcpProxyRequest(proto.Message): Attributes: project (str): Project ID for this request. + public_delegated_prefix (str): + Name of the PublicDelegatedPrefix resource to + delete. + region (str): + Name of the region of this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_tcp_proxy (str): - Name of the TargetTcpProxy resource to - delete. """ project: str = proto.Field( proto.STRING, number=227560217, ) + public_delegated_prefix: str = proto.Field( + proto.STRING, + number=204238440, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy: str = proto.Field( - proto.STRING, - number=503065442, - ) -class DeleteTargetVpnGatewayRequest(proto.Message): - r"""A request message for TargetVpnGateways.Delete. See the +class DeleteRegionAutoscalerRequest(proto.Message): + r"""A request message for RegionAutoscalers.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + autoscaler (str): + Name of the autoscaler to delete. project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - target_vpn_gateway (str): - Name of the target VPN gateway to delete. """ + autoscaler: str = proto.Field( + proto.STRING, + number=517258967, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28651,93 +30722,117 @@ class DeleteTargetVpnGatewayRequest(proto.Message): number=37109963, optional=True, ) - target_vpn_gateway: str = proto.Field( - proto.STRING, - number=532512843, - ) -class DeleteUrlMapRequest(proto.Message): - r"""A request message for UrlMaps.Delete. See the method - description for details. +class DeleteRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + backend_bucket (str): + Name of the BackendBucket resource to delete. + force_delete (bool): + Force delete the backend bucket even if it is + still in use by other resources. It's intended + to be used internally only for requests from + wipeout. + + This field is a member of `oneof`_ ``_force_delete``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap resource to delete. """ + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + force_delete: bool = proto.Field( + proto.BOOL, + number=214559103, + optional=True, + ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map: str = proto.Field( - proto.STRING, - number=367020684, - ) -class DeleteVpnGatewayRequest(proto.Message): - r"""A request message for VpnGateways.Delete. See the method - description for details. +class DeleteRegionBackendServiceRequest(proto.Message): + r"""A request message for RegionBackendServices.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + backend_service (str): + Name of the BackendService resource to + delete. project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - vpn_gateway (str): - Name of the VPN gateway to delete. """ + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28751,46 +30846,51 @@ class DeleteVpnGatewayRequest(proto.Message): number=37109963, optional=True, ) - vpn_gateway: str = proto.Field( - proto.STRING, - number=406684153, - ) -class DeleteVpnTunnelRequest(proto.Message): - r"""A request message for VpnTunnels.Delete. See the method - description for details. +class DeleteRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Delete. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck resource to + delete. project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - vpn_tunnel (str): - Name of the VpnTunnel resource to delete. """ + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -28804,180 +30904,174 @@ class DeleteVpnTunnelRequest(proto.Message): number=37109963, optional=True, ) - vpn_tunnel: str = proto.Field( - proto.STRING, - number=143821331, - ) -class DeleteWireGroupRequest(proto.Message): - r"""A request message for WireGroups.Delete. See the method +class DeleteRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cross_site_network (str): - + disk (str): + Name of the regional persistent disk to + delete. project (str): Project ID for this request. + region (str): + Name of the region for this request. request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - wire_group (str): - Name of the wire group resource to delete. """ - cross_site_network: str = proto.Field( + disk: str = proto.Field( proto.STRING, - number=108192469, + number=3083677, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - wire_group: str = proto.Field( - proto.STRING, - number=122540613, - ) -class DeleteZoneOperationRequest(proto.Message): - r"""A request message for ZoneOperations.Delete. See the method - description for details. +class DeleteRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Delete. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - operation (str): - Name of the Operations resource to delete, or - its unique numeric identifier. + health_aggregation_policy (str): + Name of the HealthAggregationPolicy resource + to delete. project (str): Project ID for this request. - zone (str): - Name of the zone for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - operation: str = proto.Field( + health_aggregation_policy: str = proto.Field( proto.STRING, - number=52090215, + number=240314354, ) project: str = proto.Field( proto.STRING, number=227560217, ) - zone: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=3744684, + number=138946292, ) - - -class DeleteZoneOperationResponse(proto.Message): - r"""A response message for ZoneOperations.Delete. See the method - description for details. - - """ - - -class Denied(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - I_p_protocol (str): - The IP protocol to which this rule applies. - The protocol type is required when creating a - firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp) or the IP - protocol number. - - This field is a member of `oneof`_ ``_I_p_protocol``. - ports (MutableSequence[str]): - An optional list of ports to which this rule applies. This - field is only applicable for the UDP or TCP protocol. Each - entry must be either an integer or a range. If not - specified, this rule applies to connections through any - port. Example inputs include: ["22"], ["80","443"], and - ["12345-12349"]. - """ - - I_p_protocol: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=488094525, + number=37109963, optional=True, ) - ports: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=106854418, - ) -class DeprecateImageRequest(proto.Message): - r"""A request message for Images.Deprecate. See the method - description for details. +class DeleteRegionHealthCheckRequest(proto.Message): + r"""A request message for RegionHealthChecks.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - deprecation_status_resource (google.cloud.compute_v1beta.types.DeprecationStatus): - The body resource for this request - image (str): - Image name. + health_check (str): + Name of the HealthCheck resource to delete. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - deprecation_status_resource: "DeprecationStatus" = proto.Field( - proto.MESSAGE, - number=333006064, - message="DeprecationStatus", - ) - image: str = proto.Field( + health_check: str = proto.Field( proto.STRING, - number=100313435, + number=308876645, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -28985,362 +31079,290 @@ class DeprecateImageRequest(proto.Message): ) -class DeprecationStatus(proto.Message): - r"""Deprecation status for a public resource. +class DeleteRegionHealthCheckServiceRequest(proto.Message): + r"""A request message for RegionHealthCheckServices.Delete. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - deleted (str): - An optional RFC3339 timestamp on or after - which the state of this resource is intended to - change to DELETED. This is only informational - and the status will not change unless the client - explicitly changes it. - - This field is a member of `oneof`_ ``_deleted``. - deprecated (str): - An optional RFC3339 timestamp on or after - which the state of this resource is intended to - change to DEPRECATED. This is only informational - and the status will not change unless the client - explicitly changes it. - - This field is a member of `oneof`_ ``_deprecated``. - obsolete (str): - An optional RFC3339 timestamp on or after - which the state of this resource is intended to - change to OBSOLETE. This is only informational - and the status will not change unless the client - explicitly changes it. - - This field is a member of `oneof`_ ``_obsolete``. - replacement (str): - The URL of the suggested replacement for a - deprecated resource. The suggested replacement - resource must be the same kind of resource as - the deprecated resource. - - This field is a member of `oneof`_ ``_replacement``. - state (str): - The deprecation state of this resource. This - can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. - Operations which communicate the end of life - date for an image, can use ACTIVE. Operations - which create a new resource using a DEPRECATED - resource will return successfully, but with a - warning indicating the deprecated resource and - recommending its replacement. Operations which - use OBSOLETE or DELETED resources will be - rejected and result in an error. Check the State - enum for the list of possible values. - - This field is a member of `oneof`_ ``_state``. - state_override (google.cloud.compute_v1beta.types.RolloutPolicy): - The rollout policy for this deprecation. This - policy is only enforced by image family views. - The rollout policy restricts the zones where the - associated resource is considered in a - deprecated state. When the rollout policy does - not include the user specified zone, or if the - zone is rolled out, the associated resource is - considered in a deprecated state. The rollout - policy for this deprecation is read-only, except - for allowlisted users. This field might not be - configured. To view the latest non-deprecated - image in a specific zone, use the - imageFamilyViews.get method. + health_check_service (str): + Name of the HealthCheckService to delete. The + name must be 1-63 characters long, and comply + with RFC1035. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_state_override``. + This field is a member of `oneof`_ ``_request_id``. """ - class State(proto.Enum): - r"""The deprecation state of this resource. This can be ACTIVE, - DEPRECATED, OBSOLETE, or DELETED. Operations which communicate - the end of life date for an image, can use ACTIVE. Operations - which create a new resource using a DEPRECATED resource will - return successfully, but with a warning indicating the - deprecated resource and recommending its replacement. Operations - which use OBSOLETE or DELETED resources will be rejected and - result in an error. - - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - No description available. - DELETED (120962041): - No description available. - DEPRECATED (463360435): - No description available. - OBSOLETE (66532761): - No description available. - """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - DELETED = 120962041 - DEPRECATED = 463360435 - OBSOLETE = 66532761 - - deleted: str = proto.Field( - proto.STRING, - number=476721177, - optional=True, - ) - deprecated: str = proto.Field( + health_check_service: str = proto.Field( proto.STRING, - number=515138995, - optional=True, + number=408374747, ) - obsolete: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=357647769, - optional=True, + number=227560217, ) - replacement: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=430919186, - optional=True, + number=138946292, ) - state: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=109757585, - optional=True, - ) - state_override: "RolloutPolicy" = proto.Field( - proto.MESSAGE, - number=300358586, + number=37109963, optional=True, - message="RolloutPolicy", ) -class DetachDiskInstanceRequest(proto.Message): - r"""A request message for Instances.DetachDisk. See the method - description for details. +class DeleteRegionHealthSourceRequest(proto.Message): + r"""A request message for RegionHealthSources.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - device_name (str): - The device name of the disk to detach. Make a - get() request on the instance to view currently - attached disks and device names. - instance (str): - Instance name for this request. + health_source (str): + Name of the HealthSource resource to delete. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. """ - device_name: str = proto.Field( - proto.STRING, - number=67541716, - ) - instance: str = proto.Field( + health_source: str = proto.Field( proto.STRING, - number=18257045, + number=376521566, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): - r"""A request message for - GlobalNetworkEndpointGroups.DetachNetworkEndpoints. See the - method description for details. +class DeleteRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.Delete. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - global_network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.GlobalNetworkEndpointGroupsDetachEndpointsRequest): - The body resource for this request - network_endpoint_group (str): - The name of the network endpoint group where - you are removing network endpoints. It should - comply with RFC1035. + instance_group_manager (str): + Name of the managed instance group to delete. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - global_network_endpoint_groups_detach_endpoints_request_resource: "GlobalNetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=8898269, - message="GlobalNetworkEndpointGroupsDetachEndpointsRequest", - ) - network_endpoint_group: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=433907078, + number=249363395, ) project: str = proto.Field( proto.STRING, number=227560217, ) - request_id: str = proto.Field( + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) -class DetachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): +class DeleteRegionInstanceGroupManagerResizeRequestRequest(proto.Message): r"""A request message for - NetworkEndpointGroups.DetachNetworkEndpoints. See the method + RegionInstanceGroupManagerResizeRequests.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group where - you are removing network endpoints. It should - comply with RFC1035. - network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsDetachEndpointsRequest): - The body resource for this request + instance_group_manager (str): + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. project (str): Project ID for this request. + region (str): + The name of the region + scoping this request. Name should conform to + RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + resize_request (str): + The name of the resize request to delete. + Name should conform to RFC1035 or be a resource + ID. """ - network_endpoint_group: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=433907078, - ) - network_endpoint_groups_detach_endpoints_request_resource: "NetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=515608697, - message="NetworkEndpointGroupsDetachEndpointsRequest", + number=249363395, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone: str = proto.Field( + resize_request: str = proto.Field( proto.STRING, - number=3744684, + number=216941060, ) -class DetachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): - r"""A request message for - RegionNetworkEndpointGroups.DetachNetworkEndpoints. See the +class DeleteRegionInstanceTemplateRequest(proto.Message): + r"""A request message for RegionInstanceTemplates.Delete. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group you - are detaching network endpoints from. It should - comply with RFC1035. + instance_template (str): + The name of the instance template to delete. project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. - region_network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest): - The body resource for this request + The name of the region for this request. request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group: str = proto.Field( + instance_template: str = proto.Field( proto.STRING, - number=433907078, + number=309248228, ) project: str = proto.Field( proto.STRING, @@ -29350,11 +31372,6 @@ class DetachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): proto.STRING, number=138946292, ) - region_network_endpoint_groups_detach_endpoints_request_resource: "RegionNetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=313193198, - message="RegionNetworkEndpointGroupsDetachEndpointsRequest", - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -29362,40 +31379,57 @@ class DetachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): ) -class DisableXpnHostProjectRequest(proto.Message): - r"""A request message for Projects.DisableXpnHost. See the method - description for details. +class DeleteRegionInstantSnapshotRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instant_snapshot (str): + Name of the InstantSnapshot resource to + delete. project (str): Project ID for this request. + region (str): + The name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ + instant_snapshot: str = proto.Field( + proto.STRING, + number=391638626, + ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -29403,46 +31437,55 @@ class DisableXpnHostProjectRequest(proto.Message): ) -class DisableXpnResourceProjectRequest(proto.Message): - r"""A request message for Projects.DisableXpnResource. See the - method description for details. +class DeleteRegionMultiMigRequest(proto.Message): + r"""A request message for RegionMultiMigs.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + multi_mig (str): + Name of the multi-MIG to delete. project (str): Project ID for this request. - projects_disable_xpn_resource_request_resource (google.cloud.compute_v1beta.types.ProjectsDisableXpnResourceRequest): - The body resource for this request + region (str): + Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ + multi_mig: str = proto.Field( + proto.STRING, + number=403990085, + ) project: str = proto.Field( proto.STRING, number=227560217, ) - projects_disable_xpn_resource_request_resource: "ProjectsDisableXpnResourceRequest" = proto.Field( - proto.MESSAGE, - number=209136170, - message="ProjectsDisableXpnResourceRequest", + region: str = proto.Field( + proto.STRING, + number=138946292, ) request_id: str = proto.Field( proto.STRING, @@ -29451,2051 +31494,2042 @@ class DisableXpnResourceProjectRequest(proto.Message): ) -class Disk(proto.Message): - r"""Represents a Persistent Disk resource. Google Compute Engine has two - Disk resources: \* - `Zonal `__ \* - `Regional `__ - Persistent disks are required for running your VM instances. Create - both boot and non-boot (data) persistent disks. For more - information, read Persistent Disks. For more storage options, read - Storage options. The disks resource represents a zonal persistent - disk. For more information, read Zonal persistent disks. The - regionDisks resource represents a regional persistent disk. For more - information, read Regional resources. +class DeleteRegionNetworkEndpointGroupRequest(proto.Message): + r"""A request message for RegionNetworkEndpointGroups.Delete. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - access_mode (str): - The access mode of the disk. - READ_WRITE_SINGLE: The - default AccessMode, means the disk can be attached to single - instance in RW mode. - READ_WRITE_MANY: The AccessMode means - the disk can be attached to multiple instances in RW mode. - - READ_ONLY_MANY: The AccessMode means the disk can be - attached to multiple instances in RO mode. The AccessMode is - only valid for Hyperdisk disk types. Check the AccessMode - enum for the list of possible values. - - This field is a member of `oneof`_ ``_access_mode``. - architecture (str): - The architecture of the disk. Valid values are ARM64 or - X86_64. Check the Architecture enum for the list of possible - values. - - This field is a member of `oneof`_ ``_architecture``. - async_primary_disk (google.cloud.compute_v1beta.types.DiskAsyncReplication): - Disk asynchronously replicated into this - disk. + network_endpoint_group (str): + The name of the network endpoint group to + delete. It should comply with RFC1035. + project (str): + Project ID for this request. + region (str): + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_async_primary_disk``. - async_secondary_disks (MutableMapping[str, google.cloud.compute_v1beta.types.DiskAsyncReplicationList]): - [Output Only] A list of disks this disk is asynchronously - replicated to. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_description``. - disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the disk using a customer-supplied encryption key - or a customer-managed encryption key. Encryption keys do not - protect access to metadata of the disk. After you encrypt a - disk with a customer-supplied key, you must provide the same - key if you use the disk later. For example, to create a disk - snapshot, to create a disk image, to create a machine image, - or to attach the disk to a virtual machine. After you - encrypt a disk with a customer-managed key, the - diskEncryptionKey.kmsKeyName is set to a key *version* name - once the disk is created. The disk is encrypted with this - version of the key. In the response, - diskEncryptionKey.kmsKeyName appears in the following - format: "diskEncryptionKey.kmsKeyName": - "projects/kms_project_id/locations/region/keyRings/ - key_region/cryptoKeys/key /cryptoKeysVersions/version If you - do not provide an encryption key when creating the disk, - then the disk is encrypted using an automatically generated - key and you don't need to provide a key to use the disk - later. - This field is a member of `oneof`_ ``_disk_encryption_key``. - enable_confidential_compute (bool): - Whether this disk is using confidential - compute mode. +class DeleteRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for RegionNetworkFirewallPolicies.Delete. + See the method description for details. - This field is a member of `oneof`_ ``_enable_confidential_compute``. - erase_windows_vss_signature (bool): - Specifies whether the disk restored from a - source snapshot should erase Windows specific - VSS signature. - This field is a member of `oneof`_ ``_erase_windows_vss_signature``. - guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): - A list of features to enable on the guest - operating system. Applicable only for bootable - images. Read Enabling guest operating system - features to see a list of available options. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_id``. - interface (str): - [Deprecated] Specifies the disk interface to use for - attaching this disk, which is either SCSI or NVME. The - default is SCSI. Check the Interface enum for the list of - possible values. + Attributes: + firewall_policy (str): + Name of the firewall policy to delete. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_interface``. - kind (str): - [Output Only] Type of the resource. Always compute#disk for - disks. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this disk, which is essentially a hash of the - labels set used for optimistic locking. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You must always provide an - up-to-date fingerprint hash in order to update - or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a disk. + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels to apply to this disk. These can be - later modified by the setLabels method. - last_attach_timestamp (str): - [Output Only] Last attach timestamp in RFC3339 text format. - This field is a member of `oneof`_ ``_last_attach_timestamp``. - last_detach_timestamp (str): - [Output Only] Last detach timestamp in RFC3339 text format. +class DeleteRegionNetworkPolicyRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.Delete. See the + method description for details. - This field is a member of `oneof`_ ``_last_detach_timestamp``. - license_codes (MutableSequence[int]): - Integer license codes indicating which - licenses are attached to this disk. - licenses (MutableSequence[str]): - A list of publicly visible licenses. Reserved - for Google's use. - location_hint (str): - An opaque location hint used to place the - disk close to other resources. This field is for - use by internal tools that use the public API. - This field is a member of `oneof`_ ``_location_hint``. - locked (bool): - [Output Only] The field indicates if the disk is created - from a locked source image. Attachment of a disk created - from a locked source image will cause the following - operations to become irreversibly prohibited: - R/W or R/O - disk attachment to any other instance - Disk detachment. And - the disk can only be deleted when the instance is deleted - - Creation of images or snapshots - Disk cloning Furthermore, - the instance with at least one disk with locked flag set to - true will be prohibited from performing the operations - below: - Further attachment of secondary disks. - Detachment - of any disks - Create machine images - Create instance - template - Delete the instance with --keep-disk parameter - set to true for locked disks - Attach a locked disk with - --auto-delete parameter set to false + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_locked``. - multi_writer (bool): - Indicates whether or not the disk can be - read/write attached to more than one instance. + Attributes: + network_policy (str): + Name of the network policy resource to + delete. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_multi_writer``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_name``. - options (str): - Internal use only. + network_policy: str = proto.Field( + proto.STRING, + number=504961123, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_options``. - params (google.cloud.compute_v1beta.types.DiskParams): - Input only. [Input Only] Additional params passed with the - request, but not persisted as part of resource payload. - This field is a member of `oneof`_ ``_params``. - physical_block_size_bytes (int): - Physical block size of the persistent disk, - in bytes. If not present in a request, a default - value is used. The currently supported size is - 4096, other sizes may be added in the future. If - an unsupported value is requested, the error - message will list the supported values for the - caller's project. +class DeleteRegionNotificationEndpointRequest(proto.Message): + r"""A request message for RegionNotificationEndpoints.Delete. See + the method description for details. - This field is a member of `oneof`_ ``_physical_block_size_bytes``. - provisioned_iops (int): - Indicates how many IOPS to provision for the - disk. This sets the number of I/O operations per - second that the disk can handle. Values must be - between 10,000 and 120,000. For more details, - see the Extreme persistent disk documentation. - This field is a member of `oneof`_ ``_provisioned_iops``. - provisioned_throughput (int): - Indicates how much throughput to provision - for the disk. This sets the number of throughput - mb per second that the disk can handle. Values - must be greater than or equal to 1. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_provisioned_throughput``. + Attributes: + notification_endpoint (str): + Name of the NotificationEndpoint resource to + delete. + project (str): + Project ID for this request. region (str): - [Output Only] URL of the region where the disk resides. Only - applicable for regional resources. You must specify this - field as part of the HTTP request URL. It is not settable as - a field in the request body. - - This field is a member of `oneof`_ ``_region``. - replica_zones (MutableSequence[str]): - URLs of the zones where the disk should be - replicated to. Only applicable for regional - resources. - resource_policies (MutableSequence[str]): - Resource policies applied to this disk for - automatic snapshot creations. - resource_status (google.cloud.compute_v1beta.types.DiskResourceStatus): - [Output Only] Status information for the disk resource. - - This field is a member of `oneof`_ ``_resource_status``. - satisfies_pzi (bool): - Output only. Reserved for future use. + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_satisfies_pzi``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_satisfies_pzs``. - self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. + notification_endpoint: str = proto.Field( + proto.STRING, + number=376807017, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_self_link``. - size_gb (int): - Size, in GB, of the persistent disk. You can - specify this field when creating a persistent - disk using the sourceImage, sourceSnapshot, or - sourceDisk parameter, or specify it alone to - create an empty persistent disk. If you specify - this field along with a source, the value of - sizeGb must not be less than the size of the - source. Acceptable values are greater than 0. - This field is a member of `oneof`_ ``_size_gb``. - source_consistency_group_policy (str): - [Output Only] URL of the DiskConsistencyGroupPolicy for a - secondary disk that was created using a consistency group. +class DeleteRegionOperationRequest(proto.Message): + r"""A request message for RegionOperations.Delete. See the method + description for details. - This field is a member of `oneof`_ ``_source_consistency_group_policy``. - source_consistency_group_policy_id (str): - [Output Only] ID of the DiskConsistencyGroupPolicy for a - secondary disk that was created using a consistency group. + Attributes: + operation (str): + Name of the Operations resource to delete, or + its unique numeric identifier. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ - This field is a member of `oneof`_ ``_source_consistency_group_policy_id``. - source_disk (str): - The source disk used to create this disk. You - can provide this as a partial or full URL to the - resource. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + operation: str = proto.Field( + proto.STRING, + number=52090215, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) - This field is a member of `oneof`_ ``_source_disk``. - source_disk_id (str): - [Output Only] The unique ID of the disk used to create this - disk. This value identifies the exact disk that was used to - create this persistent disk. For example, if you created the - persistent disk from a disk that was later deleted and - recreated under the same name, the source disk ID would - identify the exact version of the disk that was used. - This field is a member of `oneof`_ ``_source_disk_id``. - source_image (str): - The source image used to create this disk. If - the source image is deleted, this field will not - be set. To create a disk with one of the public - operating system images, specify the image by - its family name. For example, specify - family/debian-9 to use the latest Debian 9 - image: - projects/debian-cloud/global/images/family/debian-9 - Alternatively, use a specific version of a - public operating system image: - projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - To create a disk with a custom image that you - created, specify the image name in the following - format: global/images/my-custom-image You can - also specify a custom image by its image family, - which returns the latest version of the image in - that family. Replace the image name with - family/family-name: - global/images/family/my-image-family +class DeleteRegionOperationResponse(proto.Message): + r"""A response message for RegionOperations.Delete. See the + method description for details. - This field is a member of `oneof`_ ``_source_image``. - source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source image. Required if the source image is - protected by a customer-supplied encryption key. + """ - This field is a member of `oneof`_ ``_source_image_encryption_key``. - source_image_id (str): - [Output Only] The ID value of the image used to create this - disk. This value identifies the exact image that was used to - create this persistent disk. For example, if you created the - persistent disk from an image that was later deleted and - recreated under the same name, the source image ID would - identify the exact version of the image that was used. - This field is a member of `oneof`_ ``_source_image_id``. - source_instant_snapshot (str): - The source instant snapshot used to create - this disk. You can provide this as a partial or - full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instantSnapshots/instantSnapshot - - projects/project/zones/zone/instantSnapshots/instantSnapshot - - zones/zone/instantSnapshots/instantSnapshot +class DeleteRegionSecurityPolicyRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.Delete. See the + method description for details. - This field is a member of `oneof`_ ``_source_instant_snapshot``. - source_instant_snapshot_id (str): - [Output Only] The unique ID of the instant snapshot used to - create this disk. This value identifies the exact instant - snapshot that was used to create this persistent disk. For - example, if you created the persistent disk from an instant - snapshot that was later deleted and recreated under the same - name, the source instant snapshot ID would identify the - exact version of the instant snapshot that was used. - This field is a member of `oneof`_ ``_source_instant_snapshot_id``. - source_snapshot (str): - The source snapshot used to create this disk. - You can provide this as a partial or full URL to - the resource. For example, the following are - valid values: - - https://www.googleapis.com/compute/v1/projects/project - /global/snapshots/snapshot - - projects/project/global/snapshots/snapshot - - global/snapshots/snapshot + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_source_snapshot``. - source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source snapshot. Required if the source snapshot - is protected by a customer-supplied encryption - key. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. - source_snapshot_id (str): - [Output Only] The unique ID of the snapshot used to create - this disk. This value identifies the exact snapshot that was - used to create this persistent disk. For example, if you - created the persistent disk from a snapshot that was later - deleted and recreated under the same name, the source - snapshot ID would identify the exact version of the snapshot - that was used. + This field is a member of `oneof`_ ``_request_id``. + security_policy (str): + Name of the security policy to delete. + """ - This field is a member of `oneof`_ ``_source_snapshot_id``. - source_storage_object (str): - The full Google Cloud Storage URI where the - disk image is stored. This file must be a - gzip-compressed tarball whose name ends in - .tar.gz or virtual machine disk whose name ends - in vmdk. Valid URIs may start with gs:// or - https://storage.googleapis.com/. This flag is - not optimized for creating multiple disks from a - source storage object. To create many disks from - a source storage object, use gcloud compute - images import instead. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, + ) - This field is a member of `oneof`_ ``_source_storage_object``. - status (str): - [Output Only] The status of disk creation. - CREATING: Disk - is provisioning. - RESTORING: Source data is being copied - into the disk. - FAILED: Disk creation failed. - READY: Disk - is ready for use. - DELETING: Disk is deleting. Check the - Status enum for the list of possible values. - This field is a member of `oneof`_ ``_status``. - storage_pool (str): - The storage pool in which the new disk is - created. You can provide this as a partial or - full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /storagePools/storagePool - - projects/project/zones/zone/storagePools/storagePool - - zones/zone/storagePools/storagePool +class DeleteRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.Delete. See the method + description for details. - This field is a member of `oneof`_ ``_storage_pool``. - storage_type (str): - [Deprecated] Storage type of the persistent disk. Check the - StorageType enum for the list of possible values. - This field is a member of `oneof`_ ``_storage_type``. - type_ (str): - URL of the disk type resource describing - which disk type to use to create the disk. - Provide this when creating the disk. For - example: projects/project - /zones/zone/diskTypes/pd-ssd . See Persistent - disk types. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_type``. - user_licenses (MutableSequence[str]): - A list of publicly visible user-licenses. - Unlike regular licenses, user provided licenses - can be modified after the disk is created. This - includes a list of URLs to the license resource. - For example, to provide a debian license: - https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - users (MutableSequence[str]): - [Output Only] Links to the users of the disk (attached - instances) in form: - projects/project/zones/zone/instances/instance - zone (str): - [Output Only] URL of the zone where the disk resides. You - must specify this field as part of the HTTP request URL. It - is not settable as a field in the request body. + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_request_id``. + snapshot (str): + Name of the snapshot resource to delete. """ - class AccessMode(proto.Enum): - r"""The access mode of the disk. - READ_WRITE_SINGLE: The default - AccessMode, means the disk can be attached to single instance in RW - mode. - READ_WRITE_MANY: The AccessMode means the disk can be - attached to multiple instances in RW mode. - READ_ONLY_MANY: The - AccessMode means the disk can be attached to multiple instances in - RO mode. The AccessMode is only valid for Hyperdisk disk types. - - Values: - UNDEFINED_ACCESS_MODE (0): - A value indicating that the enum field is not - set. - READ_ONLY_MANY (63460265): - The AccessMode means the disk can be attached - to multiple instances in RO mode. - READ_WRITE_MANY (488743208): - The AccessMode means the disk can be attached - to multiple instances in RW mode. - READ_WRITE_SINGLE (99323089): - The default AccessMode, means the disk can be - attached to single instance in RW mode. - """ - UNDEFINED_ACCESS_MODE = 0 - READ_ONLY_MANY = 63460265 - READ_WRITE_MANY = 488743208 - READ_WRITE_SINGLE = 99323089 - - class Architecture(proto.Enum): - r"""The architecture of the disk. Valid values are ARM64 or X86_64. - - Values: - UNDEFINED_ARCHITECTURE (0): - A value indicating that the enum field is not - set. - ARCHITECTURE_UNSPECIFIED (394750507): - Default value indicating Architecture is not - set. - ARM64 (62547450): - Machines with architecture ARM64 - X86_64 (425300551): - Machines with architecture X86_64 - """ - UNDEFINED_ARCHITECTURE = 0 - ARCHITECTURE_UNSPECIFIED = 394750507 - ARM64 = 62547450 - X86_64 = 425300551 + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + snapshot: str = proto.Field( + proto.STRING, + number=284874180, + ) - class Interface(proto.Enum): - r"""[Deprecated] Specifies the disk interface to use for attaching this - disk, which is either SCSI or NVME. The default is SCSI. - Values: - UNDEFINED_INTERFACE (0): - A value indicating that the enum field is not - set. - NVME (2408800): - No description available. - SCSI (2539686): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_INTERFACE = 0 - NVME = 2408800 - SCSI = 2539686 - UNSPECIFIED = 526786327 +class DeleteRegionSslCertificateRequest(proto.Message): + r"""A request message for RegionSslCertificates.Delete. See the + method description for details. - class Status(proto.Enum): - r"""[Output Only] The status of disk creation. - CREATING: Disk is - provisioning. - RESTORING: Source data is being copied into the - disk. - FAILED: Disk creation failed. - READY: Disk is ready for - use. - DELETING: Disk is deleting. - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - CREATING (455564985): - Disk is provisioning - DELETING (528602024): - Disk is deleting. - FAILED (455706685): - Disk creation failed. - READY (77848963): - Disk is ready for use. - RESTORING (404263851): - Source data is being copied into the disk. - UNAVAILABLE (413756464): - Disk is currently unavailable and cannot be - accessed, attached or detached. - """ - UNDEFINED_STATUS = 0 - CREATING = 455564985 - DELETING = 528602024 - FAILED = 455706685 - READY = 77848963 - RESTORING = 404263851 - UNAVAILABLE = 413756464 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class StorageType(proto.Enum): - r"""[Deprecated] Storage type of the persistent disk. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - Values: - UNDEFINED_STORAGE_TYPE (0): - A value indicating that the enum field is not - set. - HDD (71368): - No description available. - SSD (82404): - No description available. - """ - UNDEFINED_STORAGE_TYPE = 0 - HDD = 71368 - SSD = 82404 + This field is a member of `oneof`_ ``_request_id``. + ssl_certificate (str): + Name of the SslCertificate resource to + delete. + """ - access_mode: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=41155486, - optional=True, + number=227560217, ) - architecture: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=302803283, - optional=True, + number=138946292, ) - async_primary_disk: "DiskAsyncReplication" = proto.Field( - proto.MESSAGE, - number=180517533, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="DiskAsyncReplication", ) - async_secondary_disks: MutableMapping[ - str, "DiskAsyncReplicationList" - ] = proto.MapField( + ssl_certificate: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=322925608, - message="DiskAsyncReplicationList", + number=46443492, ) - creation_timestamp: str = proto.Field( + + +class DeleteRegionSslPolicyRequest(proto.Message): + r"""A request message for RegionSslPolicies.Delete. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + ssl_policy (str): + Name of the SSL policy to delete. The name + must be 1-63 characters long, and comply with + RFC1035. + """ + + project: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=227560217, ) - description: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - disk_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=271660677, - optional=True, - message="CustomerEncryptionKey", - ) - enable_confidential_compute: bool = proto.Field( - proto.BOOL, - number=102135228, - optional=True, - ) - erase_windows_vss_signature: bool = proto.Field( - proto.BOOL, - number=52637562, - optional=True, - ) - guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( - proto.MESSAGE, - number=79294545, - message="GuestOsFeature", - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=138946292, ) - interface: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=502623545, + number=37109963, optional=True, ) - kind: str = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=295190213, ) - label_fingerprint: str = proto.Field( + + +class DeleteRegionTargetHttpProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpProxies.Delete. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_http_proxy (str): + Name of the TargetHttpProxy resource to + delete. + """ + + project: str = proto.Field( proto.STRING, - number=178124825, - optional=True, + number=227560217, ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, + region: str = proto.Field( proto.STRING, - number=500195327, + number=138946292, ) - last_attach_timestamp: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=42159653, + number=37109963, optional=True, ) - last_detach_timestamp: str = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, - number=56471027, - optional=True, - ) - license_codes: MutableSequence[int] = proto.RepeatedField( - proto.INT64, - number=45482664, + number=206872421, ) - licenses: MutableSequence[str] = proto.RepeatedField( + + +class DeleteRegionTargetHttpsProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpsProxies.Delete. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_https_proxy (str): + Name of the TargetHttpsProxy resource to + delete. + """ + + project: str = proto.Field( proto.STRING, - number=337642578, + number=227560217, ) - location_hint: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=350519505, - optional=True, - ) - locked: bool = proto.Field( - proto.BOOL, - number=513159946, - optional=True, - ) - multi_writer: bool = proto.Field( - proto.BOOL, - number=528165433, - optional=True, + number=138946292, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, + number=37109963, optional=True, ) - options: str = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, - number=361137822, - optional=True, - ) - params: "DiskParams" = proto.Field( - proto.MESSAGE, - number=78313862, - optional=True, - message="DiskParams", - ) - physical_block_size_bytes: int = proto.Field( - proto.INT64, - number=420007943, - optional=True, - ) - provisioned_iops: int = proto.Field( - proto.INT64, - number=186769108, - optional=True, + number=52336748, ) - provisioned_throughput: int = proto.Field( - proto.INT64, - number=526524181, - optional=True, + + +class DeleteRegionTargetTcpProxyRequest(proto.Message): + r"""A request message for RegionTargetTcpProxies.Delete. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_tcp_proxy (str): + Name of the TargetTcpProxy resource to + delete. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) region: str = proto.Field( proto.STRING, number=138946292, - optional=True, ) - replica_zones: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=48438272, + number=37109963, + optional=True, ) - resource_policies: MutableSequence[str] = proto.RepeatedField( + target_tcp_proxy: str = proto.Field( proto.STRING, - number=22220385, - ) - resource_status: "DiskResourceStatus" = proto.Field( - proto.MESSAGE, - number=249429315, - optional=True, - message="DiskResourceStatus", + number=503065442, ) - satisfies_pzi: bool = proto.Field( - proto.BOOL, - number=480964257, - optional=True, + + +class DeleteRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.Delete. 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. + region (str): + Name of the region scoping this request. + request_id (str): + begin_interface: MixerMutationRequestBuilder Request ID to + support idempotency. + + This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap resource to delete. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, - optional=True, + region: str = proto.Field( + proto.STRING, + number=138946292, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - size_gb: int = proto.Field( - proto.INT64, - number=494929369, - optional=True, - ) - source_consistency_group_policy: str = proto.Field( - proto.STRING, - number=19616093, - optional=True, - ) - source_consistency_group_policy_id: str = proto.Field( + url_map: str = proto.Field( proto.STRING, - number=267568957, - optional=True, + number=367020684, ) - source_disk: str = proto.Field( + + +class DeleteReservationRequest(proto.Message): + r"""A request message for Reservations.Delete. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + reservation (str): + Name of the reservation to delete. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( proto.STRING, - number=451753793, - optional=True, + number=227560217, ) - source_disk_id: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=454190809, + number=37109963, optional=True, ) - source_image: str = proto.Field( + reservation: str = proto.Field( proto.STRING, - number=50443319, - optional=True, - ) - source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=381503659, - optional=True, - message="CustomerEncryptionKey", + number=47530956, ) - source_image_id: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=55328291, - optional=True, + number=3744684, ) - source_instant_snapshot: str = proto.Field( + + +class DeleteResourcePolicyRequest(proto.Message): + r"""A request message for ResourcePolicies.Delete. 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. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + resource_policy (str): + Name of the resource policy to delete. + """ + + project: str = proto.Field( proto.STRING, - number=219202054, - optional=True, + number=227560217, ) - source_instant_snapshot_id: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=287582708, - optional=True, + number=138946292, ) - source_snapshot: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=126061928, - optional=True, - ) - source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=303679322, + number=37109963, optional=True, - message="CustomerEncryptionKey", ) - source_snapshot_id: str = proto.Field( + resource_policy: str = proto.Field( proto.STRING, - number=98962258, - optional=True, + number=159240835, ) - source_storage_object: str = proto.Field( + + +class DeleteRolloutPlanRequest(proto.Message): + r"""A request message for RolloutPlans.Delete. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + rollout_plan (str): + Name of the RolloutPlan resource to delete. + """ + + project: str = proto.Field( proto.STRING, - number=233052711, - optional=True, + number=227560217, ) - status: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=181260274, + number=37109963, optional=True, ) - storage_pool: str = proto.Field( + rollout_plan: str = proto.Field( proto.STRING, - number=360473440, - optional=True, + number=459057399, ) - storage_type: str = proto.Field( + + +class DeleteRolloutRequest(proto.Message): + r"""A request message for Rollouts.Delete. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + rollout (str): + Name of the Rollout resource to delete. + """ + + project: str = proto.Field( proto.STRING, - number=360602238, - optional=True, + number=227560217, ) - type_: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3575610, + number=37109963, optional=True, ) - user_licenses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=388193862, - ) - users: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=111578632, - ) - zone: str = proto.Field( + rollout: str = proto.Field( proto.STRING, - number=3744684, - optional=True, + number=303366577, ) -class DiskAggregatedList(proto.Message): - r""" +class DeleteRoutePolicyRouterRequest(proto.Message): + r"""A request message for Routers.DeleteRoutePolicy. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.DisksScopedList]): - A list of DisksScopedList resources. - kind (str): - [Output Only] Type of resource. Always - compute#diskAggregatedList for aggregated lists of - persistent disks. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + policy (str): + The Policy name for this request. Name must + conform to RFC1035 - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_policy``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + router (str): + Name of the Router resource where Route + Policy is defined. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + policy: str = proto.Field( proto.STRING, - number=3355, + number=91071794, optional=True, ) - items: MutableMapping[str, "DisksScopedList"] = proto.MapField( + project: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=100526016, - message="DisksScopedList", + number=227560217, ) - kind: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=138946292, ) - next_page_token: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=79797525, + number=37109963, optional=True, ) - self_link: str = proto.Field( + router: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=148608841, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + + +class DeleteRouteRequest(proto.Message): + r"""A request message for Routes.Delete. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + route (str): + Name of the Route resource to delete. + """ + + project: str = proto.Field( proto.STRING, - number=243372063, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", + ) + route: str = proto.Field( + proto.STRING, + number=108704329, ) -class DiskAsyncReplication(proto.Message): - r""" +class DeleteRouterRequest(proto.Message): + r"""A request message for Routers.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - consistency_group_policy (str): - [Output Only] URL of the DiskConsistencyGroupPolicy if - replication was started on the disk as a member of a group. - - This field is a member of `oneof`_ ``_consistency_group_policy``. - consistency_group_policy_id (str): - [Output Only] ID of the DiskConsistencyGroupPolicy if - replication was started on the disk as a member of a group. - - This field is a member of `oneof`_ ``_consistency_group_policy_id``. - disk (str): - The other disk asynchronously replicated to - or from the current disk. You can provide this - as a partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk - - This field is a member of `oneof`_ ``_disk``. - disk_id (str): - [Output Only] The unique ID of the other disk asynchronously - replicated to or from the current disk. This value - identifies the exact disk that was used to create this - replication. For example, if you started replicating the - persistent disk from a disk that was later deleted and - recreated under the same name, the disk ID would identify - the exact version of the disk that was used. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_disk_id``. + This field is a member of `oneof`_ ``_request_id``. + router (str): + Name of the Router resource to delete. """ - consistency_group_policy: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=1991097, - optional=True, + number=227560217, ) - consistency_group_policy_id: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=261065057, - optional=True, + number=138946292, ) - disk: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3083677, + number=37109963, optional=True, ) - disk_id: str = proto.Field( + router: str = proto.Field( proto.STRING, - number=60990205, - optional=True, + number=148608841, ) -class DiskAsyncReplicationList(proto.Message): - r""" +class DeleteSecurityPolicyRequest(proto.Message): + r"""A request message for SecurityPolicies.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - async_replication_disk (google.cloud.compute_v1beta.types.DiskAsyncReplication): + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_async_replication_disk``. + This field is a member of `oneof`_ ``_request_id``. + security_policy (str): + Name of the security policy to delete. """ - async_replication_disk: "DiskAsyncReplication" = proto.Field( - proto.MESSAGE, - number=231794067, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="DiskAsyncReplication", + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, ) -class DiskInstantiationConfig(proto.Message): - r"""A specification of the desired way to instantiate a disk in - the instance template when its created from a source instance. +class DeleteServiceAttachmentRequest(proto.Message): + r"""A request message for ServiceAttachments.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - auto_delete (bool): - Specifies whether the disk will be - auto-deleted when the instance is deleted (but - not when the disk is detached from the - instance). - - This field is a member of `oneof`_ ``_auto_delete``. - custom_image (str): - The custom source image to be used to restore - this disk when instantiating this instance - template. - - This field is a member of `oneof`_ ``_custom_image``. - device_name (str): - Specifies the device name of the disk to - which the configurations apply to. - - This field is a member of `oneof`_ ``_device_name``. - instantiate_from (str): - Specifies whether to include the disk and - what image to use. Possible values are: - - source-image: to use the same image that was - used to create the source instance's - corresponding disk. Applicable to the boot disk - and additional read-write disks. - - source-image-family: to use the same image - family that was used to create the source - instance's corresponding disk. Applicable to the - boot disk and additional read-write disks. - - custom-image: to use a user-provided image url - for disk creation. Applicable to the boot disk - and additional read-write disks. - - attach-read-only: to attach a read-only disk. - Applicable to read-only disks. - do-not-include: - to exclude a disk from the template. Applicable - to additional read-write disks, local SSDs, and - read-only disks. Check the InstantiateFrom enum - for the list of possible values. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_instantiate_from``. + This field is a member of `oneof`_ ``_request_id``. + service_attachment (str): + Name of the ServiceAttachment resource to + delete. """ - class InstantiateFrom(proto.Enum): - r"""Specifies whether to include the disk and what image to use. - Possible values are: - source-image: to use the same image that - was used to create the source instance's corresponding disk. - Applicable to the boot disk and additional read-write disks. - - source-image-family: to use the same image family that was used - to create the source instance's corresponding disk. Applicable - to the boot disk and additional read-write disks. - - custom-image: to use a user-provided image url for disk - creation. Applicable to the boot disk and additional read-write - disks. - attach-read-only: to attach a read-only disk. - Applicable to read-only disks. - do-not-include: to exclude a - disk from the template. Applicable to additional read-write - disks, local SSDs, and read-only disks. - - Values: - UNDEFINED_INSTANTIATE_FROM (0): - A value indicating that the enum field is not - set. - ATTACH_READ_ONLY (513775419): - Attach the existing disk in read-only mode. - The request will fail if the disk was attached - in read-write mode on the source instance. - Applicable to: read-only disks. - BLANK (63281460): - Create a blank disk. The disk will be created - unformatted. Applicable to: additional - read-write disks, local SSDs. - CUSTOM_IMAGE (196311789): - Use the custom image specified in the custom_image field. - Applicable to: boot disk, additional read-write disks. - DEFAULT (115302945): - Use the default instantiation option for the - corresponding type of disk. For boot disk and - any other R/W disks, new custom images will be - created from each disk. For read-only disks, - they will be attached in read-only mode. Local - SSD disks will be created as blank volumes. - DO_NOT_INCLUDE (104218952): - Do not include the disk in the instance - template. Applicable to: additional read-write - disks, local SSDs, read-only disks. - SOURCE_IMAGE (62631959): - Use the same source image used for creation - of the source instance's corresponding disk. The - request will fail if the source VM's disk was - created from a snapshot. Applicable to: boot - disk, additional read-write disks. - SOURCE_IMAGE_FAMILY (76850316): - Use the same source image family used for - creation of the source instance's corresponding - disk. The request will fail if the source image - of the source disk does not belong to any image - family. Applicable to: boot disk, additional - read-write disks. - """ - UNDEFINED_INSTANTIATE_FROM = 0 - ATTACH_READ_ONLY = 513775419 - BLANK = 63281460 - CUSTOM_IMAGE = 196311789 - DEFAULT = 115302945 - DO_NOT_INCLUDE = 104218952 - SOURCE_IMAGE = 62631959 - SOURCE_IMAGE_FAMILY = 76850316 - - auto_delete: bool = proto.Field( - proto.BOOL, - number=464761403, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - custom_image: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=184123149, - optional=True, + number=138946292, ) - device_name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=67541716, + number=37109963, optional=True, ) - instantiate_from: str = proto.Field( + service_attachment: str = proto.Field( proto.STRING, - number=393383903, - optional=True, + number=338957549, ) -class DiskList(proto.Message): - r"""A list of Disk resources. +class DeleteSignedUrlKeyBackendBucketRequest(proto.Message): + r"""A request message for BackendBuckets.DeleteSignedUrlKey. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Disk]): - A list of Disk resources. - kind (str): - [Output Only] Type of resource. Always compute#diskList for - lists of disks. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + backend_bucket (str): + Name of the BackendBucket resource to which + the Signed URL Key should be added. The name + should conform to RFC1035. + key_name (str): + The name of the Signed URL Key to delete. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Disk"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Disk", + number=91714037, ) - kind: str = proto.Field( + key_name: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=500938859, ) - next_page_token: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class DiskMoveRequest(proto.Message): - r""" +class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.DeleteSignedUrlKey. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - destination_zone (str): - The URL of the destination zone to move the - disk. This can be a full or partial URL. For - example, the following are all valid URLs to a - zone: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - - projects/project/zones/zone - zones/zone - - This field is a member of `oneof`_ ``_destination_zone``. - target_disk (str): - The URL of the target disk to move. This can - be a full or partial URL. For example, the - following are all valid URLs to a disk: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk + backend_service (str): + Name of the BackendService resource to which + the Signed URL Key should be added. The name + should conform to RFC1035. + key_name (str): + The name of the Signed URL Key to delete. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_target_disk``. + This field is a member of `oneof`_ ``_request_id``. """ - destination_zone: str = proto.Field( + backend_service: str = proto.Field( proto.STRING, - number=131854653, - optional=True, + number=306946058, ) - target_disk: str = proto.Field( + key_name: str = proto.Field( proto.STRING, - number=62433163, - optional=True, + number=500938859, ) - - -class DiskParams(proto.Message): - r"""Additional disk params. - - Attributes: - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to be bound to the disk. Tag keys and - values have the same definition as resource manager tags. - Keys must be in the format ``tagKeys/{tag_key_id}``, and - values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. - """ - - resource_manager_tags: MutableMapping[str, str] = proto.MapField( + project: str = proto.Field( proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( proto.STRING, - number=377671164, + number=37109963, + optional=True, ) -class DiskResourceStatus(proto.Message): - r""" +class DeleteSnapshotRequest(proto.Message): + r"""A request message for Snapshots.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - async_primary_disk (google.cloud.compute_v1beta.types.DiskResourceStatusAsyncReplicationStatus): + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_async_primary_disk``. - async_secondary_disks (MutableMapping[str, google.cloud.compute_v1beta.types.DiskResourceStatusAsyncReplicationStatus]): - Key: disk, value: AsyncReplicationStatus - message + This field is a member of `oneof`_ ``_request_id``. + snapshot (str): + Name of the Snapshot resource to delete. """ - async_primary_disk: "DiskResourceStatusAsyncReplicationStatus" = proto.Field( - proto.MESSAGE, - number=180517533, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="DiskResourceStatusAsyncReplicationStatus", ) - async_secondary_disks: MutableMapping[ - str, "DiskResourceStatusAsyncReplicationStatus" - ] = proto.MapField( + snapshot: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=322925608, - message="DiskResourceStatusAsyncReplicationStatus", + number=284874180, ) -class DiskResourceStatusAsyncReplicationStatus(proto.Message): - r""" +class DeleteSslCertificateRequest(proto.Message): + r"""A request message for SslCertificates.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - state (str): - Check the State enum for the list of possible - values. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_state``. + This field is a member of `oneof`_ ``_request_id``. + ssl_certificate (str): + Name of the SslCertificate resource to + delete. """ - class State(proto.Enum): - r""" - - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - Replication is active. - CREATED (135924424): - Secondary disk is created and is waiting for - replication to start. - STARTING (488820800): - Replication is starting. - STATE_UNSPECIFIED (470755401): - No description available. - STOPPED (444276141): - Replication is stopped. - STOPPING (350791796): - Replication is stopping. - """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - CREATED = 135924424 - STARTING = 488820800 - STATE_UNSPECIFIED = 470755401 - STOPPED = 444276141 - STOPPING = 350791796 - - state: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=109757585, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + ssl_certificate: str = proto.Field( + proto.STRING, + number=46443492, + ) -class DiskSettings(proto.Message): - r""" +class DeleteSslPolicyRequest(proto.Message): + r"""A request message for SslPolicies.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - access_location (google.cloud.compute_v1beta.types.DiskSettingsAccessLocation): - Policy of which locations are allowed to - create regional snapshots. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_access_location``. + This field is a member of `oneof`_ ``_request_id``. + ssl_policy (str): + Name of the SSL policy to delete. The name + must be 1-63 characters long, and comply with + RFC1035. """ - access_location: "DiskSettingsAccessLocation" = proto.Field( - proto.MESSAGE, - number=18410544, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="DiskSettingsAccessLocation", + ) + ssl_policy: str = proto.Field( + proto.STRING, + number=295190213, ) -class DiskSettingsAccessLocation(proto.Message): - r""" +class DeleteStoragePoolRequest(proto.Message): + r"""A request message for StoragePools.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - locations (MutableMapping[str, google.cloud.compute_v1beta.types.DiskSettingsAccessLocationAccessLocationPreference]): - - policy (str): - Check the Policy enum for the list of - possible values. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_policy``. + This field is a member of `oneof`_ ``_request_id``. + storage_pool (str): + Name of the storage pool to delete. + zone (str): + The name of the zone for this request. """ - class Policy(proto.Enum): - r""" - - Values: - UNDEFINED_POLICY (0): - A value indicating that the enum field is not - set. - ALL_REGIONS (273143585): - No description available. - POLICY_UNSPECIFIED (197974922): - No description available. - SPECIFIC_REGIONS (454128082): - No description available. - """ - UNDEFINED_POLICY = 0 - ALL_REGIONS = 273143585 - POLICY_UNSPECIFIED = 197974922 - SPECIFIC_REGIONS = 454128082 - - locations: MutableMapping[ - str, "DiskSettingsAccessLocationAccessLocationPreference" - ] = proto.MapField( + project: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=413423454, - message="DiskSettingsAccessLocationAccessLocationPreference", + number=227560217, ) - policy: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=91071794, + number=37109963, optional=True, ) + storage_pool: str = proto.Field( + proto.STRING, + number=360473440, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class DiskSettingsAccessLocationAccessLocationPreference(proto.Message): - r""" +class DeleteSubnetworkRequest(proto.Message): + r"""A request message for Subnetworks.Delete. 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. region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_region``. + This field is a member of `oneof`_ ``_request_id``. + subnetwork (str): + Name of the Subnetwork resource to delete. """ + project: str = proto.Field( + proto.STRING, + number=227560217, + ) region: str = proto.Field( proto.STRING, number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + subnetwork: str = proto.Field( + proto.STRING, + number=307827694, + ) -class DiskType(proto.Message): - r"""Represents a Disk Type resource. Google Compute Engine has two Disk - Type resources: \* - `Regional `__ \* - `Zonal `__ You can - choose from a variety of disk types based on your needs. For more - information, read Storage options. The diskTypes resource represents - disk types for a zonal persistent disk. For more information, read - Zonal persistent disks. The regionDiskTypes resource represents disk - types for a regional persistent disk. For more information, read - Regional persistent disks. +class DeleteTargetGrpcProxyRequest(proto.Message): + r"""A request message for TargetGrpcProxies.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - default_disk_size_gb (int): - [Output Only] Server-defined default disk size in GB. - - This field is a member of `oneof`_ ``_default_disk_size_gb``. - deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): - [Output Only] The deprecation status associated with this - disk type. - - This field is a member of `oneof`_ ``_deprecated``. - description (str): - [Output Only] An optional description of this resource. - - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always compute#diskType - for disk types. - - This field is a member of `oneof`_ ``_kind``. - name (str): - [Output Only] Name of the resource. - - This field is a member of `oneof`_ ``_name``. - region (str): - [Output Only] URL of the region where the disk type resides. - Only applicable for regional resources. You must specify - this field as part of the HTTP request URL. It is not - settable as a field in the request body. - - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. - - This field is a member of `oneof`_ ``_self_link``. - valid_disk_size (str): - [Output Only] An optional textual description of the valid - disk size, such as "10GB-10TB". - - This field is a member of `oneof`_ ``_valid_disk_size``. - zone (str): - [Output Only] URL of the zone where the disk type resides. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_request_id``. + target_grpc_proxy (str): + Name of the TargetGrpcProxy resource to + delete. """ - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - default_disk_size_gb: int = proto.Field( - proto.INT64, - number=270619253, - optional=True, - ) - deprecated: "DeprecationStatus" = proto.Field( - proto.MESSAGE, - number=515138995, - optional=True, - message="DeprecationStatus", - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, + number=37109963, optional=True, ) - region: str = proto.Field( + target_grpc_proxy: str = proto.Field( proto.STRING, - number=138946292, - optional=True, + number=5020283, ) - self_link: str = proto.Field( + + +class DeleteTargetHttpProxyRequest(proto.Message): + r"""A request message for TargetHttpProxies.Delete. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_http_proxy (str): + Name of the TargetHttpProxy resource to + delete. + """ + + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - valid_disk_size: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=493962464, + number=37109963, optional=True, ) - zone: str = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, - number=3744684, - optional=True, + number=206872421, ) -class DiskTypeAggregatedList(proto.Message): - r""" +class DeleteTargetHttpsProxyRequest(proto.Message): + r"""A request message for TargetHttpsProxies.Delete. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.DiskTypesScopedList]): - A list of DiskTypesScopedList resources. - kind (str): - [Output Only] Type of resource. Always - compute#diskTypeAggregatedList. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + target_https_proxy (str): + Name of the TargetHttpsProxy resource to + delete. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "DiskTypesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="DiskTypesScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + target_https_proxy: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=52336748, ) -class DiskTypeList(proto.Message): - r"""Contains a list of disk types. +class DeleteTargetInstanceRequest(proto.Message): + r"""A request message for TargetInstances.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): - A list of DiskType resources. - kind (str): - [Output Only] Type of resource. Always compute#diskTypeList - for disk types. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + target_instance (str): + Name of the TargetInstance resource to + delete. + zone (str): + Name of the zone scoping this request. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["DiskType"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="DiskType", + number=227560217, ) - kind: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3292052, + number=37109963, optional=True, ) - next_page_token: str = proto.Field( + target_instance: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=289769347, ) - self_link: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=3744684, ) -class DiskTypesScopedList(proto.Message): - r""" +class DeleteTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk_types (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): - [Output Only] A list of disk types contained in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of disk types when the list is empty. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + target_pool (str): + Name of the TargetPool resource to delete. """ - disk_types: MutableSequence["DiskType"] = proto.RepeatedField( - proto.MESSAGE, - number=198926167, - message="DiskType", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - - -class DisksAddResourcePoliciesRequest(proto.Message): - r""" - - Attributes: - resource_policies (MutableSequence[str]): - Full or relative path to the resource policy - to be added to this disk. You can only specify - one resource policy. - """ - - resource_policies: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=22220385, + number=37109963, + optional=True, ) - - -class DisksRemoveResourcePoliciesRequest(proto.Message): - r""" - - Attributes: - resource_policies (MutableSequence[str]): - Resource policies to be removed from this - disk. - """ - - resource_policies: MutableSequence[str] = proto.RepeatedField( + target_pool: str = proto.Field( proto.STRING, - number=22220385, + number=62796298, ) -class DisksResizeRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - size_gb (int): - The new size of the persistent disk, which is - specified in GB. - - This field is a member of `oneof`_ ``_size_gb``. - """ - - size_gb: int = proto.Field( - proto.INT64, - number=494929369, - optional=True, - ) - +class DeleteTargetSslProxyRequest(proto.Message): + r"""A request message for TargetSslProxies.Delete. See the method + description for details. -class DisksScopedList(proto.Message): - r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disks (MutableSequence[google.cloud.compute_v1beta.types.Disk]): - [Output Only] A list of disks contained in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of disks when the list is empty. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + target_ssl_proxy (str): + Name of the TargetSslProxy resource to + delete. """ - disks: MutableSequence["Disk"] = proto.RepeatedField( - proto.MESSAGE, - number=95594102, - message="Disk", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", ) - - -class DisksStartAsyncReplicationRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - async_secondary_disk (str): - The secondary disk to start asynchronous - replication to. You can provide this as a - partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk - - This field is a member of `oneof`_ ``_async_secondary_disk``. - """ - - async_secondary_disk: str = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, - number=131645867, - optional=True, + number=338795853, ) -class DisksStopGroupAsyncReplicationResource(proto.Message): - r"""A transient resource used in - compute.disks.stopGroupAsyncReplication and - compute.regionDisks.stopGroupAsyncReplication. It is only used - to process requests and is not persisted. +class DeleteTargetTcpProxyRequest(proto.Message): + r"""A request message for TargetTcpProxies.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - resource_policy (str): - The URL of the DiskConsistencyGroupPolicy for - the group of disks to stop. This may be a full - or partial URL, such as: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_resource_policy``. + This field is a member of `oneof`_ ``_request_id``. + target_tcp_proxy (str): + Name of the TargetTcpProxy resource to + delete. """ - resource_policy: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=159240835, - optional=True, - ) - - -class DisplayDevice(proto.Message): - r"""A set of Display Device options - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - enable_display (bool): - Defines whether the instance has Display - enabled. - - This field is a member of `oneof`_ ``_enable_display``. - """ - - enable_display: bool = proto.Field( - proto.BOOL, - number=14266886, - optional=True, + number=227560217, ) - - -class DistributionPolicy(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - target_shape (str): - The distribution shape to which the group - converges either proactively or on resize events - (depending on the value set in - updatePolicy.instanceRedistributionType). Check - the TargetShape enum for the list of possible - values. - - This field is a member of `oneof`_ ``_target_shape``. - zones (MutableSequence[google.cloud.compute_v1beta.types.DistributionPolicyZoneConfiguration]): - Zones where the regional managed instance - group will create and manage its instances. - """ - - class TargetShape(proto.Enum): - r"""The distribution shape to which the group converges either - proactively or on resize events (depending on the value set in - updatePolicy.instanceRedistributionType). - - Values: - UNDEFINED_TARGET_SHAPE (0): - A value indicating that the enum field is not - set. - ANY (64972): - The group picks zones for creating VM - instances to fulfill the requested number of VMs - within present resource constraints and to - maximize utilization of unused zonal - reservations. Recommended for batch workloads - that do not require high availability. - ANY_SINGLE_ZONE (61100880): - The group creates all VM instances within a - single zone. The zone is selected based on the - present resource constraints and to maximize - utilization of unused zonal reservations. - Recommended for batch workloads with heavy - interprocess communication. - BALANCED (468409608): - The group prioritizes acquisition of - resources, scheduling VMs in zones where - resources are available while distributing VMs - as evenly as possible across selected zones to - minimize the impact of zonal failure. - Recommended for highly available serving - workloads. - EVEN (2140442): - The group schedules VM instance creation and - deletion to achieve and maintain an even number - of managed instances across the selected zones. - The distribution is even when the number of - managed instances does not differ by more than 1 - between any two zones. Recommended for highly - available serving workloads. - """ - UNDEFINED_TARGET_SHAPE = 0 - ANY = 64972 - ANY_SINGLE_ZONE = 61100880 - BALANCED = 468409608 - EVEN = 2140442 - - target_shape: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=338621299, + number=37109963, optional=True, ) - zones: MutableSequence["DistributionPolicyZoneConfiguration"] = proto.RepeatedField( - proto.MESSAGE, - number=116085319, - message="DistributionPolicyZoneConfiguration", - ) - - -class DistributionPolicyZoneConfiguration(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - zone (str): - The URL of the zone. The zone must exist in - the region where the managed instance group is - located. - - This field is a member of `oneof`_ ``_zone``. - """ - - zone: str = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, - number=3744684, - optional=True, + number=503065442, ) -class Duration(proto.Message): - r"""A Duration represents a fixed-length span of time represented - as a count of seconds and fractions of seconds at nanosecond - resolution. It is independent of any calendar and concepts like - "day" or "month". Range is approximately 10,000 years. +class DeleteTargetVpnGatewayRequest(proto.Message): + r"""A request message for TargetVpnGateways.Delete. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - nanos (int): - Span of time that's a fraction of a second at nanosecond - resolution. Durations less than one second are represented - with a 0 ``seconds`` field and a positive ``nanos`` field. - Must be from 0 to 999,999,999 inclusive. - - This field is a member of `oneof`_ ``_nanos``. - seconds (int): - Span of time at a resolution of a second. Must be from 0 to - 315,576,000,000 inclusive. Note: these bounds are computed - from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 - days/year \* 10000 years + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_seconds``. + This field is a member of `oneof`_ ``_request_id``. + target_vpn_gateway (str): + Name of the target VPN gateway to delete. """ - nanos: int = proto.Field( - proto.INT32, - number=104586303, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - seconds: int = proto.Field( - proto.INT64, - number=359484031, + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + target_vpn_gateway: str = proto.Field( + proto.STRING, + number=532512843, + ) -class EnableXpnHostProjectRequest(proto.Message): - r"""A request message for Projects.EnableXpnHost. See the method +class DeleteUrlMapRequest(proto.Message): + r"""A request message for UrlMaps.Delete. See the method description for details. @@ -31509,19 +33543,25 @@ class EnableXpnHostProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap resource to delete. """ project: str = proto.Field( @@ -31533,11 +33573,15 @@ class EnableXpnHostProjectRequest(proto.Message): number=37109963, optional=True, ) + url_map: str = proto.Field( + proto.STRING, + number=367020684, + ) -class EnableXpnResourceProjectRequest(proto.Message): - r"""A request message for Projects.EnableXpnResource. See the - method description for details. +class DeleteVpnGatewayRequest(proto.Message): + r"""A request message for VpnGateways.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -31545,1573 +33589,1511 @@ class EnableXpnResourceProjectRequest(proto.Message): Attributes: project (str): Project ID for this request. - projects_enable_xpn_resource_request_resource (google.cloud.compute_v1beta.types.ProjectsEnableXpnResourceRequest): - The body resource for this request + region (str): + Name of the region for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + vpn_gateway (str): + Name of the VPN gateway to delete. """ project: str = proto.Field( proto.STRING, number=227560217, ) - projects_enable_xpn_resource_request_resource: "ProjectsEnableXpnResourceRequest" = proto.Field( - proto.MESSAGE, - number=421980207, - message="ProjectsEnableXpnResourceRequest", + region: str = proto.Field( + proto.STRING, + number=138946292, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - - -class Error(proto.Message): - r"""Errors that prevented the ResizeRequest to be fulfilled. - - Attributes: - errors (MutableSequence[google.cloud.compute_v1beta.types.Errors]): - [Output Only] The array of errors encountered while - processing this operation. - """ - - errors: MutableSequence["Errors"] = proto.RepeatedField( - proto.MESSAGE, - number=315977579, - message="Errors", + vpn_gateway: str = proto.Field( + proto.STRING, + number=406684153, ) -class ErrorDetails(proto.Message): - r""" +class DeleteVpnTunnelRequest(proto.Message): + r"""A request message for VpnTunnels.Delete. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - error_info (google.cloud.compute_v1beta.types.ErrorInfo): - - This field is a member of `oneof`_ ``_error_info``. - help_ (google.cloud.compute_v1beta.types.Help): - - This field is a member of `oneof`_ ``_help``. - localized_message (google.cloud.compute_v1beta.types.LocalizedMessage): - - This field is a member of `oneof`_ ``_localized_message``. - quota_info (google.cloud.compute_v1beta.types.QuotaExceededInfo): + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_quota_info``. + This field is a member of `oneof`_ ``_request_id``. + vpn_tunnel (str): + Name of the VpnTunnel resource to delete. """ - error_info: "ErrorInfo" = proto.Field( - proto.MESSAGE, - number=25251973, - optional=True, - message="ErrorInfo", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - help_: "Help" = proto.Field( - proto.MESSAGE, - number=3198785, - optional=True, - message="Help", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - localized_message: "LocalizedMessage" = proto.Field( - proto.MESSAGE, - number=404537155, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="LocalizedMessage", ) - quota_info: "QuotaExceededInfo" = proto.Field( - proto.MESSAGE, - number=93923861, - optional=True, - message="QuotaExceededInfo", + vpn_tunnel: str = proto.Field( + proto.STRING, + number=143821331, ) -class ErrorInfo(proto.Message): - r"""Describes the cause of the error with structured details. Example of - an error when contacting the "pubsub.googleapis.com" API when it is - not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" - "metadata": { "resource": "projects/123", "service": - "pubsub.googleapis.com" } } This response indicates that the - pubsub.googleapis.com API is not enabled. Example of an error that - is returned when attempting to create a Spanner instance in a region - that is out of stock: { "reason": "STOCKOUT" "domain": - "spanner.googleapis.com", "metadata": { "availableRegions": - "us-central1,us-east2" } } +class DeleteWireGroupRequest(proto.Message): + r"""A request message for WireGroups.Delete. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - domain (str): - The logical grouping to which the "reason" - belongs. The error domain is typically the - registered service name of the tool or product - that generates the error. Example: - "pubsub.googleapis.com". If the error is - generated by some common infrastructure, the - error domain must be a globally unique value - that identifies the infrastructure. For Google - API infrastructure, the error domain is - "googleapis.com". + cross_site_network (str): - This field is a member of `oneof`_ ``_domain``. - metadatas (MutableMapping[str, str]): - Additional structured details about this error. Keys must - match a regular expression of ``a-z+`` but should ideally be - lowerCamelCase. Also, they must be limited to 64 characters - in length. When identifying the current value of an exceeded - limit, the units should be contained in the key, not the - value. For example, rather than - ``{"instanceLimit": "100/request"}``, should be returned as, - ``{"instanceLimitPerRequest": "100"}``, if the client - exceeds the number of instances that can be created in a - single (batch) request. - reason (str): - The reason of the error. This is a constant value that - identifies the proximate cause of the error. Error reasons - are unique within a particular domain of errors. This should - be at most 63 characters and match a regular expression of - ``A-Z+[A-Z0-9]``, which represents UPPER_SNAKE_CASE. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_reason``. + This field is a member of `oneof`_ ``_request_id``. + wire_group (str): + Name of the wire group resource to delete. """ - domain: str = proto.Field( + cross_site_network: str = proto.Field( proto.STRING, - number=284415172, - optional=True, + number=108192469, ) - metadatas: MutableMapping[str, str] = proto.MapField( - proto.STRING, + project: str = proto.Field( proto.STRING, - number=8514340, + number=227560217, ) - reason: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=138777156, + number=37109963, optional=True, ) + wire_group: str = proto.Field( + proto.STRING, + number=122540613, + ) -class Errors(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class DeleteZoneOperationRequest(proto.Message): + r"""A request message for ZoneOperations.Delete. See the method + description for details. Attributes: - code (str): - [Output Only] The error type identifier for this error. - - This field is a member of `oneof`_ ``_code``. - error_details (MutableSequence[google.cloud.compute_v1beta.types.ErrorDetails]): - [Output Only] An optional list of messages that contain the - error details. There is a set of defined message types to - use for providing details.The syntax depends on the error - code. For example, QuotaExceededInfo will have details when - the error code is QUOTA_EXCEEDED. - location (str): - [Output Only] Indicates the field in the request that caused - the error. This property is optional. - - This field is a member of `oneof`_ ``_location``. - message (str): - [Output Only] An optional, human-readable error message. - - This field is a member of `oneof`_ ``_message``. + operation (str): + Name of the Operations resource to delete, or + its unique numeric identifier. + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. """ - code: str = proto.Field( + operation: str = proto.Field( proto.STRING, - number=3059181, - optional=True, - ) - error_details: MutableSequence["ErrorDetails"] = proto.RepeatedField( - proto.MESSAGE, - number=274653963, - message="ErrorDetails", + number=52090215, ) - location: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=290430901, - optional=True, + number=227560217, ) - message: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=418054151, - optional=True, + number=3744684, ) -class ExchangedPeeringRoute(proto.Message): - r""" +class DeleteZoneOperationResponse(proto.Message): + r"""A response message for ZoneOperations.Delete. See the method + description for details. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + """ - Attributes: - dest_range (str): - The destination range of the route. - This field is a member of `oneof`_ ``_dest_range``. - imported (bool): - True if the peering route has been imported - from a peer. The actual import happens if the - field networkPeering.importCustomRoutes is true - for this network, and - networkPeering.exportCustomRoutes is true for - the peer network, and the import does not result - in a route conflict. +class DeleteZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Delete. See the + method description for details. - This field is a member of `oneof`_ ``_imported``. - next_hop_region (str): - The region of peering route next hop, only - applies to dynamic routes. - This field is a member of `oneof`_ ``_next_hop_region``. - priority (int): - The priority of the peering route. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_priority``. - type_ (str): - The type of the peering route. - Check the Type enum for the list of possible - values. + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_type``. + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy (str): + Name of the zone VM extension policy to + delete. + zone (str): + Name of the zone for this request. """ - class Type(proto.Enum): - r"""The type of the peering route. - - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - DYNAMIC_PEERING_ROUTE (469794858): - For routes exported from local network. - STATIC_PEERING_ROUTE (473407545): - The peering route. - SUBNET_PEERING_ROUTE (465782504): - The peering route corresponding to subnetwork - range. - """ - UNDEFINED_TYPE = 0 - DYNAMIC_PEERING_ROUTE = 469794858 - STATIC_PEERING_ROUTE = 473407545 - SUBNET_PEERING_ROUTE = 465782504 - - dest_range: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=381327712, - optional=True, - ) - imported: bool = proto.Field( - proto.BOOL, - number=114502404, - optional=True, + number=227560217, ) - next_hop_region: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=122577014, + number=37109963, optional=True, ) - priority: int = proto.Field( - proto.UINT32, - number=445151652, - optional=True, + vm_extension_policy: str = proto.Field( + proto.STRING, + number=331532730, ) - type_: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=3575610, - optional=True, + number=3744684, ) -class ExchangedPeeringRoutesList(proto.Message): +class Denied(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ExchangedPeeringRoute]): - A list of ExchangedPeeringRoute resources. - kind (str): - [Output Only] Type of resource. Always - compute#exchangedPeeringRoutesList for exchanged peering - routes lists. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + I_p_protocol (str): + The IP protocol to which this rule applies. + The protocol type is required when creating a + firewall rule. This value can either be one of + the following well known protocol strings (tcp, + udp,icmp, esp, ah, ipip,sctp) or the IP protocol + number. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_I_p_protocol``. + ports (MutableSequence[str]): + An optional list of ports to which this rule applies. This + field is only applicable for the UDP or TCP protocol. Each + entry must be either an integer or a range. If not + specified, this rule applies to connections through any + port. - This field is a member of `oneof`_ ``_warning``. + Example inputs include: ["22"], ["80","443"], and + ["12345-12349"]. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["ExchangedPeeringRoute"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="ExchangedPeeringRoute", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + I_p_protocol: str = proto.Field( proto.STRING, - number=79797525, + number=488094525, optional=True, ) - self_link: str = proto.Field( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=106854418, ) -class ExpandIpCidrRangeSubnetworkRequest(proto.Message): - r"""A request message for Subnetworks.ExpandIpCidrRange. See the - method description for details. +class DeprecateImageRequest(proto.Message): + r"""A request message for Images.Deprecate. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + deprecation_status_resource (google.cloud.compute_v1beta.types.DeprecationStatus): + The body resource for this request + image (str): + Image name. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - subnetwork (str): - Name of the Subnetwork resource to update. - subnetworks_expand_ip_cidr_range_request_resource (google.cloud.compute_v1beta.types.SubnetworksExpandIpCidrRangeRequest): - The body resource for this request """ - project: str = proto.Field( + deprecation_status_resource: "DeprecationStatus" = proto.Field( + proto.MESSAGE, + number=333006064, + message="DeprecationStatus", + ) + image: str = proto.Field( proto.STRING, - number=227560217, + number=100313435, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork: str = proto.Field( - proto.STRING, - number=307827694, - ) - subnetworks_expand_ip_cidr_range_request_resource: "SubnetworksExpandIpCidrRangeRequest" = proto.Field( - proto.MESSAGE, - number=477014110, - message="SubnetworksExpandIpCidrRangeRequest", - ) - -class Expr(proto.Message): - r"""Represents a textual expression in the Common Expression Language - (CEL) syntax. CEL is a C-like expression language. The syntax and - semantics of CEL are documented at - https://github.com/google/cel-spec. Example (Comparison): title: - "Summary size limit" description: "Determines if a summary is less - than 100 chars" expression: "document.summary.size() < 100" Example - (Equality): title: "Requestor is owner" description: "Determines if - requestor is the document owner" expression: "document.owner == - request.auth.claims.email" Example (Logic): title: "Public - documents" description: "Determine whether the document should be - publicly visible" expression: "document.type != 'private' && - document.type != 'internal'" Example (Data Manipulation): title: - "Notification string" description: "Create a notification string - with a timestamp." expression: "'New message received at ' + - string(document.create_time)" The exact variables and functions that - may be referenced within an expression are determined by the service - that evaluates it. See the service documentation for additional - information. +class DeprecationStatus(proto.Message): + r"""Deprecation status for a public resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - Optional. Description of the expression. This - is a longer text which describes the expression, - e.g. when hovered over it in a UI. + deleted (str): + An optional RFC3339 timestamp on or after + which the state of this resource is intended to + change to DELETED. This is only informational + and the status will not change unless the client + explicitly changes it. - This field is a member of `oneof`_ ``_description``. - expression (str): - Textual representation of an expression in - Common Expression Language syntax. + This field is a member of `oneof`_ ``_deleted``. + deprecated (str): + An optional RFC3339 timestamp on or after + which the state of this resource is intended to + change to DEPRECATED. This is only informational + and the status will not change unless the client + explicitly changes it. - This field is a member of `oneof`_ ``_expression``. - location (str): - Optional. String indicating the location of - the expression for error reporting, e.g. a file - name and a position in the file. + This field is a member of `oneof`_ ``_deprecated``. + obsolete (str): + An optional RFC3339 timestamp on or after + which the state of this resource is intended to + change to OBSOLETE. This is only informational + and the status will not change unless the client + explicitly changes it. - This field is a member of `oneof`_ ``_location``. - title (str): - Optional. Title for the expression, i.e. a - short string describing its purpose. This can be - used e.g. in UIs which allow to enter the - expression. + This field is a member of `oneof`_ ``_obsolete``. + replacement (str): + The URL of the suggested replacement for a + deprecated resource. The suggested replacement + resource must be the same kind of resource as + the deprecated resource. - This field is a member of `oneof`_ ``_title``. + This field is a member of `oneof`_ ``_replacement``. + state (str): + The deprecation state of this resource. This + can be ACTIVE,DEPRECATED, OBSOLETE, or DELETED. + Operations which communicate the end of life + date for an image, can useACTIVE. Operations + which create a new resource using aDEPRECATED + resource will return successfully, but with a + warning indicating the deprecated resource and + recommending its replacement. Operations which + use OBSOLETE orDELETED resources will be + rejected and result in an error. Check the State + enum for the list of possible values. + + This field is a member of `oneof`_ ``_state``. + state_override (google.cloud.compute_v1beta.types.RolloutPolicy): + The rollout policy for this deprecation. This + policy is only enforced by image family views. + The rollout policy restricts the zones where the + associated resource is considered in a + deprecated state. When the rollout policy does + not include the user specified zone, or if the + zone is rolled out, the associated resource is + considered in a deprecated state. + + The rollout policy for this deprecation is + read-only, except for allowlisted users. This + field might not be configured. To view the + latest non-deprecated image in a specific zone, + use theimageFamilyViews.get method. + + This field is a member of `oneof`_ ``_state_override``. """ - description: str = proto.Field( + class State(proto.Enum): + r"""The deprecation state of this resource. This can be + ACTIVE,DEPRECATED, OBSOLETE, or DELETED. Operations which + communicate the end of life date for an image, can useACTIVE. + Operations which create a new resource using aDEPRECATED + resource will return successfully, but with a warning indicating + the deprecated resource and recommending its replacement. + Operations which use OBSOLETE orDELETED resources will be + rejected and result in an error. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + No description available. + DELETED (120962041): + No description available. + DEPRECATED (463360435): + No description available. + OBSOLETE (66532761): + No description available. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + DELETED = 120962041 + DEPRECATED = 463360435 + OBSOLETE = 66532761 + + deleted: str = proto.Field( proto.STRING, - number=422937596, + number=476721177, optional=True, ) - expression: str = proto.Field( + deprecated: str = proto.Field( proto.STRING, - number=352031384, + number=515138995, optional=True, ) - location: str = proto.Field( + obsolete: str = proto.Field( proto.STRING, - number=290430901, + number=357647769, optional=True, ) - title: str = proto.Field( + replacement: str = proto.Field( proto.STRING, - number=110371416, + number=430919186, optional=True, ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + state_override: "RolloutPolicy" = proto.Field( + proto.MESSAGE, + number=300358586, + optional=True, + message="RolloutPolicy", + ) -class ExternalVpnGateway(proto.Message): - r"""Represents an external VPN gateway. External VPN gateway is - the on-premises VPN gateway(s) or another cloud provider's VPN - gateway that connects to your Google Cloud VPN gateway. To - create a highly available VPN from Google Cloud Platform to your - VPN gateway or another cloud provider's VPN gateway, you must - create a external VPN gateway resource with information about - the other gateway. For more information about using external VPN - gateways, see Creating an HA VPN gateway and tunnel pair to a - peer VPN. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - interfaces (MutableSequence[google.cloud.compute_v1beta.types.ExternalVpnGatewayInterface]): - A list of interfaces for this external VPN - gateway. If your peer-side gateway is an - on-premises gateway and non-AWS cloud providers' - gateway, at most two interfaces can be provided - for an external VPN gateway. If your peer side - is an AWS virtual private gateway, four - interfaces should be provided for an external - VPN gateway. - kind (str): - [Output Only] Type of the resource. Always - compute#externalVpnGateway for externalVpnGateways. - - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this ExternalVpnGateway, which is essentially a - hash of the labels set used for optimistic - locking. The fingerprint is initially generated - by Compute Engine and changes after every - request to modify or update labels. You must - always provide an up-to-date fingerprint hash in - order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - ExternalVpnGateway. +class DetachDiskInstanceRequest(proto.Message): + r"""A request message for Instances.DetachDisk. See the method + description for details. - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. - Label values may be empty. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_name``. - redundancy_type (str): - Indicates the user-supplied redundancy type - of this external VPN gateway. Check the - RedundancyType enum for the list of possible - values. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_redundancy_type``. - self_link (str): - [Output Only] Server-defined URL for the resource. + Attributes: + device_name (str): + The device name of the disk to detach. Make a + get() request on the instance to view currently + attached disks and device names. + instance (str): + Instance name for this request. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_self_link``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - class RedundancyType(proto.Enum): - r"""Indicates the user-supplied redundancy type of this external - VPN gateway. - - Values: - UNDEFINED_REDUNDANCY_TYPE (0): - A value indicating that the enum field is not - set. - FOUR_IPS_REDUNDANCY (520087913): - The external VPN gateway has four public IP addresses; at - the time of writing this API, the AWS virtual private - gateway is an example which has four public IP addresses for - high availability connections; there should be two VPN - connections in the AWS virtual private gateway , each AWS - VPN connection has two public IP addresses; please make sure - to put two public IP addresses from one AWS VPN connection - into interfaces 0 and 1 of this external VPN gateway, and - put the other two public IP addresses from another AWS VPN - connection into interfaces 2 and 3 of this external VPN - gateway. When displaying highly available configuration - status for the VPN tunnels connected to FOUR_IPS_REDUNDANCY - external VPN gateway, Google will always detect whether - interfaces 0 and 1 are connected on one interface of HA - Cloud VPN gateway, and detect whether interfaces 2 and 3 are - connected to another interface of the HA Cloud VPN gateway. - SINGLE_IP_INTERNALLY_REDUNDANT (133914873): - The external VPN gateway has only one public - IP address which internally provide redundancy - or failover. - TWO_IPS_REDUNDANCY (367049635): - The external VPN gateway has two public IP - addresses which are redundant with each other, - the following two types of setup on your - on-premises side would have this type of - redundancy: (1) Two separate on-premises - gateways, each with one public IP address, the - two on-premises gateways are redundant with each - other. (2) A single on-premise gateway with two - public IP addresses that are redundant with - eatch other. - """ - UNDEFINED_REDUNDANCY_TYPE = 0 - FOUR_IPS_REDUNDANCY = 520087913 - SINGLE_IP_INTERNALLY_REDUNDANT = 133914873 - TWO_IPS_REDUNDANCY = 367049635 - - creation_timestamp: str = proto.Field( + device_name: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=67541716, ) - description: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - interfaces: MutableSequence["ExternalVpnGatewayInterface"] = proto.RepeatedField( - proto.MESSAGE, - number=12073562, - message="ExternalVpnGatewayInterface", + number=18257045, ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - label_fingerprint: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=178124825, + number=37109963, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, + zone: str = proto.Field( proto.STRING, - number=500195327, + number=3744684, ) - name: str = proto.Field( + + +class DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + GlobalNetworkEndpointGroups.DetachNetworkEndpoints. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + global_network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.GlobalNetworkEndpointGroupsDetachEndpointsRequest): + The body resource for this request + network_endpoint_group (str): + The name of the network endpoint group where + you are removing network endpoints. It should + comply with RFC1035. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + global_network_endpoint_groups_detach_endpoints_request_resource: "GlobalNetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=8898269, + message="GlobalNetworkEndpointGroupsDetachEndpointsRequest", + ) + network_endpoint_group: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=433907078, ) - redundancy_type: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=271443740, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) -class ExternalVpnGatewayInterface(proto.Message): - r"""The interface for the external VPN gateway. +class DetachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + NetworkEndpointGroups.DetachNetworkEndpoints. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (int): - The numeric ID of this interface. The allowed input values - for this id for different redundancy types of external VPN - gateway: - SINGLE_IP_INTERNALLY_REDUNDANT - 0 - - TWO_IPS_REDUNDANCY - 0, 1 - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 - - This field is a member of `oneof`_ ``_id``. - ip_address (str): - IP address of the interface in the external - VPN gateway. Only IPv4 is supported. This IP - address can be either from your on-premise - gateway or another Cloud provider's VPN gateway, - it cannot be an IP address from Google Compute - Engine. - - This field is a member of `oneof`_ ``_ip_address``. - ipv6_address (str): - IPv6 address of the interface in the external - VPN gateway. This IPv6 address can be either - from your on-premise gateway or another Cloud - provider's VPN gateway, it cannot be an IP - address from Google Compute Engine. Must specify - an IPv6 address (not IPV4-mapped) using any - format described in RFC 4291 (e.g. - 2001:db8:0:0:2d9:51:0:0). The output format is - RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). + network_endpoint_group (str): + The name of the network endpoint group where + you are removing network endpoints. It should + comply with RFC1035. + network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsDetachEndpointsRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_ipv6_address``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ - id: int = proto.Field( - proto.UINT32, - number=3355, - optional=True, + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, ) - ip_address: str = proto.Field( + network_endpoint_groups_detach_endpoints_request_resource: "NetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=515608697, + message="NetworkEndpointGroupsDetachEndpointsRequest", + ) + project: str = proto.Field( proto.STRING, - number=406272220, - optional=True, + number=227560217, ) - ipv6_address: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=341563804, + number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ExternalVpnGatewayList(proto.Message): - r"""Response to the list request, and contains a list of - externalVpnGateways. +class DetachNetworkEndpointsRegionNetworkEndpointGroupRequest(proto.Message): + r"""A request message for + RegionNetworkEndpointGroups.DetachNetworkEndpoints. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ExternalVpnGateway]): - A list of ExternalVpnGateway resources. - kind (str): - [Output Only] Type of resource. Always - compute#externalVpnGatewayList for lists of - externalVpnGateways. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + network_endpoint_group (str): + The name of the network endpoint group you + are detaching network endpoints from. It should + comply with RFC1035. + project (str): + Project ID for this request. + region (str): + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. + region_network_endpoint_groups_detach_endpoints_request_resource (google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - etag: str = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, - number=3123477, - optional=True, + number=433907078, ) - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=227560217, ) - items: MutableSequence["ExternalVpnGateway"] = proto.RepeatedField( + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_network_endpoint_groups_detach_endpoints_request_resource: "RegionNetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( proto.MESSAGE, - number=100526016, - message="ExternalVpnGateway", + number=313193198, + message="RegionNetworkEndpointGroupsDetachEndpointsRequest", ) - kind: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3292052, + number=37109963, optional=True, ) - next_page_token: str = proto.Field( + + +class DisableXpnHostProjectRequest(proto.Message): + r"""A request message for Projects.DisableXpnHost. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class FileContentBuffer(proto.Message): - r""" +class DisableXpnResourceProjectRequest(proto.Message): + r"""A request message for Projects.DisableXpnResource. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - content (str): - The raw content in the secure keys file. - - This field is a member of `oneof`_ ``_content``. - file_type (str): - The file type of source file. - Check the FileType enum for the list of possible - values. + project (str): + Project ID for this request. + projects_disable_xpn_resource_request_resource (google.cloud.compute_v1beta.types.ProjectsDisableXpnResourceRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_file_type``. + This field is a member of `oneof`_ ``_request_id``. """ - class FileType(proto.Enum): - r"""The file type of source file. - - Values: - UNDEFINED_FILE_TYPE (0): - A value indicating that the enum field is not - set. - BIN (65767): - No description available. - UNDEFINED (137851184): - No description available. - X509 (2674086): - No description available. - """ - UNDEFINED_FILE_TYPE = 0 - BIN = 65767 - UNDEFINED = 137851184 - X509 = 2674086 - - content: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=414659705, - optional=True, + number=227560217, ) - file_type: str = proto.Field( + projects_disable_xpn_resource_request_resource: "ProjectsDisableXpnResourceRequest" = proto.Field( + proto.MESSAGE, + number=209136170, + message="ProjectsDisableXpnResourceRequest", + ) + request_id: str = proto.Field( proto.STRING, - number=294346781, + number=37109963, optional=True, ) -class Firewall(proto.Message): - r"""Represents a Firewall Rule resource. Firewall rules allow or - deny ingress traffic to, and egress traffic from your instances. - For more information, read Firewall rules. +class Disk(proto.Message): + r"""Represents a Persistent Disk resource. + + Google Compute Engine has two Disk resources: + + - `Zonal `__ + - `Regional `__ + + Persistent disks are required for running your VM instances. Create + both boot and non-boot (data) persistent disks. For more + information, read Persistent Disks. For more storage options, read + Storage options. + + The disks resource represents a zonal persistent disk. For more + information, readZonal persistent disks. + + The regionDisks resource represents a regional persistent disk. For + more information, read Regional resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - allowed (MutableSequence[google.cloud.compute_v1beta.types.Allowed]): - The list of ALLOW rules specified by this - firewall. Each rule specifies a protocol and - port-range tuple that describes a permitted - connection. + access_mode (str): + The access mode of the disk. + + :: + + - READ_WRITE_SINGLE: The default AccessMode, means the + disk can be attached to single instance in RW mode. + - READ_WRITE_MANY: The AccessMode means the disk can be + attached to multiple instances in RW mode. + - READ_ONLY_MANY: The AccessMode means the disk can be + attached to multiple instances in RO mode. + + The AccessMode is only valid for Hyperdisk disk types. Check + the AccessMode enum for the list of possible values. + + This field is a member of `oneof`_ ``_access_mode``. + architecture (str): + The architecture of the disk. Valid values are ARM64 or + X86_64. Check the Architecture enum for the list of possible + values. + + This field is a member of `oneof`_ ``_architecture``. + async_primary_disk (google.cloud.compute_v1beta.types.DiskAsyncReplication): + Disk asynchronously replicated into this + disk. + + This field is a member of `oneof`_ ``_async_primary_disk``. + async_secondary_disks (MutableMapping[str, google.cloud.compute_v1beta.types.DiskAsyncReplicationList]): + Output only. [Output Only] A list of disks this disk is + asynchronously replicated to. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. - denied (MutableSequence[google.cloud.compute_v1beta.types.Denied]): - The list of DENY rules specified by this - firewall. Each rule specifies a protocol and - port-range tuple that describes a denied - connection. description (str): An optional description of this resource. - Provide this field when you create the resource. + Provide this property when you create the + resource. This field is a member of `oneof`_ ``_description``. - destination_ranges (MutableSequence[str]): - If destination ranges are specified, the - firewall rule applies only to traffic that has - destination IP address in these ranges. These - ranges must be expressed in CIDR format. Both - IPv4 and IPv6 are supported. - direction (str): - Direction of traffic to which this firewall applies, either - ``INGRESS`` or ``EGRESS``. The default is ``INGRESS``. For - ``EGRESS`` traffic, you cannot specify the sourceTags - fields. Check the Direction enum for the list of possible - values. + disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Encrypts the disk using a customer-supplied encryption key + or a customer-managed encryption key. - This field is a member of `oneof`_ ``_direction``. - disabled (bool): - Denotes whether the firewall rule is - disabled. When set to true, the firewall rule is - not enforced and the network behaves as if it - did not exist. If this is unspecified, the - firewall rule will be enabled. + Encryption keys do not protect access to metadata of the + disk. - This field is a member of `oneof`_ ``_disabled``. - enable_logging (bool): - Deprecated in favor of enable in LogConfig. - This field denotes whether to enable logging for - a particular firewall rule. If logging is - enabled, logs will be exported t Cloud Logging. + After you encrypt a disk with a customer-supplied key, you + must provide the same key if you use the disk later. For + example, to create a disk snapshot, to create a disk image, + to create a machine image, or to attach the disk to a + virtual machine. - This field is a member of `oneof`_ ``_enable_logging``. + After you encrypt a disk with a customer-managed key, + thediskEncryptionKey.kmsKeyName is set to a key *version* + name once the disk is created. The disk is encrypted with + this version of the key. In the response, + diskEncryptionKey.kmsKeyName appears in the following + format: + + "diskEncryptionKey.kmsKeyName": + "projects/kms_project_id/locations/region/keyRings/ + key_region/cryptoKeys/key /cryptoKeysVersions/version + + If you do not provide an encryption key when creating the + disk, then the disk is encrypted using an automatically + generated key and you don't need to provide a key to use the + disk later. + + This field is a member of `oneof`_ ``_disk_encryption_key``. + enable_confidential_compute (bool): + Whether this disk is using confidential + compute mode. + + This field is a member of `oneof`_ ``_enable_confidential_compute``. + erase_windows_vss_signature (bool): + Specifies whether the disk restored from a + source snapshot should erase Windows specific + VSS signature. + + This field is a member of `oneof`_ ``_erase_windows_vss_signature``. + guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): + A list of features to enable on the guest + operating system. Applicable only for bootable + images. Read Enabling guest operating system + features to see a list of available options. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. + interface (str): + [Deprecated] Specifies the disk interface to use for + attaching this disk, which is either SCSI or NVME. The + default isSCSI. Check the Interface enum for the list of + possible values. + + This field is a member of `oneof`_ ``_interface``. kind (str): - [Output Only] Type of the resource. Always compute#firewall - for firewall rules. + Output only. [Output Only] Type of the resource. Always + compute#disk for disks. This field is a member of `oneof`_ ``_kind``. - log_config (google.cloud.compute_v1beta.types.FirewallLogConfig): - This field denotes the logging options for a - particular firewall rule. If logging is enabled, - logs will be exported to Cloud Logging. + label_fingerprint (str): + A fingerprint for the labels being applied to + this disk, which is essentially a hash of the + labels set used for optimistic locking. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You must always provide an + up-to-date fingerprint hash in order to update + or change labels, otherwise the request will + fail with error412 conditionNotMet. - This field is a member of `oneof`_ ``_log_config``. + To see the latest fingerprint, make a get() + request to retrieve a disk. + + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels to apply to this disk. These can be + later modified by the setLabels method. + last_attach_timestamp (str): + Output only. [Output Only] Last attach timestamp inRFC3339 + text format. + + This field is a member of `oneof`_ ``_last_attach_timestamp``. + last_detach_timestamp (str): + Output only. [Output Only] Last detach timestamp inRFC3339 + text format. + + This field is a member of `oneof`_ ``_last_detach_timestamp``. + license_codes (MutableSequence[int]): + Integer license codes indicating which + licenses are attached to this disk. + licenses (MutableSequence[str]): + A list of publicly visible licenses. Reserved + for Google's use. + location_hint (str): + An opaque location hint used to place the + disk close to other resources. This field is for + use by internal tools that use the public API. + + This field is a member of `oneof`_ ``_location_hint``. + locked (bool): + Output only. [Output Only] The field indicates if the disk + is created from a locked source image. Attachment of a disk + created from a locked source image will cause the following + operations to become irreversibly prohibited: + + :: + + - R/W or R/O disk attachment to any other instance + - Disk detachment. And the disk can only be deleted when the instance + is deleted + - Creation of images or snapshots + - Disk cloning + + Furthermore, the instance with at least one disk with locked + flag set to true will be prohibited from performing the + operations below: + + :: + + - Further attachment of secondary disks. + - Detachment of any disks + - Create machine images + - Create instance template + - Delete the instance with --keep-disk parameter set to true for locked + disks + - Attach a locked disk with --auto-delete parameter set to false + + This field is a member of `oneof`_ ``_locked``. + multi_writer (bool): + Indicates whether or not the disk can be + read/write attached to more than one instance. + + This field is a member of `oneof`_ ``_multi_writer``. name (str): - Name of the resource; provided by the client when the + Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be - a lowercase letter, and all following characters (except for - the last character) must be a dash, lowercase letter, or - digit. The last character must be a lowercase letter or - digit. + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - network (str): - URL of the network resource for this firewall - rule. If not specified when creating a firewall - rule, the default network is used: - global/networks/default If you choose to specify - this field, you can specify the network as a - full or partial URL. For example, the following - are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - - projects/myproject/global/networks/my-network - - global/networks/default + options (str): + Internal use only. - This field is a member of `oneof`_ ``_network``. - params (google.cloud.compute_v1beta.types.FirewallParams): + This field is a member of `oneof`_ ``_options``. + params (google.cloud.compute_v1beta.types.DiskParams): Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. This field is a member of `oneof`_ ``_params``. - priority (int): - Priority for this rule. This is an integer between ``0`` and - ``65535``, both inclusive. The default value is ``1000``. - Relative priorities determine which rule takes effect if - multiple rules apply. Lower values indicate higher priority. - For example, a rule with priority ``0`` has higher - precedence than a rule with priority ``1``. DENY rules take - precedence over ALLOW rules if they have equal priority. - Note that VPC networks have implied rules with a priority of - ``65535``. To avoid conflicts with the implied rules, use a - priority number less than ``65535``. + physical_block_size_bytes (int): + Physical block size of the persistent disk, + in bytes. If not present in a request, a default + value is used. The currently supported size is + 4096, other sizes may be added in the future. + If an unsupported value is requested, the error + message will list the supported values for the + caller's project. - This field is a member of `oneof`_ ``_priority``. - self_link (str): - [Output Only] Server-defined URL for the resource. + This field is a member of `oneof`_ ``_physical_block_size_bytes``. + provisioned_iops (int): + Indicates how many IOPS to provision for the + disk. This sets the number of I/O operations per + second that the disk can handle. Values must be + between 10,000 and 120,000. For more details, + see theExtreme persistent disk documentation. - This field is a member of `oneof`_ ``_self_link``. - source_ranges (MutableSequence[str]): - If source ranges are specified, the firewall - rule applies only to traffic that has a source - IP address in these ranges. These ranges must be - expressed in CIDR format. One or both of - sourceRanges and sourceTags may be set. If both - fields are set, the rule applies to traffic that - has a source IP address within sourceRanges OR a - source IP from a resource with a matching tag - listed in the sourceTags field. The connection - does not need to match both fields for the rule - to apply. Both IPv4 and IPv6 are supported. - source_service_accounts (MutableSequence[str]): - If source service accounts are specified, the - firewall rules apply only to traffic originating - from an instance with a service account in this - list. Source service accounts cannot be used to - control traffic to an instance's external IP - address because service accounts are associated - with an instance, not an IP address. - sourceRanges can be set at the same time as - sourceServiceAccounts. If both are set, the - firewall applies to traffic that has a source IP - address within the sourceRanges OR a source IP - that belongs to an instance with service account - listed in sourceServiceAccount. The connection - does not need to match both fields for the - firewall to apply. sourceServiceAccounts cannot - be used at the same time as sourceTags or - targetTags. - source_tags (MutableSequence[str]): - If source tags are specified, the firewall - rule applies only to traffic with source IPs - that match the primary network interfaces of VM - instances that have the tag and are in the same - VPC network. Source tags cannot be used to - control traffic to an instance's external IP - address, it only applies to traffic between - instances in the same virtual network. Because - tags are associated with instances, not IP - addresses. One or both of sourceRanges and - sourceTags may be set. If both fields are set, - the firewall applies to traffic that has a - source IP address within sourceRanges OR a - source IP from a resource with a matching tag - listed in the sourceTags field. The connection - does not need to match both fields for the - firewall to apply. - target_service_accounts (MutableSequence[str]): - A list of service accounts indicating sets of instances - located in the network that may make network connections as - specified in allowed[]. targetServiceAccounts cannot be used - at the same time as targetTags or sourceTags. If neither - targetServiceAccounts nor targetTags are specified, the - firewall rule applies to all instances on the specified - network. - target_tags (MutableSequence[str]): - A list of tags that controls which instances - the firewall rule applies to. If targetTags are - specified, then the firewall rule applies only - to instances in the VPC network that have one of - those tags. If no targetTags are specified, the - firewall rule applies to all instances on the - specified network. - """ + This field is a member of `oneof`_ ``_provisioned_iops``. + provisioned_throughput (int): + Indicates how much throughput to provision + for the disk. This sets the number of throughput + mb per second that the disk can handle. Values + must be greater than or equal to 1. - class Direction(proto.Enum): - r"""Direction of traffic to which this firewall applies, either - ``INGRESS`` or ``EGRESS``. The default is ``INGRESS``. For - ``EGRESS`` traffic, you cannot specify the sourceTags fields. + This field is a member of `oneof`_ ``_provisioned_throughput``. + region (str): + Output only. [Output Only] URL of the region where the disk + resides. Only applicable for regional resources. You must + specify this field as part of the HTTP request URL. It is + not settable as a field in the request body. - Values: - UNDEFINED_DIRECTION (0): - A value indicating that the enum field is not - set. - EGRESS (432880501): - Indicates that firewall should apply to - outgoing traffic. - INGRESS (516931221): - Indicates that firewall should apply to - incoming traffic. - """ - UNDEFINED_DIRECTION = 0 - EGRESS = 432880501 - INGRESS = 516931221 + This field is a member of `oneof`_ ``_region``. + replica_zones (MutableSequence[str]): + URLs of the zones where the disk should be + replicated to. Only applicable for regional + resources. + resource_policies (MutableSequence[str]): + Resource policies applied to this disk for + automatic snapshot creations. + resource_status (google.cloud.compute_v1beta.types.DiskResourceStatus): + Output only. [Output Only] Status information for the disk + resource. - allowed: MutableSequence["Allowed"] = proto.RepeatedField( - proto.MESSAGE, - number=162398632, - message="Allowed", - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - denied: MutableSequence["Denied"] = proto.RepeatedField( - proto.MESSAGE, - number=275217307, - message="Denied", - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - destination_ranges: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=305699879, - ) - direction: str = proto.Field( - proto.STRING, - number=111150975, - optional=True, - ) - disabled: bool = proto.Field( - proto.BOOL, - number=270940796, - optional=True, - ) - enable_logging: bool = proto.Field( - proto.BOOL, - number=295396515, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - log_config: "FirewallLogConfig" = proto.Field( - proto.MESSAGE, - number=351299741, - optional=True, - message="FirewallLogConfig", - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - network: str = proto.Field( - proto.STRING, - number=232872494, - optional=True, - ) - params: "FirewallParams" = proto.Field( - proto.MESSAGE, - number=78313862, - optional=True, - message="FirewallParams", - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - source_ranges: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=200097658, - ) - source_service_accounts: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=105100756, - ) - source_tags: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=452222397, - ) - target_service_accounts: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=457639710, - ) - target_tags: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=62901767, - ) + This field is a member of `oneof`_ ``_resource_status``. + satisfies_pzi (bool): + Output only. Reserved for future use. + This field is a member of `oneof`_ ``_satisfies_pzi``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. -class FirewallList(proto.Message): - r"""Contains a list of firewalls. + This field is a member of `oneof`_ ``_satisfies_pzs``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_self_link``. + size_gb (int): + Size, in GB, of the persistent disk. You can + specify this field when creating a persistent + disk using thesourceImage, sourceSnapshot, + orsourceDisk parameter, or specify it alone to + create an empty persistent disk. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + If you specify this field along with a source, + the value ofsizeGb must not be less than the + size of the source. + Acceptable values are greater than 0. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): - A list of Firewall resources. - kind (str): - [Output Only] Type of resource. Always compute#firewallList - for lists of firewalls. + This field is a member of `oneof`_ ``_size_gb``. + source_consistency_group_policy (str): + Output only. [Output Only] URL of the + DiskConsistencyGroupPolicy for a secondary disk that was + created using a consistency group. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_source_consistency_group_policy``. + source_consistency_group_policy_id (str): + Output only. [Output Only] ID of the + DiskConsistencyGroupPolicy for a secondary disk that was + created using a consistency group. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_source_consistency_group_policy_id``. + source_disk (str): + The source disk used to create this disk. You + can provide this as a partial or full URL to the + resource. For example, the following are valid + values: - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_warning``. - """ + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - @property - def raw_page(self): - return self + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Firewall"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Firewall", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + - + projects/project/zones/zone/disks/disk + - + projects/project/regions/region/disks/disk -class FirewallLogConfig(proto.Message): - r"""The available logging options for a firewall rule. + - + zones/zone/disks/disk - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - + regions/region/disks/disk - Attributes: - enable (bool): - This field denotes whether to enable logging - for a particular firewall rule. + This field is a member of `oneof`_ ``_source_disk``. + source_disk_id (str): + Output only. [Output Only] The unique ID of the disk used to + create this disk. This value identifies the exact disk that + was used to create this persistent disk. For example, if you + created the persistent disk from a disk that was later + deleted and recreated under the same name, the source disk + ID would identify the exact version of the disk that was + used. - This field is a member of `oneof`_ ``_enable``. - metadata (str): - This field can only be specified for a - particular firewall rule if logging is enabled - for that rule. This field denotes whether to - include or exclude metadata for firewall logs. - Check the Metadata enum for the list of possible - values. + This field is a member of `oneof`_ ``_source_disk_id``. + source_image (str): + The source image used to create this disk. If + the source image is deleted, this field will not + be set. - This field is a member of `oneof`_ ``_metadata``. - """ + To create a disk with one of the public + operating system images, specify the image by + its family name. For example, + specifyfamily/debian-9 to use the latest Debian + 9 image: - class Metadata(proto.Enum): - r"""This field can only be specified for a particular firewall - rule if logging is enabled for that rule. This field denotes - whether to include or exclude metadata for firewall logs. + projects/debian-cloud/global/images/family/debian-9 - Values: - UNDEFINED_METADATA (0): - A value indicating that the enum field is not - set. - EXCLUDE_ALL_METADATA (334519954): - No description available. - INCLUDE_ALL_METADATA (164619908): - No description available. - """ - UNDEFINED_METADATA = 0 - EXCLUDE_ALL_METADATA = 334519954 - INCLUDE_ALL_METADATA = 164619908 + Alternatively, use a specific version of a + public operating system image: - enable: bool = proto.Field( - proto.BOOL, - number=311764355, - optional=True, - ) - metadata: str = proto.Field( - proto.STRING, - number=86866735, - optional=True, - ) + projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD + To create a disk with a custom image that you + created, specify the image name in the following + format: -class FirewallParams(proto.Message): - r"""Additional firewall parameters. + global/images/my-custom-image - Attributes: - resource_manager_tags (MutableMapping[str, str]): - Tag keys/values directly bound to this resource. Tag keys - and values have the same definition as resource manager - tags. The field is allowed for INSERT only. The keys/values - to set on the resource should be specified in either ID { : - } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. - """ + You can also specify a custom image by its image + family, which returns the latest version of the + image in that family. Replace the image name + with family/family-name: - resource_manager_tags: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=377671164, - ) + global/images/family/my-image-family + This field is a member of `oneof`_ ``_source_image``. + source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Thecustomer-supplied + encryption key of the source image. Required if + the source image is protected by a + customer-supplied encryption key. -class FirewallPoliciesListAssociationsResponse(proto.Message): - r""" + This field is a member of `oneof`_ ``_source_image_encryption_key``. + source_image_id (str): + Output only. [Output Only] The ID value of the image used to + create this disk. This value identifies the exact image that + was used to create this persistent disk. For example, if you + created the persistent disk from an image that was later + deleted and recreated under the same name, the source image + ID would identify the exact version of the image that was + used. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_source_image_id``. + source_instant_snapshot (str): + The source instant snapshot used to create + this disk. You can provide this as a partial or + full URL to the resource. For example, the + following are valid values: - Attributes: - associations (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyAssociation]): - A list of associations. - kind (str): - [Output Only] Type of firewallPolicy associations. Always - compute#FirewallPoliciesListAssociations for lists of - firewallPolicy associations. - This field is a member of `oneof`_ ``_kind``. - """ + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot + - + projects/project/zones/zone/instantSnapshots/instantSnapshot + - zones/zone/instantSnapshots/instantSnapshot - associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( - proto.MESSAGE, - number=508736530, - message="FirewallPolicyAssociation", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) + This field is a member of `oneof`_ ``_source_instant_snapshot``. + source_instant_snapshot_id (str): + Output only. [Output Only] The unique ID of the instant + snapshot used to create this disk. This value identifies the + exact instant snapshot that was used to create this + persistent disk. For example, if you created the persistent + disk from an instant snapshot that was later deleted and + recreated under the same name, the source instant snapshot + ID would identify the exact version of the instant snapshot + that was used. + This field is a member of `oneof`_ ``_source_instant_snapshot_id``. + source_snapshot (str): + The source snapshot used to create this disk. + You can provide this as a partial or full URL to + the resource. For example, the following are + valid values: -class FirewallPoliciesScopedList(proto.Message): - r""" - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - + https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot + - projects/project/global/snapshots/snapshot + - global/snapshots/snapshot - Attributes: - firewall_policies (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicy]): - A list of firewall policies contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of firewall policies when the list is empty. + This field is a member of `oneof`_ ``_source_snapshot``. + source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Thecustomer-supplied + encryption key of the source snapshot. Required + if the source snapshot is protected by a + customer-supplied encryption key. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. + source_snapshot_id (str): + Output only. [Output Only] The unique ID of the snapshot + used to create this disk. This value identifies the exact + snapshot that was used to create this persistent disk. For + example, if you created the persistent disk from a snapshot + that was later deleted and recreated under the same name, + the source snapshot ID would identify the exact version of + the snapshot that was used. - firewall_policies: MutableSequence["FirewallPolicy"] = proto.RepeatedField( - proto.MESSAGE, - number=392512943, - message="FirewallPolicy", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + This field is a member of `oneof`_ ``_source_snapshot_id``. + source_storage_object (str): + The full Google Cloud Storage URI where the + disk image is stored. This file must be a + gzip-compressed tarball whose name ends in + .tar.gz or virtual machine disk whose name ends + in vmdk. Valid URIs may start with gs:// or + https://storage.googleapis.com/. This flag is + not optimized for creating multiple disks from a + source storage object. To create many disks from + a source storage object, use gcloud compute + images import instead. + This field is a member of `oneof`_ ``_source_storage_object``. + status (str): + Output only. [Output Only] The status of disk creation. -class FirewallPolicy(proto.Message): - r"""Represents a Firewall Policy resource. + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - CREATING: Disk is provisioning. + - RESTORING: Source data is being copied into the + disk. + - FAILED: Disk creation failed. + - READY: Disk is ready for use. + - DELETING: Disk is deleting. - Attributes: - associations (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyAssociation]): - A list of associations that belong to this - firewall policy. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Check the Status enum for the list of possible values. - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + This field is a member of `oneof`_ ``_status``. + storage_pool (str): + The storage pool in which the new disk is + created. You can provide this as a partial or + full URL to the resource. For example, the + following are valid values: - This field is a member of `oneof`_ ``_description``. - display_name (str): - Deprecated, please use short name instead. User-provided - name of the Organization firewall policy. The name should be - unique in the organization in which the firewall policy is - created. This field is not applicable to network firewall - policies. This name must be set on creation and cannot be - changed. The name must be 1-63 characters long, and comply - with RFC1035. Specifically, the name must be 1-63 characters - long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_display_name``. - fingerprint (str): - Specifies a fingerprint for this resource, - which is essentially a hash of the metadata's - contents and used for optimistic locking. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update metadata. You must always provide an - up-to-date fingerprint hash in order to update - or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make get() request to the - firewall policy. + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool + - + projects/project/zones/zone/storagePools/storagePool + - zones/zone/storagePools/storagePool - This field is a member of `oneof`_ ``_fingerprint``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + This field is a member of `oneof`_ ``_storage_pool``. + storage_type (str): + [Deprecated] Storage type of the persistent disk. Check the + StorageType enum for the list of possible values. - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output only] Type of the resource. Always - compute#firewallPolicyfor firewall policies + This field is a member of `oneof`_ ``_storage_type``. + type_ (str): + URL of the disk type resource describing + which disk type to use to create the disk. + Provide this when creating the disk. For + example:projects/project/zones/zone/diskTypes/pd-ssd. + See Persistent disk types. - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. For Organization Firewall Policies - it's a [Output Only] numeric ID allocated by Google Cloud - which uniquely identifies the Organization Firewall Policy. + This field is a member of `oneof`_ ``_type``. + user_licenses (MutableSequence[str]): + A list of publicly visible user-licenses. + Unlike regular licenses, user provided licenses + can be modified after the disk is created. This + includes a list of URLs to the license resource. + For example, to provide a debian license: - This field is a member of `oneof`_ ``_name``. - packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - A list of packet mirroring rules that belong - to this policy. - parent (str): - [Output Only] The parent of the firewall policy. This field - is not applicable to network firewall policies. + https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch + users (MutableSequence[str]): + Output only. [Output Only] Links to the users of the disk + (attached instances) in + form:projects/project/zones/zone/instances/instance + zone (str): + Output only. [Output Only] URL of the zone where the disk + resides. You must specify this field as part of the HTTP + request URL. It is not settable as a field in the request + body. - This field is a member of `oneof`_ ``_parent``. - policy_source (str): - [Output Only] Source of this Firewall Policy. USER_DEFINED - if created by a Cloud user, or SYSTEM if created by managed - services like GKE. Check the PolicySource enum for the list - of possible values. + This field is a member of `oneof`_ ``_zone``. + """ - This field is a member of `oneof`_ ``_policy_source``. - policy_type (str): - The type of the firewall policy. This field can be either - VPC_POLICY or RDMA_ROCE_POLICY. Note: if not specified then - VPC_POLICY will be used. Check the PolicyType enum for the - list of possible values. + class AccessMode(proto.Enum): + r"""The access mode of the disk. - This field is a member of `oneof`_ ``_policy_type``. - region (str): - [Output Only] URL of the region where the regional firewall - policy resides. This field is not applicable to global - firewall policies. You must specify this field as part of - the HTTP request URL. It is not settable as a field in the - request body. + :: - This field is a member of `oneof`_ ``_region``. - rule_tuple_count (int): - [Output Only] Total count of all firewall policy rule - tuples. A firewall policy can not exceed a set number of - tuples. + - READ_WRITE_SINGLE: The default AccessMode, means the + disk can be attached to single instance in RW mode. + - READ_WRITE_MANY: The AccessMode means the disk can be + attached to multiple instances in RW mode. + - READ_ONLY_MANY: The AccessMode means the disk can be + attached to multiple instances in RO mode. - This field is a member of `oneof`_ ``_rule_tuple_count``. - rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - A list of rules that belong to this policy. There must - always be a default rule (rule with priority 2147483647 and - match "\*"). If no rules are provided when creating a - firewall policy, a default rule with action "allow" will be - added. - self_link (str): - [Output Only] Server-defined URL for the resource. + The AccessMode is only valid for Hyperdisk disk types. - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Values: + UNDEFINED_ACCESS_MODE (0): + A value indicating that the enum field is not + set. + READ_ONLY_MANY (63460265): + The AccessMode means the disk can be attached + to multiple instances in RO mode. + READ_WRITE_MANY (488743208): + The AccessMode means the disk can be attached + to multiple instances in RW mode. + READ_WRITE_SINGLE (99323089): + The default AccessMode, means the disk can be + attached to single instance in RW mode. + """ + UNDEFINED_ACCESS_MODE = 0 + READ_ONLY_MANY = 63460265 + READ_WRITE_MANY = 488743208 + READ_WRITE_SINGLE = 99323089 - This field is a member of `oneof`_ ``_self_link_with_id``. - short_name (str): - User-provided name of the Organization firewall policy. The - name should be unique in the organization in which the - firewall policy is created. This field is not applicable to - network firewall policies. This name must be set on creation - and cannot be changed. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + class Architecture(proto.Enum): + r"""The architecture of the disk. Valid values are ARM64 or X86_64. - This field is a member of `oneof`_ ``_short_name``. - """ + Values: + UNDEFINED_ARCHITECTURE (0): + A value indicating that the enum field is not + set. + ARCHITECTURE_UNSPECIFIED (394750507): + Default value indicating Architecture is not + set. + ARM64 (62547450): + Machines with architecture ARM64 + X86_64 (425300551): + Machines with architecture X86_64 + """ + UNDEFINED_ARCHITECTURE = 0 + ARCHITECTURE_UNSPECIFIED = 394750507 + ARM64 = 62547450 + X86_64 = 425300551 - class PolicySource(proto.Enum): - r"""[Output Only] Source of this Firewall Policy. USER_DEFINED if - created by a Cloud user, or SYSTEM if created by managed services - like GKE. + class Interface(proto.Enum): + r"""[Deprecated] Specifies the disk interface to use for attaching this + disk, which is either SCSI or NVME. The default isSCSI. Values: - UNDEFINED_POLICY_SOURCE (0): + UNDEFINED_INTERFACE (0): A value indicating that the enum field is not set. - SYSTEM (313484847): + NVME (2408800): No description available. - USER_DEFINED (491485557): + SCSI (2539686): + No description available. + UNSPECIFIED (526786327): No description available. """ - UNDEFINED_POLICY_SOURCE = 0 - SYSTEM = 313484847 - USER_DEFINED = 491485557 + UNDEFINED_INTERFACE = 0 + NVME = 2408800 + SCSI = 2539686 + UNSPECIFIED = 526786327 - class PolicyType(proto.Enum): - r"""The type of the firewall policy. This field can be either VPC_POLICY - or RDMA_ROCE_POLICY. Note: if not specified then VPC_POLICY will be - used. + class Status(proto.Enum): + r"""Output only. [Output Only] The status of disk creation. + + :: + + - CREATING: Disk is provisioning. + - RESTORING: Source data is being copied into the + disk. + - FAILED: Disk creation failed. + - READY: Disk is ready for use. + - DELETING: Disk is deleting. Values: - UNDEFINED_POLICY_TYPE (0): + UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - RDMA_ROCE_POLICY (148757145): + CREATING (455564985): + Disk is provisioning + DELETING (528602024): + Disk is deleting. + FAILED (455706685): + Disk creation failed. + READY (77848963): + Disk is ready for use. + RESTORING (404263851): + Source data is being copied into the disk. + UNAVAILABLE (413756464): + Disk is currently unavailable and cannot be + accessed, attached or detached. + """ + UNDEFINED_STATUS = 0 + CREATING = 455564985 + DELETING = 528602024 + FAILED = 455706685 + READY = 77848963 + RESTORING = 404263851 + UNAVAILABLE = 413756464 + + class StorageType(proto.Enum): + r"""[Deprecated] Storage type of the persistent disk. + + Values: + UNDEFINED_STORAGE_TYPE (0): + A value indicating that the enum field is not + set. + HDD (71368): No description available. - VPC_POLICY (74319208): + SSD (82404): No description available. """ - UNDEFINED_POLICY_TYPE = 0 - RDMA_ROCE_POLICY = 148757145 - VPC_POLICY = 74319208 + UNDEFINED_STORAGE_TYPE = 0 + HDD = 71368 + SSD = 82404 - associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( + access_mode: str = proto.Field( + proto.STRING, + number=41155486, + optional=True, + ) + architecture: str = proto.Field( + proto.STRING, + number=302803283, + optional=True, + ) + async_primary_disk: "DiskAsyncReplication" = proto.Field( proto.MESSAGE, - number=508736530, - message="FirewallPolicyAssociation", + number=180517533, + optional=True, + message="DiskAsyncReplication", + ) + async_secondary_disks: MutableMapping[ + str, "DiskAsyncReplicationList" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=322925608, + message="DiskAsyncReplicationList", ) creation_timestamp: str = proto.Field( proto.STRING, @@ -33123,49 +35105,114 @@ class PolicyType(proto.Enum): number=422937596, optional=True, ) - display_name: str = proto.Field( - proto.STRING, - number=4473832, + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=271660677, optional=True, + message="CustomerEncryptionKey", ) - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, + enable_confidential_compute: bool = proto.Field( + proto.BOOL, + number=102135228, + optional=True, + ) + erase_windows_vss_signature: bool = proto.Field( + proto.BOOL, + number=52637562, optional=True, ) + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( + proto.MESSAGE, + number=79294545, + message="GuestOsFeature", + ) id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) + interface: str = proto.Field( + proto.STRING, + number=502623545, + optional=True, + ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name: str = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, - number=3373707, + number=178124825, optional=True, ) - packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( - proto.MESSAGE, - number=531644356, - message="FirewallPolicyRule", + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, ) - parent: str = proto.Field( + last_attach_timestamp: str = proto.Field( proto.STRING, - number=78317738, + number=42159653, optional=True, ) - policy_source: str = proto.Field( + last_detach_timestamp: str = proto.Field( proto.STRING, - number=232383432, + number=56471027, optional=True, ) - policy_type: str = proto.Field( + license_codes: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=45482664, + ) + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=18158119, + number=337642578, + ) + location_hint: str = proto.Field( + proto.STRING, + number=350519505, + optional=True, + ) + locked: bool = proto.Field( + proto.BOOL, + number=513159946, + optional=True, + ) + multi_writer: bool = proto.Field( + proto.BOOL, + number=528165433, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + options: str = proto.Field( + proto.STRING, + number=361137822, + optional=True, + ) + params: "DiskParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="DiskParams", + ) + physical_block_size_bytes: int = proto.Field( + proto.INT64, + number=420007943, + optional=True, + ) + provisioned_iops: int = proto.Field( + proto.INT64, + number=186769108, + optional=True, + ) + provisioned_throughput: int = proto.Field( + proto.INT64, + number=526524181, optional=True, ) region: str = proto.Field( @@ -33173,107 +35220,143 @@ class PolicyType(proto.Enum): number=138946292, optional=True, ) - rule_tuple_count: int = proto.Field( - proto.INT32, - number=388342037, - optional=True, + replica_zones: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=48438272, ) - rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) + resource_status: "DiskResourceStatus" = proto.Field( proto.MESSAGE, - number=108873975, - message="FirewallPolicyRule", + number=249429315, + optional=True, + message="DiskResourceStatus", + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=480964257, + optional=True, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, + optional=True, ) self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_link_with_id: str = proto.Field( - proto.STRING, - number=44520962, + size_gb: int = proto.Field( + proto.INT64, + number=494929369, optional=True, ) - short_name: str = proto.Field( + source_consistency_group_policy: str = proto.Field( proto.STRING, - number=492051566, + number=19616093, optional=True, ) - - -class FirewallPolicyAssociation(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - attachment_target (str): - The target that the firewall policy is - attached to. - - This field is a member of `oneof`_ ``_attachment_target``. - display_name (str): - [Output Only] Deprecated, please use short name instead. The - display name of the firewall policy of the association. - - This field is a member of `oneof`_ ``_display_name``. - firewall_policy_id (str): - [Output Only] The firewall policy ID of the association. - - This field is a member of `oneof`_ ``_firewall_policy_id``. - name (str): - The name for an association. - - This field is a member of `oneof`_ ``_name``. - priority (int): - An integer indicating the priority of an association. The - priority must be a positive value between 1 and 2147483647. - Firewall Policies are evaluated from highest to lowest - priority where 1 is the highest priority and 2147483647 is - the lowest priority. The default value is ``1000``. If two - associations have the same priority then lexicographical - order on association names is applied. - - This field is a member of `oneof`_ ``_priority``. - short_name (str): - [Output Only] The short name of the firewall policy of the - association. - - This field is a member of `oneof`_ ``_short_name``. - """ - - attachment_target: str = proto.Field( + source_consistency_group_policy_id: str = proto.Field( proto.STRING, - number=175773741, + number=267568957, optional=True, ) - display_name: str = proto.Field( + source_disk: str = proto.Field( proto.STRING, - number=4473832, + number=451753793, optional=True, ) - firewall_policy_id: str = proto.Field( + source_disk_id: str = proto.Field( proto.STRING, - number=357211849, + number=454190809, optional=True, ) - name: str = proto.Field( + source_image: str = proto.Field( proto.STRING, - number=3373707, + number=50443319, optional=True, ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=381503659, optional=True, + message="CustomerEncryptionKey", ) - short_name: str = proto.Field( + source_image_id: str = proto.Field( proto.STRING, - number=492051566, + number=55328291, + optional=True, + ) + source_instant_snapshot: str = proto.Field( + proto.STRING, + number=219202054, + optional=True, + ) + source_instant_snapshot_id: str = proto.Field( + proto.STRING, + number=287582708, + optional=True, + ) + source_snapshot: str = proto.Field( + proto.STRING, + number=126061928, + optional=True, + ) + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=303679322, + optional=True, + message="CustomerEncryptionKey", + ) + source_snapshot_id: str = proto.Field( + proto.STRING, + number=98962258, + optional=True, + ) + source_storage_object: str = proto.Field( + proto.STRING, + number=233052711, + optional=True, + ) + status: str = proto.Field( + proto.STRING, + number=181260274, + optional=True, + ) + storage_pool: str = proto.Field( + proto.STRING, + number=360473440, + optional=True, + ) + storage_type: str = proto.Field( + proto.STRING, + number=360602238, + optional=True, + ) + type_: str = proto.Field( + proto.STRING, + number=3575610, + optional=True, + ) + user_licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=388193862, + ) + users: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=111578632, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, optional=True, ) - -class FirewallPolicyList(proto.Message): + +class DiskAggregatedList(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -33284,22 +35367,30 @@ class FirewallPolicyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicy]): - A list of FirewallPolicy resources. + items (MutableMapping[str, google.cloud.compute_v1beta.types.DisksScopedList]): + A list of DisksScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#firewallPolicyList for listsof FirewallPolicies + Output only. [Output Only] Type of resource. + Alwayscompute#diskAggregatedList for aggregated lists of + persistent disks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -33315,10 +35406,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["FirewallPolicy"] = proto.RepeatedField( + items: MutableMapping[str, "DisksScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, number=100526016, - message="FirewallPolicy", + message="DisksScopedList", ) kind: str = proto.Field( proto.STRING, @@ -33330,6 +35422,15 @@ def raw_page(self): number=79797525, optional=True, ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -33338,8441 +35439,18937 @@ def raw_page(self): ) -class FirewallPolicyRule(proto.Message): - r"""Represents a rule that describes one or more match conditions - along with the action to be taken when traffic matches this - condition (allow or deny). - +class DiskAsyncReplication(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - action (str): - The Action to perform when the client connection triggers - the rule. Valid actions for firewall rules are: "allow", - "deny", "apply_security_profile_group" and "goto_next". - Valid actions for packet mirroring rules are: "mirror", - "do_not_mirror" and "goto_next". - - This field is a member of `oneof`_ ``_action``. - description (str): - An optional description for this resource. + consistency_group_policy (str): + Output only. [Output Only] URL of the + DiskConsistencyGroupPolicy if replication was started on the + disk as a member of a group. - This field is a member of `oneof`_ ``_description``. - direction (str): - The direction in which this rule applies. - Check the Direction enum for the list of - possible values. + This field is a member of `oneof`_ ``_consistency_group_policy``. + consistency_group_policy_id (str): + Output only. [Output Only] ID of the + DiskConsistencyGroupPolicy if replication was started on the + disk as a member of a group. - This field is a member of `oneof`_ ``_direction``. - disabled (bool): - Denotes whether the firewall policy rule is - disabled. When set to true, the firewall policy - rule is not enforced and traffic behaves as if - it did not exist. If this is unspecified, the - firewall policy rule will be enabled. + This field is a member of `oneof`_ ``_consistency_group_policy_id``. + disk (str): + The other disk asynchronously replicated to + or from the current disk. You can provide this + as a partial or full URL to the resource. For + example, the following are valid values: - This field is a member of `oneof`_ ``_disabled``. - enable_logging (bool): - Denotes whether to enable logging for a particular rule. If - logging is enabled, logs will be exported to the configured - export destination in Stackdriver. Logs may be exported to - BigQuery or Pub/Sub. Note: you cannot enable logging on - "goto_next" rules. - This field is a member of `oneof`_ ``_enable_logging``. - kind (str): - [Output only] Type of the resource. Returns - compute#firewallPolicyRule for firewall rules and - compute#packetMirroringRule for packet mirroring rules. + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk - This field is a member of `oneof`_ ``_kind``. - match (google.cloud.compute_v1beta.types.FirewallPolicyRuleMatcher): - A match condition that incoming traffic is - evaluated against. If it evaluates to true, the - corresponding 'action' is enforced. + This field is a member of `oneof`_ ``_disk``. + disk_id (str): + Output only. [Output Only] The unique ID of the other disk + asynchronously replicated to or from the current disk. This + value identifies the exact disk that was used to create this + replication. For example, if you started replicating the + persistent disk from a disk that was later deleted and + recreated under the same name, the disk ID would identify + the exact version of the disk that was used. - This field is a member of `oneof`_ ``_match``. - priority (int): - An integer indicating the priority of a rule - in the list. The priority must be a positive - value between 0 and 2147483647. Rules are - evaluated from highest to lowest priority where - 0 is the highest priority and 2147483647 is the - lowest priority. + This field is a member of `oneof`_ ``_disk_id``. + """ - This field is a member of `oneof`_ ``_priority``. - rule_name (str): - An optional name for the rule. This field is - not a unique identifier and can be updated. + consistency_group_policy: str = proto.Field( + proto.STRING, + number=1991097, + optional=True, + ) + consistency_group_policy_id: str = proto.Field( + proto.STRING, + number=261065057, + optional=True, + ) + disk: str = proto.Field( + proto.STRING, + number=3083677, + optional=True, + ) + disk_id: str = proto.Field( + proto.STRING, + number=60990205, + optional=True, + ) - This field is a member of `oneof`_ ``_rule_name``. - rule_tuple_count (int): - [Output Only] Calculation of the complexity of a single - firewall policy rule. - This field is a member of `oneof`_ ``_rule_tuple_count``. - security_profile_group (str): - A fully-qualified URL of a SecurityProfile resource - instance. Example: - https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group - Must be specified if action is one of - 'apply_security_profile_group' or 'mirror'. Cannot be - specified for other actions. +class DiskAsyncReplicationList(proto.Message): + r""" - This field is a member of `oneof`_ ``_security_profile_group``. - target_forwarding_rules (MutableSequence[str]): - A list of forwarding rules to which this rule - applies. This field allows you to control which - load balancers get this rule. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project - /global/forwardingRules/forwardingRule - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /forwardingRules/forwardingRule - - projects/project/global/ - forwardingRules/forwardingRule - - projects/project/regions/region/forwardingRules/ - forwardingRule - target_resources (MutableSequence[str]): - A list of network resource URLs to which this - rule applies. This field allows you to control - which network's VMs get this rule. If this field - is left blank, all VMs within the organization - will receive the rule. - target_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): - A list of secure tags that controls which instances the - firewall rule applies to. If targetSecureTag are specified, - then the firewall rule applies only to instances in the VPC - network that have one of those EFFECTIVE secure tags, if all - the target_secure_tag are in INEFFECTIVE state, then this - rule will be ignored. targetSecureTag may not be set at the - same time as targetServiceAccounts. If neither - targetServiceAccounts nor targetSecureTag are specified, the - firewall rule applies to all instances on the specified - network. Maximum number of target label tags allowed is 256. - target_service_accounts (MutableSequence[str]): - A list of service accounts indicating the - sets of instances that are applied with this - rule. - target_type (str): - Target types of the firewall policy rule. - Default value is INSTANCES. Check the TargetType - enum for the list of possible values. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_target_type``. - tls_inspect (bool): - Boolean flag indicating if the traffic should be TLS - decrypted. Can be set only if action = - 'apply_security_profile_group' and cannot be set for other - actions. + Attributes: + async_replication_disk (google.cloud.compute_v1beta.types.DiskAsyncReplication): - This field is a member of `oneof`_ ``_tls_inspect``. + This field is a member of `oneof`_ ``_async_replication_disk``. """ - class Direction(proto.Enum): - r"""The direction in which this rule applies. + async_replication_disk: "DiskAsyncReplication" = proto.Field( + proto.MESSAGE, + number=231794067, + optional=True, + message="DiskAsyncReplication", + ) - Values: - UNDEFINED_DIRECTION (0): - A value indicating that the enum field is not - set. - EGRESS (432880501): - No description available. - INGRESS (516931221): - No description available. - """ - UNDEFINED_DIRECTION = 0 - EGRESS = 432880501 - INGRESS = 516931221 - class TargetType(proto.Enum): - r"""Target types of the firewall policy rule. Default value is - INSTANCES. +class DiskInstantiationConfig(proto.Message): + r"""A specification of the desired way to instantiate a disk in + the instance template when its created from a source instance. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + auto_delete (bool): + Specifies whether the disk will be + auto-deleted when the instance is deleted (but + not when the disk is detached from the + instance). + + This field is a member of `oneof`_ ``_auto_delete``. + custom_image (str): + The custom source image to be used to restore + this disk when instantiating this instance + template. + + This field is a member of `oneof`_ ``_custom_image``. + device_name (str): + Specifies the device name of the disk to + which the configurations apply to. + + This field is a member of `oneof`_ ``_device_name``. + instantiate_from (str): + Specifies whether to include the disk and + what image to use. Possible values are: + + + - source-image: to use the same image that + was used to create the source instance's + corresponding disk. Applicable to the boot + disk and additional read-write disks. + - source-image-family: to use the same + image family that was used to create the + source instance's corresponding disk. + Applicable to the boot disk and + additional read-write disks. + - custom-image: to use a user-provided + image url for disk creation. Applicable + to the boot disk and additional read-write + disks. + - attach-read-only: to attach a read-only + disk. Applicable to read-only disks. + - do-not-include: to exclude a disk from + the template. Applicable to additional + read-write disks, local SSDs, and read-only + disks. + Check the InstantiateFrom enum for the list of + possible values. + + This field is a member of `oneof`_ ``_instantiate_from``. + """ + + class InstantiateFrom(proto.Enum): + r"""Specifies whether to include the disk and what image to use. + Possible values are: + + + - source-image: to use the same image that was used to + create the source instance's corresponding disk. Applicable to + the boot disk and additional read-write disks. + - source-image-family: to use the same image family that + was used to create the source instance's corresponding disk. + Applicable to the boot disk and additional read-write + disks. + - custom-image: to use a user-provided image url for disk + creation. Applicable to the boot disk and additional + read-write disks. + - attach-read-only: to attach a read-only + disk. Applicable to read-only disks. + - do-not-include: to exclude a disk from the template. + Applicable to additional read-write disks, local SSDs, and + read-only disks. Values: - UNDEFINED_TARGET_TYPE (0): + UNDEFINED_INSTANTIATE_FROM (0): A value indicating that the enum field is not set. - INSTANCES (131337822): - No description available. - INTERNAL_MANAGED_LB (309241080): - No description available. + ATTACH_READ_ONLY (513775419): + Attach the existing disk in read-only mode. + The request will fail if the disk was attached + in read-write mode on the source instance. + Applicable to: read-only disks. + BLANK (63281460): + Create a blank disk. The disk will be created + unformatted. Applicable to: additional + read-write disks, local SSDs. + CUSTOM_IMAGE (196311789): + Use the custom image specified in the custom_image field. + Applicable to: boot disk, additional read-write disks. + DEFAULT (115302945): + Use the default instantiation option for the + corresponding type of disk. For boot disk and + any other R/W disks, new custom images will be + created from each disk. For read-only disks, + they will be attached in read-only mode. Local + SSD disks will be created as blank volumes. + DO_NOT_INCLUDE (104218952): + Do not include the disk in the instance + template. Applicable to: additional read-write + disks, local SSDs, read-only disks. + SOURCE_IMAGE (62631959): + Use the same source image used for creation + of the source instance's corresponding disk. The + request will fail if the source VM's disk was + created from a snapshot. Applicable to: boot + disk, additional read-write disks. + SOURCE_IMAGE_FAMILY (76850316): + Use the same source image family used for + creation of the source instance's corresponding + disk. The request will fail if the source image + of the source disk does not belong to any image + family. Applicable to: + + boot disk, additional read-write disks. """ - UNDEFINED_TARGET_TYPE = 0 - INSTANCES = 131337822 - INTERNAL_MANAGED_LB = 309241080 + UNDEFINED_INSTANTIATE_FROM = 0 + ATTACH_READ_ONLY = 513775419 + BLANK = 63281460 + CUSTOM_IMAGE = 196311789 + DEFAULT = 115302945 + DO_NOT_INCLUDE = 104218952 + SOURCE_IMAGE = 62631959 + SOURCE_IMAGE_FAMILY = 76850316 - action: str = proto.Field( - proto.STRING, - number=187661878, + auto_delete: bool = proto.Field( + proto.BOOL, + number=464761403, optional=True, ) - description: str = proto.Field( + custom_image: str = proto.Field( proto.STRING, - number=422937596, + number=184123149, optional=True, ) - direction: str = proto.Field( + device_name: str = proto.Field( proto.STRING, - number=111150975, + number=67541716, optional=True, ) - disabled: bool = proto.Field( - proto.BOOL, - number=270940796, + instantiate_from: str = proto.Field( + proto.STRING, + number=393383903, optional=True, ) - enable_logging: bool = proto.Field( - proto.BOOL, - number=295396515, + + +class DiskList(proto.Message): + r"""A list of Disk resources. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Disk]): + A list of Disk resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#diskList for lists of disks. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) + items: MutableSequence["Disk"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Disk", + ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - match: "FirewallPolicyRuleMatcher" = proto.Field( - proto.MESSAGE, - number=103668165, - optional=True, - message="FirewallPolicyRuleMatcher", - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, optional=True, ) - rule_name: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=55286254, + number=456214797, optional=True, ) - rule_tuple_count: int = proto.Field( - proto.INT32, - number=388342037, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) - security_profile_group: str = proto.Field( + + +class DiskMoveRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + destination_zone (str): + The URL of the destination zone to move the + disk. This can be a full or partial URL. For + example, the following are all valid URLs to a + zone: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone + - projects/project/zones/zone + - zones/zone + + This field is a member of `oneof`_ ``_destination_zone``. + target_disk (str): + The URL of the target disk to move. This can + be a full or partial URL. For example, the + following are all valid URLs to a disk: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk + + This field is a member of `oneof`_ ``_target_disk``. + """ + + destination_zone: str = proto.Field( proto.STRING, - number=207411626, + number=131854653, optional=True, ) - target_forwarding_rules: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=495923747, - ) - target_resources: MutableSequence[str] = proto.RepeatedField( + target_disk: str = proto.Field( proto.STRING, - number=528230647, - ) - target_secure_tags: MutableSequence[ - "FirewallPolicyRuleSecureTag" - ] = proto.RepeatedField( - proto.MESSAGE, - number=468132403, - message="FirewallPolicyRuleSecureTag", + number=62433163, + optional=True, ) - target_service_accounts: MutableSequence[str] = proto.RepeatedField( + + +class DiskParams(proto.Message): + r"""Additional disk params. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to be bound to the disk. Tag keys and + values have the same definition as resource manager tags. + Keys and values can be either in numeric format, such as + ``tagKeys/{tag_key_id}`` and ``tagValues/456`` or in + namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. The field is ignored (both PUT & + PATCH) when empty. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=457639710, - ) - target_type: str = proto.Field( proto.STRING, - number=62925096, - optional=True, - ) - tls_inspect: bool = proto.Field( - proto.BOOL, - number=43425488, - optional=True, + number=377671164, ) -class FirewallPolicyRuleMatcher(proto.Message): - r"""Represents a match condition that incoming traffic is - evaluated against. Exactly one field must be specified. - +class DiskResourceStatus(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - dest_address_groups (MutableSequence[str]): - Address groups which should be matched - against the traffic destination. Maximum number - of destination address groups is 10. - dest_fqdns (MutableSequence[str]): - Fully Qualified Domain Name (FQDN) which - should be matched against traffic destination. - Maximum number of destination fqdn allowed is - 100. - dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - destination CIDR IP ranges allowed is 5000. - dest_network_scope (str): - Network scope of the traffic destination. - Check the DestNetworkScope enum for the list of - possible values. - - This field is a member of `oneof`_ ``_dest_network_scope``. - dest_network_type (str): - Network type of the traffic destination. Allowed values are: - - UNSPECIFIED - INTERNET - NON_INTERNET Check the - DestNetworkType enum for the list of possible values. - - This field is a member of `oneof`_ ``_dest_network_type``. - dest_region_codes (MutableSequence[str]): - Region codes whose IP addresses will be used - to match for destination of traffic. Should be - specified as 2 letter country code defined as - per ISO 3166 alpha-2 country codes. ex."US" - Maximum number of dest region codes allowed is - 5000. - dest_threat_intelligences (MutableSequence[str]): - Names of Network Threat Intelligence lists. - The IPs in these lists will be matched against - traffic destination. - layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleMatcherLayer4Config]): - Pairs of IP protocols and ports that the rule - should match. - src_address_groups (MutableSequence[str]): - Address groups which should be matched - against the traffic source. Maximum number of - source address groups is 10. - src_fqdns (MutableSequence[str]): - Fully Qualified Domain Name (FQDN) which - should be matched against traffic source. - Maximum number of source fqdn allowed is 100. - src_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - source CIDR IP ranges allowed is 5000. - src_network_scope (str): - Network scope of the traffic source. - Check the SrcNetworkScope enum for the list of - possible values. - - This field is a member of `oneof`_ ``_src_network_scope``. - src_network_type (str): - Network type of the traffic source. Allowed values are: - - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - - VPC_NETWORKS Check the SrcNetworkType enum for the list of - possible values. + async_primary_disk (google.cloud.compute_v1beta.types.DiskResourceStatusAsyncReplicationStatus): - This field is a member of `oneof`_ ``_src_network_type``. - src_networks (MutableSequence[str]): - Networks of the traffic source. It can be - either a full or partial url. - src_region_codes (MutableSequence[str]): - Region codes whose IP addresses will be used - to match for source of traffic. Should be - specified as 2 letter country code defined as - per ISO 3166 alpha-2 country codes. ex."US" - Maximum number of source region codes allowed is - 5000. - src_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): - List of secure tag values, which should be - matched at the source of the traffic. For - INGRESS rule, if all the srcSecureTag are - INEFFECTIVE, and there is no srcIpRange, this - rule will be ignored. Maximum number of source - tag values allowed is 256. - src_threat_intelligences (MutableSequence[str]): - Names of Network Threat Intelligence lists. - The IPs in these lists will be matched against - traffic source. + This field is a member of `oneof`_ ``_async_primary_disk``. + async_secondary_disks (MutableMapping[str, google.cloud.compute_v1beta.types.DiskResourceStatusAsyncReplicationStatus]): + Key: disk, value: AsyncReplicationStatus + message """ - class DestNetworkScope(proto.Enum): - r"""Network scope of the traffic destination. Additional supported - values which may be not listed in the enum directly due to technical - reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS + async_primary_disk: "DiskResourceStatusAsyncReplicationStatus" = proto.Field( + proto.MESSAGE, + number=180517533, + optional=True, + message="DiskResourceStatusAsyncReplicationStatus", + ) + async_secondary_disks: MutableMapping[ + str, "DiskResourceStatusAsyncReplicationStatus" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=322925608, + message="DiskResourceStatusAsyncReplicationStatus", + ) - Values: - UNDEFINED_DEST_NETWORK_SCOPE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_DEST_NETWORK_SCOPE = 0 - class DestNetworkType(proto.Enum): - r"""Network type of the traffic destination. Allowed values are: - - UNSPECIFIED - INTERNET - NON_INTERNET Additional supported values - which may be not listed in the enum directly due to technical - reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS +class DiskResourceStatusAsyncReplicationStatus(proto.Message): + r""" - Values: - UNDEFINED_DEST_NETWORK_TYPE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_DEST_NETWORK_TYPE = 0 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class SrcNetworkScope(proto.Enum): - r"""Network scope of the traffic source. Additional supported values - which may be not listed in the enum directly due to technical - reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS + Attributes: + state (str): + Check the State enum for the list of possible + values. - Values: - UNDEFINED_SRC_NETWORK_SCOPE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_SRC_NETWORK_SCOPE = 0 + This field is a member of `oneof`_ ``_state``. + """ - class SrcNetworkType(proto.Enum): - r"""Network type of the traffic source. Allowed values are: - - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS - Additional supported values which may be not listed in the enum - directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET - UNSPECIFIED VPC_NETWORKS + class State(proto.Enum): + r""" Values: - UNDEFINED_SRC_NETWORK_TYPE (0): + UNDEFINED_STATE (0): A value indicating that the enum field is not set. + ACTIVE (314733318): + Replication is active. + CREATED (135924424): + Secondary disk is created and is waiting for + replication to start. + STARTING (488820800): + Replication is starting. + STATE_UNSPECIFIED (470755401): + No description available. + STOPPED (444276141): + Replication is stopped. + STOPPING (350791796): + Replication is stopping. """ - UNDEFINED_SRC_NETWORK_TYPE = 0 + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + CREATED = 135924424 + STARTING = 488820800 + STATE_UNSPECIFIED = 470755401 + STOPPED = 444276141 + STOPPING = 350791796 - dest_address_groups: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=468760508, - ) - dest_fqdns: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=370712737, - ) - dest_ip_ranges: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=337357713, - ) - dest_network_scope: str = proto.Field( - proto.STRING, - number=355839526, - optional=True, - ) - dest_network_type: str = proto.Field( - proto.STRING, - number=409853224, - optional=True, - ) - dest_region_codes: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=199120280, - ) - dest_threat_intelligences: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=119896492, - ) - layer4_configs: MutableSequence[ - "FirewallPolicyRuleMatcherLayer4Config" - ] = proto.RepeatedField( - proto.MESSAGE, - number=373534261, - message="FirewallPolicyRuleMatcherLayer4Config", - ) - src_address_groups: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=436423738, - ) - src_fqdns: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=435906147, - ) - src_ip_ranges: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=432128083, - ) - src_network_scope: str = proto.Field( - proto.STRING, - number=476025320, - optional=True, - ) - src_network_type: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=309819686, + number=109757585, optional=True, ) - src_networks: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=247119872, - ) - src_region_codes: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=99086742, - ) - src_secure_tags: MutableSequence[ - "FirewallPolicyRuleSecureTag" - ] = proto.RepeatedField( - proto.MESSAGE, - number=508791302, - message="FirewallPolicyRuleSecureTag", - ) - src_threat_intelligences: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=323631018, - ) -class FirewallPolicyRuleMatcherLayer4Config(proto.Message): +class DiskSettings(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ip_protocol (str): - The IP protocol to which this rule applies. - The protocol type is required when creating a - firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp), or the IP - protocol number. + access_location (google.cloud.compute_v1beta.types.DiskSettingsAccessLocation): + Policy of which locations are allowed to + create regional snapshots. - This field is a member of `oneof`_ ``_ip_protocol``. - ports (MutableSequence[str]): - An optional list of ports to which this rule applies. This - field is only applicable for UDP or TCP protocol. Each entry - must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. + This field is a member of `oneof`_ ``_access_location``. """ - ip_protocol: str = proto.Field( - proto.STRING, - number=475958960, + access_location: "DiskSettingsAccessLocation" = proto.Field( + proto.MESSAGE, + number=18410544, optional=True, - ) - ports: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=106854418, + message="DiskSettingsAccessLocation", ) -class FirewallPolicyRuleSecureTag(proto.Message): - r""" +class DiskSettingsAccessLocation(proto.Message): + r"""AccessLocation is only used for regional snapshot. It contains which + regions are allowed to create a regional snapshot from disks located + in the given region/zone. It includes key-value pairs designed to + store the following structure. The keys should match their + corresponding values, which must be provided: access_location: { + locations { us-central1 { region: "us-central1" }, asia-west2 { + region: "asia-west2" } } } + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Name of the secure tag, created with - TagManager's TagValue API. - - This field is a member of `oneof`_ ``_name``. - state (str): - [Output Only] State of the secure tag, either ``EFFECTIVE`` - or ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` when it - is deleted or its network is deleted. Check the State enum - for the list of possible values. + locations (MutableMapping[str, google.cloud.compute_v1beta.types.DiskSettingsAccessLocationAccessLocationPreference]): + List of regions that can create a regional + snapshot from the current region + policy (str): + Policy of which location is allowed to access + snapshot. Check the Policy enum for the list of + possible values. - This field is a member of `oneof`_ ``_state``. + This field is a member of `oneof`_ ``_policy``. """ - class State(proto.Enum): - r"""[Output Only] State of the secure tag, either ``EFFECTIVE`` or - ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` when it is deleted - or its network is deleted. + class Policy(proto.Enum): + r"""Policy of which location is allowed to access snapshot. Values: - UNDEFINED_STATE (0): + UNDEFINED_POLICY (0): A value indicating that the enum field is not set. - EFFECTIVE (244201863): - No description available. - INEFFECTIVE (304458242): + ALL_REGIONS (273143585): + Any regions will be able to access the source + location. + POLICY_UNSPECIFIED (197974922): No description available. + SPECIFIC_REGIONS (454128082): + Only allowlisted regions will be able to + create region scoped snapshots """ - UNDEFINED_STATE = 0 - EFFECTIVE = 244201863 - INEFFECTIVE = 304458242 + UNDEFINED_POLICY = 0 + ALL_REGIONS = 273143585 + POLICY_UNSPECIFIED = 197974922 + SPECIFIC_REGIONS = 454128082 - name: str = proto.Field( + locations: MutableMapping[ + str, "DiskSettingsAccessLocationAccessLocationPreference" + ] = proto.MapField( proto.STRING, - number=3373707, - optional=True, + proto.MESSAGE, + number=413423454, + message="DiskSettingsAccessLocationAccessLocationPreference", ) - state: str = proto.Field( + policy: str = proto.Field( proto.STRING, - number=109757585, + number=91071794, optional=True, ) -class FixedOrPercent(proto.Message): - r"""Encapsulates numeric value that can be either absolute or - relative. +class DiskSettingsAccessLocationAccessLocationPreference(proto.Message): + r"""A structure for specifying an allowed target region to create + snapshot. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - calculated (int): - [Output Only] Absolute value of VM instances calculated - based on the specific mode. - If the value is fixed, then - the calculated value is equal to the fixed value. - If the - value is a percent, then the calculated value is percent/100 - \* targetSize. For example, the calculated value of a 80% of - a managed instance group with 150 instances would be (80/100 - \* 150) = 120 VM instances. If there is a remainder, the - number is rounded. - - This field is a member of `oneof`_ ``_calculated``. - fixed (int): - Specifies a fixed number of VM instances. - This must be a positive integer. - - This field is a member of `oneof`_ ``_fixed``. - percent (int): - Specifies a percentage of instances between 0 - to 100%, inclusive. For example, specify 80 for - 80%. + region (str): + Accessible region name - This field is a member of `oneof`_ ``_percent``. + This field is a member of `oneof`_ ``_region``. """ - calculated: int = proto.Field( - proto.INT32, - number=472082878, - optional=True, - ) - fixed: int = proto.Field( - proto.INT32, - number=97445748, - optional=True, - ) - percent: int = proto.Field( - proto.INT32, - number=394814533, + region: str = proto.Field( + proto.STRING, + number=138946292, optional=True, ) -class FlexibleTimeRange(proto.Message): - r"""A flexible specification of a time range that has 3 points of - flexibility: (1) a flexible start time, (2) a flexible end time, - (3) a flexible duration. It is possible to specify a - contradictory time range that cannot be matched by any Interval. - This causes a validation error. +class DiskType(proto.Message): + r"""Represents a Disk Type resource. + + Google Compute Engine has two Disk Type resources: + + - `Regional `__ + - `Zonal `__ + + You can choose from a variety of disk types based on your needs. For + more information, readStorage options. + + The diskTypes resource represents disk types for a zonal persistent + disk. For more information, readZonal persistent disks. + + The regionDiskTypes resource represents disk types for a regional + persistent disk. For more information, read Regional persistent + disks. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - end_time_not_earlier_than (str): + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. - This field is a member of `oneof`_ ``_end_time_not_earlier_than``. - end_time_not_later_than (str): + This field is a member of `oneof`_ ``_creation_timestamp``. + default_disk_size_gb (int): + [Output Only] Server-defined default disk size in GB. - This field is a member of `oneof`_ ``_end_time_not_later_than``. - max_duration (str): + This field is a member of `oneof`_ ``_default_disk_size_gb``. + deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): + [Output Only] The deprecation status associated with this + disk type. - This field is a member of `oneof`_ ``_max_duration``. - min_duration (str): + This field is a member of `oneof`_ ``_deprecated``. + description (str): + [Output Only] An optional description of this resource. - This field is a member of `oneof`_ ``_min_duration``. - start_time_not_earlier_than (str): + This field is a member of `oneof`_ ``_description``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - This field is a member of `oneof`_ ``_start_time_not_earlier_than``. - start_time_not_later_than (str): + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#diskType for disk types. - This field is a member of `oneof`_ ``_start_time_not_later_than``. + This field is a member of `oneof`_ ``_kind``. + name (str): + [Output Only] Name of the resource. + + This field is a member of `oneof`_ ``_name``. + region (str): + [Output Only] URL of the region where the disk type resides. + Only applicable for regional resources. You must specify + this field as part of the HTTP request URL. It is not + settable as a field in the request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + valid_disk_size (str): + [Output Only] An optional textual description of the valid + disk size, such as "10GB-10TB". + + This field is a member of `oneof`_ ``_valid_disk_size``. + zone (str): + [Output Only] URL of the zone where the disk type resides. + You must specify this field as part of the HTTP request URL. + It is not settable as a field in the request body. + + This field is a member of `oneof`_ ``_zone``. """ - end_time_not_earlier_than: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=83355642, + number=30525366, optional=True, ) - end_time_not_later_than: str = proto.Field( + default_disk_size_gb: int = proto.Field( + proto.INT64, + number=270619253, + optional=True, + ) + deprecated: "DeprecationStatus" = proto.Field( + proto.MESSAGE, + number=515138995, + optional=True, + message="DeprecationStatus", + ) + description: str = proto.Field( proto.STRING, - number=526866094, + number=422937596, optional=True, ) - max_duration: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=39954959, + number=3292052, optional=True, ) - min_duration: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=514381025, + number=3373707, optional=True, ) - start_time_not_earlier_than: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=490386497, + number=138946292, optional=True, ) - start_time_not_later_than: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=212764853, + number=456214797, + optional=True, + ) + valid_disk_size: str = proto.Field( + proto.STRING, + number=493962464, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, optional=True, ) -class ForwardingRule(proto.Message): - r"""Represents a Forwarding Rule resource. Forwarding rule resources in - Google Cloud can be either regional or global in scope: \* - `Global `__ - \* - `Regional `__ - A forwarding rule and its corresponding IP address represent the - frontend configuration of a Google Cloud load balancer. Forwarding - rules can also reference target instances and Cloud VPN Classic - gateways (targetVpnGateway). For more information, read Forwarding - rule concepts and Using protocol forwarding. - +class DiskTypeAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - I_p_address (str): - IP address for which this forwarding rule accepts traffic. - When a client sends traffic to this IP address, the - forwarding rule directs the traffic to the referenced target - or backendService. While creating a forwarding rule, - specifying an IPAddress is required under the following - circumstances: - When the target is set to targetGrpcProxy - and validateForProxyless is set to true, the IPAddress - should be set to 0.0.0.0. - When the target is a Private - Service Connect Google APIs bundle, you must specify an - IPAddress. Otherwise, you can optionally specify an IP - address that references an existing static (reserved) IP - address resource. When omitted, Google Cloud assigns an - ephemeral IP address. Use one of the following formats to - specify an IP address while creating a forwarding rule: \* - IP address number, as in ``100.1.2.3`` \* IPv6 address - range, as in ``2600:1234::/96`` \* Full resource URL, as in - https://www.googleapis.com/compute/v1/projects/ - project_id/regions/region/addresses/address-name \* Partial - URL or by name, as in: - - projects/project_id/regions/region/addresses/address-name - - regions/region/addresses/address-name - - global/addresses/address-name - address-name The forwarding - rule's target or backendService, and in most cases, also the - loadBalancingScheme, determine the type of IP address that - you can use. For detailed information, see `IP address - specifications `__. - When reading an IPAddress, the API always returns the IP - address number. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_I_p_address``. - I_p_protocol (str): - The IP protocol to which this rule applies. For protocol - forwarding, valid options are TCP, UDP, ESP, AH, SCTP, ICMP - and L3_DEFAULT. The valid IP protocols are different for - different load balancing products as described in `Load - balancing - features `__. - Check the IPProtocolEnum enum for the list of possible - values. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.DiskTypesScopedList]): + A list of DiskTypesScopedList resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#diskTypeAggregatedList. - This field is a member of `oneof`_ ``_I_p_protocol``. - all_ports (bool): - The ports, portRange, and allPorts fields are mutually - exclusive. Only packets addressed to ports in the specified - range will be forwarded to the backends configured with this - forwarding rule. The allPorts field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. - It's - applicable only to the following products: internal - passthrough Network Load Balancers, backend service-based - external passthrough Network Load Balancers, and internal - and external protocol forwarding. - Set this field to true - to allow packets addressed to any port or packets lacking - destination port information (for example, UDP fragments - after the first fragment) to be forwarded to the backends - configured with this forwarding rule. The L3_DEFAULT - protocol requires allPorts be set to true. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_all_ports``. - allow_global_access (bool): - If set to true, clients can access the internal passthrough - Network Load Balancers, the regional internal Application - Load Balancer, and the regional internal proxy Network Load - Balancer from all regions. If false, only allows access from - the local region the load balancer is located at. Note that - for INTERNAL_MANAGED forwarding rules, this field cannot be - changed after the forwarding rule is created. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_allow_global_access``. - allow_psc_global_access (bool): - This is used in PSC consumer ForwardingRule - to control whether the PSC endpoint can be - accessed from another region. + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_allow_psc_global_access``. - allow_psc_packet_injection (bool): - This is used in PSC consumer ForwardingRule to control - whether the producer is allowed to inject packets into the - consumer's network. If set to true, the target service - attachment must have tunneling enabled and - TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC - forwarding rules should not use this field. This field was - never released to any customers and is deprecated and will - be removed in the future. + This field is a member of `oneof`_ ``_warning``. + """ - This field is a member of `oneof`_ ``_allow_psc_packet_injection``. - backend_service (str): - Identifies the backend service to which the - forwarding rule sends traffic. Required for - internal and external passthrough Network Load - Balancers; must be omitted for all other load - balancer types. + @property + def raw_page(self): + return self - This field is a member of `oneof`_ ``_backend_service``. - base_forwarding_rule (str): - [Output Only] The URL for the corresponding base forwarding - rule. By base forwarding rule, we mean the forwarding rule - that has the same IP address, protocol, and port settings - with the current forwarding rule, but without sourceIPRanges - specified. Always empty if the current forwarding rule does - not have sourceIPRanges specified. + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "DiskTypesScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="DiskTypesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) - This field is a member of `oneof`_ ``_base_forwarding_rule``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the +class DiskTypeList(proto.Message): + r"""Contains a list of disk types. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): + A list of DiskType resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#diskTypeList for disk types. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_description``. - external_managed_backend_bucket_migration_state (str): - Specifies the canary migration state for the backend buckets - attached to this forwarding rule. Possible values are - PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin - the migration from EXTERNAL to EXTERNAL_MANAGED, the state - must be changed to PREPARE. The state must be changed to - TEST_ALL_TRAFFIC before the loadBalancingScheme can be - changed to EXTERNAL_MANAGED. Optionally, the - TEST_BY_PERCENTAGE state can be used to migrate traffic to - backend buckets attached to this forwarding rule by - percentage using - externalManagedBackendBucketMigrationTestingPercentage. - Rolling back a migration requires the states to be set in - reverse order. So changing the scheme from EXTERNAL_MANAGED - to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC - at the same time. Optionally, the TEST_BY_PERCENTAGE state - can be used to migrate some traffic back to EXTERNAL or - PREPARE can be used to migrate all traffic back to EXTERNAL. - Check the ExternalManagedBackendBucketMigrationState enum - for the list of possible values. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_external_managed_backend_bucket_migration_state``. - external_managed_backend_bucket_migration_testing_percentage (float): - Determines the fraction of requests to backend buckets that - should be processed by the global external Application Load - Balancer. The value of this field must be in the range [0, - 100]. This value can only be set if the loadBalancingScheme - in the BackendService is set to EXTERNAL (when using the - classic Application Load Balancer) and the migration state - is TEST_BY_PERCENTAGE. + This field is a member of `oneof`_ ``_warning``. + """ - This field is a member of `oneof`_ ``_external_managed_backend_bucket_migration_testing_percentage``. - fingerprint (str): - Fingerprint of this resource. A hash of the - contents stored in this object. This field is - used in optimistic locking. This field will be - ignored when inserting a ForwardingRule. Include - the fingerprint in patch request to ensure that - you do not overwrite changes that were applied - from another concurrent request. To see the - latest fingerprint, make a get() request to - retrieve a ForwardingRule. + @property + def raw_page(self): + return self - This field is a member of `oneof`_ ``_fingerprint``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["DiskType"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="DiskType", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) - This field is a member of `oneof`_ ``_id``. - ip_collection (str): - Resource reference of a PublicDelegatedPrefix. The PDP must - be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. - Use one of the following formats to specify a sub-PDP when - creating an IPv6 NetLB forwarding rule using BYOIP: Full - resource URL, as in - https://www.googleapis.com/compute/v1/projects/project_id/regions/region - /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - - regions/region/publicDelegatedPrefixes/sub-pdp-name - This field is a member of `oneof`_ ``_ip_collection``. - ip_version (str): - The IP Version that will be used by this - forwarding rule. Valid options are IPV4 or IPV6. - Check the IpVersion enum for the list of - possible values. +class DiskTypesScopedList(proto.Message): + r""" - This field is a member of `oneof`_ ``_ip_version``. - is_mirroring_collector (bool): - Indicates whether or not this load balancer - can be used as a collector for packet mirroring. - To prevent mirroring loops, instances behind - this load balancer will not have their traffic - mirrored even if a PacketMirroring rule applies - to them. This can only be set to true for load - balancers that have their loadBalancingScheme - set to INTERNAL. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_is_mirroring_collector``. - kind (str): - [Output Only] Type of the resource. Always - compute#forwardingRule for forwarding rule resources. + Attributes: + disk_types (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): + [Output Only] A list of disk types contained in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of disk types when the list is empty. - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this resource, which is essentially a hash of - the labels set used for optimistic locking. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You must always provide an - up-to-date fingerprint hash in order to update - or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a ForwardingRule. + This field is a member of `oneof`_ ``_warning``. + """ - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. - Label values may be empty. - load_balancing_scheme (str): - Specifies the forwarding rule type. For more - information about forwarding rules, refer to - Forwarding rule concepts. Check the - LoadBalancingScheme enum for the list of - possible values. + disk_types: MutableSequence["DiskType"] = proto.RepeatedField( + proto.MESSAGE, + number=198926167, + message="DiskType", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) - This field is a member of `oneof`_ ``_load_balancing_scheme``. - metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): - Opaque filter criteria used by load balancer to restrict - routing configuration to a limited set of xDS compliant - clients. In their xDS requests to load balancer, xDS clients - present node metadata. When there is a match, the relevant - configuration is made available to those proxies. Otherwise, - all the resources (e.g. TargetHttpProxy, UrlMap) referenced - by the ForwardingRule are not visible to those proxies. For - each metadataFilter in this list, if its filterMatchCriteria - is set to MATCH_ANY, at least one of the filterLabels must - match the corresponding label provided in the metadata. If - its filterMatchCriteria is set to MATCH_ALL, then all of its - filterLabels must match with corresponding labels provided - in the metadata. If multiple metadataFilters are specified, - all of them need to be satisfied in order to be considered a - match. metadataFilters specified here will be applifed - before those specified in the UrlMap that this - ForwardingRule references. metadataFilters only applies to - Loadbalancers that have their loadBalancingScheme set to - INTERNAL_SELF_MANAGED. - name (str): - Name of the resource; provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. For - Private Service Connect forwarding rules that forward - traffic to Google APIs, the forwarding rule name must be a - 1-20 characters string with lowercase letters and numbers - and must start with a letter. - This field is a member of `oneof`_ ``_name``. - network (str): - This field is not used for global external - load balancing. For internal passthrough Network - Load Balancers, this field identifies the - network that the load balanced IP should belong - to for this forwarding rule. If the subnetwork - is specified, the network of the subnetwork will - be used. If neither subnetwork nor this field is - specified, the default network will be used. For - Private Service Connect forwarding rules that - forward traffic to Google APIs, a network must - be provided. +class DisksAddResourcePoliciesRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_network``. - network_tier (str): - This signifies the networking tier used for - configuring this load balancer and can only take - the following values: PREMIUM, STANDARD. For - regional ForwardingRule, the valid values are - PREMIUM and STANDARD. For GlobalForwardingRule, - the valid value is PREMIUM. If this field is not - specified, it is assumed to be PREMIUM. If - IPAddress is specified, this value must be equal - to the networkTier of the Address. Check the - NetworkTier enum for the list of possible - values. + Attributes: + resource_policies (MutableSequence[str]): + Full or relative path to the resource policy + to be added to this disk. You can only specify + one resource policy. + """ - This field is a member of `oneof`_ ``_network_tier``. - no_automate_dns_zone (bool): - This is used in PSC consumer ForwardingRule - to control whether it should try to - auto-generate a DNS zone or not. Non-PSC - forwarding rules do not use this field. Once - set, this field is not mutable. + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) - This field is a member of `oneof`_ ``_no_automate_dns_zone``. - port_range (str): - The ports, portRange, and allPorts fields are mutually - exclusive. Only packets addressed to ports in the specified - range will be forwarded to the backends configured with this - forwarding rule. The portRange field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, or SCTP, and - It's applicable only - to the following products: external passthrough Network Load - Balancers, internal and external proxy Network Load - Balancers, internal and external Application Load Balancers, - external protocol forwarding, and Classic VPN. - Some - products have restrictions on what ports can be used. See - port specifications for details. For external forwarding - rules, two or more forwarding rules cannot use the same - [IPAddress, IPProtocol] pair, and cannot have overlapping - portRanges. For internal forwarding rules within the same - VPC network, two or more forwarding rules cannot use the - same [IPAddress, IPProtocol] pair, and cannot have - overlapping portRanges. @pattern: \\d+(?:-\\d+)? - This field is a member of `oneof`_ ``_port_range``. - ports (MutableSequence[str]): - The ports, portRange, and allPorts fields are mutually - exclusive. Only packets addressed to ports in the specified - range will be forwarded to the backends configured with this - forwarding rule. The ports field has the following - limitations: - It requires that the forwarding rule - IPProtocol be TCP, UDP, or SCTP, and - It's applicable only - to the following products: internal passthrough Network Load - Balancers, backend service-based external passthrough - Network Load Balancers, and internal protocol forwarding. - - You can specify a list of up to five ports by number, - separated by commas. The ports can be contiguous or - discontiguous. For external forwarding rules, two or more - forwarding rules cannot use the same [IPAddress, IPProtocol] - pair if they share at least one port number. For internal - forwarding rules within the same VPC network, two or more - forwarding rules cannot use the same [IPAddress, IPProtocol] - pair if they share at least one port number. @pattern: - \\d+(?:-\\d+)? - psc_connection_id (int): - [Output Only] The PSC connection id of the PSC forwarding - rule. +class DisksRemoveResourcePoliciesRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_psc_connection_id``. - psc_connection_status (str): - Check the PscConnectionStatus enum for the - list of possible values. + Attributes: + resource_policies (MutableSequence[str]): + Resource policies to be removed from this + disk. + """ - This field is a member of `oneof`_ ``_psc_connection_status``. - region (str): - [Output Only] URL of the region where the regional - forwarding rule resides. This field is not applicable to - global forwarding rules. You must specify this field as part - of the HTTP request URL. It is not settable as a field in - the request body. + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. +class DisksResizeRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_self_link_with_id``. - service_directory_registrations (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRuleServiceDirectoryRegistration]): - Service Directory resources to register this - forwarding rule with. Currently, only supports a - single Service Directory resource. - service_label (str): - An optional prefix to the service name for this forwarding - rule. If specified, the prefix is the first label of the - fully qualified service name. The label must be 1-63 - characters long, and comply with RFC1035. Specifically, the - label must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. - This field is only used for internal load balancing. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_service_label``. - service_name (str): - [Output Only] The internal fully qualified service name for - this forwarding rule. This field is only used for internal - load balancing. + Attributes: + size_gb (int): + The new size of the persistent disk, which is + specified in GB. - This field is a member of `oneof`_ ``_service_name``. - source_ip_ranges (MutableSequence[str]): - If not empty, this forwarding rule will only forward the - traffic when the source IP address matches one of the IP - addresses or CIDR ranges set here. Note that a forwarding - rule can only have up to 64 source IP ranges, and this field - can only be used with a regional forwarding rule whose - scheme is EXTERNAL. Each source_ip_range entry should be - either an IP address (for example, 1.2.3.4) or a CIDR range - (for example, 1.2.3.0/24). - subnetwork (str): - This field identifies the subnetwork that the - load balanced IP should belong to for this - forwarding rule, used with internal load - balancers and external passthrough Network Load - Balancers with IPv6. If the network specified is - in auto subnet mode, this field is optional. - However, a subnetwork must be specified if the - network is in custom subnet mode or when - creating external forwarding rule with IPv6. + This field is a member of `oneof`_ ``_size_gb``. + """ - This field is a member of `oneof`_ ``_subnetwork``. - target (str): - The URL of the target resource to receive the matched - traffic. For regional forwarding rules, this target must be - in the same region as the forwarding rule. For global - forwarding rules, this target must be a global load - balancing resource. The forwarded traffic must be of a type - appropriate to the target object. - For load balancers, see - the "Target" column in `Port - specifications `__. - - For Private Service Connect forwarding rules that forward - traffic to Google APIs, provide the name of a supported - Google API bundle: - vpc-sc - APIs that support VPC Service - Controls. - all-apis - All supported Google APIs. - For - Private Service Connect forwarding rules that forward - traffic to managed services, the target must be a service - attachment. The target is not mutable once set as a service - attachment. + size_gb: int = proto.Field( + proto.INT64, + number=494929369, + optional=True, + ) - This field is a member of `oneof`_ ``_target``. + +class DisksScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + disks (MutableSequence[google.cloud.compute_v1beta.types.Disk]): + [Output Only] A list of disks contained in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of disks when the list is empty. + + This field is a member of `oneof`_ ``_warning``. """ - class ExternalManagedBackendBucketMigrationState(proto.Enum): - r"""Specifies the canary migration state for the backend buckets - attached to this forwarding rule. Possible values are PREPARE, - TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration - from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to - PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the - loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate traffic to - backend buckets attached to this forwarding rule by percentage using - externalManagedBackendBucketMigrationTestingPercentage. Rolling back - a migration requires the states to be set in reverse order. So - changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the - state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, - the TEST_BY_PERCENTAGE state can be used to migrate some traffic - back to EXTERNAL or PREPARE can be used to migrate all traffic back - to EXTERNAL. + disks: MutableSequence["Disk"] = proto.RepeatedField( + proto.MESSAGE, + number=95594102, + message="Disk", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) - Values: - UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE (0): - A value indicating that the enum field is not - set. - PREPARE (399612135): - No description available. - TEST_ALL_TRAFFIC (79728882): - No description available. - TEST_BY_PERCENTAGE (513738389): - No description available. - """ - UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE = 0 - PREPARE = 399612135 - TEST_ALL_TRAFFIC = 79728882 - TEST_BY_PERCENTAGE = 513738389 - class IPProtocolEnum(proto.Enum): - r"""The IP protocol to which this rule applies. For protocol forwarding, - valid options are TCP, UDP, ESP, AH, SCTP, ICMP and L3_DEFAULT. The - valid IP protocols are different for different load balancing - products as described in `Load balancing - features `__. +class DisksStartAsyncReplicationRequest(proto.Message): + r""" - Values: - UNDEFINED_I_P_PROTOCOL_ENUM (0): - A value indicating that the enum field is not - set. - AH (2087): - No description available. - ESP (68962): - No description available. - ICMP (2241597): - No description available. - L3_DEFAULT (48151369): - No description available. - SCTP (2539724): - No description available. - TCP (82881): - No description available. - UDP (83873): - No description available. - """ - UNDEFINED_I_P_PROTOCOL_ENUM = 0 - AH = 2087 - ESP = 68962 - ICMP = 2241597 - L3_DEFAULT = 48151369 - SCTP = 2539724 - TCP = 82881 - UDP = 83873 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class IpVersion(proto.Enum): - r"""The IP Version that will be used by this forwarding rule. - Valid options are IPV4 or IPV6. + Attributes: + async_secondary_disk (str): + The secondary disk to start asynchronous + replication to. You can provide this as a + partial or full URL to the resource. For + example, the following are valid values: - Values: - UNDEFINED_IP_VERSION (0): - A value indicating that the enum field is not - set. - IPV4 (2254341): - No description available. - IPV6 (2254343): - No description available. - UNSPECIFIED_VERSION (21850000): - No description available. - """ - UNDEFINED_IP_VERSION = 0 - IPV4 = 2254341 - IPV6 = 2254343 - UNSPECIFIED_VERSION = 21850000 - class LoadBalancingScheme(proto.Enum): - r"""Specifies the forwarding rule type. For more information - about forwarding rules, refer to Forwarding rule concepts. + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - Values: - UNDEFINED_LOAD_BALANCING_SCHEME (0): - A value indicating that the enum field is not - set. - EXTERNAL (35607499): - No description available. - EXTERNAL_MANAGED (512006923): - No description available. - INTERNAL (279295677): - No description available. - INTERNAL_MANAGED (37350397): - No description available. - INTERNAL_SELF_MANAGED (236211150): - No description available. - INVALID (530283991): - No description available. - """ - UNDEFINED_LOAD_BALANCING_SCHEME = 0 - EXTERNAL = 35607499 - EXTERNAL_MANAGED = 512006923 - INTERNAL = 279295677 - INTERNAL_MANAGED = 37350397 - INTERNAL_SELF_MANAGED = 236211150 - INVALID = 530283991 + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - class NetworkTier(proto.Enum): - r"""This signifies the networking tier used for configuring this - load balancer and can only take the following values: PREMIUM, - STANDARD. For regional ForwardingRule, the valid values are - PREMIUM and STANDARD. For GlobalForwardingRule, the valid value - is PREMIUM. If this field is not specified, it is assumed to be - PREMIUM. If IPAddress is specified, this value must be equal to - the networkTier of the Address. + - + projects/project/zones/zone/disks/disk - Values: - UNDEFINED_NETWORK_TIER (0): - A value indicating that the enum field is not - set. - FIXED_STANDARD (310464328): - Public internet quality with fixed bandwidth. - PREMIUM (399530551): - High quality, Google-grade network tier, - support for all networking products. - STANDARD (484642493): - Public internet quality, only limited support - for other networking products. - STANDARD_OVERRIDES_FIXED_STANDARD (465847234): - (Output only) Temporary tier for FIXED_STANDARD when fixed - standard tier is expired or not configured. - """ - UNDEFINED_NETWORK_TIER = 0 - FIXED_STANDARD = 310464328 - PREMIUM = 399530551 - STANDARD = 484642493 - STANDARD_OVERRIDES_FIXED_STANDARD = 465847234 + - + projects/project/regions/region/disks/disk - class PscConnectionStatus(proto.Enum): - r""" + - + zones/zone/disks/disk - Values: - UNDEFINED_PSC_CONNECTION_STATUS (0): - A value indicating that the enum field is not - set. - ACCEPTED (246714279): - The connection has been accepted by the - producer. - CLOSED (380163436): - The connection has been closed by the - producer and will not serve traffic going - forward. - NEEDS_ATTENTION (344491452): - The connection has been accepted by the - producer, but the producer needs to take further - action before the forwarding rule can serve - traffic. - PENDING (35394935): - The connection is pending acceptance by the - producer. - REJECTED (174130302): - The connection has been rejected by the - producer. - STATUS_UNSPECIFIED (42133066): - No description available. - """ - UNDEFINED_PSC_CONNECTION_STATUS = 0 - ACCEPTED = 246714279 - CLOSED = 380163436 - NEEDS_ATTENTION = 344491452 - PENDING = 35394935 - REJECTED = 174130302 - STATUS_UNSPECIFIED = 42133066 + - + regions/region/disks/disk - I_p_address: str = proto.Field( + This field is a member of `oneof`_ ``_async_secondary_disk``. + """ + + async_secondary_disk: str = proto.Field( proto.STRING, - number=42976943, + number=131645867, optional=True, ) - I_p_protocol: str = proto.Field( + + +class DisksStopGroupAsyncReplicationResource(proto.Message): + r"""A transient resource used in + compute.disks.stopGroupAsyncReplication and + compute.regionDisks.stopGroupAsyncReplication. It is only used + to process requests and is not persisted. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + resource_policy (str): + The URL of the DiskConsistencyGroupPolicy for + the group of disks to stop. This may be a full + or partial URL, such as: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + + - + projects/project/regions/region/resourcePolicies/resourcePolicy + + - + regions/region/resourcePolicies/resourcePolicy + + This field is a member of `oneof`_ ``_resource_policy``. + """ + + resource_policy: str = proto.Field( proto.STRING, - number=488094525, + number=159240835, optional=True, ) - all_ports: bool = proto.Field( + + +class DisplayDevice(proto.Message): + r"""A set of Display Device options + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + enable_display (bool): + Defines whether the instance has Display + enabled. + + This field is a member of `oneof`_ ``_enable_display``. + """ + + enable_display: bool = proto.Field( proto.BOOL, - number=445175796, + number=14266886, optional=True, ) - allow_global_access: bool = proto.Field( - proto.BOOL, - number=499409674, + + +class DistributionPolicy(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + target_shape (str): + The distribution shape to which the group + converges either proactively or on resize events + (depending on the value set + inupdatePolicy.instanceRedistributionType). + Check the TargetShape enum for the list of + possible values. + + This field is a member of `oneof`_ ``_target_shape``. + zones (MutableSequence[google.cloud.compute_v1beta.types.DistributionPolicyZoneConfiguration]): + Zones where the regional managed instance + group will create and manage its instances. + """ + + class TargetShape(proto.Enum): + r"""The distribution shape to which the group converges either + proactively or on resize events (depending on the value set + inupdatePolicy.instanceRedistributionType). + + Values: + UNDEFINED_TARGET_SHAPE (0): + A value indicating that the enum field is not + set. + ANY (64972): + The group picks zones for creating VM + instances to fulfill the requested number of VMs + within present resource constraints and to + maximize utilization of unused zonal + reservations. Recommended for batch workloads + that do not require high availability. + ANY_SINGLE_ZONE (61100880): + The group creates all VM instances within a + single zone. The zone is selected based on the + present resource constraints and to maximize + utilization of unused zonal reservations. + Recommended for batch workloads with heavy + interprocess communication. + BALANCED (468409608): + The group prioritizes acquisition of + resources, scheduling VMs in zones where + resources are available while distributing VMs + as evenly as possible across selected zones to + minimize the impact of zonal failure. + Recommended for highly available serving + workloads. + EVEN (2140442): + The group schedules VM instance creation and + deletion to achieve and maintain an even number + of managed instances across the selected zones. + The distribution is even when the number of + managed instances does not differ by more than 1 + between any two zones. Recommended for highly + available serving workloads. + """ + UNDEFINED_TARGET_SHAPE = 0 + ANY = 64972 + ANY_SINGLE_ZONE = 61100880 + BALANCED = 468409608 + EVEN = 2140442 + + target_shape: str = proto.Field( + proto.STRING, + number=338621299, optional=True, ) - allow_psc_global_access: bool = proto.Field( - proto.BOOL, - number=263471819, + zones: MutableSequence["DistributionPolicyZoneConfiguration"] = proto.RepeatedField( + proto.MESSAGE, + number=116085319, + message="DistributionPolicyZoneConfiguration", + ) + + +class DistributionPolicyZoneConfiguration(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + zone (str): + The URL of thezone. + The zone must exist in the region where the + managed instance group is located. + + This field is a member of `oneof`_ ``_zone``. + """ + + zone: str = proto.Field( + proto.STRING, + number=3744684, optional=True, ) - allow_psc_packet_injection: bool = proto.Field( - proto.BOOL, - number=272272565, + + +class Duration(proto.Message): + r"""A Duration represents a fixed-length span of time represented + as a count of seconds and fractions of seconds at nanosecond + resolution. It is independent of any calendar and concepts like + "day" or "month". Range is approximately 10,000 years. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + nanos (int): + Span of time that's a fraction of a second at nanosecond + resolution. Durations less than one second are represented + with a 0 ``seconds`` field and a positive ``nanos`` field. + Must be from 0 to 999,999,999 inclusive. + + This field is a member of `oneof`_ ``_nanos``. + seconds (int): + Span of time at a resolution of a second. Must be from 0 to + 315,576,000,000 inclusive. Note: these bounds are computed + from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 + days/year \* 10000 years + + This field is a member of `oneof`_ ``_seconds``. + """ + + nanos: int = proto.Field( + proto.INT32, + number=104586303, optional=True, ) - backend_service: str = proto.Field( + seconds: int = proto.Field( + proto.INT64, + number=359484031, + optional=True, + ) + + +class EnableXpnHostProjectRequest(proto.Message): + r"""A request message for Projects.EnableXpnHost. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + +class EnableXpnResourceProjectRequest(proto.Message): + r"""A request message for Projects.EnableXpnResource. 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. + projects_enable_xpn_resource_request_resource (google.cloud.compute_v1beta.types.ProjectsEnableXpnResourceRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + projects_enable_xpn_resource_request_resource: "ProjectsEnableXpnResourceRequest" = proto.Field( + proto.MESSAGE, + number=421980207, + message="ProjectsEnableXpnResourceRequest", + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + +class Error(proto.Message): + r"""Output only. Errors that prevented the ResizeRequest to be + fulfilled. + + Attributes: + errors (MutableSequence[google.cloud.compute_v1beta.types.Errors]): + [Output Only] The array of errors encountered while + processing this operation. + """ + + errors: MutableSequence["Errors"] = proto.RepeatedField( + proto.MESSAGE, + number=315977579, + message="Errors", + ) + + +class ErrorDetails(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + error_info (google.cloud.compute_v1beta.types.ErrorInfo): + + This field is a member of `oneof`_ ``_error_info``. + help_ (google.cloud.compute_v1beta.types.Help): + + This field is a member of `oneof`_ ``_help``. + localized_message (google.cloud.compute_v1beta.types.LocalizedMessage): + + This field is a member of `oneof`_ ``_localized_message``. + quota_info (google.cloud.compute_v1beta.types.QuotaExceededInfo): + + This field is a member of `oneof`_ ``_quota_info``. + """ + + error_info: "ErrorInfo" = proto.Field( + proto.MESSAGE, + number=25251973, + optional=True, + message="ErrorInfo", + ) + help_: "Help" = proto.Field( + proto.MESSAGE, + number=3198785, + optional=True, + message="Help", + ) + localized_message: "LocalizedMessage" = proto.Field( + proto.MESSAGE, + number=404537155, + optional=True, + message="LocalizedMessage", + ) + quota_info: "QuotaExceededInfo" = proto.Field( + proto.MESSAGE, + number=93923861, + optional=True, + message="QuotaExceededInfo", + ) + + +class ErrorInfo(proto.Message): + r"""Describes the cause of the error with structured details. + + Example of an error when contacting the "pubsub.googleapis.com" API + when it is not enabled: + + :: + + { "reason": "API_DISABLED" + "domain": "googleapis.com" + "metadata": { + "resource": "projects/123", + "service": "pubsub.googleapis.com" + } + } + + This response indicates that the pubsub.googleapis.com API is not + enabled. + + Example of an error that is returned when attempting to create a + Spanner instance in a region that is out of stock: + + :: + + { "reason": "STOCKOUT" + "domain": "spanner.googleapis.com", + "metadata": { + "availableRegions": "us-central1,us-east2" + } + } + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + domain (str): + The logical grouping to which the "reason" + belongs. The error domain is typically the + registered service name of the tool or product + that generates the error. Example: + "pubsub.googleapis.com". If the error is + generated by some common infrastructure, the + error domain must be a globally unique value + that identifies the infrastructure. For Google + API infrastructure, the error domain is + "googleapis.com". + + This field is a member of `oneof`_ ``_domain``. + metadatas (MutableMapping[str, str]): + Additional structured details about this error. + + Keys must match a regular expression of ``a-z+`` but should + ideally be lowerCamelCase. Also, they must be limited to 64 + characters in length. When identifying the current value of + an exceeded limit, the units should be contained in the key, + not the value. For example, rather than + ``{"instanceLimit": "100/request"}``, should be returned as, + ``{"instanceLimitPerRequest": "100"}``, if the client + exceeds the number of instances that can be created in a + single (batch) request. + reason (str): + The reason of the error. This is a constant value that + identifies the proximate cause of the error. Error reasons + are unique within a particular domain of errors. This should + be at most 63 characters and match a regular expression of + ``A-Z+[A-Z0-9]``, which represents UPPER_SNAKE_CASE. + + This field is a member of `oneof`_ ``_reason``. + """ + + domain: str = proto.Field( + proto.STRING, + number=284415172, + optional=True, + ) + metadatas: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=8514340, + ) + reason: str = proto.Field( + proto.STRING, + number=138777156, + optional=True, + ) + + +class Errors(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + code (str): + [Output Only] The error type identifier for this error. + + This field is a member of `oneof`_ ``_code``. + error_details (MutableSequence[google.cloud.compute_v1beta.types.ErrorDetails]): + [Output Only] An optional list of messages that contain the + error details. There is a set of defined message types to + use for providing details.The syntax depends on the error + code. For example, QuotaExceededInfo will have details when + the error code is QUOTA_EXCEEDED. + location (str): + [Output Only] Indicates the field in the request that caused + the error. This property is optional. + + This field is a member of `oneof`_ ``_location``. + message (str): + [Output Only] An optional, human-readable error message. + + This field is a member of `oneof`_ ``_message``. + """ + + code: str = proto.Field( + proto.STRING, + number=3059181, + optional=True, + ) + error_details: MutableSequence["ErrorDetails"] = proto.RepeatedField( + proto.MESSAGE, + number=274653963, + message="ErrorDetails", + ) + location: str = proto.Field( + proto.STRING, + number=290430901, + optional=True, + ) + message: str = proto.Field( + proto.STRING, + number=418054151, + optional=True, + ) + + +class ExchangedPeeringRoute(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dest_range (str): + The destination range of the route. + + This field is a member of `oneof`_ ``_dest_range``. + imported (bool): + True if the peering route has been imported + from a peer. The actual import happens if the + field networkPeering.importCustomRoutes is true + for this network, and + networkPeering.exportCustomRoutes is true for + the peer network, and the import does not result + in a route conflict. + + This field is a member of `oneof`_ ``_imported``. + next_hop_region (str): + The region of peering route next hop, only + applies to dynamic routes. + + This field is a member of `oneof`_ ``_next_hop_region``. + priority (int): + The priority of the peering route. + + This field is a member of `oneof`_ ``_priority``. + type_ (str): + The type of the peering route. + Check the Type enum for the list of possible + values. + + This field is a member of `oneof`_ ``_type``. + """ + + class Type(proto.Enum): + r"""The type of the peering route. + + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + DYNAMIC_PEERING_ROUTE (469794858): + For routes exported from local network. + STATIC_PEERING_ROUTE (473407545): + The peering route. + SUBNET_PEERING_ROUTE (465782504): + The peering route corresponding to subnetwork + range. + """ + UNDEFINED_TYPE = 0 + DYNAMIC_PEERING_ROUTE = 469794858 + STATIC_PEERING_ROUTE = 473407545 + SUBNET_PEERING_ROUTE = 465782504 + + dest_range: str = proto.Field( + proto.STRING, + number=381327712, + optional=True, + ) + imported: bool = proto.Field( + proto.BOOL, + number=114502404, + optional=True, + ) + next_hop_region: str = proto.Field( + proto.STRING, + number=122577014, + optional=True, + ) + priority: int = proto.Field( + proto.UINT32, + number=445151652, + optional=True, + ) + type_: str = proto.Field( + proto.STRING, + number=3575610, + optional=True, + ) + + +class ExchangedPeeringRoutesList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ExchangedPeeringRoute]): + A list of ExchangedPeeringRoute resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#exchangedPeeringRoutesList for exchanged + peering routes lists. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["ExchangedPeeringRoute"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="ExchangedPeeringRoute", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class ExpandIpCidrRangeSubnetworkRequest(proto.Message): + r"""A request message for Subnetworks.ExpandIpCidrRange. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + subnetwork (str): + Name of the Subnetwork resource to update. + subnetworks_expand_ip_cidr_range_request_resource (google.cloud.compute_v1beta.types.SubnetworksExpandIpCidrRangeRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=307827694, + ) + subnetworks_expand_ip_cidr_range_request_resource: "SubnetworksExpandIpCidrRangeRequest" = proto.Field( + proto.MESSAGE, + number=477014110, + message="SubnetworksExpandIpCidrRangeRequest", + ) + + +class Expr(proto.Message): + r"""Represents a textual expression in the Common Expression Language + (CEL) syntax. CEL is a C-like expression language. The syntax and + semantics of CEL are documented at + https://github.com/google/cel-spec. + + Example (Comparison): + + :: + + title: "Summary size limit" + description: "Determines if a summary is less than 100 chars" + expression: "document.summary.size() < 100" + + Example (Equality): + + :: + + title: "Requestor is owner" + description: "Determines if requestor is the document owner" + expression: "document.owner == request.auth.claims.email" + + Example (Logic): + + :: + + title: "Public documents" + description: "Determine whether the document should be publicly visible" + expression: "document.type != 'private' && document.type != 'internal'" + + Example (Data Manipulation): + + :: + + title: "Notification string" + description: "Create a notification string with a timestamp." + expression: "'New message received at ' + string(document.create_time)" + + The exact variables and functions that may be referenced within an + expression are determined by the service that evaluates it. See the + service documentation for additional information. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + description (str): + Optional. Description of the expression. This + is a longer text which describes the expression, + e.g. when hovered over it in a UI. + + This field is a member of `oneof`_ ``_description``. + expression (str): + Textual representation of an expression in + Common Expression Language syntax. + + This field is a member of `oneof`_ ``_expression``. + location (str): + Optional. String indicating the location of + the expression for error reporting, e.g. a file + name and a position in the file. + + This field is a member of `oneof`_ ``_location``. + title (str): + Optional. Title for the expression, i.e. a + short string describing its purpose. This can be + used e.g. in UIs which allow to enter the + expression. + + This field is a member of `oneof`_ ``_title``. + """ + + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + expression: str = proto.Field( + proto.STRING, + number=352031384, + optional=True, + ) + location: str = proto.Field( + proto.STRING, + number=290430901, + optional=True, + ) + title: str = proto.Field( + proto.STRING, + number=110371416, + optional=True, + ) + + +class ExternalVpnGateway(proto.Message): + r"""Represents an external VPN gateway. + + External VPN gateway is the on-premises VPN gateway(s) or + another cloud provider's VPN gateway that connects to your + Google Cloud VPN gateway. + + To create a highly available VPN from Google Cloud Platform to + your VPN gateway or another cloud provider's VPN gateway, you + must create a external VPN gateway resource with information + about the other gateway. + + For more information about using external VPN gateways, see + Creating an HA VPN gateway and tunnel pair to a peer VPN. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + interfaces (MutableSequence[google.cloud.compute_v1beta.types.ExternalVpnGatewayInterface]): + A list of interfaces for this external VPN + gateway. + If your peer-side gateway is an on-premises + gateway and non-AWS cloud providers' gateway, at + most two interfaces can be provided for an + external VPN gateway. If your peer side is an + AWS virtual private gateway, four interfaces + should be provided for an external VPN gateway. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#externalVpnGateway for externalVpnGateways. + + This field is a member of `oneof`_ ``_kind``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this ExternalVpnGateway, which is essentially a + hash of the labels set used for optimistic + locking. The fingerprint is initially generated + by Compute Engine and changes after every + request to modify or update labels. You must + always provide an up-to-date fingerprint hash in + order to update or change labels, otherwise the + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an ExternalVpnGateway. + + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels for this resource. These can only be + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. + Label values may be empty. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + redundancy_type (str): + Indicates the user-supplied redundancy type + of this external VPN gateway. Check the + RedundancyType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_redundancy_type``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. + """ + + class RedundancyType(proto.Enum): + r"""Indicates the user-supplied redundancy type of this external + VPN gateway. + + Values: + UNDEFINED_REDUNDANCY_TYPE (0): + A value indicating that the enum field is not + set. + FOUR_IPS_REDUNDANCY (520087913): + The external VPN gateway has four public IP addresses; at + the time of writing this API, the AWS virtual private + gateway is an example which has four public IP addresses for + high availability connections; there should be two VPN + connections in the AWS virtual private gateway , each AWS + VPN connection has two public IP addresses; please make sure + to put two public IP addresses from one AWS VPN connection + into interfaces 0 and 1 of this external VPN gateway, and + put the other two public IP addresses from another AWS VPN + connection into interfaces 2 and 3 of this external VPN + gateway. When displaying highly available configuration + status for the VPN tunnels connected to FOUR_IPS_REDUNDANCY + external VPN gateway, Google will always detect whether + interfaces 0 and 1 are connected on one interface of HA + Cloud VPN gateway, and detect whether interfaces 2 and 3 are + connected to another interface of the HA Cloud VPN gateway. + SINGLE_IP_INTERNALLY_REDUNDANT (133914873): + The external VPN gateway has only one public + IP address which internally provide redundancy + or failover. + TWO_IPS_REDUNDANCY (367049635): + The external VPN gateway has two public IP + addresses which are redundant with each other, + the following two types of setup on your + on-premises side would have this type of + redundancy: + + (1) Two separate on-premises gateways, each with + one public IP address, the two on-premises + gateways are redundant with each other. (2) A + single on-premise gateway with two public IP + addresses that are redundant with eatch + other. + """ + UNDEFINED_REDUNDANCY_TYPE = 0 + FOUR_IPS_REDUNDANCY = 520087913 + SINGLE_IP_INTERNALLY_REDUNDANT = 133914873 + TWO_IPS_REDUNDANCY = 367049635 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + interfaces: MutableSequence["ExternalVpnGatewayInterface"] = proto.RepeatedField( + proto.MESSAGE, + number=12073562, + message="ExternalVpnGatewayInterface", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + redundancy_type: str = proto.Field( + proto.STRING, + number=271443740, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + + +class ExternalVpnGatewayInterface(proto.Message): + r"""The interface for the external VPN gateway. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (int): + The numeric ID of this interface. The allowed input values + for this id for different redundancy types of external VPN + gateway: + + :: + + - SINGLE_IP_INTERNALLY_REDUNDANT - 0 + - TWO_IPS_REDUNDANCY - 0, 1 + - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 + + This field is a member of `oneof`_ ``_id``. + ip_address (str): + IP address of the interface in the external + VPN gateway. Only IPv4 is supported. This IP + address can be either from your on-premise + gateway or another Cloud provider's VPN gateway, + it cannot be an IP address from Google Compute + Engine. + + This field is a member of `oneof`_ ``_ip_address``. + ipv6_address (str): + IPv6 address of the interface in the external + VPN gateway. This IPv6 address can be either + from your on-premise gateway or another Cloud + provider's VPN gateway, it cannot be an IP + address from Google Compute Engine. Must specify + an IPv6 address (not IPV4-mapped) using any + format described in RFC 4291 (e.g. + 2001:db8:0:0:2d9:51:0:0). The output format is + RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). + + This field is a member of `oneof`_ ``_ipv6_address``. + """ + + id: int = proto.Field( + proto.UINT32, + number=3355, + optional=True, + ) + ip_address: str = proto.Field( + proto.STRING, + number=406272220, + optional=True, + ) + ipv6_address: str = proto.Field( + proto.STRING, + number=341563804, + optional=True, + ) + + +class ExternalVpnGatewayList(proto.Message): + r"""Response to the list request, and contains a list of + externalVpnGateways. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ExternalVpnGateway]): + A list of ExternalVpnGateway resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#externalVpnGatewayList for lists of + externalVpnGateways. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["ExternalVpnGateway"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="ExternalVpnGateway", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FileContentBuffer(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + content (str): + The raw content in the secure keys file. + + This field is a member of `oneof`_ ``_content``. + file_type (str): + The file type of source file. + Check the FileType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_file_type``. + """ + + class FileType(proto.Enum): + r"""The file type of source file. + + Values: + UNDEFINED_FILE_TYPE (0): + A value indicating that the enum field is not + set. + BIN (65767): + No description available. + UNDEFINED (137851184): + No description available. + X509 (2674086): + No description available. + """ + UNDEFINED_FILE_TYPE = 0 + BIN = 65767 + UNDEFINED = 137851184 + X509 = 2674086 + + content: str = proto.Field( + proto.STRING, + number=414659705, + optional=True, + ) + file_type: str = proto.Field( + proto.STRING, + number=294346781, + optional=True, + ) + + +class Firewall(proto.Message): + r"""Represents a Firewall Rule resource. + + Firewall rules allow or deny ingress traffic to, and egress + traffic from your instances. For more information, readFirewall + rules. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + allowed (MutableSequence[google.cloud.compute_v1beta.types.Allowed]): + The list of ALLOW rules specified by this + firewall. Each rule specifies a protocol and + port-range tuple that describes a permitted + connection. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + denied (MutableSequence[google.cloud.compute_v1beta.types.Denied]): + The list of DENY rules specified by this + firewall. Each rule specifies a protocol and + port-range tuple that describes a denied + connection. + description (str): + An optional description of this resource. + Provide this field when you create the resource. + + This field is a member of `oneof`_ ``_description``. + destination_ranges (MutableSequence[str]): + If destination ranges are specified, the + firewall rule applies only to traffic that has + destination IP address in these ranges. These + ranges must be expressed inCIDR format. Both + IPv4 and IPv6 are supported. + direction (str): + Direction of traffic to which this firewall applies, either + ``INGRESS`` or ``EGRESS``. The default is ``INGRESS``. For + ``EGRESS`` traffic, you cannot specify the sourceTags + fields. Check the Direction enum for the list of possible + values. + + This field is a member of `oneof`_ ``_direction``. + disabled (bool): + Denotes whether the firewall rule is + disabled. When set to true, the firewall rule is + not enforced and the network behaves as if it + did not exist. If this is unspecified, the + firewall rule will be enabled. + + This field is a member of `oneof`_ ``_disabled``. + enable_logging (bool): + Deprecated in favor of enable in LogConfig. + This field denotes whether to enable logging for + a particular firewall rule. If logging is + enabled, logs will be exported t Cloud Logging. + + This field is a member of `oneof`_ ``_enable_logging``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#firewall for firewall rules. + + This field is a member of `oneof`_ ``_kind``. + log_config (google.cloud.compute_v1beta.types.FirewallLogConfig): + This field denotes the logging options for a + particular firewall rule. If logging is enabled, + logs will be exported to Cloud Logging. + + This field is a member of `oneof`_ ``_log_config``. + name (str): + Name of the resource; provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be + a lowercase letter, and all following characters (except for + the last character) must be a dash, lowercase letter, or + digit. The last character must be a lowercase letter or + digit. + + This field is a member of `oneof`_ ``_name``. + network (str): + URL of the network resource for this firewall + rule. If not specified when creating a firewall + rule, the default network is used: + + global/networks/default + + If you choose to specify this field, you can + specify the network as a full or partial URL. + For example, the following are all valid URLs: + + - + https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network + - + projects/myproject/global/networks/my-network + - global/networks/default + + This field is a member of `oneof`_ ``_network``. + params (google.cloud.compute_v1beta.types.FirewallParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. + + This field is a member of `oneof`_ ``_params``. + priority (int): + Priority for this rule. This is an integer between ``0`` and + ``65535``, both inclusive. The default value is ``1000``. + Relative priorities determine which rule takes effect if + multiple rules apply. Lower values indicate higher priority. + For example, a rule with priority ``0`` has higher + precedence than a rule with priority ``1``. DENY rules take + precedence over ALLOW rules if they have equal priority. + Note that VPC networks have implied rules with a priority of + ``65535``. To avoid conflicts with the implied rules, use a + priority number less than ``65535``. + + This field is a member of `oneof`_ ``_priority``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + source_ranges (MutableSequence[str]): + If source ranges are specified, the firewall + rule applies only to traffic that has a source + IP address in these ranges. These ranges must be + expressed inCIDR format. One or both of + sourceRanges and sourceTags may be set. + If both fields are set, the rule applies to + traffic that has a source IP address within + sourceRanges OR a source IP from a resource with + a matching tag listed in thesourceTags field. + The connection does not need to match both + fields for the rule to + apply. Both IPv4 and IPv6 are supported. + source_service_accounts (MutableSequence[str]): + If source service accounts are specified, the + firewall rules apply only to traffic originating + from an instance with a service account in this + list. Source service accounts cannot be used to + control traffic to an instance's external IP + address because service accounts are associated + with an instance, not an IP address.sourceRanges + can be set at the same time + assourceServiceAccounts. If both are set, the + firewall applies to traffic that has a source IP + address within the sourceRanges OR a source IP + that belongs to an instance with service account + listed insourceServiceAccount. The connection + does not need to match both fields for the + firewall to apply.sourceServiceAccounts cannot + be used at the same time assourceTags or + targetTags. + source_tags (MutableSequence[str]): + If source tags are specified, the firewall + rule applies only to traffic with source IPs + that match the primary network interfaces of VM + instances that have the tag and are in the same + VPC network. Source tags cannot be used to + control traffic to an instance's external IP + address, it only applies to traffic between + instances in the same virtual network. Because + tags are associated with instances, not IP + addresses. One or both of sourceRanges and + sourceTags may be set. If both fields are set, + the firewall applies to traffic that has a + source IP address within sourceRanges OR a + source IP from a resource with a matching tag + listed in the sourceTags field. The connection + does not need to match both fields for the + firewall to apply. + target_service_accounts (MutableSequence[str]): + A list of service accounts indicating sets of instances + located in the network that may make network connections as + specified inallowed[].targetServiceAccounts cannot be used + at the same time astargetTags or sourceTags. If neither + targetServiceAccounts nor targetTags are specified, the + firewall rule applies to all instances on the specified + network. + target_tags (MutableSequence[str]): + A list of tags that controls which instances + the firewall rule applies to. If targetTags are + specified, then the firewall rule applies only + to instances in the VPC network that have one of + those tags. If no targetTags are specified, the + firewall rule applies to all instances on the + specified network. + """ + + class Direction(proto.Enum): + r"""Direction of traffic to which this firewall applies, either + ``INGRESS`` or ``EGRESS``. The default is ``INGRESS``. For + ``EGRESS`` traffic, you cannot specify the sourceTags fields. + + Values: + UNDEFINED_DIRECTION (0): + A value indicating that the enum field is not + set. + EGRESS (432880501): + Indicates that firewall should apply to + outgoing traffic. + INGRESS (516931221): + Indicates that firewall should apply to + incoming traffic. + """ + UNDEFINED_DIRECTION = 0 + EGRESS = 432880501 + INGRESS = 516931221 + + allowed: MutableSequence["Allowed"] = proto.RepeatedField( + proto.MESSAGE, + number=162398632, + message="Allowed", + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + denied: MutableSequence["Denied"] = proto.RepeatedField( + proto.MESSAGE, + number=275217307, + message="Denied", + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + destination_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=305699879, + ) + direction: str = proto.Field( + proto.STRING, + number=111150975, + optional=True, + ) + disabled: bool = proto.Field( + proto.BOOL, + number=270940796, + optional=True, + ) + enable_logging: bool = proto.Field( + proto.BOOL, + number=295396515, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + log_config: "FirewallLogConfig" = proto.Field( + proto.MESSAGE, + number=351299741, + optional=True, + message="FirewallLogConfig", + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + network: str = proto.Field( + proto.STRING, + number=232872494, + optional=True, + ) + params: "FirewallParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="FirewallParams", + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + source_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=200097658, + ) + source_service_accounts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=105100756, + ) + source_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=452222397, + ) + target_service_accounts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=457639710, + ) + target_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=62901767, + ) + + +class FirewallList(proto.Message): + r"""Contains a list of firewalls. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): + A list of Firewall resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#firewallList for lists of firewalls. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["Firewall"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Firewall", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FirewallLogConfig(proto.Message): + r"""The available logging options for a firewall rule. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + enable (bool): + This field denotes whether to enable logging + for a particular firewall rule. + + This field is a member of `oneof`_ ``_enable``. + metadata (str): + This field can only be specified for a + particular firewall rule if logging is enabled + for that rule. This field denotes whether to + include or exclude metadata for firewall logs. + Check the Metadata enum for the list of possible + values. + + This field is a member of `oneof`_ ``_metadata``. + """ + + class Metadata(proto.Enum): + r"""This field can only be specified for a particular firewall + rule if logging is enabled for that rule. This field denotes + whether to include or exclude metadata for firewall logs. + + Values: + UNDEFINED_METADATA (0): + A value indicating that the enum field is not + set. + EXCLUDE_ALL_METADATA (334519954): + No description available. + INCLUDE_ALL_METADATA (164619908): + No description available. + """ + UNDEFINED_METADATA = 0 + EXCLUDE_ALL_METADATA = 334519954 + INCLUDE_ALL_METADATA = 164619908 + + enable: bool = proto.Field( + proto.BOOL, + number=311764355, + optional=True, + ) + metadata: str = proto.Field( + proto.STRING, + number=86866735, + optional=True, + ) + + +class FirewallParams(proto.Message): + r"""Additional firewall parameters. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, + ) + + +class FirewallPoliciesListAssociationsResponse(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + associations (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyAssociation]): + A list of associations. + kind (str): + Output only. [Output Only] Type of firewallPolicy + associations. Alwayscompute#FirewallPoliciesListAssociations + for lists of firewallPolicy associations. + + This field is a member of `oneof`_ ``_kind``. + """ + + associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( + proto.MESSAGE, + number=508736530, + message="FirewallPolicyAssociation", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + + +class FirewallPoliciesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policies (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicy]): + A list of firewall policies contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of firewall policies when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + firewall_policies: MutableSequence["FirewallPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=392512943, + message="FirewallPolicy", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FirewallPolicy(proto.Message): + r"""Represents a Firewall Policy resource. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + associations (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyAssociation]): + A list of associations that belong to this + firewall policy. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + display_name (str): + Deprecated, please use short name instead. User-provided + name of the Organization firewall policy. The name should be + unique in the organization in which the firewall policy is + created. This field is not applicable to network firewall + policies. This name must be set on creation and cannot be + changed. The name must be 1-63 characters long, and comply + with RFC1035. Specifically, the name must be 1-63 characters + long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_display_name``. + fingerprint (str): + Specifies a fingerprint for this resource, + which is essentially a hash of the metadata's + contents and used for optimistic locking. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update metadata. You must always provide an + up-to-date fingerprint hash in order to update + or change metadata, otherwise the request will + fail with error412 conditionNotMet. + + To see the latest fingerprint, make get() + request to the firewall policy. + + This field is a member of `oneof`_ ``_fingerprint``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output only] Type of the resource. + Alwayscompute#firewallPolicyfor firewall policies + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. For Organization Firewall Policies + it's a [Output Only] numeric ID allocated by Google Cloud + which uniquely identifies the Organization Firewall Policy. + + This field is a member of `oneof`_ ``_name``. + packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + A list of packet mirroring rules that belong + to this policy. + parent (str): + Output only. [Output Only] The parent of the firewall + policy. This field is not applicable to network firewall + policies. + + This field is a member of `oneof`_ ``_parent``. + policy_source (str): + Indicates the source of this Firewall Policy. This field is + optional on creation and defaults to USER_DEFINED. + + The USER_DEFINED value indicates a regular firewall policy. + + The SYSTEM value indicates a system-level policy managed by + an internal service like GKE. This SYSTEM value is reserved + for internal services and cannot be set by users during + policy creation. Policies with a SYSTEM source cannot be + modified or deleted by users. Check the PolicySource enum + for the list of possible values. + + This field is a member of `oneof`_ ``_policy_source``. + policy_type (str): + The type of the firewall policy. This field can be + eitherVPC_POLICY or RDMA_ROCE_POLICY. + + Note: if not specified then VPC_POLICY will be used. Check + the PolicyType enum for the list of possible values. + + This field is a member of `oneof`_ ``_policy_type``. + region (str): + Output only. [Output Only] URL of the region where the + regional firewall policy resides. This field is not + applicable to global firewall policies. You must specify + this field as part of the HTTP request URL. It is not + settable as a field in the request body. + + This field is a member of `oneof`_ ``_region``. + rule_tuple_count (int): + Output only. [Output Only] Total count of all firewall + policy rule tuples. A firewall policy can not exceed a set + number of tuples. + + This field is a member of `oneof`_ ``_rule_tuple_count``. + rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + A list of rules that belong to this policy. There must + always be a default rule (rule with priority 2147483647 and + match "\*"). If no rules are provided when creating a + firewall policy, a default rule with action "allow" will be + added. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + short_name (str): + User-provided name of the Organization firewall policy. The + name should be unique in the organization in which the + firewall policy is created. This field is not applicable to + network firewall policies. This name must be set on creation + and cannot be changed. The name must be 1-63 characters + long, and comply with RFC1035. Specifically, the name must + be 1-63 characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_short_name``. + """ + + class PolicySource(proto.Enum): + r"""Indicates the source of this Firewall Policy. This field is optional + on creation and defaults to USER_DEFINED. + + The USER_DEFINED value indicates a regular firewall policy. + + The SYSTEM value indicates a system-level policy managed by an + internal service like GKE. This SYSTEM value is reserved for + internal services and cannot be set by users during policy creation. + Policies with a SYSTEM source cannot be modified or deleted by + users. + + Values: + UNDEFINED_POLICY_SOURCE (0): + A value indicating that the enum field is not + set. + SYSTEM (313484847): + No description available. + USER_DEFINED (491485557): + No description available. + """ + UNDEFINED_POLICY_SOURCE = 0 + SYSTEM = 313484847 + USER_DEFINED = 491485557 + + class PolicyType(proto.Enum): + r"""The type of the firewall policy. This field can be eitherVPC_POLICY + or RDMA_ROCE_POLICY. + + Note: if not specified then VPC_POLICY will be used. + + Values: + UNDEFINED_POLICY_TYPE (0): + A value indicating that the enum field is not + set. + RDMA_ROCE_POLICY (148757145): + No description available. + VPC_POLICY (74319208): + No description available. + """ + UNDEFINED_POLICY_TYPE = 0 + RDMA_ROCE_POLICY = 148757145 + VPC_POLICY = 74319208 + + associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( + proto.MESSAGE, + number=508736530, + message="FirewallPolicyAssociation", + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + display_name: str = proto.Field( + proto.STRING, + number=4473832, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=531644356, + message="FirewallPolicyRule", + ) + parent: str = proto.Field( + proto.STRING, + number=78317738, + optional=True, + ) + policy_source: str = proto.Field( + proto.STRING, + number=232383432, + optional=True, + ) + policy_type: str = proto.Field( + proto.STRING, + number=18158119, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + rule_tuple_count: int = proto.Field( + proto.INT32, + number=388342037, + optional=True, + ) + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=108873975, + message="FirewallPolicyRule", + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + short_name: str = proto.Field( + proto.STRING, + number=492051566, + optional=True, + ) + + +class FirewallPolicyAssociation(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + attachment_target (str): + The target that the firewall policy is + attached to. + + This field is a member of `oneof`_ ``_attachment_target``. + display_name (str): + [Output Only] Deprecated, please use short name instead. The + display name of the firewall policy of the association. + + This field is a member of `oneof`_ ``_display_name``. + firewall_policy_id (str): + Output only. [Output Only] The firewall policy ID of the + association. + + This field is a member of `oneof`_ ``_firewall_policy_id``. + name (str): + The name for an association. + + This field is a member of `oneof`_ ``_name``. + priority (int): + An integer indicating the priority of an association. The + priority must be a positive value between 1 and 2147483647. + Firewall Policies are evaluated from highest to lowest + priority where 1 is the highest priority and 2147483647 is + the lowest priority. The default value is ``1000``. If two + associations have the same priority then lexicographical + order on association names is applied. + + This field is a member of `oneof`_ ``_priority``. + short_name (str): + Output only. [Output Only] The short name of the firewall + policy of the association. + + This field is a member of `oneof`_ ``_short_name``. + """ + + attachment_target: str = proto.Field( + proto.STRING, + number=175773741, + optional=True, + ) + display_name: str = proto.Field( + proto.STRING, + number=4473832, + optional=True, + ) + firewall_policy_id: str = proto.Field( + proto.STRING, + number=357211849, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + short_name: str = proto.Field( + proto.STRING, + number=492051566, + optional=True, + ) + + +class FirewallPolicyList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicy]): + A list of FirewallPolicy resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#firewallPolicyList for listsof + FirewallPolicies + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["FirewallPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="FirewallPolicy", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FirewallPolicyRule(proto.Message): + r"""Represents a rule that describes one or more match conditions + along with the action to be taken when traffic matches this + condition (allow or deny). + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + action (str): + The Action to perform when the client connection triggers + the rule. Valid actions for firewall rules are: "allow", + "deny", "apply_security_profile_group" and "goto_next". + Valid actions for packet mirroring rules are: "mirror", + "do_not_mirror" and "goto_next". + + This field is a member of `oneof`_ ``_action``. + description (str): + An optional description for this resource. + + This field is a member of `oneof`_ ``_description``. + direction (str): + The direction in which this rule applies. + Check the Direction enum for the list of + possible values. + + This field is a member of `oneof`_ ``_direction``. + disabled (bool): + Denotes whether the firewall policy rule is + disabled. When set to true, the firewall policy + rule is not enforced and traffic behaves as if + it did not exist. If this is unspecified, the + firewall policy rule will be enabled. + + This field is a member of `oneof`_ ``_disabled``. + enable_logging (bool): + Denotes whether to enable logging for a particular rule. If + logging is enabled, logs will be exported to the configured + export destination in Stackdriver. Logs may be exported to + BigQuery or Pub/Sub. Note: you cannot enable logging on + "goto_next" rules. + + This field is a member of `oneof`_ ``_enable_logging``. + kind (str): + Output only. [Output only] Type of the resource. + Returnscompute#firewallPolicyRule for firewall rules + andcompute#packetMirroringRule for packet mirroring rules. + + This field is a member of `oneof`_ ``_kind``. + match (google.cloud.compute_v1beta.types.FirewallPolicyRuleMatcher): + A match condition that incoming traffic is + evaluated against. If it evaluates to true, the + corresponding 'action' is enforced. + + This field is a member of `oneof`_ ``_match``. + priority (int): + An integer indicating the priority of a rule + in the list. The priority must be a positive + value between 0 and 2147483647. Rules are + evaluated from highest to lowest priority where + 0 is the highest priority and 2147483647 is the + lowest priority. + + This field is a member of `oneof`_ ``_priority``. + rule_name (str): + An optional name for the rule. This field is + not a unique identifier and can be updated. + + This field is a member of `oneof`_ ``_rule_name``. + rule_tuple_count (int): + Output only. [Output Only] Calculation of the complexity of + a single firewall policy rule. + + This field is a member of `oneof`_ ``_rule_tuple_count``. + security_profile_group (str): + A fully-qualified URL of a SecurityProfile resource + instance. Example: + https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group + Must be specified if action is one of + 'apply_security_profile_group' or 'mirror'. Cannot be + specified for other actions. + + This field is a member of `oneof`_ ``_security_profile_group``. + target_forwarding_rules (MutableSequence[str]): + A list of forwarding rules to which this rule + applies. This field allows you to control which + load balancers get this rule. For example, the + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule + - projects/project/global/ + forwardingRules/forwardingRule + - + projects/project/regions/region/forwardingRules/ + forwardingRule + target_resources (MutableSequence[str]): + A list of network resource URLs to which this + rule applies. This field allows you to control + which network's VMs get this rule. If this + field is left blank, all VMs within the + organization will receive the rule. + target_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): + A list of secure tags that controls which instances the + firewall rule applies to. If targetSecureTag are specified, + then the firewall rule applies only to instances in the VPC + network that have one of those EFFECTIVE secure tags, if all + the target_secure_tag are in INEFFECTIVE state, then this + rule will be ignored.targetSecureTag may not be set at the + same time astargetServiceAccounts. If neither + targetServiceAccounts nortargetSecureTag are specified, the + firewall rule applies to all instances on the specified + network. Maximum number of target label tags allowed is 256. + target_service_accounts (MutableSequence[str]): + A list of service accounts indicating the + sets of instances that are applied with this + rule. + target_type (str): + Target types of the firewall policy rule. + Default value is INSTANCES. + Check the TargetType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_target_type``. + tls_inspect (bool): + Boolean flag indicating if the traffic should be TLS + decrypted. Can be set only if action = + 'apply_security_profile_group' and cannot be set for other + actions. + + This field is a member of `oneof`_ ``_tls_inspect``. + """ + + class Direction(proto.Enum): + r"""The direction in which this rule applies. + + Values: + UNDEFINED_DIRECTION (0): + A value indicating that the enum field is not + set. + EGRESS (432880501): + No description available. + INGRESS (516931221): + No description available. + """ + UNDEFINED_DIRECTION = 0 + EGRESS = 432880501 + INGRESS = 516931221 + + class TargetType(proto.Enum): + r"""Target types of the firewall policy rule. + Default value is INSTANCES. + + Values: + UNDEFINED_TARGET_TYPE (0): + A value indicating that the enum field is not + set. + INSTANCES (131337822): + No description available. + INTERNAL_MANAGED_LB (309241080): + No description available. + """ + UNDEFINED_TARGET_TYPE = 0 + INSTANCES = 131337822 + INTERNAL_MANAGED_LB = 309241080 + + action: str = proto.Field( + proto.STRING, + number=187661878, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + direction: str = proto.Field( + proto.STRING, + number=111150975, + optional=True, + ) + disabled: bool = proto.Field( + proto.BOOL, + number=270940796, + optional=True, + ) + enable_logging: bool = proto.Field( + proto.BOOL, + number=295396515, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + match: "FirewallPolicyRuleMatcher" = proto.Field( + proto.MESSAGE, + number=103668165, + optional=True, + message="FirewallPolicyRuleMatcher", + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + rule_name: str = proto.Field( + proto.STRING, + number=55286254, + optional=True, + ) + rule_tuple_count: int = proto.Field( + proto.INT32, + number=388342037, + optional=True, + ) + security_profile_group: str = proto.Field( + proto.STRING, + number=207411626, + optional=True, + ) + target_forwarding_rules: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=495923747, + ) + target_resources: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=528230647, + ) + target_secure_tags: MutableSequence[ + "FirewallPolicyRuleSecureTag" + ] = proto.RepeatedField( + proto.MESSAGE, + number=468132403, + message="FirewallPolicyRuleSecureTag", + ) + target_service_accounts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=457639710, + ) + target_type: str = proto.Field( + proto.STRING, + number=62925096, + optional=True, + ) + tls_inspect: bool = proto.Field( + proto.BOOL, + number=43425488, + optional=True, + ) + + +class FirewallPolicyRuleMatcher(proto.Message): + r"""Represents a match condition that incoming traffic is + evaluated against. Exactly one field must be specified. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dest_address_groups (MutableSequence[str]): + Address groups which should be matched + against the traffic destination. Maximum number + of destination address groups is 10. + dest_fqdns (MutableSequence[str]): + Fully Qualified Domain Name (FQDN) which + should be matched against traffic destination. + Maximum number of destination fqdn allowed is + 100. + dest_ip_ranges (MutableSequence[str]): + CIDR IP address range. + Maximum number of destination CIDR IP ranges + allowed is 5000. + dest_network_context (str): + Network context of the traffic destination. Allowed values + are: + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Check the DestNetworkContext enum for the list of possible + values. + + This field is a member of `oneof`_ ``_dest_network_context``. + dest_network_scope (str): + Network scope of the traffic destination. + Check the DestNetworkScope enum for the list of + possible values. + + This field is a member of `oneof`_ ``_dest_network_scope``. + dest_network_type (str): + Network type of the traffic destination. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Check the DestNetworkType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_dest_network_type``. + dest_region_codes (MutableSequence[str]): + Region codes whose IP addresses will be used + to match for destination of traffic. Should be + specified as 2 letter country code defined as + per ISO 3166 alpha-2 country codes. ex."US" + Maximum number of dest region codes allowed is + 5000. + dest_threat_intelligences (MutableSequence[str]): + Names of Network Threat Intelligence lists. + The IPs in these lists will be matched against + traffic destination. + layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleMatcherLayer4Config]): + Pairs of IP protocols and ports that the rule + should match. + src_address_groups (MutableSequence[str]): + Address groups which should be matched + against the traffic source. Maximum number of + source address groups is 10. + src_fqdns (MutableSequence[str]): + Fully Qualified Domain Name (FQDN) which + should be matched against traffic source. + Maximum number of source fqdn allowed is 100. + src_ip_ranges (MutableSequence[str]): + CIDR IP address range. + Maximum number of source CIDR IP ranges allowed + is 5000. + src_network_context (str): + Network context of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + + Check the SrcNetworkContext enum for the list of possible + values. + + This field is a member of `oneof`_ ``_src_network_context``. + src_network_scope (str): + Network scope of the traffic source. + Check the SrcNetworkScope enum for the list of + possible values. + + This field is a member of `oneof`_ ``_src_network_scope``. + src_network_type (str): + Network type of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + + Check the SrcNetworkType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_src_network_type``. + src_networks (MutableSequence[str]): + Networks of the traffic source. It can be + either a full or partial url. + src_region_codes (MutableSequence[str]): + Region codes whose IP addresses will be used + to match for source of traffic. Should be + specified as 2 letter country code defined as + per ISO 3166 alpha-2 country codes. ex."US" + Maximum number of source region codes allowed is + 5000. + src_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRuleSecureTag]): + List of secure tag values, which should be + matched at the source of the traffic. + For INGRESS rule, if all the srcSecureTag are + INEFFECTIVE, and there is no srcIpRange, this + rule will be ignored. Maximum number of source + tag values allowed is 256. + src_threat_intelligences (MutableSequence[str]): + Names of Network Threat Intelligence lists. + The IPs in these lists will be matched against + traffic source. + """ + + class DestNetworkContext(proto.Enum): + r"""Network context of the traffic destination. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Additional supported values which may be not listed in the enum + directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET + UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_DEST_NETWORK_CONTEXT (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_DEST_NETWORK_CONTEXT = 0 + + class DestNetworkScope(proto.Enum): + r"""Network scope of the traffic destination. Additional supported + values which may be not listed in the enum directly due to technical + reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_DEST_NETWORK_SCOPE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_DEST_NETWORK_SCOPE = 0 + + class DestNetworkType(proto.Enum): + r"""Network type of the traffic destination. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - NON_INTERNET + + Additional supported values which may be not listed in the enum + directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET + UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_DEST_NETWORK_TYPE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_DEST_NETWORK_TYPE = 0 + + class SrcNetworkContext(proto.Enum): + r"""Network context of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + + Additional supported values which may be not listed in the enum + directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET + UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_SRC_NETWORK_CONTEXT (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_SRC_NETWORK_CONTEXT = 0 + + class SrcNetworkScope(proto.Enum): + r"""Network scope of the traffic source. Additional supported values + which may be not listed in the enum directly due to technical + reasons: INTERNET INTRA_VPC NON_INTERNET UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_SRC_NETWORK_SCOPE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_SRC_NETWORK_SCOPE = 0 + + class SrcNetworkType(proto.Enum): + r"""Network type of the traffic source. Allowed values are: + + :: + + - UNSPECIFIED + - INTERNET + - INTRA_VPC + - NON_INTERNET + - VPC_NETWORKS + + Additional supported values which may be not listed in the enum + directly due to technical reasons: INTERNET INTRA_VPC NON_INTERNET + UNSPECIFIED VPC_NETWORKS + + Values: + UNDEFINED_SRC_NETWORK_TYPE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_SRC_NETWORK_TYPE = 0 + + dest_address_groups: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=468760508, + ) + dest_fqdns: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=370712737, + ) + dest_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=337357713, + ) + dest_network_context: str = proto.Field( + proto.STRING, + number=76347649, + optional=True, + ) + dest_network_scope: str = proto.Field( + proto.STRING, + number=355839526, + optional=True, + ) + dest_network_type: str = proto.Field( + proto.STRING, + number=409853224, + optional=True, + ) + dest_region_codes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=199120280, + ) + dest_threat_intelligences: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=119896492, + ) + layer4_configs: MutableSequence[ + "FirewallPolicyRuleMatcherLayer4Config" + ] = proto.RepeatedField( + proto.MESSAGE, + number=373534261, + message="FirewallPolicyRuleMatcherLayer4Config", + ) + src_address_groups: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=436423738, + ) + src_fqdns: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=435906147, + ) + src_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=432128083, + ) + src_network_context: str = proto.Field( + proto.STRING, + number=147649603, + optional=True, + ) + src_network_scope: str = proto.Field( + proto.STRING, + number=476025320, + optional=True, + ) + src_network_type: str = proto.Field( + proto.STRING, + number=309819686, + optional=True, + ) + src_networks: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=247119872, + ) + src_region_codes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=99086742, + ) + src_secure_tags: MutableSequence[ + "FirewallPolicyRuleSecureTag" + ] = proto.RepeatedField( + proto.MESSAGE, + number=508791302, + message="FirewallPolicyRuleSecureTag", + ) + src_threat_intelligences: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=323631018, + ) + + +class FirewallPolicyRuleMatcherLayer4Config(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + ip_protocol (str): + The IP protocol to which this rule applies. + The protocol type is required when creating a + firewall rule. This value can either be one of + the following well known protocol strings + (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP + protocol number. + + This field is a member of `oneof`_ ``_ip_protocol``. + ports (MutableSequence[str]): + An optional list of ports to which this rule applies. This + field is only applicable for UDP or TCP protocol. Each entry + must be either an integer or a range. If not specified, this + rule applies to connections through any port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. + """ + + ip_protocol: str = proto.Field( + proto.STRING, + number=475958960, + optional=True, + ) + ports: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=106854418, + ) + + +class FirewallPolicyRuleSecureTag(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + name (str): + Name of the secure tag, created with + TagManager's TagValue API. + + This field is a member of `oneof`_ ``_name``. + state (str): + Output only. [Output Only] State of the secure tag, either + ``EFFECTIVE`` or ``INEFFECTIVE``. A secure tag is + ``INEFFECTIVE`` when it is deleted or its network is + deleted. Check the State enum for the list of possible + values. + + This field is a member of `oneof`_ ``_state``. + """ + + class State(proto.Enum): + r"""Output only. [Output Only] State of the secure tag, either + ``EFFECTIVE`` or ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` + when it is deleted or its network is deleted. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + EFFECTIVE (244201863): + No description available. + INEFFECTIVE (304458242): + No description available. + """ + UNDEFINED_STATE = 0 + EFFECTIVE = 244201863 + INEFFECTIVE = 304458242 + + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + + +class FixedOrPercent(proto.Message): + r"""Encapsulates numeric value that can be either absolute or + relative. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + calculated (int): + Output only. [Output Only] Absolute value of VM instances + calculated based on the specific mode. + + :: + + - If the value is fixed, then the calculated + value is equal to the fixed value. + - If the value is a percent, then the + calculated + value is percent/100 * targetSize. For example, + the calculated value of a 80% of a managed instance group + with 150 instances would be (80/100 * 150) = 120 VM instances. If there + is a remainder, the number is rounded. + + This field is a member of `oneof`_ ``_calculated``. + fixed (int): + Specifies a fixed number of VM instances. + This must be a positive integer. + + This field is a member of `oneof`_ ``_fixed``. + percent (int): + Specifies a percentage of instances between 0 + to 100%, inclusive. For example, specify 80 for + 80%. + + This field is a member of `oneof`_ ``_percent``. + """ + + calculated: int = proto.Field( + proto.INT32, + number=472082878, + optional=True, + ) + fixed: int = proto.Field( + proto.INT32, + number=97445748, + optional=True, + ) + percent: int = proto.Field( + proto.INT32, + number=394814533, + optional=True, + ) + + +class FlexibleTimeRange(proto.Message): + r"""A flexible specification of a time range that has 3 points of + flexibility: (1) a flexible start time, (2) a flexible end time, + (3) a flexible duration. + + It is possible to specify a contradictory time range that cannot + be matched by any Interval. This causes a validation error. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + end_time_not_earlier_than (str): + + This field is a member of `oneof`_ ``_end_time_not_earlier_than``. + end_time_not_later_than (str): + + This field is a member of `oneof`_ ``_end_time_not_later_than``. + max_duration (str): + + This field is a member of `oneof`_ ``_max_duration``. + min_duration (str): + + This field is a member of `oneof`_ ``_min_duration``. + start_time_not_earlier_than (str): + + This field is a member of `oneof`_ ``_start_time_not_earlier_than``. + start_time_not_later_than (str): + + This field is a member of `oneof`_ ``_start_time_not_later_than``. + """ + + end_time_not_earlier_than: str = proto.Field( + proto.STRING, + number=83355642, + optional=True, + ) + end_time_not_later_than: str = proto.Field( + proto.STRING, + number=526866094, + optional=True, + ) + max_duration: str = proto.Field( + proto.STRING, + number=39954959, + optional=True, + ) + min_duration: str = proto.Field( + proto.STRING, + number=514381025, + optional=True, + ) + start_time_not_earlier_than: str = proto.Field( + proto.STRING, + number=490386497, + optional=True, + ) + start_time_not_later_than: str = proto.Field( + proto.STRING, + number=212764853, + optional=True, + ) + + +class ForwardingRule(proto.Message): + r"""Represents a Forwarding Rule resource. + + Forwarding rule resources in Google Cloud can be either regional or + global in scope: + + - `Global `__ + - `Regional `__ + + A forwarding rule and its corresponding IP address represent the + frontend configuration of a Google Cloud load balancer. Forwarding + rules can also reference target instances and Cloud VPN Classic + gateways (targetVpnGateway). + + For more information, read Forwarding rule concepts and Using + protocol forwarding. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + I_p_address (str): + IP address for which this forwarding rule accepts traffic. + When a client sends traffic to this IP address, the + forwarding rule directs the traffic to the referenced target + or backendService. While creating a forwarding rule, + specifying an IPAddress is required under the following + circumstances: + + :: + + - When the target is set to targetGrpcProxy andvalidateForProxyless is set to true, theIPAddress should be set to 0.0.0.0. + - When the target is a Private Service Connect Google APIs + bundle, you must specify an IPAddress. + + Otherwise, you can optionally specify an IP address that + references an existing static (reserved) IP address + resource. When omitted, Google Cloud assigns an ephemeral IP + address. + + Use one of the following formats to specify an IP address + while creating a forwarding rule: + + - IP address number, as in ``100.1.2.3`` + + - IPv6 address range, as in ``2600:1234::/96`` + + - Full resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name + + - Partial URL or by name, as in: + + - projects/project_id/regions/region/addresses/address-name + - regions/region/addresses/address-name + - global/addresses/address-name + - address-name + + The forwarding rule's target or backendService, and in most + cases, also the loadBalancingScheme, determine the type of + IP address that you can use. For detailed information, see + `IP address + specifications `__. + + When reading an IPAddress, the API always returns the IP + address number. + + This field is a member of `oneof`_ ``_I_p_address``. + I_p_protocol (str): + The IP protocol to which this rule applies. + + For protocol forwarding, valid options are TCP, UDP, ESP,AH, + SCTP, ICMP andL3_DEFAULT. + + The valid IP protocols are different for different load + balancing products as described in `Load balancing + features `__. + Check the IPProtocolEnum enum for the list of possible + values. + + This field is a member of `oneof`_ ``_I_p_protocol``. + all_ports (bool): + The ports, portRange, and allPorts fields are mutually + exclusive. Only packets addressed to ports in the specified + range will be forwarded to the backends configured with this + forwarding rule. + + The allPorts field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, SCTP, or L3_DEFAULT. + - It's applicable only to the following products: internal passthrough + Network Load Balancers, backend service-based external passthrough Network + Load Balancers, and internal and external protocol forwarding. + - Set this field to true to allow packets addressed to any port or + packets lacking destination port information (for example, UDP fragments + after the first fragment) to be forwarded to the backends configured with + this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to true. + + This field is a member of `oneof`_ ``_all_ports``. + allow_global_access (bool): + If set to true, clients can access the internal passthrough + Network Load Balancers, the regional internal Application + Load Balancer, and the regional internal proxy Network Load + Balancer from all regions. If false, only allows access from + the local region the load balancer is located at. Note that + for INTERNAL_MANAGED forwarding rules, this field cannot be + changed after the forwarding rule is created. + + This field is a member of `oneof`_ ``_allow_global_access``. + allow_psc_global_access (bool): + This is used in PSC consumer ForwardingRule + to control whether the PSC endpoint can be + accessed from another region. + + This field is a member of `oneof`_ ``_allow_psc_global_access``. + allow_psc_packet_injection (bool): + This is used in PSC consumer ForwardingRule to control + whether the producer is allowed to inject packets into the + consumer's network. If set to true, the target service + attachment must have tunneling enabled and + TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC + forwarding rules should not use this field. + + This field was never released to any customers and is + deprecated and will be removed in the future. + + This field is a member of `oneof`_ ``_allow_psc_packet_injection``. + backend_service (str): + Identifies the backend service to which the + forwarding rule sends traffic. Required for + internal and external passthrough Network Load + Balancers; must be omitted for all other load + balancer types. + + This field is a member of `oneof`_ ``_backend_service``. + base_forwarding_rule (str): + Output only. [Output Only] The URL for the corresponding + base forwarding rule. By base forwarding rule, we mean the + forwarding rule that has the same IP address, protocol, and + port settings with the current forwarding rule, but without + sourceIPRanges specified. Always empty if the current + forwarding rule does not have sourceIPRanges specified. + + This field is a member of `oneof`_ ``_base_forwarding_rule``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + external_managed_backend_bucket_migration_state (str): + Specifies the canary migration state for the backend buckets + attached to this forwarding rule. Possible values are + PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, + the state must be changed to PREPARE. The state must be + changed to TEST_ALL_TRAFFIC before the loadBalancingScheme + can be changed to EXTERNAL_MANAGED. Optionally, the + TEST_BY_PERCENTAGE state can be used to migrate traffic to + backend buckets attached to this forwarding rule by + percentage using + externalManagedBackendBucketMigrationTestingPercentage. + + Rolling back a migration requires the states to be set in + reverse order. So changing the scheme from EXTERNAL_MANAGED + to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC + at the same time. Optionally, the TEST_BY_PERCENTAGE state + can be used to migrate some traffic back to EXTERNAL or + PREPARE can be used to migrate all traffic back to EXTERNAL. + Check the ExternalManagedBackendBucketMigrationState enum + for the list of possible values. + + This field is a member of `oneof`_ ``_external_managed_backend_bucket_migration_state``. + external_managed_backend_bucket_migration_testing_percentage (float): + Determines the fraction of requests to backend buckets that + should be processed by the global external Application Load + Balancer. + + The value of this field must be in the range [0, 100]. + + This value can only be set if the loadBalancingScheme in the + BackendService is set to EXTERNAL (when using the classic + Application Load Balancer) and the migration state is + TEST_BY_PERCENTAGE. + + This field is a member of `oneof`_ ``_external_managed_backend_bucket_migration_testing_percentage``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a ForwardingRule. Include + the fingerprint in patch request to ensure that + you do not overwrite changes that were applied + from another concurrent request. + + To see the latest fingerprint, make a get() + request to retrieve a ForwardingRule. + + This field is a member of `oneof`_ ``_fingerprint``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + ip_collection (str): + Resource reference of a PublicDelegatedPrefix. The PDP must + be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. + + Use one of the following formats to specify a sub-PDP when + creating an IPv6 NetLB forwarding rule using BYOIP: Full + resource URL, as + inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name + Partial URL, as in: + + :: + + - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name + - regions/region/publicDelegatedPrefixes/sub-pdp-name + + This field is a member of `oneof`_ ``_ip_collection``. + ip_version (str): + The IP Version that will be used by this + forwarding rule. Valid options are IPV4 or + IPV6. Check the IpVersion enum for the list of + possible values. + + This field is a member of `oneof`_ ``_ip_version``. + is_mirroring_collector (bool): + Indicates whether or not this load balancer + can be used as a collector for packet mirroring. + To prevent mirroring loops, instances behind + this load balancer will not have their traffic + mirrored even if aPacketMirroring rule applies + to them. This can only be set to true for load + balancers that have theirloadBalancingScheme set + to INTERNAL. + + This field is a member of `oneof`_ ``_is_mirroring_collector``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#forwardingRule for forwarding rule resources. + + This field is a member of `oneof`_ ``_kind``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this resource, which is essentially a hash of + the labels set used for optimistic locking. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You must always provide an + up-to-date fingerprint hash in order to update + or change labels, otherwise the request will + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a ForwardingRule. + + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels for this resource. These can only be + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. + Label values may be empty. + load_balancing_scheme (str): + Specifies the forwarding rule type. + + For more information about forwarding rules, + refer to Forwarding rule concepts. + Check the LoadBalancingScheme enum for the list + of possible values. + + This field is a member of `oneof`_ ``_load_balancing_scheme``. + metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): + Opaque filter criteria used by load balancer to restrict + routing configuration to a limited set of xDS compliant + clients. In their xDS requests to load balancer, xDS clients + present node metadata. When there is a match, the relevant + configuration is made available to those proxies. Otherwise, + all the resources (e.g.TargetHttpProxy, UrlMap) referenced + by the ForwardingRule are not visible to those proxies. + + For each metadataFilter in this list, if + itsfilterMatchCriteria is set to MATCH_ANY, at least one of + thefilterLabels must match the corresponding label provided + in the metadata. If its filterMatchCriteria is set to + MATCH_ALL, then all of its filterLabels must match with + corresponding labels provided in the metadata. If + multiplemetadataFilters are specified, all of them need to + be satisfied in order to be considered a match. + + metadataFilters specified here will be applifed before those + specified in the UrlMap that thisForwardingRule references. + + metadataFilters only applies to Loadbalancers that have + their loadBalancingScheme set toINTERNAL_SELF_MANAGED. + name (str): + Name of the resource; provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + For Private Service Connect forwarding rules that forward + traffic to Google APIs, the forwarding rule name must be a + 1-20 characters string with lowercase letters and numbers + and must start with a letter. + + This field is a member of `oneof`_ ``_name``. + network (str): + This field is not used for global external + load balancing. + For internal passthrough Network Load Balancers, + this field identifies the network that the load + balanced IP should belong to for this forwarding + rule. + If the subnetwork is specified, the network of + the subnetwork will be used. If neither + subnetwork nor this field is specified, the + default network will be used. + + For Private Service Connect forwarding rules + that forward traffic to Google APIs, a network + must be provided. + + This field is a member of `oneof`_ ``_network``. + network_tier (str): + This signifies the networking tier used for + configuring this load balancer and can only take + the following values:PREMIUM, STANDARD. + + For regional ForwardingRule, the valid values + are PREMIUM andSTANDARD. For + GlobalForwardingRule, the valid value isPREMIUM. + + If this field is not specified, it is assumed to + be PREMIUM. If IPAddress is specified, this + value must be equal to the networkTier of the + Address. + Check the NetworkTier enum for the list of + possible values. + + This field is a member of `oneof`_ ``_network_tier``. + no_automate_dns_zone (bool): + This is used in PSC consumer ForwardingRule + to control whether it should try to + auto-generate a DNS zone or not. Non-PSC + forwarding rules do not use this field. Once + set, this field is not mutable. + + This field is a member of `oneof`_ ``_no_automate_dns_zone``. + port_range (str): + The ports, portRange, and allPorts fields are mutually + exclusive. Only packets addressed to ports in the specified + range will be forwarded to the backends configured with this + forwarding rule. + + The portRange field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, or SCTP, and + - It's applicable only to the following products: external passthrough + Network Load Balancers, internal and external proxy Network Load Balancers, + internal and external Application Load Balancers, external protocol + forwarding, and Classic VPN. + - Some products have restrictions on what ports can be used. See + port specifications for details. + + For external forwarding rules, two or more forwarding rules + cannot use the same [IPAddress, IPProtocol] pair, and cannot + have overlappingportRanges. + + For internal forwarding rules within the same VPC network, + two or more forwarding rules cannot use the same [IPAddress, + IPProtocol] pair, and cannot have overlapping portRanges. + + @pattern: \\d+(?:-\\d+)? + + This field is a member of `oneof`_ ``_port_range``. + ports (MutableSequence[str]): + The ports, portRange, and allPorts fields are mutually + exclusive. Only packets addressed to ports in the specified + range will be forwarded to the backends configured with this + forwarding rule. + + The ports field has the following limitations: + + :: + + - It requires that the forwarding rule IPProtocol be TCP, + UDP, or SCTP, and + - It's applicable only to the following products: internal passthrough + Network Load Balancers, backend service-based external passthrough Network + Load Balancers, and internal protocol forwarding. + - You can specify a list of up to five ports by number, separated by + commas. The ports can be contiguous or discontiguous. + + For external forwarding rules, two or more forwarding rules + cannot use the same [IPAddress, IPProtocol] pair if they + share at least one port number. + + For internal forwarding rules within the same VPC network, + two or more forwarding rules cannot use the same [IPAddress, + IPProtocol] pair if they share at least one port number. + + @pattern: \\d+(?:-\\d+)? + psc_connection_id (int): + [Output Only] The PSC connection id of the PSC forwarding + rule. + + This field is a member of `oneof`_ ``_psc_connection_id``. + psc_connection_status (str): + Check the PscConnectionStatus enum for the + list of possible values. + + This field is a member of `oneof`_ ``_psc_connection_status``. + region (str): + Output only. [Output Only] URL of the region where the + regional forwarding rule resides. This field is not + applicable to global forwarding rules. You must specify this + field as part of the HTTP request URL. It is not settable as + a field in the request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + service_directory_registrations (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRuleServiceDirectoryRegistration]): + Service Directory resources to register this + forwarding rule with. Currently, only supports a + single Service Directory resource. + service_label (str): + An optional prefix to the service name for this forwarding + rule. If specified, the prefix is the first label of the + fully qualified service name. + + The label must be 1-63 characters long, and comply + withRFC1035. Specifically, the label must be 1-63 characters + long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is only used for internal load balancing. + + This field is a member of `oneof`_ ``_service_label``. + service_name (str): + [Output Only] The internal fully qualified service name for + this forwarding rule. + + This field is only used for internal load balancing. + + This field is a member of `oneof`_ ``_service_name``. + source_ip_ranges (MutableSequence[str]): + If not empty, this forwarding rule will only forward the + traffic when the source IP address matches one of the IP + addresses or CIDR ranges set here. Note that a forwarding + rule can only have up to 64 source IP ranges, and this field + can only be used with a regional forwarding rule whose + scheme isEXTERNAL. Each source_ip_range entry should be + either an IP address (for example, 1.2.3.4) or a CIDR range + (for example, 1.2.3.0/24). + subnetwork (str): + This field identifies the subnetwork that the + load balanced IP should belong to for this + forwarding rule, used with internal load + balancers and external passthrough Network Load + Balancers with IPv6. + + If the network specified is in auto subnet mode, + this field is optional. However, a subnetwork + must be specified if the network is in custom + subnet mode or when creating external forwarding + rule with IPv6. + + This field is a member of `oneof`_ ``_subnetwork``. + target (str): + The URL of the target resource to receive the matched + traffic. For regional forwarding rules, this target must be + in the same region as the forwarding rule. For global + forwarding rules, this target must be a global load + balancing resource. + + The forwarded traffic must be of a type appropriate to the + target object. + + :: + + - For load balancers, see the "Target" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). + - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle: + + + - vpc-sc - APIs that support VPC Service Controls. + - all-apis - All supported Google APIs. + + + - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment. + + This field is a member of `oneof`_ ``_target``. + """ + + class ExternalManagedBackendBucketMigrationState(proto.Enum): + r"""Specifies the canary migration state for the backend buckets + attached to this forwarding rule. Possible values are PREPARE, + TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. + + To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state + must be changed to PREPARE. The state must be changed to + TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to + EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be + used to migrate traffic to backend buckets attached to this + forwarding rule by percentage using + externalManagedBackendBucketMigrationTestingPercentage. + + Rolling back a migration requires the states to be set in reverse + order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL + requires the state to be set to TEST_ALL_TRAFFIC at the same time. + Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some + traffic back to EXTERNAL or PREPARE can be used to migrate all + traffic back to EXTERNAL. + + Values: + UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE (0): + A value indicating that the enum field is not + set. + PREPARE (399612135): + No description available. + TEST_ALL_TRAFFIC (79728882): + No description available. + TEST_BY_PERCENTAGE (513738389): + No description available. + """ + UNDEFINED_EXTERNAL_MANAGED_BACKEND_BUCKET_MIGRATION_STATE = 0 + PREPARE = 399612135 + TEST_ALL_TRAFFIC = 79728882 + TEST_BY_PERCENTAGE = 513738389 + + class IPProtocolEnum(proto.Enum): + r"""The IP protocol to which this rule applies. + + For protocol forwarding, valid options are TCP, UDP, ESP,AH, SCTP, + ICMP andL3_DEFAULT. + + The valid IP protocols are different for different load balancing + products as described in `Load balancing + features `__. + + Values: + UNDEFINED_I_P_PROTOCOL_ENUM (0): + A value indicating that the enum field is not + set. + AH (2087): + No description available. + ESP (68962): + No description available. + ICMP (2241597): + No description available. + L3_DEFAULT (48151369): + No description available. + SCTP (2539724): + No description available. + TCP (82881): + No description available. + UDP (83873): + No description available. + """ + UNDEFINED_I_P_PROTOCOL_ENUM = 0 + AH = 2087 + ESP = 68962 + ICMP = 2241597 + L3_DEFAULT = 48151369 + SCTP = 2539724 + TCP = 82881 + UDP = 83873 + + class IpVersion(proto.Enum): + r"""The IP Version that will be used by this forwarding rule. + Valid options are IPV4 or IPV6. + + Values: + UNDEFINED_IP_VERSION (0): + A value indicating that the enum field is not + set. + IPV4 (2254341): + No description available. + IPV6 (2254343): + No description available. + UNSPECIFIED_VERSION (21850000): + No description available. + """ + UNDEFINED_IP_VERSION = 0 + IPV4 = 2254341 + IPV6 = 2254343 + UNSPECIFIED_VERSION = 21850000 + + class LoadBalancingScheme(proto.Enum): + r"""Specifies the forwarding rule type. + + For more information about forwarding rules, refer to Forwarding + rule concepts. + + Values: + UNDEFINED_LOAD_BALANCING_SCHEME (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + No description available. + EXTERNAL_MANAGED (512006923): + No description available. + INTERNAL (279295677): + No description available. + INTERNAL_MANAGED (37350397): + No description available. + INTERNAL_SELF_MANAGED (236211150): + No description available. + INVALID (530283991): + No description available. + """ + UNDEFINED_LOAD_BALANCING_SCHEME = 0 + EXTERNAL = 35607499 + EXTERNAL_MANAGED = 512006923 + INTERNAL = 279295677 + INTERNAL_MANAGED = 37350397 + INTERNAL_SELF_MANAGED = 236211150 + INVALID = 530283991 + + class NetworkTier(proto.Enum): + r"""This signifies the networking tier used for configuring + this load balancer and can only take the following + values:PREMIUM, STANDARD. + + For regional ForwardingRule, the valid values are PREMIUM + andSTANDARD. For GlobalForwardingRule, the valid value + isPREMIUM. + + If this field is not specified, it is assumed to be PREMIUM. If + IPAddress is specified, this value must be equal to the + networkTier of the Address. + + Values: + UNDEFINED_NETWORK_TIER (0): + A value indicating that the enum field is not + set. + FIXED_STANDARD (310464328): + Public internet quality with fixed bandwidth. + PREMIUM (399530551): + High quality, Google-grade network tier, + support for all networking products. + STANDARD (484642493): + Public internet quality, only limited support + for other networking products. + STANDARD_OVERRIDES_FIXED_STANDARD (465847234): + (Output only) Temporary tier for FIXED_STANDARD when fixed + standard tier is expired or not configured. + """ + UNDEFINED_NETWORK_TIER = 0 + FIXED_STANDARD = 310464328 + PREMIUM = 399530551 + STANDARD = 484642493 + STANDARD_OVERRIDES_FIXED_STANDARD = 465847234 + + class PscConnectionStatus(proto.Enum): + r""" + + Values: + UNDEFINED_PSC_CONNECTION_STATUS (0): + A value indicating that the enum field is not + set. + ACCEPTED (246714279): + The connection has been accepted by the + producer. + CLOSED (380163436): + The connection has been closed by the + producer and will not serve traffic going + forward. + NEEDS_ATTENTION (344491452): + The connection has been accepted by the + producer, but the producer needs to take further + action before the forwarding rule can serve + traffic. + PENDING (35394935): + The connection is pending acceptance by the + producer. + REJECTED (174130302): + The connection has been rejected by the + producer. + STATUS_UNSPECIFIED (42133066): + No description available. + """ + UNDEFINED_PSC_CONNECTION_STATUS = 0 + ACCEPTED = 246714279 + CLOSED = 380163436 + NEEDS_ATTENTION = 344491452 + PENDING = 35394935 + REJECTED = 174130302 + STATUS_UNSPECIFIED = 42133066 + + I_p_address: str = proto.Field( + proto.STRING, + number=42976943, + optional=True, + ) + I_p_protocol: str = proto.Field( + proto.STRING, + number=488094525, + optional=True, + ) + all_ports: bool = proto.Field( + proto.BOOL, + number=445175796, + optional=True, + ) + allow_global_access: bool = proto.Field( + proto.BOOL, + number=499409674, + optional=True, + ) + allow_psc_global_access: bool = proto.Field( + proto.BOOL, + number=263471819, + optional=True, + ) + allow_psc_packet_injection: bool = proto.Field( + proto.BOOL, + number=272272565, + optional=True, + ) + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + optional=True, + ) + base_forwarding_rule: str = proto.Field( + proto.STRING, + number=524873104, + optional=True, + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + external_managed_backend_bucket_migration_state: str = proto.Field( + proto.STRING, + number=107811370, + optional=True, + ) + external_managed_backend_bucket_migration_testing_percentage: float = proto.Field( + proto.FLOAT, + number=105676592, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + ip_collection: str = proto.Field( + proto.STRING, + number=176818358, + optional=True, + ) + ip_version: str = proto.Field( + proto.STRING, + number=294959552, + optional=True, + ) + is_mirroring_collector: bool = proto.Field( + proto.BOOL, + number=119255164, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, + ) + load_balancing_scheme: str = proto.Field( + proto.STRING, + number=363890244, + optional=True, + ) + metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( + proto.MESSAGE, + number=464725739, + message="MetadataFilter", + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + network: str = proto.Field( + proto.STRING, + number=232872494, + optional=True, + ) + network_tier: str = proto.Field( + proto.STRING, + number=517397843, + optional=True, + ) + no_automate_dns_zone: bool = proto.Field( + proto.BOOL, + number=64546991, + optional=True, + ) + port_range: str = proto.Field( + proto.STRING, + number=217518079, + optional=True, + ) + ports: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=106854418, + ) + psc_connection_id: int = proto.Field( + proto.UINT64, + number=292082397, + optional=True, + ) + psc_connection_status: str = proto.Field( + proto.STRING, + number=184149172, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + service_directory_registrations: MutableSequence[ + "ForwardingRuleServiceDirectoryRegistration" + ] = proto.RepeatedField( + proto.MESSAGE, + number=223549694, + message="ForwardingRuleServiceDirectoryRegistration", + ) + service_label: str = proto.Field( + proto.STRING, + number=417008874, + optional=True, + ) + service_name: str = proto.Field( + proto.STRING, + number=359880149, + optional=True, + ) + source_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=111563210, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=307827694, + optional=True, + ) + target: str = proto.Field( + proto.STRING, + number=192835985, + optional=True, + ) + + +class ForwardingRuleAggregatedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.ForwardingRulesScopedList]): + A list of ForwardingRulesScopedList + resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#forwardingRuleAggregatedList for lists of + forwarding rules. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "ForwardingRulesScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="ForwardingRulesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class ForwardingRuleList(proto.Message): + r"""Contains a list of ForwardingRule resources. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRule]): + A list of ForwardingRule resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["ForwardingRule"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="ForwardingRule", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class ForwardingRuleReference(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + forwarding_rule (str): + + This field is a member of `oneof`_ ``_forwarding_rule``. + """ + + forwarding_rule: str = proto.Field( + proto.STRING, + number=269964030, + optional=True, + ) + + +class ForwardingRuleServiceDirectoryRegistration(proto.Message): + r"""Describes the auto-registration of the forwarding rule to + Service Directory. The region and project of the Service + Directory resource generated from this registration will be the + same as this forwarding rule. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + namespace (str): + Service Directory namespace to register the + forwarding rule under. + + This field is a member of `oneof`_ ``_namespace``. + service (str): + Service Directory service to register the + forwarding rule under. + + This field is a member of `oneof`_ ``_service``. + service_directory_region (str): + [Optional] Service Directory region to register this global + forwarding rule under. Default to "us-central1". Only used + for PSC for Google APIs. All PSC for Google APIs forwarding + rules on the same network should use the same Service + Directory region. + + This field is a member of `oneof`_ ``_service_directory_region``. + """ + + namespace: str = proto.Field( + proto.STRING, + number=178476379, + optional=True, + ) + service: str = proto.Field( + proto.STRING, + number=373540533, + optional=True, + ) + service_directory_region: str = proto.Field( + proto.STRING, + number=74030416, + optional=True, + ) + + +class ForwardingRulesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + forwarding_rules (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRule]): + A list of forwarding rules contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of forwarding rules when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + forwarding_rules: MutableSequence["ForwardingRule"] = proto.RepeatedField( + proto.MESSAGE, + number=315821365, + message="ForwardingRule", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FutureReservation(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + aggregate_reservation (google.cloud.compute_v1beta.types.AllocationAggregateReservation): + Aggregate reservation details for the future + reservation. + + This field is a member of `oneof`_ ``_aggregate_reservation``. + auto_created_reservations_delete_time (str): + Future timestamp when the FR auto-created + reservations will be deleted by Compute Engine. + Format of this field must be a valid + href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 + value. + + This field is a member of `oneof`_ ``_auto_created_reservations_delete_time``. + auto_created_reservations_duration (google.cloud.compute_v1beta.types.Duration): + Specifies the duration of auto-created reservations. It + represents relative time to future reservation start_time + when auto-created reservations will be automatically deleted + by Compute Engine. Duration time unit is represented as a + count of seconds and fractions of seconds at nanosecond + resolution. + + This field is a member of `oneof`_ ``_auto_created_reservations_duration``. + auto_delete_auto_created_reservations (bool): + Setting for enabling or disabling automatic deletion for + auto-created reservation. If set to true, auto-created + reservations will be deleted at Future Reservation's end + time (default) or at user's defined timestamp if any of the + [auto_created_reservations_delete_time, + auto_created_reservations_duration] values is specified. For + keeping auto-created reservation indefinitely, this value + should be set to false. + + This field is a member of `oneof`_ ``_auto_delete_auto_created_reservations``. + commitment_info (google.cloud.compute_v1beta.types.FutureReservationCommitmentInfo): + If not present, then FR will not deliver a + new commitment or update an existing commitment. + + This field is a member of `oneof`_ ``_commitment_info``. + creation_timestamp (str): + Output only. [Output Only] The creation timestamp for this + future reservation inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + deployment_type (str): + Type of the deployment requested as part of + future reservation. Check the DeploymentType + enum for the list of possible values. + + This field is a member of `oneof`_ ``_deployment_type``. + description (str): + An optional description of this resource. + Provide this property when you create the future + reservation. + + This field is a member of `oneof`_ ``_description``. + enable_emergent_maintenance (bool): + Indicates if this group of VMs have emergent + maintenance enabled. + + This field is a member of `oneof`_ ``_enable_emergent_maintenance``. + id (int): + Output only. [Output Only] A unique identifier for this + future reservation. The server defines this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#futureReservation for future reservations. + + This field is a member of `oneof`_ ``_kind``. + name (str): + The name of the resource, provided by the client when + initially creating the resource. The resource name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + name_prefix (str): + Name prefix for the reservations to be + created at the time of delivery. The name prefix + must comply with RFC1035. Maximum allowed length + for name prefix is 20. Automatically created + reservations name format will be -date-####. + + This field is a member of `oneof`_ ``_name_prefix``. + planning_status (str): + Planning state before being submitted for + evaluation Check the PlanningStatus enum for the + list of possible values. + + This field is a member of `oneof`_ ``_planning_status``. + protection_tier (str): + Protection tier for the workload. + Check the ProtectionTier enum for the list of + possible values. + + This field is a member of `oneof`_ ``_protection_tier``. + reservation_mode (str): + The reservation mode which determines + reservation-termination behavior and expected + pricing. Check the ReservationMode enum for the + list of possible values. + + This field is a member of `oneof`_ ``_reservation_mode``. + reservation_name (str): + Name of reservations where the capacity is provisioned at + the time of delivery of future reservations. If the + reservation with the given name does not exist already, it + is created automatically at the time of Approval with + INACTIVE state till specified start-time. Either provide the + reservation_name or a name_prefix. + + This field is a member of `oneof`_ ``_reservation_name``. + scheduling_type (str): + Maintenance information for this reservation + Check the SchedulingType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_scheduling_type``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + share_settings (google.cloud.compute_v1beta.types.ShareSettings): + List of Projects/Folders to share with. + + This field is a member of `oneof`_ ``_share_settings``. + specific_reservation_required (bool): + Indicates whether the auto-created + reservation can be consumed by VMs with affinity + for "any" reservation. If the field is set, then + only VMs that target the reservation by name can + consume from the delivered reservation. + + This field is a member of `oneof`_ ``_specific_reservation_required``. + specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationSpecificSKUProperties): + Future Reservation configuration to indicate + instance properties and total count. + + This field is a member of `oneof`_ ``_specific_sku_properties``. + status (google.cloud.compute_v1beta.types.FutureReservationStatus): + Output only. [Output only] Status of the Future Reservation + + This field is a member of `oneof`_ ``_status``. + time_window (google.cloud.compute_v1beta.types.FutureReservationTimeWindow): + Time window for this Future Reservation. + + This field is a member of `oneof`_ ``_time_window``. + zone (str): + Output only. [Output Only] URL of the Zone where this future + reservation resides. + + This field is a member of `oneof`_ ``_zone``. + """ + + class DeploymentType(proto.Enum): + r"""Type of the deployment requested as part of future + reservation. + + Values: + UNDEFINED_DEPLOYMENT_TYPE (0): + A value indicating that the enum field is not + set. + DENSE (64932607): + The reserved capacity is made up of densely + deployed reservation blocks. + DEPLOYMENT_TYPE_UNSPECIFIED (234847180): + No description available. + FLEXIBLE (379880395): + The reserved capacity is made up of highly + flexible, logical reservation blocks. + """ + UNDEFINED_DEPLOYMENT_TYPE = 0 + DENSE = 64932607 + DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 + FLEXIBLE = 379880395 + + class PlanningStatus(proto.Enum): + r"""Planning state before being submitted for evaluation + + Values: + UNDEFINED_PLANNING_STATUS (0): + A value indicating that the enum field is not + set. + DRAFT (65307009): + Future Reservation is being drafted. + PLANNING_STATUS_UNSPECIFIED (252728940): + No description available. + SUBMITTED (450918619): + Future Reservation has been submitted for + evaluation by GCP. + """ + UNDEFINED_PLANNING_STATUS = 0 + DRAFT = 65307009 + PLANNING_STATUS_UNSPECIFIED = 252728940 + SUBMITTED = 450918619 + + class ProtectionTier(proto.Enum): + r"""Protection tier for the workload. + + Values: + UNDEFINED_PROTECTION_TIER (0): + A value indicating that the enum field is not + set. + CAPACITY_OPTIMIZED (17430466): + CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. + power, cooling) at the data center during normal operating + conditions. In the event of infrastructure failures at data + center (e.g. power and/or cooling failures), this workload + may be disrupted. As a consequence, it has a weaker + availability SLO than STANDARD. + PROTECTION_TIER_UNSPECIFIED (262261984): + Unspecified protection tier. + STANDARD (484642493): + STANDARD protection for workload that should + be protected by redundancies (e.g. power, + cooling) at the data center level. In the event + of infrastructure failures at data center (e.g. + power and/or cooling failures), this workload is + expected to continue as normal using the + redundancies. + """ + UNDEFINED_PROTECTION_TIER = 0 + CAPACITY_OPTIMIZED = 17430466 + PROTECTION_TIER_UNSPECIFIED = 262261984 + STANDARD = 484642493 + + class ReservationMode(proto.Enum): + r"""The reservation mode which determines reservation-termination + behavior and expected pricing. + + Values: + UNDEFINED_RESERVATION_MODE (0): + A value indicating that the enum field is not + set. + CALENDAR (67431230): + The delivered reservations will delivered at + specified start time and terminated at specified + end time along with terminating the VMs running + on it. + DEFAULT (115302945): + The delivered reservations do not terminate + VMs at the end of reservations. This is default + mode. + RESERVATION_MODE_UNSPECIFIED (233810606): + No description available. + """ + UNDEFINED_RESERVATION_MODE = 0 + CALENDAR = 67431230 + DEFAULT = 115302945 + RESERVATION_MODE_UNSPECIFIED = 233810606 + + class SchedulingType(proto.Enum): + r"""Maintenance information for this reservation + + Values: + UNDEFINED_SCHEDULING_TYPE (0): + A value indicating that the enum field is not + set. + GROUPED (474540862): + Maintenance on all reserved instances in the + reservation is synchronized. + GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): + Unknown maintenance type. + INDEPENDENT (127011674): + Maintenance is not synchronized for this + reservation. Instead, each instance has its own + maintenance window. + """ + UNDEFINED_SCHEDULING_TYPE = 0 + GROUPED = 474540862 + GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 + INDEPENDENT = 127011674 + + aggregate_reservation: "AllocationAggregateReservation" = proto.Field( + proto.MESSAGE, + number=291567948, + optional=True, + message="AllocationAggregateReservation", + ) + auto_created_reservations_delete_time: str = proto.Field( + proto.STRING, + number=242855120, + optional=True, + ) + auto_created_reservations_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=496244741, + optional=True, + message="Duration", + ) + auto_delete_auto_created_reservations: bool = proto.Field( + proto.BOOL, + number=491352490, + optional=True, + ) + commitment_info: "FutureReservationCommitmentInfo" = proto.Field( + proto.MESSAGE, + number=164362136, + optional=True, + message="FutureReservationCommitmentInfo", + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + deployment_type: str = proto.Field( + proto.STRING, + number=396722292, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + enable_emergent_maintenance: bool = proto.Field( + proto.BOOL, + number=353759497, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + name_prefix: str = proto.Field( + proto.STRING, + number=236409542, + optional=True, + ) + planning_status: str = proto.Field( + proto.STRING, + number=19714836, + optional=True, + ) + protection_tier: str = proto.Field( + proto.STRING, + number=503959432, + optional=True, + ) + reservation_mode: str = proto.Field( + proto.STRING, + number=277294646, + optional=True, + ) + reservation_name: str = proto.Field( + proto.STRING, + number=277311262, + optional=True, + ) + scheduling_type: str = proto.Field( + proto.STRING, + number=199835397, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + share_settings: "ShareSettings" = proto.Field( + proto.MESSAGE, + number=266668163, + optional=True, + message="ShareSettings", + ) + specific_reservation_required: bool = proto.Field( + proto.BOOL, + number=226550687, + optional=True, + ) + specific_sku_properties: "FutureReservationSpecificSKUProperties" = proto.Field( + proto.MESSAGE, + number=108887106, + optional=True, + message="FutureReservationSpecificSKUProperties", + ) + status: "FutureReservationStatus" = proto.Field( + proto.MESSAGE, + number=181260274, + optional=True, + message="FutureReservationStatus", + ) + time_window: "FutureReservationTimeWindow" = proto.Field( + proto.MESSAGE, + number=422983074, + optional=True, + message="FutureReservationTimeWindow", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + optional=True, + ) + + +class FutureReservationCommitmentInfo(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + commitment_name (str): + name of the commitment where capacity is + being delivered to. + + This field is a member of `oneof`_ ``_commitment_name``. + commitment_plan (str): + Indicates if a Commitment needs to be created + as part of FR delivery. If this field is not + present, then no commitment needs to be created. + Check the CommitmentPlan enum for the list of + possible values. + + This field is a member of `oneof`_ ``_commitment_plan``. + previous_commitment_terms (str): + Only applicable if FR is delivering to the + same reservation. If set, all parent commitments + will be extended to match the end date of the + plan for this commitment. + Check the PreviousCommitmentTerms enum for the + list of possible values. + + This field is a member of `oneof`_ ``_previous_commitment_terms``. + """ + + class CommitmentPlan(proto.Enum): + r"""Indicates if a Commitment needs to be created as part of FR + delivery. If this field is not present, then no + commitment needs to be created. + + Values: + UNDEFINED_COMMITMENT_PLAN (0): + A value indicating that the enum field is not + set. + INVALID (530283991): + No description available. + THIRTY_SIX_MONTH (266295942): + No description available. + TWELVE_MONTH (173083962): + No description available. + """ + UNDEFINED_COMMITMENT_PLAN = 0 + INVALID = 530283991 + THIRTY_SIX_MONTH = 266295942 + TWELVE_MONTH = 173083962 + + class PreviousCommitmentTerms(proto.Enum): + r"""Only applicable if FR is delivering to the same reservation. + If set, all parent commitments will be extended to match the end + date of the plan for this commitment. + + Values: + UNDEFINED_PREVIOUS_COMMITMENT_TERMS (0): + A value indicating that the enum field is not + set. + EXTEND (448639770): + All associated parent Committed Used Discount(s) + end-date/term will be extended to the end-time of this + future reservation. Default is to extend previous + commitment(s) time to the end_time of the reservation. + PREVIOUSCOMMITMENTTERM_UNSPECIFIED (98482448): + No changes to associated parents Committed + Used Discount(s) terms. + """ + UNDEFINED_PREVIOUS_COMMITMENT_TERMS = 0 + EXTEND = 448639770 + PREVIOUSCOMMITMENTTERM_UNSPECIFIED = 98482448 + + commitment_name: str = proto.Field( + proto.STRING, + number=164498805, + optional=True, + ) + commitment_plan: str = proto.Field( + proto.STRING, + number=164568595, + optional=True, + ) + previous_commitment_terms: str = proto.Field( + proto.STRING, + number=447490085, + optional=True, + ) + + +class FutureReservationSpecificSKUProperties(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_properties (google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationReservedInstanceProperties): + Properties of the SKU instances being + reserved. + + This field is a member of `oneof`_ ``_instance_properties``. + source_instance_template (str): + The instance template that will be used to + populate the ReservedInstanceProperties of the + future reservation + + This field is a member of `oneof`_ ``_source_instance_template``. + total_count (int): + Total number of instances for which capacity + assurance is requested at a future time period. + + This field is a member of `oneof`_ ``_total_count``. + """ + + instance_properties: "AllocationSpecificSKUAllocationReservedInstanceProperties" = ( + proto.Field( + proto.MESSAGE, + number=215355165, + optional=True, + message="AllocationSpecificSKUAllocationReservedInstanceProperties", + ) + ) + source_instance_template: str = proto.Field( + proto.STRING, + number=332423616, + optional=True, + ) + total_count: int = proto.Field( + proto.INT64, + number=129109076, + optional=True, + ) + + +class FutureReservationStatus(proto.Message): + r"""[Output only] Represents status related to the future reservation. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + amendment_status (str): + Output only. [Output Only] The current status of the + requested amendment. Check the AmendmentStatus enum for the + list of possible values. + + This field is a member of `oneof`_ ``_amendment_status``. + auto_created_reservations (MutableSequence[str]): + Output only. Fully qualified urls of the automatically + created reservations at start_time. + existing_matching_usage_info (google.cloud.compute_v1beta.types.FutureReservationStatusExistingMatchingUsageInfo): + Output only. [Output Only] Represents the existing matching + usage for the future reservation. + + This field is a member of `oneof`_ ``_existing_matching_usage_info``. + fulfilled_count (int): + Output only. This count indicates the + fulfilled capacity so far. This is set during + "PROVISIONING" state. This count also includes + capacity delivered as part of existing matching + reservations. + + This field is a member of `oneof`_ ``_fulfilled_count``. + last_known_good_state (google.cloud.compute_v1beta.types.FutureReservationStatusLastKnownGoodState): + Output only. [Output Only] This field represents the future + reservation before an amendment was requested. If the + amendment is declined, the Future Reservation will be + reverted to the last known good state. The last known good + state is not set when updating a future reservation whose + Procurement Status is DRAFTING. + + This field is a member of `oneof`_ ``_last_known_good_state``. + lock_time (str): + Output only. Time when Future Reservation would become + LOCKED, after which no modifications to Future Reservation + will be allowed. Applicable only after the Future + Reservation is in the APPROVED state. The lock_time is an + RFC3339 string. The procurement_status will transition to + PROCURING state at this time. + + This field is a member of `oneof`_ ``_lock_time``. + procurement_status (str): + Output only. Current state of this Future + Reservation Check the ProcurementStatus enum for + the list of possible values. + + This field is a member of `oneof`_ ``_procurement_status``. + specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationStatusSpecificSKUProperties): + + This field is a member of `oneof`_ ``_specific_sku_properties``. + """ + + class AmendmentStatus(proto.Enum): + r"""Output only. [Output Only] The current status of the requested + amendment. + + Values: + UNDEFINED_AMENDMENT_STATUS (0): + A value indicating that the enum field is not + set. + AMENDMENT_APPROVED (150573001): + The requested amendment to the Future + Resevation has been approved and applied by GCP. + AMENDMENT_DECLINED (70395200): + The requested amendment to the Future + Reservation has been declined by GCP and the + original state was restored. + AMENDMENT_IN_REVIEW (25830624): + The requested amendment to the Future + Reservation is currently being reviewd by GCP. + AMENDMENT_STATUS_UNSPECIFIED (412250332): + No description available. + """ + UNDEFINED_AMENDMENT_STATUS = 0 + AMENDMENT_APPROVED = 150573001 + AMENDMENT_DECLINED = 70395200 + AMENDMENT_IN_REVIEW = 25830624 + AMENDMENT_STATUS_UNSPECIFIED = 412250332 + + class ProcurementStatus(proto.Enum): + r"""Output only. Current state of this Future Reservation + + Values: + UNDEFINED_PROCUREMENT_STATUS (0): + A value indicating that the enum field is not + set. + APPROVED (357258935): + Future reservation is approved by GCP. + CANCELLED (41957681): + Future reservation is cancelled by the + customer. + COMMITTED (221710172): + Future reservation is committed by the + customer. + DECLINED (277081134): + Future reservation is rejected by GCP. + DRAFTING (477863585): + Related status for PlanningStatus.Draft. Transitions to + PENDING_APPROVAL upon user submitting FR. + FAILED (455706685): + Future reservation failed. No additional + reservations were provided. + FAILED_PARTIALLY_FULFILLED (14455212): + Future reservation is partially fulfilled. Additional + reservations were provided but did not reach total_count + reserved instance slots. + FULFILLED (409958655): + Future reservation is fulfilled completely. + PENDING_AMENDMENT_APPROVAL (510150429): + An Amendment to the Future Reservation has + been requested. If the Amendment is declined, + the Future Reservation will be restored to the + last known good state. + PENDING_APPROVAL (209692683): + Future reservation is pending approval by + GCP. + PROCUREMENT_STATUS_UNSPECIFIED (45807705): + No description available. + PROCURING (95959663): + Future reservation is being procured by GCP. + Beyond this point, Future reservation is locked + and no further modifications are allowed. + PROVISIONING (290896621): + Future reservation capacity is being provisioned. This state + will be entered after start_time, while reservations are + being created to provide total_count reserved instance + slots. This state will not persist past start_time + 24h. + """ + UNDEFINED_PROCUREMENT_STATUS = 0 + APPROVED = 357258935 + CANCELLED = 41957681 + COMMITTED = 221710172 + DECLINED = 277081134 + DRAFTING = 477863585 + FAILED = 455706685 + FAILED_PARTIALLY_FULFILLED = 14455212 + FULFILLED = 409958655 + PENDING_AMENDMENT_APPROVAL = 510150429 + PENDING_APPROVAL = 209692683 + PROCUREMENT_STATUS_UNSPECIFIED = 45807705 + PROCURING = 95959663 + PROVISIONING = 290896621 + + amendment_status: str = proto.Field( + proto.STRING, + number=250270052, + optional=True, + ) + auto_created_reservations: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=140217006, + ) + existing_matching_usage_info: "FutureReservationStatusExistingMatchingUsageInfo" = ( + proto.Field( + proto.MESSAGE, + number=509920602, + optional=True, + message="FutureReservationStatusExistingMatchingUsageInfo", + ) + ) + fulfilled_count: int = proto.Field( + proto.INT64, + number=319392239, + optional=True, + ) + last_known_good_state: "FutureReservationStatusLastKnownGoodState" = proto.Field( + proto.MESSAGE, + number=192819092, + optional=True, + message="FutureReservationStatusLastKnownGoodState", + ) + lock_time: str = proto.Field( + proto.STRING, + number=143772001, + optional=True, + ) + procurement_status: str = proto.Field( + proto.STRING, + number=224718945, + optional=True, + ) + specific_sku_properties: "FutureReservationStatusSpecificSKUProperties" = ( + proto.Field( + proto.MESSAGE, + number=108887106, + optional=True, + message="FutureReservationStatusSpecificSKUProperties", + ) + ) + + +class FutureReservationStatusExistingMatchingUsageInfo(proto.Message): + r"""[Output Only] Represents the existing matching usage for the future + reservation. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + count (int): + Output only. Count to represent min(FR total_count, + matching_reserved_capacity+matching_unreserved_instances) + + This field is a member of `oneof`_ ``_count``. + timestamp (str): + Output only. Timestamp when the matching + usage was calculated + + This field is a member of `oneof`_ ``_timestamp``. + """ + + count: int = proto.Field( + proto.INT64, + number=94851343, + optional=True, + ) + timestamp: str = proto.Field( + proto.STRING, + number=55126294, + optional=True, + ) + + +class FutureReservationStatusLastKnownGoodState(proto.Message): + r"""The state that the future reservation will be reverted to + should the amendment be declined. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + description (str): + Output only. [Output Only] The description of the + FutureReservation before an amendment was requested. + + This field is a member of `oneof`_ ``_description``. + existing_matching_usage_info (google.cloud.compute_v1beta.types.FutureReservationStatusExistingMatchingUsageInfo): + Output only. [Output Only] Represents the matching usage for + the future reservation before an amendment was requested. + + This field is a member of `oneof`_ ``_existing_matching_usage_info``. + future_reservation_specs (google.cloud.compute_v1beta.types.FutureReservationStatusLastKnownGoodStateFutureReservationSpecs): + + This field is a member of `oneof`_ ``_future_reservation_specs``. + lock_time (str): + Output only. [Output Only] The lock time of the + FutureReservation before an amendment was requested. + + This field is a member of `oneof`_ ``_lock_time``. + name_prefix (str): + Output only. [Output Only] The name prefix of the Future + Reservation before an amendment was requested. + + This field is a member of `oneof`_ ``_name_prefix``. + procurement_status (str): + Output only. [Output Only] The status of the last known good + state for the Future Reservation. Check the + ProcurementStatus enum for the list of possible values. + + This field is a member of `oneof`_ ``_procurement_status``. + """ + + class ProcurementStatus(proto.Enum): + r"""Output only. [Output Only] The status of the last known good state + for the Future Reservation. + + Values: + UNDEFINED_PROCUREMENT_STATUS (0): + A value indicating that the enum field is not + set. + APPROVED (357258935): + Future reservation is approved by GCP. + CANCELLED (41957681): + Future reservation is cancelled by the + customer. + COMMITTED (221710172): + Future reservation is committed by the + customer. + DECLINED (277081134): + Future reservation is rejected by GCP. + DRAFTING (477863585): + Related status for PlanningStatus.Draft. Transitions to + PENDING_APPROVAL upon user submitting FR. + FAILED (455706685): + Future reservation failed. No additional + reservations were provided. + FAILED_PARTIALLY_FULFILLED (14455212): + Future reservation is partially fulfilled. Additional + reservations were provided but did not reach total_count + reserved instance slots. + FULFILLED (409958655): + Future reservation is fulfilled completely. + PENDING_AMENDMENT_APPROVAL (510150429): + An Amendment to the Future Reservation has + been requested. If the Amendment is declined, + the Future Reservation will be restored to the + last known good state. + PENDING_APPROVAL (209692683): + Future reservation is pending approval by + GCP. + PROCUREMENT_STATUS_UNSPECIFIED (45807705): + No description available. + PROCURING (95959663): + Future reservation is being procured by GCP. + Beyond this point, Future reservation is locked + and no further modifications are allowed. + PROVISIONING (290896621): + Future reservation capacity is being provisioned. This state + will be entered after start_time, while reservations are + being created to provide total_count reserved instance + slots. This state will not persist past start_time + 24h. + """ + UNDEFINED_PROCUREMENT_STATUS = 0 + APPROVED = 357258935 + CANCELLED = 41957681 + COMMITTED = 221710172 + DECLINED = 277081134 + DRAFTING = 477863585 + FAILED = 455706685 + FAILED_PARTIALLY_FULFILLED = 14455212 + FULFILLED = 409958655 + PENDING_AMENDMENT_APPROVAL = 510150429 + PENDING_APPROVAL = 209692683 + PROCUREMENT_STATUS_UNSPECIFIED = 45807705 + PROCURING = 95959663 + PROVISIONING = 290896621 + + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + existing_matching_usage_info: "FutureReservationStatusExistingMatchingUsageInfo" = ( + proto.Field( + proto.MESSAGE, + number=509920602, + optional=True, + message="FutureReservationStatusExistingMatchingUsageInfo", + ) + ) + future_reservation_specs: "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" = proto.Field( + proto.MESSAGE, + number=82528873, + optional=True, + message="FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", + ) + lock_time: str = proto.Field( + proto.STRING, + number=143772001, + optional=True, + ) + name_prefix: str = proto.Field( + proto.STRING, + number=236409542, + optional=True, + ) + procurement_status: str = proto.Field( + proto.STRING, + number=224718945, + optional=True, + ) + + +class FutureReservationStatusLastKnownGoodStateFutureReservationSpecs(proto.Message): + r"""The properties of the last known good state for the Future + Reservation. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + share_settings (google.cloud.compute_v1beta.types.ShareSettings): + Output only. [Output Only] The previous share settings of + the Future Reservation. + + This field is a member of `oneof`_ ``_share_settings``. + specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationSpecificSKUProperties): + Output only. [Output Only] The previous instance related + properties of the Future Reservation. + + This field is a member of `oneof`_ ``_specific_sku_properties``. + time_window (google.cloud.compute_v1beta.types.FutureReservationTimeWindow): + Output only. [Output Only] The previous time window of the + Future Reservation. + + This field is a member of `oneof`_ ``_time_window``. + """ + + share_settings: "ShareSettings" = proto.Field( + proto.MESSAGE, + number=266668163, + optional=True, + message="ShareSettings", + ) + specific_sku_properties: "FutureReservationSpecificSKUProperties" = proto.Field( + proto.MESSAGE, + number=108887106, + optional=True, + message="FutureReservationSpecificSKUProperties", + ) + time_window: "FutureReservationTimeWindow" = proto.Field( + proto.MESSAGE, + number=422983074, + optional=True, + message="FutureReservationTimeWindow", + ) + + +class FutureReservationStatusSpecificSKUProperties(proto.Message): + r"""Properties to be set for the Future Reservation. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + source_instance_template_id (str): + ID of the instance template used to populate + the Future Reservation properties. + + This field is a member of `oneof`_ ``_source_instance_template_id``. + """ + + source_instance_template_id: str = proto.Field( + proto.STRING, + number=111196154, + optional=True, + ) + + +class FutureReservationTimeWindow(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + duration (google.cloud.compute_v1beta.types.Duration): + + This field is a member of `oneof`_ ``_duration``. + end_time (str): + + This field is a member of `oneof`_ ``_end_time``. + start_time (str): + Start time of the Future Reservation. The start_time is an + RFC3339 string. + + This field is a member of `oneof`_ ``_start_time``. + """ + + duration: "Duration" = proto.Field( + proto.MESSAGE, + number=155471252, + optional=True, + message="Duration", + ) + end_time: str = proto.Field( + proto.STRING, + number=114938801, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, + ) + + +class FutureReservationsAggregatedListResponse(proto.Message): + r"""Contains a list of future reservations. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.FutureReservationsScopedList]): + A list of Future reservation resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#futureReservationsAggregatedListResponse for + future resevation aggregated list response. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "FutureReservationsScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="FutureReservationsScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FutureReservationsListResponse(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.FutureReservation]): + [Output Only] A list of future reservation resources. + kind (str): + Output only. [Output Only] Type of + resource.Alwayscompute#FutureReservationsListResponse for + lists of reservations + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["FutureReservation"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="FutureReservation", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FutureReservationsScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + future_reservations (MutableSequence[google.cloud.compute_v1beta.types.FutureReservation]): + A list of future reservations contained in + this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of future reservations when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + future_reservations: MutableSequence["FutureReservation"] = proto.RepeatedField( + proto.MESSAGE, + number=131778339, + message="FutureReservation", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class FutureResourcesRecommendation(proto.Message): + r"""Recommendation for single resources specification, to be + created in the future. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + end_time (str): + + This field is a member of `oneof`_ ``_end_time``. + location (str): + The advised location for resource usage. When a zone, in + format 'zones/'. If not set, it means that no location is + recommended - see other_locations for details. + + This field is a member of `oneof`_ ``_location``. + other_locations (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesRecommendationOtherLocation]): + List of locations in the request scope that + were not recommended. Keys of the map are zones, + in format 'zones/'. The values are status + information indicating the recommendation + status. + recommendation_id (str): + Unique id of the recommendation, a UUID + string generated by the API. + + This field is a member of `oneof`_ ``_recommendation_id``. + recommendation_type (str): + Type of recommendation. Currently only FUTURE_RESERVATION is + supported. Check the RecommendationType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_recommendation_type``. + start_time (str): + + This field is a member of `oneof`_ ``_start_time``. + """ + + class RecommendationType(proto.Enum): + r"""Type of recommendation. Currently only FUTURE_RESERVATION is + supported. + + Values: + UNDEFINED_RECOMMENDATION_TYPE (0): + A value indicating that the enum field is not + set. + FUTURE_RESERVATION (41036592): + A Future Reservation is recommended. + RECOMMENDATION_TYPE_UNSPECIFIED (140641624): + Default value, unused. + """ + UNDEFINED_RECOMMENDATION_TYPE = 0 + FUTURE_RESERVATION = 41036592 + RECOMMENDATION_TYPE_UNSPECIFIED = 140641624 + + end_time: str = proto.Field( + proto.STRING, + number=114938801, + optional=True, + ) + location: str = proto.Field( + proto.STRING, + number=290430901, + optional=True, + ) + other_locations: MutableMapping[ + str, "FutureResourcesRecommendationOtherLocation" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=179322095, + message="FutureResourcesRecommendationOtherLocation", + ) + recommendation_id: str = proto.Field( + proto.STRING, + number=474540897, + optional=True, + ) + recommendation_type: str = proto.Field( + proto.STRING, + number=230749184, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, + ) + + +class FutureResourcesRecommendationOtherLocation(proto.Message): + r"""Information about recommendation status for locations + that were allowed but not used by the response. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + details (str): + Details (human readable) describing the situation. For + example, if status is CONDITION_NOT_MET, then details + contain information about the parameters of the time window + that did not meet the required conditions. + + This field is a member of `oneof`_ ``_details``. + status (str): + Status of recommendation in this location. + Check the Status enum for the list of possible + values. + + This field is a member of `oneof`_ ``_status``. + """ + + class Status(proto.Enum): + r"""Status of recommendation in this location. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + CONDITIONS_NOT_MET (363628457): + The requested resources are offered in this + location but the requested time window is does + not meet the required conditions. + NOT_SUPPORTED (317950466): + The requested resources are not offered in + this location. Retrying the request will not + change this status. + NO_CAPACITY (274240888): + The requested resources are offered in this + location and the requested time window is + accepted but there is no capacity within the + requested time window. + OTHER_LOCATION_STATUS_UNDEFINED (222662622): + Default value, unused. + RECOMMENDED (369652283): + The requested resources are offered in this + location and it is possible to request them. + However, another location was better and was + recommended. + """ + UNDEFINED_STATUS = 0 + CONDITIONS_NOT_MET = 363628457 + NOT_SUPPORTED = 317950466 + NO_CAPACITY = 274240888 + OTHER_LOCATION_STATUS_UNDEFINED = 222662622 + RECOMMENDED = 369652283 + + details: str = proto.Field( + proto.STRING, + number=483979842, + optional=True, + ) + status: str = proto.Field( + proto.STRING, + number=181260274, + optional=True, + ) + + +class FutureResourcesSpec(proto.Message): + r"""Specification of resources to be created at some time in the + future within an optionally specified set of locations, and + within the specified time range. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + deployment_type (str): + Indicates if the reservation allocation + strategy is static (DENSE) or dynamic + (STANDARD). Defaults to DENSE. Check the + DeploymentType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_deployment_type``. + location_policy (google.cloud.compute_v1beta.types.FutureResourcesSpecLocationPolicy): + Optional location policy allowing to exclude + some zone(s) in which the resources must not be + created. + + This field is a member of `oneof`_ ``_location_policy``. + target_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecTargetResources): + Specification of the reserved resources. + + This field is a member of `oneof`_ ``_target_resources``. + time_range_spec (google.cloud.compute_v1beta.types.FlexibleTimeRange): + Specification of a time range in which the + resources may be created. The time range + specifies start of resource use and planned end + of resource use. + + This field is a member of `oneof`_ ``_time_range_spec``. + """ + + class DeploymentType(proto.Enum): + r"""Indicates if the reservation allocation strategy is static + (DENSE) or dynamic (STANDARD). Defaults to DENSE. + + Values: + UNDEFINED_DEPLOYMENT_TYPE (0): + A value indicating that the enum field is not + set. + DENSE (64932607): + The reserved capacity is made up of densely + deployed reservation blocks. + DEPLOYMENT_TYPE_UNSPECIFIED (234847180): + No description available. + FLEXIBLE (379880395): + The reserved capacity is made up of highly + flexible, logical reservation blocks. + """ + UNDEFINED_DEPLOYMENT_TYPE = 0 + DENSE = 64932607 + DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 + FLEXIBLE = 379880395 + + deployment_type: str = proto.Field( + proto.STRING, + number=396722292, + optional=True, + ) + location_policy: "FutureResourcesSpecLocationPolicy" = proto.Field( + proto.MESSAGE, + number=465689852, + optional=True, + message="FutureResourcesSpecLocationPolicy", + ) + target_resources: "FutureResourcesSpecTargetResources" = proto.Field( + proto.MESSAGE, + number=528230647, + optional=True, + message="FutureResourcesSpecTargetResources", + ) + time_range_spec: "FlexibleTimeRange" = proto.Field( + proto.MESSAGE, + number=116516399, + optional=True, + message="FlexibleTimeRange", + ) + + +class FutureResourcesSpecAggregateResources(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + accelerator_count (int): + Size of the request, in accelerator (chip) + count. + + This field is a member of `oneof`_ ``_accelerator_count``. + vm_family (str): + The VM family that all instances scheduled + against this reservation must belong to. Use for + TPU reservations. Check the VmFamily enum for + the list of possible values. + + This field is a member of `oneof`_ ``_vm_family``. + workload_type (str): + Workload type. Use for TPU reservations. + Check the WorkloadType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_workload_type``. + """ + + class VmFamily(proto.Enum): + r"""The VM family that all instances scheduled against this + reservation must belong to. Use for TPU reservations. + + Values: + UNDEFINED_VM_FAMILY (0): + A value indicating that the enum field is not + set. + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): + No description available. + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): + No description available. + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X (485271888): + No description available. + """ + UNDEFINED_VM_FAMILY = 0 + VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 + VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 + VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 + VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 + VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X = 485271888 + + class WorkloadType(proto.Enum): + r"""Workload type. Use for TPU reservations. + + Values: + UNDEFINED_WORKLOAD_TYPE (0): + A value indicating that the enum field is not + set. + BATCH (62971674): + Reserved resources will be optimized for + BATCH workloads, such as ML training. + SERVING (17781740): + Reserved resources will be optimized for + SERVING workloads, such as ML inference. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_WORKLOAD_TYPE = 0 + BATCH = 62971674 + SERVING = 17781740 + UNSPECIFIED = 526786327 + + accelerator_count: int = proto.Field( + proto.INT64, + number=504879675, + optional=True, + ) + vm_family: str = proto.Field( + proto.STRING, + number=125017580, + optional=True, + ) + workload_type: str = proto.Field( + proto.STRING, + number=273432322, + optional=True, + ) + + +class FutureResourcesSpecLocalSsdPartition(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + disk_interface (str): + Disk interface. Defaults to SCSI. + Check the DiskInterface enum for the list of + possible values. + + This field is a member of `oneof`_ ``_disk_interface``. + disk_size_gb (int): + The size of the disk in GB. + + This field is a member of `oneof`_ ``_disk_size_gb``. + """ + + class DiskInterface(proto.Enum): + r"""Disk interface. Defaults to SCSI. + + Values: + UNDEFINED_DISK_INTERFACE (0): + A value indicating that the enum field is not + set. + NVME (2408800): + No description available. + SCSI (2539686): + No description available. + """ + UNDEFINED_DISK_INTERFACE = 0 + NVME = 2408800 + SCSI = 2539686 + + disk_interface: str = proto.Field( + proto.STRING, + number=66770199, + optional=True, + ) + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, + optional=True, + ) + + +class FutureResourcesSpecLocationPolicy(proto.Message): + r"""Specification of locations to create resources in. + + Attributes: + locations (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesSpecLocationPolicyLocation]): + Preferences for specified locations. + Keys of the map are locations - zones, in format + of 'zones/'. Values are preferences for the + zones. + If a zone is not specified in this map, it is + ALLOWed. + """ + + locations: MutableMapping[ + str, "FutureResourcesSpecLocationPolicyLocation" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=413423454, + message="FutureResourcesSpecLocationPolicyLocation", + ) + + +class FutureResourcesSpecLocationPolicyLocation(proto.Message): + r"""Preference for a single specified location. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + preference (str): + Preference for this location. + Check the Preference enum for the list of + possible values. + + This field is a member of `oneof`_ ``_preference``. + """ + + class Preference(proto.Enum): + r"""Preference for this location. + + Values: + UNDEFINED_PREFERENCE (0): + A value indicating that the enum field is not + set. + ALLOW (62368553): + Location is allowed for use. + DENY (2094604): + Location is prohibited. + PREFERENCE_UNSPECIFIED (496219571): + Default value, unused. + """ + UNDEFINED_PREFERENCE = 0 + ALLOW = 62368553 + DENY = 2094604 + PREFERENCE_UNSPECIFIED = 496219571 + + preference: str = proto.Field( + proto.STRING, + number=150781147, + optional=True, + ) + + +class FutureResourcesSpecSpecificSKUResources(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_count (int): + Size of the request, in instance count. + + This field is a member of `oneof`_ ``_instance_count``. + local_ssd_partitions (MutableSequence[google.cloud.compute_v1beta.types.FutureResourcesSpecLocalSsdPartition]): + Local SSD partitions. You do not have to + include SSD partitions that are built in the + machine type. + machine_type (str): + The machine type to use for instances that + will use the reservation. This field only + accepts machine type names. e.g. n2-standard-4 + and does not accept machine type full or partial + url. e.g. + projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4. + Use for GPU reservations. + + This field is a member of `oneof`_ ``_machine_type``. + """ + + instance_count: int = proto.Field( + proto.INT64, + number=77317349, + optional=True, + ) + local_ssd_partitions: MutableSequence[ + "FutureResourcesSpecLocalSsdPartition" + ] = proto.RepeatedField( + proto.MESSAGE, + number=470688568, + message="FutureResourcesSpecLocalSsdPartition", + ) + machine_type: str = proto.Field( + proto.STRING, + number=227711026, + optional=True, + ) + + +class FutureResourcesSpecTargetResources(proto.Message): + r"""Specification of reserved resources. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + aggregate_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecAggregateResources): + + This field is a member of `oneof`_ ``_aggregate_resources``. + specific_sku_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecSpecificSKUResources): + + This field is a member of `oneof`_ ``_specific_sku_resources``. + """ + + aggregate_resources: "FutureResourcesSpecAggregateResources" = proto.Field( + proto.MESSAGE, + number=180868005, + optional=True, + message="FutureResourcesSpecAggregateResources", + ) + specific_sku_resources: "FutureResourcesSpecSpecificSKUResources" = proto.Field( + proto.MESSAGE, + number=267071798, + optional=True, + message="FutureResourcesSpecSpecificSKUResources", + ) + + +class GRPCHealthCheck(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + grpc_service_name (str): + The gRPC service name for the health check. This field is + optional. The value of grpc_service_name has the following + meanings by convention: + + - Empty service_name means the overall status of all + services at the backend. + + - Non-empty service_name means the health of that gRPC + service, as defined by the owner of the service. + + The grpc_service_name can only be ASCII. + + This field is a member of `oneof`_ ``_grpc_service_name``. + port (int): + The TCP port number to which the health check + prober sends packets. Valid values are 1 through + 65535. + + This field is a member of `oneof`_ ``_port``. + port_name (str): + Not supported. + + This field is a member of `oneof`_ ``_port_name``. + port_specification (str): + Specifies how a port is selected for health checking. Can be + one of the following values: USE_FIXED_PORT: Specifies a + port number explicitly using theport field in the health + check. Supported by backend services for passthrough load + balancers and backend services for proxy load balancers. Not + supported by target pools. The health check supports all + backends supported by the backend service provided the + backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint + groups, and instance group backends. USE_NAMED_PORT: Not + supported. USE_SERVING_PORT: Provides an indirect method of + specifying the health check port by referring to the backend + service. Only supported by backend services for proxy load + balancers. Not supported by target pools. Not supported by + backend services for passthrough load balancers. Supports + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. + + This field is a member of `oneof`_ ``_port_specification``. + """ + + class PortSpecification(proto.Enum): + r"""Specifies how a port is selected for health checking. Can be one of + the following values: USE_FIXED_PORT: Specifies a port number + explicitly using theport field in the health check. Supported by + backend services for passthrough load balancers and backend services + for proxy load balancers. Not supported by target pools. The health + check supports all backends supported by the backend service + provided the backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and + instance group backends. USE_NAMED_PORT: Not supported. + USE_SERVING_PORT: Provides an indirect method of specifying the + health check port by referring to the backend service. Only + supported by backend services for proxy load balancers. Not + supported by target pools. Not supported by backend services for + passthrough load balancers. Supports all backends that can be health + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. + + Values: + UNDEFINED_PORT_SPECIFICATION (0): + A value indicating that the enum field is not + set. + USE_FIXED_PORT (190235748): + The port number in the health check's port is + used for health checking. Applies to network + endpoint group and instance group backends. + USE_NAMED_PORT (349300671): + Not supported. + USE_SERVING_PORT (362637516): + For network endpoint group backends, the + health check uses the port number specified on + each endpoint in the network endpoint group. For + instance group backends, the health check uses + the port number specified for the backend + service's named port defined in the instance + group's named ports. + """ + UNDEFINED_PORT_SPECIFICATION = 0 + USE_FIXED_PORT = 190235748 + USE_NAMED_PORT = 349300671 + USE_SERVING_PORT = 362637516 + + grpc_service_name: str = proto.Field( + proto.STRING, + number=136533078, + optional=True, + ) + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + port_name: str = proto.Field( + proto.STRING, + number=41534345, + optional=True, + ) + port_specification: str = proto.Field( + proto.STRING, + number=51590597, + optional=True, + ) + + +class GRPCTLSHealthCheck(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + grpc_service_name (str): + The gRPC service name for the health check. This field is + optional. The value of grpc_service_name has the following + meanings by convention: + + - Empty service_name means the overall status of all + services at the backend. + + - Non-empty service_name means the health of that gRPC + service, as defined by the owner of the service. + + The grpc_service_name can only be ASCII. + + This field is a member of `oneof`_ ``_grpc_service_name``. + port (int): + The TCP port number to which the health check + prober sends packets. Valid values are 1 through + 65535. + + This field is a member of `oneof`_ ``_port``. + port_specification (str): + Specifies how a port is selected for health checking. Can be + one of the following values: USE_FIXED_PORT: Specifies a + port number explicitly using theport field in the health + check. Supported by backend services for passthrough load + balancers and backend services for proxy load balancers. Not + supported by target pools. The health check supports all + backends supported by the backend service provided the + backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint + groups, and instance group backends. USE_NAMED_PORT: Not + supported. USE_SERVING_PORT: Provides an indirect method of + specifying the health check port by referring to the backend + service. Only supported by backend services for proxy load + balancers. Not supported by target pools. Not supported by + backend services for passthrough load balancers. Supports + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. + + This field is a member of `oneof`_ ``_port_specification``. + """ + + class PortSpecification(proto.Enum): + r"""Specifies how a port is selected for health checking. Can be one of + the following values: USE_FIXED_PORT: Specifies a port number + explicitly using theport field in the health check. Supported by + backend services for passthrough load balancers and backend services + for proxy load balancers. Not supported by target pools. The health + check supports all backends supported by the backend service + provided the backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and + instance group backends. USE_NAMED_PORT: Not supported. + USE_SERVING_PORT: Provides an indirect method of specifying the + health check port by referring to the backend service. Only + supported by backend services for proxy load balancers. Not + supported by target pools. Not supported by backend services for + passthrough load balancers. Supports all backends that can be health + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. + + Values: + UNDEFINED_PORT_SPECIFICATION (0): + A value indicating that the enum field is not + set. + USE_FIXED_PORT (190235748): + The port number in the health check's port is + used for health checking. Applies to network + endpoint group and instance group backends. + USE_NAMED_PORT (349300671): + Not supported. + USE_SERVING_PORT (362637516): + For network endpoint group backends, the + health check uses the port number specified on + each endpoint in the network endpoint group. For + instance group backends, the health check uses + the port number specified for the backend + service's named port defined in the instance + group's named ports. + """ + UNDEFINED_PORT_SPECIFICATION = 0 + USE_FIXED_PORT = 190235748 + USE_NAMED_PORT = 349300671 + USE_SERVING_PORT = 362637516 + + grpc_service_name: str = proto.Field( + proto.STRING, + number=136533078, + optional=True, + ) + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + port_specification: str = proto.Field( + proto.STRING, + number=51590597, + optional=True, + ) + + +class GetAcceleratorTypeRequest(proto.Message): + r"""A request message for AcceleratorTypes.Get. See the method + description for details. + + Attributes: + accelerator_type (str): + Name of the accelerator type to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + accelerator_type: str = proto.Field( + proto.STRING, + number=138031246, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetAddressRequest(proto.Message): + r"""A request message for Addresses.Get. See the method + description for details. + + Attributes: + address (str): + Name of the address resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + address: str = proto.Field( + proto.STRING, + number=462920692, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetAssociationFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.GetAssociation. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + name (str): + The name of the association to get from the + firewall policy. + + This field is a member of `oneof`_ ``_name``. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + + +class GetAssociationNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.GetAssociation. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy (str): + Name of the firewall policy to which the + queried association belongs. + name (str): + The name of the association to get from the + firewall policy. + + This field is a member of `oneof`_ ``_name``. + project (str): + Project ID for this request. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetAssociationOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.GetAssociation. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + name (str): + The name of the association to get from the + security policy. + + This field is a member of `oneof`_ ``_name``. + security_policy (str): + Name of the security policy to which the + queried rule belongs. + """ + + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, + ) + + +class GetAssociationRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.GetAssociation. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy (str): + Name of the firewall policy to which the + queried association belongs. + name (str): + The name of the association to get from the + firewall policy. + + This field is a member of `oneof`_ ``_name``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetAssociationRegionNetworkPolicyRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.GetAssociation. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + name (str): + The name of the association to get from the + network policy. + + This field is a member of `oneof`_ ``_name``. + network_policy (str): + Name of the network policy to which the + queried association belongs. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + """ + + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + network_policy: str = proto.Field( + proto.STRING, + number=504961123, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetAutoscalerRequest(proto.Message): + r"""A request message for Autoscalers.Get. See the method + description for details. + + Attributes: + autoscaler (str): + Name of the autoscaler to return. + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. + """ + + autoscaler: str = proto.Field( + proto.STRING, + number=517258967, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.GetAvailableAcceleratorTopologies. See the + method description for details. + + Attributes: + project (str): + Required. Project ID for this request. + resource_id (str): + Required. The name of the managed instance + group. It should conform to RFC1035. + zone (str): + Required. The name of thezone where the + managed instance group is located. + Name should conform to RFC1035. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource_id: str = proto.Field( + proto.STRING, + number=160795372, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetBackendBucketRequest(proto.Message): + r"""A request message for BackendBuckets.Get. See the method + description for details. + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to return. + project (str): + Project ID for this request. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.Get. See the method + description for details. + + Attributes: + backend_service (str): + Name of the BackendService resource to + return. + project (str): + Project ID for this request. + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetCrossSiteNetworkRequest(proto.Message): + r"""A request message for CrossSiteNetworks.Get. See the method + description for details. + + Attributes: + cross_site_network (str): + Name of the cross-site network to return. + project (str): + Project ID for this request. + """ + + cross_site_network: str = proto.Field( + proto.STRING, + number=108192469, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetDiagnosticsInterconnectRequest(proto.Message): + r"""A request message for Interconnects.GetDiagnostics. See the + method description for details. + + Attributes: + interconnect (str): + Name of the interconnect resource to query. + project (str): + Project ID for this request. + """ + + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetDiskRequest(proto.Message): + r"""A request message for Disks.Get. See the method description + for details. + + Attributes: + disk (str): + Name of the persistent disk to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + disk: str = proto.Field( + proto.STRING, + number=3083677, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetDiskSettingRequest(proto.Message): + r"""A request message for DiskSettingsService.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetDiskTypeRequest(proto.Message): + r"""A request message for DiskTypes.Get. See the method + description for details. + + Attributes: + disk_type (str): + Name of the disk type to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + disk_type: str = proto.Field( + proto.STRING, + number=93009052, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetEffectiveFirewallsInstanceRequest(proto.Message): + r"""A request message for Instances.GetEffectiveFirewalls. See + the method description for details. + + Attributes: + instance (str): + Name of the instance scoping this request. + network_interface (str): + The name of the network interface to get the + effective firewalls. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + network_interface: str = proto.Field( + proto.STRING, + number=365387880, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetEffectiveFirewallsNetworkRequest(proto.Message): + r"""A request message for Networks.GetEffectiveFirewalls. See the + method description for details. + + Attributes: + network (str): + Name of the network for this request. + project (str): + Project ID for this request. + """ + + network: str = proto.Field( + proto.STRING, + number=232872494, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.GetEffectiveFirewalls. See the + method description for details. + + Attributes: + network (str): + Network reference + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + network: str = proto.Field( + proto.STRING, + number=232872494, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetEffectiveSecurityPoliciesBackendServiceRequest(proto.Message): + r"""A request message for + BackendServices.GetEffectiveSecurityPolicies. See the method + description for details. + + Attributes: + backend_service (str): + Name of the Backend Service for this request. + project (str): + Project ID for this request. + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetExternalVpnGatewayRequest(proto.Message): + r"""A request message for ExternalVpnGateways.Get. See the method + description for details. + + Attributes: + external_vpn_gateway (str): + Name of the externalVpnGateway to return. + project (str): + Project ID for this request. + """ + + external_vpn_gateway: str = proto.Field( + proto.STRING, + number=109898629, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.Get. See the method + description for details. + + Attributes: + firewall_policy (str): + Name of the firewall policy to get. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + + +class GetFirewallRequest(proto.Message): + r"""A request message for Firewalls.Get. See the method + description for details. + + Attributes: + firewall (str): + Name of the firewall rule to return. + project (str): + Project ID for this request. + """ + + firewall: str = proto.Field( + proto.STRING, + number=511016192, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetForwardingRuleRequest(proto.Message): + r"""A request message for ForwardingRules.Get. See the method + description for details. + + Attributes: + forwarding_rule (str): + Name of the ForwardingRule resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + forwarding_rule: str = proto.Field( + proto.STRING, + number=269964030, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetFromFamilyImageRequest(proto.Message): + r"""A request message for Images.GetFromFamily. See the method + description for details. + + Attributes: + family (str): + Name of the image family to search for. + project (str): + The image project that the image belongs to. + For example, to get a CentOS image, specify + centos-cloud as the image project. + """ + + family: str = proto.Field( + proto.STRING, + number=328751972, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetFutureReservationRequest(proto.Message): + r"""A request message for FutureReservations.Get. See the method + description for details. + + Attributes: + future_reservation (str): + Name of the future reservation to retrieve. + Name should conform to RFC1035. + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. Name + should conform to RFC1035. + """ + + future_reservation: str = proto.Field( + proto.STRING, + number=56206160, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetGlobalAddressRequest(proto.Message): + r"""A request message for GlobalAddresses.Get. See the method + description for details. + + Attributes: + address (str): + Name of the address resource to return. + project (str): + Project ID for this request. + """ + + address: str = proto.Field( + proto.STRING, + number=462920692, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetGlobalForwardingRuleRequest(proto.Message): + r"""A request message for GlobalForwardingRules.Get. See the + method description for details. + + Attributes: + forwarding_rule (str): + Name of the ForwardingRule resource to + return. + project (str): + Project ID for this request. + """ + + forwarding_rule: str = proto.Field( + proto.STRING, + number=269964030, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetGlobalNetworkEndpointGroupRequest(proto.Message): + r"""A request message for GlobalNetworkEndpointGroups.Get. See + the method description for details. + + Attributes: + network_endpoint_group (str): + The name of the network endpoint group. It + should comply with RFC1035. + project (str): + Project ID for this request. + """ + + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetGlobalOperationRequest(proto.Message): + r"""A request message for GlobalOperations.Get. See the method + description for details. + + Attributes: + operation (str): + Name of the Operations resource to return, or + its unique numeric identifier. + project (str): + Project ID for this request. + """ + + operation: str = proto.Field( + proto.STRING, + number=52090215, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetGlobalOrganizationOperationRequest(proto.Message): + r"""A request message for GlobalOrganizationOperations.Get. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + operation (str): + Name of the Operations resource to return. + Parent is derived from this field. + parent_id (str): + Parent ID for this request. Not used. Parent is derived from + resource_id. + + This field is a member of `oneof`_ ``_parent_id``. + """ + + operation: str = proto.Field( + proto.STRING, + number=52090215, + ) + parent_id: str = proto.Field( + proto.STRING, + number=459714768, + optional=True, + ) + + +class GetGlobalPublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for GlobalPublicDelegatedPrefixes.Get. See + the method description for details. + + Attributes: + project (str): + Project ID for this request. + public_delegated_prefix (str): + Name of the PublicDelegatedPrefix resource to + return. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + public_delegated_prefix: str = proto.Field( + proto.STRING, + number=204238440, + ) + + +class GetGlobalVmExtensionPolicyRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.Get. See the + method description for details. + + Attributes: + global_vm_extension_policy (str): + Name of the GlobalVmExtensionPolicy resource + to return. + project (str): + Project ID for this request. + """ + + global_vm_extension_policy: str = proto.Field( + proto.STRING, + number=8334110, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetGuestAttributesInstanceRequest(proto.Message): + r"""A request message for Instances.GetGuestAttributes. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance (str): + Name of the instance scoping this request. + project (str): + Project ID for this request. + query_path (str): + Specifies the guest attributes path to be + queried. + + This field is a member of `oneof`_ ``_query_path``. + variable_key (str): + Specifies the key for the guest attributes + entry. + + This field is a member of `oneof`_ ``_variable_key``. + zone (str): + The name of the zone for this request. + """ + + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + query_path: str = proto.Field( + proto.STRING, + number=368591164, + optional=True, + ) + variable_key: str = proto.Field( + proto.STRING, + number=164364828, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetHealthBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.GetHealth. See the + method description for details. + + Attributes: + backend_service (str): + Name of the BackendService resource to which + the queried instance belongs. + project (str): + + resource_group_reference_resource (google.cloud.compute_v1beta.types.ResourceGroupReference): + The body resource for this request + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource_group_reference_resource: "ResourceGroupReference" = proto.Field( + proto.MESSAGE, + number=112951123, + message="ResourceGroupReference", + ) + + +class GetHealthCheckRequest(proto.Message): + r"""A request message for HealthChecks.Get. See the method + description for details. + + Attributes: + health_check (str): + Name of the HealthCheck resource to return. + project (str): + Project ID for this request. + """ + + health_check: str = proto.Field( + proto.STRING, + number=308876645, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetHealthRegionBackendServiceRequest(proto.Message): + r"""A request message for RegionBackendServices.GetHealth. See + the method description for details. + + Attributes: + backend_service (str): + Name of the BackendService resource for which + to get health. + project (str): + + region (str): + Name of the region scoping this request. + resource_group_reference_resource (google.cloud.compute_v1beta.types.ResourceGroupReference): + The body resource for this request + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource_group_reference_resource: "ResourceGroupReference" = proto.Field( + proto.MESSAGE, + number=112951123, + message="ResourceGroupReference", + ) + + +class GetHealthTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.GetHealth. See the method + description for details. + + Attributes: + instance_reference_resource (google.cloud.compute_v1beta.types.InstanceReference): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + target_pool (str): + Name of the TargetPool resource to which the + queried instance belongs. + """ + + instance_reference_resource: "InstanceReference" = proto.Field( + proto.MESSAGE, + number=292926060, + message="InstanceReference", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + target_pool: str = proto.Field( + proto.STRING, + number=62796298, + ) + + +class GetIamPolicyBackendBucketRequest(proto.Message): + r"""A request message for BackendBuckets.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyDiskRequest(proto.Message): + r"""A request message for Disks.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyImageRequest(proto.Message): + r"""A request message for Images.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyInstanceRequest(proto.Message): + r"""A request message for Instances.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyInstanceTemplateRequest(proto.Message): + r"""A request message for InstanceTemplates.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyInstantSnapshotRequest(proto.Message): + r"""A request message for InstantSnapshots.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for + InterconnectAttachmentGroups.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyLicenseRequest(proto.Message): + r"""A request message for Licenses.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyMachineImageRequest(proto.Message): + r"""A request message for MachineImages.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyNetworkAttachmentRequest(proto.Message): + r"""A request message for NetworkAttachments.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.GetIamPolicy. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyNodeTemplateRequest(proto.Message): + r"""A request message for NodeTemplates.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionBackendServiceRequest(proto.Message): + r"""A request message for RegionBackendServices.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionInstantSnapshotRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.GetIamPolicy. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyReservationRequest(proto.Message): + r"""A request message for Reservations.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicyResourcePolicyRequest(proto.Message): + r"""A request message for ResourcePolicies.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyServiceAttachmentRequest(proto.Message): + r"""A request message for ServiceAttachments.GetIamPolicy. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicySnapshotRequest(proto.Message): + r"""A request message for Snapshots.GetIamPolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetIamPolicyStoragePoolRequest(proto.Message): + r"""A request message for StoragePools.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetIamPolicySubnetworkRequest(proto.Message): + r"""A request message for Subnetworks.GetIamPolicy. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + options_requested_policy_version (int): + Requested IAM Policy version. + + This field is a member of `oneof`_ ``_options_requested_policy_version``. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + """ + + options_requested_policy_version: int = proto.Field( + proto.INT32, + number=499220029, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + +class GetImageFamilyViewRequest(proto.Message): + r"""A request message for ImageFamilyViews.Get. See the method + description for details. + + Attributes: + family (str): + Name of the image family to search for. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + family: str = proto.Field( + proto.STRING, + number=328751972, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetImageRequest(proto.Message): + r"""A request message for Images.Get. See the method description + for details. + + Attributes: + image (str): + Name of the image resource to return. + project (str): + Project ID for this request. + """ + + image: str = proto.Field( + proto.STRING, + number=100313435, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.Get. See the + method description for details. + + Attributes: + instance_group_manager (str): + The name of the managed instance group. + project (str): + Project ID for this request. + zone (str): + The name of thezone where the managed + instance group is located. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for InstanceGroupManagerResizeRequests.Get. + See the method description for details. + + Attributes: + instance_group_manager (str): + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. + project (str): + Project ID for this request. + resize_request (str): + The name of the resize request. + Name should conform to RFC1035 or be a resource + ID. + zone (str): + Name of the + href="/compute/docs/regions-zones/#available">zone + scoping this request. Name should conform to + RFC1035. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resize_request: str = proto.Field( + proto.STRING, + number=216941060, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInstanceGroupRequest(proto.Message): + r"""A request message for InstanceGroups.Get. See the method + description for details. + + Attributes: + instance_group (str): + The name of the instance group. + project (str): + Project ID for this request. + zone (str): + The name of the zone + where the instance group is located. + """ + + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInstanceRequest(proto.Message): + r"""A request message for Instances.Get. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance (str): + Name of the instance resource to return. + project (str): + Project ID for this request. + view (str): + View of the instance. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. + zone (str): + The name of the zone for this request. + """ + + class View(proto.Enum): + r"""View of the instance. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInstanceSettingRequest(proto.Message): + r"""A request message for InstanceSettingsService.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInstanceTemplateRequest(proto.Message): + r"""A request message for InstanceTemplates.Get. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_template (str): + The name of the instance template. + project (str): + Project ID for this request. + view (str): + View of the instance template. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. + """ + + class View(proto.Enum): + r"""View of the instance template. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + + instance_template: str = proto.Field( + proto.STRING, + number=309248228, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) + + +class GetInstantSnapshotRequest(proto.Message): + r"""A request message for InstantSnapshots.Get. See the method + description for details. + + Attributes: + instant_snapshot (str): + Name of the InstantSnapshot resource to + return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + instant_snapshot: str = proto.Field( + proto.STRING, + number=391638626, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for InterconnectAttachmentGroups.Get. See + the method description for details. + + Attributes: + interconnect_attachment_group (str): + Name of the InterconnectAttachmentGroup + resource to return. + project (str): + Project ID for this request. + """ + + interconnect_attachment_group: str = proto.Field( + proto.STRING, + number=75905012, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetInterconnectAttachmentRequest(proto.Message): + r"""A request message for InterconnectAttachments.Get. See the + method description for details. + + Attributes: + interconnect_attachment (str): + Name of the interconnect attachment to + return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + interconnect_attachment: str = proto.Field( + proto.STRING, + number=308135284, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.Get. See the method + description for details. + + Attributes: + interconnect_group (str): + Name of the InterconnectGroup resource to + return. + project (str): + Project ID for this request. + """ + + interconnect_group: str = proto.Field( + proto.STRING, + number=388651918, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetInterconnectLocationRequest(proto.Message): + r"""A request message for InterconnectLocations.Get. See the + method description for details. + + Attributes: + interconnect_location (str): + Name of the interconnect location to return. + project (str): + Project ID for this request. + """ + + interconnect_location: str = proto.Field( + proto.STRING, + number=492235846, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetInterconnectRemoteLocationRequest(proto.Message): + r"""A request message for InterconnectRemoteLocations.Get. See + the method description for details. + + Attributes: + interconnect_remote_location (str): + Name of the interconnect remote location to + return. + project (str): + Project ID for this request. + """ + + interconnect_remote_location: str = proto.Field( + proto.STRING, + number=290153949, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetInterconnectRequest(proto.Message): + r"""A request message for Interconnects.Get. See the method + description for details. + + Attributes: + interconnect (str): + Name of the interconnect to return. + project (str): + Project ID for this request. + """ + + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetLicenseCodeRequest(proto.Message): + r"""A request message for LicenseCodes.Get. See the method + description for details. + + Attributes: + license_code (str): + Number corresponding to the License code + resource to return. + project (str): + Project ID for this request. + """ + + license_code: str = proto.Field( + proto.STRING, + number=1467179, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetLicenseRequest(proto.Message): + r"""A request message for Licenses.Get. See the method + description for details. + + Attributes: + license_ (str): + Name of the License resource to return. + project (str): + Project ID for this request. + """ + + license_: str = proto.Field( + proto.STRING, + number=166757441, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetMachineImageRequest(proto.Message): + r"""A request message for MachineImages.Get. See the method + description for details. + + Attributes: + machine_image (str): + The name of the machine image. + project (str): + Project ID for this request. + """ + + machine_image: str = proto.Field( + proto.STRING, + number=69189475, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetMachineTypeRequest(proto.Message): + r"""A request message for MachineTypes.Get. See the method + description for details. + + Attributes: + machine_type (str): + Name of the machine type to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + machine_type: str = proto.Field( + proto.STRING, + number=227711026, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetMacsecConfigInterconnectRequest(proto.Message): + r"""A request message for Interconnects.GetMacsecConfig. See the + method description for details. + + Attributes: + interconnect (str): + Name of the interconnect resource to query. + project (str): + Project ID for this request. + """ + + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetNatIpInfoRouterRequest(proto.Message): + r"""A request message for Routers.GetNatIpInfo. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + nat_name (str): + Name of the nat service to filter the NAT IP + information. If it is omitted, all nats for this + router will be returned. Name should conform to + RFC1035. + + This field is a member of `oneof`_ ``_nat_name``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + router (str): + Name of the Router resource to query for Nat + IP information. The name should conform to + RFC1035. + """ + + nat_name: str = proto.Field( + proto.STRING, + number=425596649, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + router: str = proto.Field( + proto.STRING, + number=148608841, + ) + + +class GetNatMappingInfoRoutersRequest(proto.Message): + r"""A request message for Routers.GetNatMappingInfo. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + nat_name (str): + Name of the nat service to filter the Nat + Mapping information. If it is omitted, all nats + for this router will be returned. Name should + conform to RFC1035. + + This field is a member of `oneof`_ ``_nat_name``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + router (str): + Name of the Router resource to query for Nat + Mapping information of VM endpoints. + """ + + filter: str = proto.Field( + proto.STRING, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + nat_name: str = proto.Field( + proto.STRING, + number=425596649, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + router: str = proto.Field( + proto.STRING, + number=148608841, + ) + + +class GetNetworkAttachmentRequest(proto.Message): + r"""A request message for NetworkAttachments.Get. See the method + description for details. + + Attributes: + network_attachment (str): + Name of the NetworkAttachment resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + """ + + network_attachment: str = proto.Field( + proto.STRING, + number=224644052, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetNetworkEdgeSecurityServiceRequest(proto.Message): + r"""A request message for NetworkEdgeSecurityServices.Get. See + the method description for details. + + Attributes: + network_edge_security_service (str): + Name of the network edge security service to + get. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + network_edge_security_service: str = proto.Field( + proto.STRING, + number=157011879, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetNetworkEndpointGroupRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.Get. See the + method description for details. + + Attributes: + network_endpoint_group (str): + The name of the network endpoint group. It + should comply with RFC1035. + project (str): + Project ID for this request. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. + """ + + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.Get. See the + method description for details. + + Attributes: + firewall_policy (str): + Name of the firewall policy to get. + project (str): + Project ID for this request. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetNetworkProfileRequest(proto.Message): + r"""A request message for NetworkProfiles.Get. See the method + description for details. + + Attributes: + network_profile (str): + Name of the network profile to return. + project (str): + Project ID for this request. + """ + + network_profile: str = proto.Field( + proto.STRING, + number=173112472, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetNetworkRequest(proto.Message): + r"""A request message for Networks.Get. See the method + description for details. + + Attributes: + network (str): + Name of the network to return. + project (str): + Project ID for this request. + """ + + network: str = proto.Field( + proto.STRING, + number=232872494, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.Get. See the method + description for details. + + Attributes: + node_group (str): + Name of the node group to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + node_group: str = proto.Field( + proto.STRING, + number=469958146, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetNodeTemplateRequest(proto.Message): + r"""A request message for NodeTemplates.Get. See the method + description for details. + + Attributes: + node_template (str): + Name of the node template to return. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + """ + + node_template: str = proto.Field( + proto.STRING, + number=323154455, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetNodeTypeRequest(proto.Message): + r"""A request message for NodeTypes.Get. See the method + description for details. + + Attributes: + node_type (str): + Name of the node type to return. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + node_type: str = proto.Field( + proto.STRING, + number=465832791, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetOperationalStatusInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for + InterconnectAttachmentGroups.GetOperationalStatus. See the + method description for details. + + Attributes: + interconnect_attachment_group (str): + Name of the interconnectAttachmentGroup + resource to query. + project (str): + Project ID for this request. + """ + + interconnect_attachment_group: str = proto.Field( + proto.STRING, + number=75905012, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetOperationalStatusInterconnectGroupRequest(proto.Message): + r"""A request message for + InterconnectGroups.GetOperationalStatus. See the method + description for details. + + Attributes: + interconnect_group (str): + Name of the interconnectGroup resource to + query. + project (str): + Project ID for this request. + """ + + interconnect_group: str = proto.Field( + proto.STRING, + number=388651918, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.Get. See + the method description for details. + + Attributes: + security_policy (str): + Name of the security policy to get. + """ + + security_policy: str = proto.Field( + proto.STRING, + number=171082513, + ) + + +class GetPacketMirroringRequest(proto.Message): + r"""A request message for PacketMirrorings.Get. See the method + description for details. + + Attributes: + packet_mirroring (str): + Name of the PacketMirroring resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + packet_mirroring: str = proto.Field( + proto.STRING, + number=22305996, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetPacketMirroringRuleFirewallPolicyRequest(proto.Message): + r"""A request message for + FirewallPolicies.GetPacketMirroringRule. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + firewall policy. + + This field is a member of `oneof`_ ``_priority``. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + + +class GetPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + NetworkFirewallPolicies.GetPacketMirroringRule. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + firewall policy. + + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetPartnerMetadataInstanceRequest(proto.Message): + r"""A request message for Instances.GetPartnerMetadata. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance (str): + Name of the instance scoping this request. + namespaces (str): + Comma separated partner metadata namespaces. + + This field is a member of `oneof`_ ``_namespaces``. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + namespaces: str = proto.Field( + proto.STRING, + number=164058744, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class GetPreviewFeatureRequest(proto.Message): + r"""A request message for PreviewFeatures.Get. See the method + description for details. + + Attributes: + preview_feature (str): + Name of the PreviewFeature for this request. + project (str): + Project ID for this request. + """ + + preview_feature: str = proto.Field( + proto.STRING, + number=454999423, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetProjectRequest(proto.Message): + r"""A request message for Projects.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + + +class GetPublicAdvertisedPrefixeRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + public_advertised_prefix (str): + Name of the PublicAdvertisedPrefix resource + to return. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + public_advertised_prefix: str = proto.Field( + proto.STRING, + number=101874590, + ) + + +class GetPublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + public_delegated_prefix (str): + Name of the PublicDelegatedPrefix resource to + return. + region (str): + Name of the region of this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + public_delegated_prefix: str = proto.Field( + proto.STRING, + number=204238440, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionAutoscalerRequest(proto.Message): + r"""A request message for RegionAutoscalers.Get. See the method + description for details. + + Attributes: + autoscaler (str): + Name of the autoscaler to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + autoscaler: str = proto.Field( + proto.STRING, + number=517258967, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Get. See the + method description for details. + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionBackendServiceRequest(proto.Message): + r"""A request message for RegionBackendServices.Get. See the + method description for details. + + Attributes: + backend_service (str): + Name of the BackendService resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionCommitmentRequest(proto.Message): + r"""A request message for RegionCommitments.Get. See the method + description for details. + + Attributes: + commitment (str): + Name of the commitment to return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + commitment: str = proto.Field( + proto.STRING, + number=482134805, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Get. See + the method description for details. + + Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.Get. See the method + description for details. + + Attributes: + disk (str): + Name of the regional persistent disk to + return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + disk: str = proto.Field( + proto.STRING, + number=3083677, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionDiskSettingRequest(proto.Message): + r"""A request message for RegionDiskSettings.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionDiskTypeRequest(proto.Message): + r"""A request message for RegionDiskTypes.Get. See the method + description for details. + + Attributes: + disk_type (str): + Name of the disk type to return. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + """ + + disk_type: str = proto.Field( + proto.STRING, + number=93009052, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Get. + See the method description for details. + + Attributes: + health_aggregation_policy (str): + Name of the HealthAggregationPolicy resource + to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionHealthCheckRequest(proto.Message): + r"""A request message for RegionHealthChecks.Get. See the method + description for details. + + Attributes: + health_check (str): + Name of the HealthCheck resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + health_check: str = proto.Field( + proto.STRING, + number=308876645, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionHealthCheckServiceRequest(proto.Message): + r"""A request message for RegionHealthCheckServices.Get. See the + method description for details. + + Attributes: + health_check_service (str): + Name of the HealthCheckService to update. The + name must be 1-63 characters long, and comply + with RFC1035. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + health_check_service: str = proto.Field( + proto.STRING, + number=408374747, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionHealthSourceRequest(proto.Message): + r"""A request message for RegionHealthSources.Get. See the method + description for details. + + Attributes: + health_source (str): + Name of the HealthSource resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + health_source: str = proto.Field( + proto.STRING, + number=376521566, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.Get. See + the method description for details. + + Attributes: + instance_group_manager (str): + Name of the managed instance group to return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagerResizeRequests.Get. See the method + description for details. + + Attributes: + instance_group_manager (str): + The name of the managed instance group. + Name should conform to RFC1035 or be a resource + ID. + project (str): + Project ID for this request. + region (str): + The name of the region + scoping this request. Name should conform to + RFC1035. + resize_request (str): + The name of the resize request. + Name should conform to RFC1035 or be a resource + ID. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resize_request: str = proto.Field( + proto.STRING, + number=216941060, + ) + + +class GetRegionInstanceGroupRequest(proto.Message): + r"""A request message for RegionInstanceGroups.Get. See the + method description for details. + + Attributes: + instance_group (str): + Name of the instance group resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionInstanceTemplateRequest(proto.Message): + r"""A request message for RegionInstanceTemplates.Get. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_template (str): + The name of the instance template. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + view (str): + View of the instance template. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. + """ + + class View(proto.Enum): + r"""View of the instance template. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + + instance_template: str = proto.Field( + proto.STRING, + number=309248228, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) + + +class GetRegionInstantSnapshotRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.Get. See the + method description for details. + + Attributes: + instant_snapshot (str): + Name of the InstantSnapshot resource to + return. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + """ + + instant_snapshot: str = proto.Field( + proto.STRING, + number=391638626, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionMultiMigRequest(proto.Message): + r"""A request message for RegionMultiMigs.Get. See the method + description for details. + + Attributes: + multi_mig (str): + Name of the multi-MIG resource to return. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + multi_mig: str = proto.Field( + proto.STRING, + number=403990085, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionNetworkEndpointGroupRequest(proto.Message): + r"""A request message for RegionNetworkEndpointGroups.Get. See + the method description for details. + + Attributes: + network_endpoint_group (str): + The name of the network endpoint group. It + should comply with RFC1035. + project (str): + Project ID for this request. + region (str): + The name of the region where + the network endpoint group is located. It should + comply with RFC1035. + """ + + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for RegionNetworkFirewallPolicies.Get. See + the method description for details. + + Attributes: + firewall_policy (str): + Name of the firewall policy to get. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionNetworkPolicyRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.Get. See the + method description for details. + + Attributes: + network_policy (str): + Name of the network policy resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + """ + + network_policy: str = proto.Field( + proto.STRING, + number=504961123, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionNotificationEndpointRequest(proto.Message): + r"""A request message for RegionNotificationEndpoints.Get. See + the method description for details. + + Attributes: + notification_endpoint (str): + Name of the NotificationEndpoint resource to + return. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + """ + + notification_endpoint: str = proto.Field( + proto.STRING, + number=376807017, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionOperationRequest(proto.Message): + r"""A request message for RegionOperations.Get. See the method + description for details. + + Attributes: + operation (str): + Name of the Operations resource to return, or + its unique numeric identifier. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + operation: str = proto.Field( + proto.STRING, + number=52090215, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionRequest(proto.Message): + r"""A request message for Regions.Get. See the method description + for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region resource to return. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionSecurityPolicyRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + security_policy (str): + Name of the security policy to get. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, + ) + + +class GetRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + snapshot (str): + Name of the Snapshot resource to return. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + snapshot: str = proto.Field( + proto.STRING, + number=284874180, + ) + + +class GetRegionSnapshotSettingRequest(proto.Message): + r"""A request message for RegionSnapshotSettings.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + + +class GetRegionSslCertificateRequest(proto.Message): + r"""A request message for RegionSslCertificates.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + ssl_certificate (str): + Name of the SslCertificate resource to + return. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + ssl_certificate: str = proto.Field( + proto.STRING, + number=46443492, + ) + + +class GetRegionSslPolicyRequest(proto.Message): + r"""A request message for RegionSslPolicies.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + ssl_policy (str): + Name of the SSL policy to update. The name + must be 1-63 characters long, and comply with + RFC1035. + """ + + project: str = proto.Field( proto.STRING, - number=306946058, - optional=True, + number=227560217, ) - base_forwarding_rule: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=524873104, - optional=True, + number=138946292, ) - creation_timestamp: str = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=295190213, ) - description: str = proto.Field( + + +class GetRegionTargetHttpProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpProxies.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + target_http_proxy (str): + Name of the TargetHttpProxy resource to + return. + """ + + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=227560217, ) - external_managed_backend_bucket_migration_state: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=107811370, - optional=True, - ) - external_managed_backend_bucket_migration_testing_percentage: float = proto.Field( - proto.FLOAT, - number=105676592, - optional=True, + number=138946292, ) - fingerprint: str = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, - number=234678500, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=206872421, ) - ip_collection: str = proto.Field( + + +class GetRegionTargetHttpsProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpsProxies.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + target_https_proxy (str): + Name of the TargetHttpsProxy resource to + return. + """ + + project: str = proto.Field( proto.STRING, - number=176818358, - optional=True, + number=227560217, ) - ip_version: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=294959552, - optional=True, - ) - is_mirroring_collector: bool = proto.Field( - proto.BOOL, - number=119255164, - optional=True, + number=138946292, ) - kind: str = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=52336748, ) - label_fingerprint: str = proto.Field( + + +class GetRegionTargetTcpProxyRequest(proto.Message): + r"""A request message for RegionTargetTcpProxies.Get. See the + method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + target_tcp_proxy (str): + Name of the TargetTcpProxy resource to + return. + """ + + project: str = proto.Field( proto.STRING, - number=178124825, - optional=True, + number=227560217, ) - labels: MutableMapping[str, str] = proto.MapField( + region: str = proto.Field( proto.STRING, + number=138946292, + ) + target_tcp_proxy: str = proto.Field( proto.STRING, - number=500195327, + number=503065442, ) - load_balancing_scheme: str = proto.Field( + + +class GetRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + url_map (str): + Name of the UrlMap resource to return. + """ + + project: str = proto.Field( proto.STRING, - number=363890244, - optional=True, + number=227560217, ) - metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( - proto.MESSAGE, - number=464725739, - message="MetadataFilter", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - name: str = proto.Field( + url_map: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=367020684, ) - network: str = proto.Field( + + +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. + reservation (str): + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. + 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=232872494, - optional=True, + number=227560217, ) - network_tier: str = proto.Field( + reservation: str = proto.Field( proto.STRING, - number=517397843, - optional=True, + number=47530956, ) - no_automate_dns_zone: bool = proto.Field( - proto.BOOL, - number=64546991, - optional=True, + reservation_block: str = proto.Field( + proto.STRING, + number=532832858, ) - port_range: str = proto.Field( + view: str = proto.Field( proto.STRING, - number=217518079, + number=3619493, optional=True, ) - ports: MutableSequence[str] = proto.RepeatedField( + zone: str = proto.Field( proto.STRING, - number=106854418, + number=3744684, ) - psc_connection_id: int = proto.Field( - proto.UINT64, - number=292082397, - optional=True, + + +class GetReservationRequest(proto.Message): + r"""A request message for Reservations.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + reservation (str): + Name of the reservation to retrieve. + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - psc_connection_status: str = proto.Field( + reservation: str = proto.Field( proto.STRING, - number=184149172, - optional=True, + number=47530956, ) - region: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=138946292, - optional=True, + number=3744684, ) - self_link: str = proto.Field( + + +class GetReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.Get. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + parent_name (str): + The name of the parent reservation and parent block. In the + format of + reservations/{reservation_name}/reservationBlocks/{reservation_block_name} + project (str): + Project ID for this request. + reservation_sub_block (str): + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. + view (str): + View of the subBlock. + 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 subBlock. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + SUB_BLOCK_VIEW_BASIC (236009797): + This view includes basic information about + the reservation sub block + SUB_BLOCK_VIEW_FULL (440711800): + Includes detailed topology view. + SUB_BLOCK_VIEW_UNSPECIFIED (246642446): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + SUB_BLOCK_VIEW_BASIC = 236009797 + SUB_BLOCK_VIEW_FULL = 440711800 + SUB_BLOCK_VIEW_UNSPECIFIED = 246642446 + + parent_name: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=478151936, ) - self_link_with_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=44520962, - optional=True, + number=227560217, ) - service_directory_registrations: MutableSequence[ - "ForwardingRuleServiceDirectoryRegistration" - ] = proto.RepeatedField( - proto.MESSAGE, - number=223549694, - message="ForwardingRuleServiceDirectoryRegistration", + reservation_sub_block: str = proto.Field( + proto.STRING, + number=22750491, ) - service_label: str = proto.Field( + view: str = proto.Field( proto.STRING, - number=417008874, + number=3619493, optional=True, ) - service_name: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=359880149, - optional=True, + number=3744684, ) - source_ip_ranges: MutableSequence[str] = proto.RepeatedField( + + +class GetResourcePolicyRequest(proto.Message): + r"""A request message for ResourcePolicies.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + resource_policy (str): + Name of the resource policy to retrieve. + """ + + project: str = proto.Field( proto.STRING, - number=111563210, + number=227560217, ) - subnetwork: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=307827694, - optional=True, + number=138946292, ) - target: str = proto.Field( + resource_policy: str = proto.Field( proto.STRING, - number=192835985, - optional=True, + number=159240835, ) -class ForwardingRuleAggregatedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetRolloutPlanRequest(proto.Message): + r"""A request message for RolloutPlans.Get. See the method + description for details. Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.ForwardingRulesScopedList]): - A list of ForwardingRulesScopedList - resources. - kind (str): - [Output Only] Type of resource. Always - compute#forwardingRuleAggregatedList for lists of forwarding - rules. + project (str): + Project ID for this request. + rollout_plan (str): + Name of the persistent rollout plan to + return. + """ - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + rollout_plan: str = proto.Field( + proto.STRING, + number=459057399, + ) - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. +class GetRolloutRequest(proto.Message): + r"""A request message for Rollouts.Get. See the method + description for details. - This field is a member of `oneof`_ ``_warning``. + Attributes: + project (str): + Project ID for this request. + rollout (str): + Name of the persistent rollout to return. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=227560217, ) - items: MutableMapping[str, "ForwardingRulesScopedList"] = proto.MapField( + rollout: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=100526016, - message="ForwardingRulesScopedList", + number=303366577, ) - kind: str = proto.Field( + + +class GetRoutePolicyRouterRequest(proto.Message): + r"""A request message for Routers.GetRoutePolicy. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + policy (str): + The Policy name for this request. Name must + conform to RFC1035 + + This field is a member of `oneof`_ ``_policy``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + router (str): + Name of the Router resource to query for the + route policy. The name should conform to + RFC1035. + """ + + policy: str = proto.Field( proto.STRING, - number=3292052, + number=91071794, optional=True, ) - next_page_token: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=138946292, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + router: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=148608841, ) -class ForwardingRuleList(proto.Message): - r"""Contains a list of ForwardingRule resources. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetRouteRequest(proto.Message): + r"""A request message for Routes.Get. See the method description + for details. Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRule]): - A list of ForwardingRule resources. - kind (str): - Type of resource. + project (str): + Project ID for this request. + route (str): + Name of the Route resource to return. + """ - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + route: str = proto.Field( + proto.STRING, + number=108704329, + ) - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. +class GetRouterRequest(proto.Message): + r"""A request message for Routers.Get. See the method description + for details. - This field is a member of `oneof`_ ``_warning``. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + router (str): + Name of the Router resource to return. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=227560217, ) - items: MutableSequence["ForwardingRule"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="ForwardingRule", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - kind: str = proto.Field( + router: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=148608841, ) - next_page_token: str = proto.Field( + + +class GetRouterStatusRouterRequest(proto.Message): + r"""A request message for Routers.GetRouterStatus. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + router (str): + Name of the Router resource to query. + """ + + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=138946292, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + router: str = proto.Field( + proto.STRING, + number=148608841, ) -class ForwardingRuleReference(proto.Message): - r""" +class GetRuleFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.GetRule. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - forwarding_rule (str): + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + firewall policy. - This field is a member of `oneof`_ ``_forwarding_rule``. + This field is a member of `oneof`_ ``_priority``. """ - forwarding_rule: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=269964030, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) -class ForwardingRuleServiceDirectoryRegistration(proto.Message): - r"""Describes the auto-registration of the forwarding rule to - Service Directory. The region and project of the Service - Directory resource generated from this registration will be the - same as this forwarding rule. +class GetRuleNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.GetRule. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - namespace (str): - Service Directory namespace to register the - forwarding rule under. - - This field is a member of `oneof`_ ``_namespace``. - service (str): - Service Directory service to register the - forwarding rule under. - - This field is a member of `oneof`_ ``_service``. - service_directory_region (str): - [Optional] Service Directory region to register this global - forwarding rule under. Default to "us-central1". Only used - for PSC for Google APIs. All PSC for Google APIs forwarding - rules on the same network should use the same Service - Directory region. + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + firewall policy. - This field is a member of `oneof`_ ``_service_directory_region``. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. """ - namespace: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=178476379, - optional=True, + number=498173265, ) - service: str = proto.Field( - proto.STRING, - number=373540533, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - service_directory_region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=74030416, - optional=True, + number=227560217, ) -class ForwardingRulesScopedList(proto.Message): - r""" +class GetRuleOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.GetRule. + See the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - forwarding_rules (MutableSequence[google.cloud.compute_v1beta.types.ForwardingRule]): - A list of forwarding rules contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of forwarding rules when the list is empty. + priority (int): + The priority of the rule to get from the + security policy. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_priority``. + security_policy (str): + Name of the security policy to which the + queried rule belongs. """ - forwarding_rules: MutableSequence["ForwardingRule"] = proto.RepeatedField( - proto.MESSAGE, - number=315821365, - message="ForwardingRule", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, - message="Warning", + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, ) -class FutureReservation(proto.Message): - r""" +class GetRuleRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for RegionNetworkFirewallPolicies.GetRule. + See the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - aggregate_reservation (google.cloud.compute_v1beta.types.AllocationAggregateReservation): - Aggregate reservation details for the future - reservation. - - This field is a member of `oneof`_ ``_aggregate_reservation``. - auto_created_reservations_delete_time (str): - Future timestamp when the FR auto-created - reservations will be deleted by Compute Engine. - Format of this field must be a valid - href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 - value. - - This field is a member of `oneof`_ ``_auto_created_reservations_delete_time``. - auto_created_reservations_duration (google.cloud.compute_v1beta.types.Duration): - Specifies the duration of auto-created reservations. It - represents relative time to future reservation start_time - when auto-created reservations will be automatically deleted - by Compute Engine. Duration time unit is represented as a - count of seconds and fractions of seconds at nanosecond - resolution. - - This field is a member of `oneof`_ ``_auto_created_reservations_duration``. - auto_delete_auto_created_reservations (bool): - Setting for enabling or disabling automatic deletion for - auto-created reservation. If set to true, auto-created - reservations will be deleted at Future Reservation's end - time (default) or at user's defined timestamp if any of the - [auto_created_reservations_delete_time, - auto_created_reservations_duration] values is specified. For - keeping auto-created reservation indefinitely, this value - should be set to false. - - This field is a member of `oneof`_ ``_auto_delete_auto_created_reservations``. - commitment_info (google.cloud.compute_v1beta.types.FutureReservationCommitmentInfo): - If not present, then FR will not deliver a - new commitment or update an existing commitment. - - This field is a member of `oneof`_ ``_commitment_info``. - creation_timestamp (str): - [Output Only] The creation timestamp for this future - reservation in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - deployment_type (str): - Type of the deployment requested as part of - future reservation. Check the DeploymentType - enum for the list of possible values. - - This field is a member of `oneof`_ ``_deployment_type``. - description (str): - An optional description of this resource. - Provide this property when you create the future - reservation. - - This field is a member of `oneof`_ ``_description``. - enable_emergent_maintenance (bool): - Indicates if this group of VMs have emergent - maintenance enabled. - - This field is a member of `oneof`_ ``_enable_emergent_maintenance``. - id (int): - [Output Only] A unique identifier for this future - reservation. The server defines this identifier. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#futureReservation for future reservations. - - This field is a member of `oneof`_ ``_kind``. - name (str): - The name of the resource, provided by the client when - initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. - - This field is a member of `oneof`_ ``_name``. - name_prefix (str): - Name prefix for the reservations to be - created at the time of delivery. The name prefix - must comply with RFC1035. Maximum allowed length - for name prefix is 20. Automatically created - reservations name format will be -date-####. - - This field is a member of `oneof`_ ``_name_prefix``. - planning_status (str): - Planning state before being submitted for - evaluation Check the PlanningStatus enum for the - list of possible values. - - This field is a member of `oneof`_ ``_planning_status``. - protection_tier (str): - Protection tier for the workload. - Check the ProtectionTier enum for the list of - possible values. - - This field is a member of `oneof`_ ``_protection_tier``. - reservation_mode (str): - The reservation mode which determines - reservation-termination behavior and expected - pricing. Check the ReservationMode enum for the - list of possible values. - - This field is a member of `oneof`_ ``_reservation_mode``. - reservation_name (str): - Name of reservations where the capacity is provisioned at - the time of delivery of future reservations. If the - reservation with the given name does not exist already, it - is created automatically at the time of Approval with - INACTIVE state till specified start-time. Either provide the - reservation_name or a name_prefix. - - This field is a member of `oneof`_ ``_reservation_name``. - scheduling_type (str): - Maintenance information for this reservation - Check the SchedulingType enum for the list of - possible values. - - This field is a member of `oneof`_ ``_scheduling_type``. - self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. - - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. - - This field is a member of `oneof`_ ``_self_link_with_id``. - share_settings (google.cloud.compute_v1beta.types.ShareSettings): - List of Projects/Folders to share with. - - This field is a member of `oneof`_ ``_share_settings``. - specific_reservation_required (bool): - Indicates whether the auto-created - reservation can be consumed by VMs with affinity - for "any" reservation. If the field is set, then - only VMs that target the reservation by name can - consume from the delivered reservation. - - This field is a member of `oneof`_ ``_specific_reservation_required``. - specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationSpecificSKUProperties): - Future Reservation configuration to indicate - instance properties and total count. - - This field is a member of `oneof`_ ``_specific_sku_properties``. - status (google.cloud.compute_v1beta.types.FutureReservationStatus): - [Output only] Status of the Future Reservation - - This field is a member of `oneof`_ ``_status``. - time_window (google.cloud.compute_v1beta.types.FutureReservationTimeWindow): - Time window for this Future Reservation. - - This field is a member of `oneof`_ ``_time_window``. - zone (str): - [Output Only] URL of the Zone where this future reservation - resides. + firewall_policy (str): + Name of the firewall policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + firewall policy. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. """ - class DeploymentType(proto.Enum): - r"""Type of the deployment requested as part of future - reservation. - - Values: - UNDEFINED_DEPLOYMENT_TYPE (0): - A value indicating that the enum field is not - set. - DENSE (64932607): - The reserved capacity is made up of densely - deployed reservation blocks. - DEPLOYMENT_TYPE_UNSPECIFIED (234847180): - No description available. - FLEXIBLE (379880395): - The reserved capacity is made up of highly - flexible, logical reservation blocks. - """ - UNDEFINED_DEPLOYMENT_TYPE = 0 - DENSE = 64932607 - DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 - FLEXIBLE = 379880395 - - class PlanningStatus(proto.Enum): - r"""Planning state before being submitted for evaluation - - Values: - UNDEFINED_PLANNING_STATUS (0): - A value indicating that the enum field is not - set. - DRAFT (65307009): - Future Reservation is being drafted. - PLANNING_STATUS_UNSPECIFIED (252728940): - No description available. - SUBMITTED (450918619): - Future Reservation has been submitted for - evaluation by GCP. - """ - UNDEFINED_PLANNING_STATUS = 0 - DRAFT = 65307009 - PLANNING_STATUS_UNSPECIFIED = 252728940 - SUBMITTED = 450918619 + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) - class ProtectionTier(proto.Enum): - r"""Protection tier for the workload. - Values: - UNDEFINED_PROTECTION_TIER (0): - A value indicating that the enum field is not - set. - CAPACITY_OPTIMIZED (17430466): - CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. - power, cooling) at the data center during normal operating - conditions. In the event of infrastructure failures at data - center (e.g. power and/or cooling failures), this workload - may be disrupted. As a consequence, it has a weaker - availability SLO than STANDARD. - PROTECTION_TIER_UNSPECIFIED (262261984): - Unspecified protection tier. - STANDARD (484642493): - STANDARD protection for workload that should - be protected by redundancies (e.g. power, - cooling) at the data center level. In the event - of infrastructure failures at data center (e.g. - power and/or cooling failures), this workload is - expected to continue as normal using the - redundancies. - """ - UNDEFINED_PROTECTION_TIER = 0 - CAPACITY_OPTIMIZED = 17430466 - PROTECTION_TIER_UNSPECIFIED = 262261984 - STANDARD = 484642493 +class GetRuleRegionSecurityPolicyRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.GetRule. See the + method description for details. - class ReservationMode(proto.Enum): - r"""The reservation mode which determines reservation-termination - behavior and expected pricing. - Values: - UNDEFINED_RESERVATION_MODE (0): - A value indicating that the enum field is not - set. - CALENDAR (67431230): - The delivered reservations will delivered at - specified start time and terminated at specified - end time along with terminating the VMs running - on it. - DEFAULT (115302945): - The delivered reservations do not terminate - VMs at the end of reservations. This is default - mode. - RESERVATION_MODE_UNSPECIFIED (233810606): - No description available. - """ - UNDEFINED_RESERVATION_MODE = 0 - CALENDAR = 67431230 - DEFAULT = 115302945 - RESERVATION_MODE_UNSPECIFIED = 233810606 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class SchedulingType(proto.Enum): - r"""Maintenance information for this reservation + Attributes: + priority (int): + The priority of the rule to get from the + security policy. - Values: - UNDEFINED_SCHEDULING_TYPE (0): - A value indicating that the enum field is not - set. - GROUPED (474540862): - Maintenance on all reserved instances in the - reservation is synchronized. - GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): - Unknown maintenance type. - INDEPENDENT (127011674): - Maintenance is not synchronized for this - reservation. Instead, each instance has its own - maintenance window. - """ - UNDEFINED_SCHEDULING_TYPE = 0 - GROUPED = 474540862 - GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 - INDEPENDENT = 127011674 + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + security_policy (str): + Name of the security policy to which the + queried rule belongs. + """ - aggregate_reservation: "AllocationAggregateReservation" = proto.Field( - proto.MESSAGE, - number=291567948, - optional=True, - message="AllocationAggregateReservation", - ) - auto_created_reservations_delete_time: str = proto.Field( - proto.STRING, - number=242855120, - optional=True, - ) - auto_created_reservations_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=496244741, - optional=True, - message="Duration", - ) - auto_delete_auto_created_reservations: bool = proto.Field( - proto.BOOL, - number=491352490, - optional=True, - ) - commitment_info: "FutureReservationCommitmentInfo" = proto.Field( - proto.MESSAGE, - number=164362136, - optional=True, - message="FutureReservationCommitmentInfo", - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - deployment_type: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=396722292, - optional=True, + number=227560217, ) - description: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - enable_emergent_maintenance: bool = proto.Field( - proto.BOOL, - number=353759497, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=138946292, ) - kind: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=171082513, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + + +class GetRuleSecurityPolicyRequest(proto.Message): + r"""A request message for SecurityPolicies.GetRule. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + priority (int): + The priority of the rule to get from the + security policy. + + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + security_policy (str): + Name of the security policy to which the + queried rule belongs. + """ + + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - name_prefix: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=236409542, - optional=True, + number=227560217, ) - planning_status: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=19714836, - optional=True, + number=171082513, ) - protection_tier: str = proto.Field( + + +class GetScreenshotInstanceRequest(proto.Message): + r"""A request message for Instances.GetScreenshot. See the method + description for details. + + Attributes: + instance (str): + Name of the instance scoping this request. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ + + instance: str = proto.Field( proto.STRING, - number=503959432, - optional=True, + number=18257045, ) - reservation_mode: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=277294646, - optional=True, + number=227560217, ) - reservation_name: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=277311262, - optional=True, + number=3744684, ) - scheduling_type: str = proto.Field( + + +class GetSecurityPolicyRequest(proto.Message): + r"""A request message for SecurityPolicies.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + security_policy (str): + Name of the security policy to get. + """ + + project: str = proto.Field( proto.STRING, - number=199835397, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=171082513, ) - self_link_with_id: str = proto.Field( + + +class GetSerialPortOutputInstanceRequest(proto.Message): + r"""A request message for Instances.GetSerialPortOutput. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance (str): + Name of the instance for this request. + port (int): + Specifies which COM or serial port to + retrieve data from. + + This field is a member of `oneof`_ ``_port``. + project (str): + Project ID for this request. + start (int): + Specifies the starting byte position of the output to + return. To start with the first byte of output to the + specified port, omit this field or set it to ``0``. + + If the output for that byte position is available, this + field matches the ``start`` parameter sent with the request. + If the amount of serial console output exceeds the size of + the buffer (1 MB), the oldest output is discarded and is no + longer available. If the requested start position refers to + discarded output, the start position is adjusted to the + oldest output still available, and the adjusted start + position is returned as the ``start`` property value. + + You can also provide a negative start position, which + translates to the most recent number of bytes written to the + serial port. For example, -3 is interpreted as the most + recent 3 bytes written to the serial console. Note that the + negative start is bounded by the retained buffer size, and + the returned serial console output will not exceed the max + buffer size. + + This field is a member of `oneof`_ ``_start``. + zone (str): + The name of the zone for this request. + """ + + instance: str = proto.Field( proto.STRING, - number=44520962, - optional=True, - ) - share_settings: "ShareSettings" = proto.Field( - proto.MESSAGE, - number=266668163, - optional=True, - message="ShareSettings", - ) - specific_reservation_required: bool = proto.Field( - proto.BOOL, - number=226550687, - optional=True, + number=18257045, ) - specific_sku_properties: "FutureReservationSpecificSKUProperties" = proto.Field( - proto.MESSAGE, - number=108887106, + port: int = proto.Field( + proto.INT32, + number=3446913, optional=True, - message="FutureReservationSpecificSKUProperties", ) - status: "FutureReservationStatus" = proto.Field( - proto.MESSAGE, - number=181260274, - optional=True, - message="FutureReservationStatus", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - time_window: "FutureReservationTimeWindow" = proto.Field( - proto.MESSAGE, - number=422983074, + start: int = proto.Field( + proto.INT64, + number=109757538, optional=True, - message="FutureReservationTimeWindow", ) zone: str = proto.Field( proto.STRING, number=3744684, - optional=True, ) -class FutureReservationCommitmentInfo(proto.Message): - r""" +class GetServiceAttachmentRequest(proto.Message): + r"""A request message for ServiceAttachments.Get. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - commitment_name (str): - name of the commitment where capacity is - being delivered to. - - This field is a member of `oneof`_ ``_commitment_name``. - commitment_plan (str): - Indicates if a Commitment needs to be created - as part of FR delivery. If this field is not - present, then no commitment needs to be created. - Check the CommitmentPlan enum for the list of - possible values. - - This field is a member of `oneof`_ ``_commitment_plan``. - previous_commitment_terms (str): - Only applicable if FR is delivering to the - same reservation. If set, all parent commitments - will be extended to match the end date of the - plan for this commitment. Check the - PreviousCommitmentTerms enum for the list of - possible values. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + service_attachment (str): + Name of the ServiceAttachment resource to + return. + show_nat_ips (bool): + Indicates whether NAT IPs should be included + in the response. - This field is a member of `oneof`_ ``_previous_commitment_terms``. + This field is a member of `oneof`_ ``_show_nat_ips``. """ - class CommitmentPlan(proto.Enum): - r"""Indicates if a Commitment needs to be created as part of FR - delivery. If this field is not present, then no commitment needs - to be created. - - Values: - UNDEFINED_COMMITMENT_PLAN (0): - A value indicating that the enum field is not - set. - INVALID (530283991): - No description available. - THIRTY_SIX_MONTH (266295942): - No description available. - TWELVE_MONTH (173083962): - No description available. - """ - UNDEFINED_COMMITMENT_PLAN = 0 - INVALID = 530283991 - THIRTY_SIX_MONTH = 266295942 - TWELVE_MONTH = 173083962 - - class PreviousCommitmentTerms(proto.Enum): - r"""Only applicable if FR is delivering to the same reservation. - If set, all parent commitments will be extended to match the end - date of the plan for this commitment. - - Values: - UNDEFINED_PREVIOUS_COMMITMENT_TERMS (0): - A value indicating that the enum field is not - set. - EXTEND (448639770): - All associated parent Committed Used Discount(s) - end-date/term will be extended to the end-time of this - future reservation. Default is to extend previous - commitment(s) time to the end_time of the reservation. - PREVIOUSCOMMITMENTTERM_UNSPECIFIED (98482448): - No changes to associated parents Committed - Used Discount(s) terms. - """ - UNDEFINED_PREVIOUS_COMMITMENT_TERMS = 0 - EXTEND = 448639770 - PREVIOUSCOMMITMENTTERM_UNSPECIFIED = 98482448 - - commitment_name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=164498805, - optional=True, + number=227560217, ) - commitment_plan: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=164568595, - optional=True, + number=138946292, ) - previous_commitment_terms: str = proto.Field( + service_attachment: str = proto.Field( proto.STRING, - number=447490085, + number=338957549, + ) + show_nat_ips: bool = proto.Field( + proto.BOOL, + number=485502156, optional=True, ) -class FutureReservationSpecificSKUProperties(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetShieldedInstanceIdentityInstanceRequest(proto.Message): + r"""A request message for Instances.GetShieldedInstanceIdentity. + See the method description for details. Attributes: - instance_properties (google.cloud.compute_v1beta.types.AllocationSpecificSKUAllocationReservedInstanceProperties): - Properties of the SKU instances being - reserved. + instance (str): + Name or id of the instance scoping this + request. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. + """ - This field is a member of `oneof`_ ``_instance_properties``. - source_instance_template (str): - The instance template that will be used to - populate the ReservedInstanceProperties of the - future reservation + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - This field is a member of `oneof`_ ``_source_instance_template``. - total_count (int): - Total number of instances for which capacity - assurance is requested at a future time period. - This field is a member of `oneof`_ ``_total_count``. +class GetShieldedVmIdentityInstanceRequest(proto.Message): + r"""A request message for Instances.GetShieldedVmIdentity. See + the method description for details. + + Attributes: + instance (str): + Name of the instance scoping this request. + project (str): + Project ID for this request. + zone (str): + The name of the zone for this request. """ - instance_properties: "AllocationSpecificSKUAllocationReservedInstanceProperties" = ( - proto.Field( - proto.MESSAGE, - number=215355165, - optional=True, - message="AllocationSpecificSKUAllocationReservedInstanceProperties", - ) + instance: str = proto.Field( + proto.STRING, + number=18257045, ) - source_instance_template: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=332423616, - optional=True, + number=227560217, ) - total_count: int = proto.Field( - proto.INT64, - number=129109076, - optional=True, + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class FutureReservationStatus(proto.Message): - r"""[Output only] Represents status related to the future reservation. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetSnapshotRequest(proto.Message): + r"""A request message for Snapshots.Get. See the method + description for details. Attributes: - amendment_status (str): - [Output Only] The current status of the requested amendment. - Check the AmendmentStatus enum for the list of possible - values. + project (str): + Project ID for this request. + snapshot (str): + Name of the Snapshot resource to return. + """ - This field is a member of `oneof`_ ``_amendment_status``. - auto_created_reservations (MutableSequence[str]): - Fully qualified urls of the automatically created - reservations at start_time. - existing_matching_usage_info (google.cloud.compute_v1beta.types.FutureReservationStatusExistingMatchingUsageInfo): - [Output Only] Represents the existing matching usage for the - future reservation. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + snapshot: str = proto.Field( + proto.STRING, + number=284874180, + ) - This field is a member of `oneof`_ ``_existing_matching_usage_info``. - fulfilled_count (int): - This count indicates the fulfilled capacity - so far. This is set during "PROVISIONING" state. - This count also includes capacity delivered as - part of existing matching reservations. - This field is a member of `oneof`_ ``_fulfilled_count``. - last_known_good_state (google.cloud.compute_v1beta.types.FutureReservationStatusLastKnownGoodState): - [Output Only] This field represents the future reservation - before an amendment was requested. If the amendment is - declined, the Future Reservation will be reverted to the - last known good state. The last known good state is not set - when updating a future reservation whose Procurement Status - is DRAFTING. +class GetSnapshotSettingRequest(proto.Message): + r"""A request message for SnapshotSettingsService.Get. See the + method description for details. - This field is a member of `oneof`_ ``_last_known_good_state``. - lock_time (str): - Time when Future Reservation would become LOCKED, after - which no modifications to Future Reservation will be - allowed. Applicable only after the Future Reservation is in - the APPROVED state. The lock_time is an RFC3339 string. The - procurement_status will transition to PROCURING state at - this time. + Attributes: + project (str): + Project ID for this request. + """ - This field is a member of `oneof`_ ``_lock_time``. - procurement_status (str): - Current state of this Future Reservation - Check the ProcurementStatus enum for the list of - possible values. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) - This field is a member of `oneof`_ ``_procurement_status``. - specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationStatusSpecificSKUProperties): - This field is a member of `oneof`_ ``_specific_sku_properties``. +class GetSslCertificateRequest(proto.Message): + r"""A request message for SslCertificates.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + ssl_certificate (str): + Name of the SslCertificate resource to + return. """ - class AmendmentStatus(proto.Enum): - r"""[Output Only] The current status of the requested amendment. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + ssl_certificate: str = proto.Field( + proto.STRING, + number=46443492, + ) - Values: - UNDEFINED_AMENDMENT_STATUS (0): - A value indicating that the enum field is not - set. - AMENDMENT_APPROVED (150573001): - The requested amendment to the Future - Resevation has been approved and applied by GCP. - AMENDMENT_DECLINED (70395200): - The requested amendment to the Future - Reservation has been declined by GCP and the - original state was restored. - AMENDMENT_IN_REVIEW (25830624): - The requested amendment to the Future - Reservation is currently being reviewd by GCP. - AMENDMENT_STATUS_UNSPECIFIED (412250332): - No description available. - """ - UNDEFINED_AMENDMENT_STATUS = 0 - AMENDMENT_APPROVED = 150573001 - AMENDMENT_DECLINED = 70395200 - AMENDMENT_IN_REVIEW = 25830624 - AMENDMENT_STATUS_UNSPECIFIED = 412250332 - class ProcurementStatus(proto.Enum): - r"""Current state of this Future Reservation +class GetSslPolicyRequest(proto.Message): + r"""A request message for SslPolicies.Get. See the method + description for details. - Values: - UNDEFINED_PROCUREMENT_STATUS (0): - A value indicating that the enum field is not - set. - APPROVED (357258935): - Future reservation is approved by GCP. - CANCELLED (41957681): - Future reservation is cancelled by the - customer. - COMMITTED (221710172): - Future reservation is committed by the - customer. - DECLINED (277081134): - Future reservation is rejected by GCP. - DRAFTING (477863585): - Related status for PlanningStatus.Draft. Transitions to - PENDING_APPROVAL upon user submitting FR. - FAILED (455706685): - Future reservation failed. No additional - reservations were provided. - FAILED_PARTIALLY_FULFILLED (14455212): - Future reservation is partially fulfilled. Additional - reservations were provided but did not reach total_count - reserved instance slots. - FULFILLED (409958655): - Future reservation is fulfilled completely. - PENDING_AMENDMENT_APPROVAL (510150429): - An Amendment to the Future Reservation has - been requested. If the Amendment is declined, - the Future Reservation will be restored to the - last known good state. - PENDING_APPROVAL (209692683): - Future reservation is pending approval by - GCP. - PROCUREMENT_STATUS_UNSPECIFIED (45807705): - No description available. - PROCURING (95959663): - Future reservation is being procured by GCP. - Beyond this point, Future reservation is locked - and no further modifications are allowed. - PROVISIONING (290896621): - Future reservation capacity is being provisioned. This state - will be entered after start_time, while reservations are - being created to provide total_count reserved instance - slots. This state will not persist past start_time + 24h. - """ - UNDEFINED_PROCUREMENT_STATUS = 0 - APPROVED = 357258935 - CANCELLED = 41957681 - COMMITTED = 221710172 - DECLINED = 277081134 - DRAFTING = 477863585 - FAILED = 455706685 - FAILED_PARTIALLY_FULFILLED = 14455212 - FULFILLED = 409958655 - PENDING_AMENDMENT_APPROVAL = 510150429 - PENDING_APPROVAL = 209692683 - PROCUREMENT_STATUS_UNSPECIFIED = 45807705 - PROCURING = 95959663 - PROVISIONING = 290896621 + Attributes: + project (str): + Project ID for this request. + ssl_policy (str): + Name of the SSL policy to update. The name + must be 1-63 characters long, and comply with + RFC1035. + """ - amendment_status: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=250270052, - optional=True, + number=227560217, ) - auto_created_reservations: MutableSequence[str] = proto.RepeatedField( + ssl_policy: str = proto.Field( proto.STRING, - number=140217006, - ) - existing_matching_usage_info: "FutureReservationStatusExistingMatchingUsageInfo" = ( - proto.Field( - proto.MESSAGE, - number=509920602, - optional=True, - message="FutureReservationStatusExistingMatchingUsageInfo", - ) - ) - fulfilled_count: int = proto.Field( - proto.INT64, - number=319392239, - optional=True, - ) - last_known_good_state: "FutureReservationStatusLastKnownGoodState" = proto.Field( - proto.MESSAGE, - number=192819092, - optional=True, - message="FutureReservationStatusLastKnownGoodState", + number=295190213, ) - lock_time: str = proto.Field( + + +class GetStatusVpnGatewayRequest(proto.Message): + r"""A request message for VpnGateways.GetStatus. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + vpn_gateway (str): + Name of the VPN gateway to return. + """ + + project: str = proto.Field( proto.STRING, - number=143772001, - optional=True, + number=227560217, ) - procurement_status: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=224718945, - optional=True, + number=138946292, ) - specific_sku_properties: "FutureReservationStatusSpecificSKUProperties" = ( - proto.Field( - proto.MESSAGE, - number=108887106, - optional=True, - message="FutureReservationStatusSpecificSKUProperties", - ) + vpn_gateway: str = proto.Field( + proto.STRING, + number=406684153, ) -class FutureReservationStatusExistingMatchingUsageInfo(proto.Message): - r"""[Output Only] Represents the existing matching usage for the future - reservation. +class GetStoragePoolRequest(proto.Message): + r"""A request message for StoragePools.Get. See the method + description for details. + Attributes: + project (str): + Project ID for this request. + storage_pool (str): + Name of the storage pool to return. + zone (str): + The name of the zone for this request. + """ - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + storage_pool: str = proto.Field( + proto.STRING, + number=360473440, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - Attributes: - count (int): - Count to represent min(FR total_count, - matching_reserved_capacity+matching_unreserved_instances) - This field is a member of `oneof`_ ``_count``. - timestamp (str): - Timestamp when the matching usage was - calculated +class GetStoragePoolTypeRequest(proto.Message): + r"""A request message for StoragePoolTypes.Get. See the method + description for details. - This field is a member of `oneof`_ ``_timestamp``. + Attributes: + project (str): + Project ID for this request. + storage_pool_type (str): + Name of the storage pool type to return. + zone (str): + The name of the zone for this request. """ - count: int = proto.Field( - proto.INT64, - number=94851343, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - timestamp: str = proto.Field( + storage_pool_type: str = proto.Field( proto.STRING, - number=55126294, - optional=True, + number=285999289, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class FutureReservationStatusLastKnownGoodState(proto.Message): - r"""The state that the future reservation will be reverted to - should the amendment be declined. +class GetSubnetworkRequest(proto.Message): + r"""A request message for Subnetworks.Get. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - [Output Only] The description of the FutureReservation - before an amendment was requested. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + subnetwork (str): + Name of the Subnetwork resource to return. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: - This field is a member of `oneof`_ ``_description``. - existing_matching_usage_info (google.cloud.compute_v1beta.types.FutureReservationStatusExistingMatchingUsageInfo): - [Output Only] Represents the matching usage for the future - reservation before an amendment was requested. + :: - This field is a member of `oneof`_ ``_existing_matching_usage_info``. - future_reservation_specs (google.cloud.compute_v1beta.types.FutureReservationStatusLastKnownGoodStateFutureReservationSpecs): + - WITH_UTILIZATION: Utilization data is included in the + response. - This field is a member of `oneof`_ ``_future_reservation_specs``. - lock_time (str): - [Output Only] The lock time of the FutureReservation before - an amendment was requested. + Check the Views enum for the list of possible values. - This field is a member of `oneof`_ ``_lock_time``. - name_prefix (str): - [Output Only] The name prefix of the Future Reservation - before an amendment was requested. + This field is a member of `oneof`_ ``_views``. + """ - This field is a member of `oneof`_ ``_name_prefix``. - procurement_status (str): - [Output Only] The status of the last known good state for - the Future Reservation. Check the ProcurementStatus enum for - the list of possible values. + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: - This field is a member of `oneof`_ ``_procurement_status``. - """ + :: - class ProcurementStatus(proto.Enum): - r"""[Output Only] The status of the last known good state for the Future - Reservation. + - WITH_UTILIZATION: Utilization data is included in the + response. Values: - UNDEFINED_PROCUREMENT_STATUS (0): + UNDEFINED_VIEWS (0): A value indicating that the enum field is not set. - APPROVED (357258935): - Future reservation is approved by GCP. - CANCELLED (41957681): - Future reservation is cancelled by the - customer. - COMMITTED (221710172): - Future reservation is committed by the - customer. - DECLINED (277081134): - Future reservation is rejected by GCP. - DRAFTING (477863585): - Related status for PlanningStatus.Draft. Transitions to - PENDING_APPROVAL upon user submitting FR. - FAILED (455706685): - Future reservation failed. No additional - reservations were provided. - FAILED_PARTIALLY_FULFILLED (14455212): - Future reservation is partially fulfilled. Additional - reservations were provided but did not reach total_count - reserved instance slots. - FULFILLED (409958655): - Future reservation is fulfilled completely. - PENDING_AMENDMENT_APPROVAL (510150429): - An Amendment to the Future Reservation has - been requested. If the Amendment is declined, - the Future Reservation will be restored to the - last known good state. - PENDING_APPROVAL (209692683): - Future reservation is pending approval by - GCP. - PROCUREMENT_STATUS_UNSPECIFIED (45807705): + DEFAULT (115302945): No description available. - PROCURING (95959663): - Future reservation is being procured by GCP. - Beyond this point, Future reservation is locked - and no further modifications are allowed. - PROVISIONING (290896621): - Future reservation capacity is being provisioned. This state - will be entered after start_time, while reservations are - being created to provide total_count reserved instance - slots. This state will not persist past start_time + 24h. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. """ - UNDEFINED_PROCUREMENT_STATUS = 0 - APPROVED = 357258935 - CANCELLED = 41957681 - COMMITTED = 221710172 - DECLINED = 277081134 - DRAFTING = 477863585 - FAILED = 455706685 - FAILED_PARTIALLY_FULFILLED = 14455212 - FULFILLED = 409958655 - PENDING_AMENDMENT_APPROVAL = 510150429 - PENDING_APPROVAL = 209692683 - PROCUREMENT_STATUS_UNSPECIFIED = 45807705 - PROCURING = 95959663 - PROVISIONING = 290896621 + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 - description: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - existing_matching_usage_info: "FutureReservationStatusExistingMatchingUsageInfo" = ( - proto.Field( - proto.MESSAGE, - number=509920602, - optional=True, - message="FutureReservationStatusExistingMatchingUsageInfo", - ) - ) - future_reservation_specs: "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" = proto.Field( - proto.MESSAGE, - number=82528873, - optional=True, - message="FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", + number=227560217, ) - lock_time: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=143772001, - optional=True, + number=138946292, ) - name_prefix: str = proto.Field( + subnetwork: str = proto.Field( proto.STRING, - number=236409542, - optional=True, + number=307827694, ) - procurement_status: str = proto.Field( + views: str = proto.Field( proto.STRING, - number=224718945, + number=112204398, optional=True, ) -class FutureReservationStatusLastKnownGoodStateFutureReservationSpecs(proto.Message): - r"""The properties of the last known good state for the Future - Reservation. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetTargetGrpcProxyRequest(proto.Message): + r"""A request message for TargetGrpcProxies.Get. See the method + description for details. Attributes: - share_settings (google.cloud.compute_v1beta.types.ShareSettings): - [Output Only] The previous share settings of the Future - Reservation. - - This field is a member of `oneof`_ ``_share_settings``. - specific_sku_properties (google.cloud.compute_v1beta.types.FutureReservationSpecificSKUProperties): - [Output Only] The previous instance related properties of - the Future Reservation. - - This field is a member of `oneof`_ ``_specific_sku_properties``. - time_window (google.cloud.compute_v1beta.types.FutureReservationTimeWindow): - [Output Only] The previous time window of the Future - Reservation. - - This field is a member of `oneof`_ ``_time_window``. + project (str): + Project ID for this request. + target_grpc_proxy (str): + Name of the TargetGrpcProxy resource to + return. """ - share_settings: "ShareSettings" = proto.Field( - proto.MESSAGE, - number=266668163, - optional=True, - message="ShareSettings", - ) - specific_sku_properties: "FutureReservationSpecificSKUProperties" = proto.Field( - proto.MESSAGE, - number=108887106, - optional=True, - message="FutureReservationSpecificSKUProperties", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - time_window: "FutureReservationTimeWindow" = proto.Field( - proto.MESSAGE, - number=422983074, - optional=True, - message="FutureReservationTimeWindow", + target_grpc_proxy: str = proto.Field( + proto.STRING, + number=5020283, ) -class FutureReservationStatusSpecificSKUProperties(proto.Message): - r"""Properties to be set for the Future Reservation. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetTargetHttpProxyRequest(proto.Message): + r"""A request message for TargetHttpProxies.Get. See the method + description for details. Attributes: - source_instance_template_id (str): - ID of the instance template used to populate - the Future Reservation properties. - - This field is a member of `oneof`_ ``_source_instance_template_id``. + project (str): + Project ID for this request. + target_http_proxy (str): + Name of the TargetHttpProxy resource to + return. """ - source_instance_template_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=111196154, - optional=True, + number=227560217, + ) + target_http_proxy: str = proto.Field( + proto.STRING, + number=206872421, ) -class FutureReservationTimeWindow(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetTargetHttpsProxyRequest(proto.Message): + r"""A request message for TargetHttpsProxies.Get. See the method + description for details. Attributes: - duration (google.cloud.compute_v1beta.types.Duration): + project (str): + Project ID for this request. + target_https_proxy (str): + Name of the TargetHttpsProxy resource to + return. + """ - This field is a member of `oneof`_ ``_duration``. - end_time (str): + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + target_https_proxy: str = proto.Field( + proto.STRING, + number=52336748, + ) - This field is a member of `oneof`_ ``_end_time``. - start_time (str): - Start time of the Future Reservation. The start_time is an - RFC3339 string. - This field is a member of `oneof`_ ``_start_time``. +class GetTargetInstanceRequest(proto.Message): + r"""A request message for TargetInstances.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + target_instance (str): + Name of the TargetInstance resource to + return. + zone (str): + Name of the zone scoping this request. """ - duration: "Duration" = proto.Field( - proto.MESSAGE, - number=155471252, - optional=True, - message="Duration", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - end_time: str = proto.Field( + target_instance: str = proto.Field( proto.STRING, - number=114938801, - optional=True, + number=289769347, ) - start_time: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=37467274, - optional=True, + number=3744684, ) -class FutureReservationsAggregatedListResponse(proto.Message): - r"""Contains a list of future reservations. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.Get. See the method + description for details. Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.FutureReservationsScopedList]): - A list of Future reservation resources. - kind (str): - [Output Only] Type of resource. Always - compute#futureReservationsAggregatedListResponse for future - resevation aggregated list response. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + target_pool (str): + Name of the TargetPool resource to return. + """ - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + target_pool: str = proto.Field( + proto.STRING, + number=62796298, + ) - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. +class GetTargetSslProxyRequest(proto.Message): + r"""A request message for TargetSslProxies.Get. See the method + description for details. - This field is a member of `oneof`_ ``_warning``. + Attributes: + project (str): + Project ID for this request. + target_ssl_proxy (str): + Name of the TargetSslProxy resource to + return. """ - @property - def raw_page(self): - return self - - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=227560217, ) - items: MutableMapping[str, "FutureReservationsScopedList"] = proto.MapField( + target_ssl_proxy: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=100526016, - message="FutureReservationsScopedList", + number=338795853, ) - kind: str = proto.Field( + + +class GetTargetTcpProxyRequest(proto.Message): + r"""A request message for TargetTcpProxies.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + target_tcp_proxy (str): + Name of the TargetTcpProxy resource to + return. + """ + + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=503065442, ) - self_link: str = proto.Field( + + +class GetTargetVpnGatewayRequest(proto.Message): + r"""A request message for TargetVpnGateways.Get. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + target_vpn_gateway (str): + Name of the target VPN gateway to return. + """ + + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + region: str = proto.Field( proto.STRING, - number=243372063, + number=138946292, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + target_vpn_gateway: str = proto.Field( + proto.STRING, + number=532512843, ) -class FutureReservationsListResponse(proto.Message): - r""" +class GetTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkPolicies.GetTrafficClassificationRule. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.FutureReservation]): - [Output Only] A list of future reservation resources. - kind (str): - [Output Only] Type of resource.Always - compute#FutureReservationsListResponse for lists of - reservations - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + network_policy (str): + Name of the network policy to which the + queried rule belongs. + priority (int): + The priority of the rule to get from the + network policy. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. """ - @property - def raw_page(self): - return self - - etag: str = proto.Field( + network_policy: str = proto.Field( proto.STRING, - number=3123477, - optional=True, + number=504961123, ) - id: str = proto.Field( - proto.STRING, - number=3355, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - items: MutableSequence["FutureReservation"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="FutureReservation", - ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( + + +class GetUrlMapRequest(proto.Message): + r"""A request message for UrlMaps.Get. See the method description + for details. + + Attributes: + project (str): + Project ID for this request. + url_map (str): + Name of the UrlMap resource to return. + """ + + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + url_map: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=367020684, ) -class FutureReservationsScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetVpnGatewayRequest(proto.Message): + r"""A request message for VpnGateways.Get. See the method + description for details. Attributes: - future_reservations (MutableSequence[google.cloud.compute_v1beta.types.FutureReservation]): - A list of future reservations contained in - this scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of future reservations when the list is empty. - - This field is a member of `oneof`_ ``_warning``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + vpn_gateway (str): + Name of the VPN gateway to return. """ - future_reservations: MutableSequence["FutureReservation"] = proto.RepeatedField( - proto.MESSAGE, - number=131778339, - message="FutureReservation", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + vpn_gateway: str = proto.Field( + proto.STRING, + number=406684153, ) -class FutureResourcesRecommendation(proto.Message): - r"""Recommendation for single resources specification, to be - created in the future. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetVpnTunnelRequest(proto.Message): + r"""A request message for VpnTunnels.Get. See the method + description for details. Attributes: - end_time (str): + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + vpn_tunnel (str): + Name of the VpnTunnel resource to return. + """ - This field is a member of `oneof`_ ``_end_time``. - location (str): - The advised location for resource usage. When a zone, in - format 'zones/'. If not set, it means that no location is - recommended - see other_locations for details. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + vpn_tunnel: str = proto.Field( + proto.STRING, + number=143821331, + ) - This field is a member of `oneof`_ ``_location``. - other_locations (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesRecommendationOtherLocation]): - List of locations in the request scope that - were not recommended. Keys of the map are zones, - in format 'zones/'. The values are status - information indicating the recommendation - status. - recommendation_id (str): - Unique id of the recommendation, a UUID - string generated by the API. - This field is a member of `oneof`_ ``_recommendation_id``. - recommendation_type (str): - Type of recommendation. Currently only FUTURE_RESERVATION is - supported. Check the RecommendationType enum for the list of - possible values. +class GetWireGroupRequest(proto.Message): + r"""A request message for WireGroups.Get. See the method + description for details. - This field is a member of `oneof`_ ``_recommendation_type``. - start_time (str): + Attributes: + cross_site_network (str): - This field is a member of `oneof`_ ``_start_time``. + project (str): + Project ID for this request. + wire_group (str): + Name of the wire group resource to return. """ - class RecommendationType(proto.Enum): - r"""Type of recommendation. Currently only FUTURE_RESERVATION is - supported. - - Values: - UNDEFINED_RECOMMENDATION_TYPE (0): - A value indicating that the enum field is not - set. - FUTURE_RESERVATION (41036592): - A Future Reservation is recommended. - RECOMMENDATION_TYPE_UNSPECIFIED (140641624): - Default value, unused. - """ - UNDEFINED_RECOMMENDATION_TYPE = 0 - FUTURE_RESERVATION = 41036592 - RECOMMENDATION_TYPE_UNSPECIFIED = 140641624 - - end_time: str = proto.Field( - proto.STRING, - number=114938801, - optional=True, - ) - location: str = proto.Field( - proto.STRING, - number=290430901, - optional=True, - ) - other_locations: MutableMapping[ - str, "FutureResourcesRecommendationOtherLocation" - ] = proto.MapField( + cross_site_network: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=179322095, - message="FutureResourcesRecommendationOtherLocation", + number=108192469, ) - recommendation_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=474540897, - optional=True, + number=227560217, ) - recommendation_type: str = proto.Field( + wire_group: str = proto.Field( proto.STRING, - number=230749184, - optional=True, + number=122540613, ) - start_time: str = proto.Field( + + +class GetXpnHostProjectRequest(proto.Message): + r"""A request message for Projects.GetXpnHost. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + """ + + project: str = proto.Field( proto.STRING, - number=37467274, - optional=True, + number=227560217, ) -class FutureResourcesRecommendationOtherLocation(proto.Message): - r"""Information about recommendation status for locations that - were allowed but not used by the response. +class GetXpnResourcesProjectsRequest(proto.Message): + r"""A request message for Projects.GetXpnResources. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - details (str): - Details (human readable) describing the situation. For - example, if status is CONDITION_NOT_MET, then details - contain information about the parameters of the time window - that did not meet the required conditions. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_details``. - status (str): - Status of recommendation in this location. - Check the Status enum for the list of possible - values. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_status``. - """ + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - class Status(proto.Enum): - r"""Status of recommendation in this location. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - CONDITIONS_NOT_MET (363628457): - The requested resources are offered in this - location but the requested time window is does - not meet the required conditions. - NOT_SUPPORTED (317950466): - The requested resources are not offered in - this location. Retrying the request will not - change this status. - NO_CAPACITY (274240888): - The requested resources are offered in this - location and the requested time window is - accepted but there is no capacity within the - requested time window. - OTHER_LOCATION_STATUS_UNDEFINED (222662622): - Default value, unused. - RECOMMENDED (369652283): - The requested resources are offered in this - location and it is possible to request them. - However, another location was better and was - recommended. - """ - UNDEFINED_STATUS = 0 - CONDITIONS_NOT_MET = 363628457 - NOT_SUPPORTED = 317950466 - NO_CAPACITY = 274240888 - OTHER_LOCATION_STATUS_UNDEFINED = 222662622 - RECOMMENDED = 369652283 + :: - details: str = proto.Field( - proto.STRING, - number=483979842, - optional=True, - ) - status: str = proto.Field( - proto.STRING, - number=181260274, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class FutureResourcesSpec(proto.Message): - r"""Specification of resources to be created at some time in the - future within an optionally specified set of locations, and - within the specified time range. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - deployment_type (str): - Indicates if the reservation allocation - strategy is static (DENSE) or dynamic - (STANDARD). Defaults to DENSE. Check the - DeploymentType enum for the list of possible - values. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_deployment_type``. - location_policy (google.cloud.compute_v1beta.types.FutureResourcesSpecLocationPolicy): - Optional location policy allowing to exclude - some zone(s) in which the resources must not be - created. + :: - This field is a member of `oneof`_ ``_location_policy``. - target_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecTargetResources): - Specification of the reserved resources. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_target_resources``. - time_range_spec (google.cloud.compute_v1beta.types.FlexibleTimeRange): - Specification of a time range in which the - resources may be created. The time range - specifies start of resource use and planned end - of resource use. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_time_range_spec``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - class DeploymentType(proto.Enum): - r"""Indicates if the reservation allocation strategy is static - (DENSE) or dynamic (STANDARD). Defaults to DENSE. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - Values: - UNDEFINED_DEPLOYMENT_TYPE (0): - A value indicating that the enum field is not - set. - DENSE (64932607): - The reserved capacity is made up of densely - deployed reservation blocks. - DEPLOYMENT_TYPE_UNSPECIFIED (234847180): - No description available. - FLEXIBLE (379880395): - The reserved capacity is made up of highly - flexible, logical reservation blocks. - """ - UNDEFINED_DEPLOYMENT_TYPE = 0 - DENSE = 64932607 - DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 - FLEXIBLE = 379880395 + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - deployment_type: str = proto.Field( + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=396722292, + number=336120696, optional=True, ) - location_policy: "FutureResourcesSpecLocationPolicy" = proto.Field( - proto.MESSAGE, - number=465689852, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, - message="FutureResourcesSpecLocationPolicy", ) - target_resources: "FutureResourcesSpecTargetResources" = proto.Field( - proto.MESSAGE, - number=528230647, + order_by: str = proto.Field( + proto.STRING, + number=160562920, optional=True, - message="FutureResourcesSpecTargetResources", ) - time_range_spec: "FlexibleTimeRange" = proto.Field( - proto.MESSAGE, - number=116516399, + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="FlexibleTimeRange", ) -class FutureResourcesSpecAggregateResources(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GetZoneOperationRequest(proto.Message): + r"""A request message for ZoneOperations.Get. See the method + description for details. Attributes: - accelerator_count (int): - Size of the request, in accelerator (chip) - count. + operation (str): + Name of the Operations resource to return, or + its unique numeric identifier. + project (str): + Project ID for this request. + zone (str): + Name of the zone for this request. + """ - This field is a member of `oneof`_ ``_accelerator_count``. - vm_family (str): - The VM family that all instances scheduled - against this reservation must belong to. Use for - TPU reservations. Check the VmFamily enum for - the list of possible values. + operation: str = proto.Field( + proto.STRING, + number=52090215, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - This field is a member of `oneof`_ ``_vm_family``. - workload_type (str): - Workload type. Use for TPU reservations. - Check the WorkloadType enum for the list of - possible values. - This field is a member of `oneof`_ ``_workload_type``. +class GetZoneRequest(proto.Message): + r"""A request message for Zones.Get. See the method description + for details. + + Attributes: + project (str): + Project ID for this request. + zone (str): + Name of the zone resource to return. """ - class VmFamily(proto.Enum): - r"""The VM family that all instances scheduled against this - reservation must belong to. Use for TPU reservations. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - Values: - UNDEFINED_VM_FAMILY (0): - A value indicating that the enum field is not - set. - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 (42845948): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L (108020067): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP (18705267): - No description available. - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E (398926997): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P (517384376): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P (517384407): - No description available. - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P (517384438): - No description available. - """ - UNDEFINED_VM_FAMILY = 0 - VM_FAMILY_CLOUD_TPU_DEVICE_CT3 = 42845948 - VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L = 108020067 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP = 18705267 - VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E = 398926997 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P = 517384376 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P = 517384407 - VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P = 517384438 - class WorkloadType(proto.Enum): - r"""Workload type. Use for TPU reservations. +class GetZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Get. See the + method description for details. - Values: - UNDEFINED_WORKLOAD_TYPE (0): - A value indicating that the enum field is not - set. - BATCH (62971674): - Reserved resources will be optimized for - BATCH workloads, such as ML training. - SERVING (17781740): - Reserved resources will be optimized for - SERVING workloads, such as ML inference. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_WORKLOAD_TYPE = 0 - BATCH = 62971674 - SERVING = 17781740 - UNSPECIFIED = 526786327 + Attributes: + project (str): + Project ID for this request. + vm_extension_policy (str): + Name of the VM extension policy resource to + return. + zone (str): + Name of the zone for this request. + """ - accelerator_count: int = proto.Field( - proto.INT64, - number=504879675, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - vm_family: str = proto.Field( + vm_extension_policy: str = proto.Field( proto.STRING, - number=125017580, - optional=True, + number=331532730, ) - workload_type: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=273432322, - optional=True, + number=3744684, ) -class FutureResourcesSpecLocalSsdPartition(proto.Message): +class GlobalAddressesMoveRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk_interface (str): - Disk interface. Defaults to SCSI. - Check the DiskInterface enum for the list of - possible values. + description (str): + An optional destination address description + if intended to be different from the source. - This field is a member of `oneof`_ ``_disk_interface``. - disk_size_gb (int): - The size of the disk in GB. + This field is a member of `oneof`_ ``_description``. + destination_address (str): + The URL of the destination address to move + to. This can be a full or partial URL. For + example, the following are all valid URLs to a + address: - This field is a member of `oneof`_ ``_disk_size_gb``. - """ + - + https://www.googleapis.com/compute/v1/projects/project/global/addresses/address + - projects/project/global/addresses/address - class DiskInterface(proto.Enum): - r"""Disk interface. Defaults to SCSI. + Note that destination project must be different + from the source project. + So/global/addresses/address is not valid partial + url. - Values: - UNDEFINED_DISK_INTERFACE (0): - A value indicating that the enum field is not - set. - NVME (2408800): - No description available. - SCSI (2539686): - No description available. - """ - UNDEFINED_DISK_INTERFACE = 0 - NVME = 2408800 - SCSI = 2539686 + This field is a member of `oneof`_ ``_destination_address``. + """ - disk_interface: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=66770199, + number=422937596, optional=True, ) - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, + destination_address: str = proto.Field( + proto.STRING, + number=371693763, optional=True, ) -class FutureResourcesSpecLocationPolicy(proto.Message): - r"""Specification of locations to create resources in. +class GlobalNetworkEndpointGroupsAttachEndpointsRequest(proto.Message): + r""" Attributes: - locations (MutableMapping[str, google.cloud.compute_v1beta.types.FutureResourcesSpecLocationPolicyLocation]): - Preferences for specified locations. Keys of - the map are locations - zones, in format of - 'zones/'. Values are preferences for the zones. - If a zone is not specified in this map, it is - ALLOWed. + network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): + The list of network endpoints to be attached. """ - locations: MutableMapping[ - str, "FutureResourcesSpecLocationPolicyLocation" - ] = proto.MapField( - proto.STRING, + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, - number=413423454, - message="FutureResourcesSpecLocationPolicyLocation", + number=149850285, + message="NetworkEndpoint", ) -class FutureResourcesSpecLocationPolicyLocation(proto.Message): - r"""Preference for a single specified location. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GlobalNetworkEndpointGroupsDetachEndpointsRequest(proto.Message): + r""" Attributes: - preference (str): - Preference for this location. - Check the Preference enum for the list of - possible values. - - This field is a member of `oneof`_ ``_preference``. + network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): + The list of network endpoints to be detached. """ - class Preference(proto.Enum): - r"""Preference for this location. - - Values: - UNDEFINED_PREFERENCE (0): - A value indicating that the enum field is not - set. - ALLOW (62368553): - Location is allowed for use. - DENY (2094604): - Location is prohibited. - PREFERENCE_UNSPECIFIED (496219571): - Default value, unused. - """ - UNDEFINED_PREFERENCE = 0 - ALLOW = 62368553 - DENY = 2094604 - PREFERENCE_UNSPECIFIED = 496219571 - - preference: str = proto.Field( - proto.STRING, - number=150781147, - optional=True, + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( + proto.MESSAGE, + number=149850285, + message="NetworkEndpoint", ) -class FutureResourcesSpecSpecificSKUResources(proto.Message): +class GlobalOrganizationSetPolicyRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_count (int): - Size of the request, in instance count. + bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify bindings. + etag (str): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify the etag. - This field is a member of `oneof`_ ``_instance_count``. - local_ssd_partitions (MutableSequence[google.cloud.compute_v1beta.types.FutureResourcesSpecLocalSsdPartition]): - Local SSD partitions. You do not have to - include SSD partitions that are built in the - machine type. - machine_type (str): - The machine type to use for instances that - will use the reservation. This field only - accepts machine type names. e.g. n2-standard-4 - and does not accept machine type full or partial - url. e.g. - projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4. - Use for GPU reservations. + This field is a member of `oneof`_ ``_etag``. + policy (google.cloud.compute_v1beta.types.Policy): + REQUIRED: The complete policy to be applied + to the 'resource'. The size of the policy is + limited to a few 10s of KB. An empty policy is + in general a valid policy but certain services + (like Projects) might reject them. - This field is a member of `oneof`_ ``_machine_type``. + This field is a member of `oneof`_ ``_policy``. """ - instance_count: int = proto.Field( - proto.INT64, - number=77317349, - optional=True, - ) - local_ssd_partitions: MutableSequence[ - "FutureResourcesSpecLocalSsdPartition" - ] = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, - number=470688568, - message="FutureResourcesSpecLocalSsdPartition", + number=403251854, + message="Binding", ) - machine_type: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=227711026, + number=3123477, + optional=True, + ) + policy: "Policy" = proto.Field( + proto.MESSAGE, + number=91071794, optional=True, + message="Policy", ) -class FutureResourcesSpecTargetResources(proto.Message): - r"""Specification of reserved resources. +class GlobalSetLabelsRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - aggregate_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecAggregateResources): - - This field is a member of `oneof`_ ``_aggregate_resources``. - specific_sku_resources (google.cloud.compute_v1beta.types.FutureResourcesSpecSpecificSKUResources): + label_fingerprint (str): + The fingerprint of the previous set of labels + for this resource, used to detect conflicts. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You must always provide an + up-to-date fingerprint hash when updating or + changing labels, otherwise the request will fail + with error412 conditionNotMet. Make a get() + request to the resource to get the latest + fingerprint. - This field is a member of `oneof`_ ``_specific_sku_resources``. + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + A list of labels to apply for this resource. + Each label must comply with the + requirements for labels. For + example,"webserver-frontend": "images". A label + value can also be empty (e.g. "my-label": ""). """ - aggregate_resources: "FutureResourcesSpecAggregateResources" = proto.Field( - proto.MESSAGE, - number=180868005, + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, optional=True, - message="FutureResourcesSpecAggregateResources", ) - specific_sku_resources: "FutureResourcesSpecSpecificSKUResources" = proto.Field( - proto.MESSAGE, - number=267071798, - optional=True, - message="FutureResourcesSpecSpecificSKUResources", + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, ) -class GRPCHealthCheck(proto.Message): +class GlobalSetPolicyRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - grpc_service_name (str): - The gRPC service name for the health check. This field is - optional. The value of grpc_service_name has the following - meanings by convention: - Empty service_name means the - overall status of all services at the backend. - Non-empty - service_name means the health of that gRPC service, as - defined by the owner of the service. The grpc_service_name - can only be ASCII. - - This field is a member of `oneof`_ ``_grpc_service_name``. - port (int): - The TCP port number to which the health check - prober sends packets. Valid values are 1 through - 65535. - - This field is a member of `oneof`_ ``_port``. - port_name (str): - Not supported. + bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify bindings. + etag (str): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify the etag. - This field is a member of `oneof`_ ``_port_name``. - port_specification (str): - Specifies how a port is selected for health checking. Can be - one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health - check. Supported by backend services for passthrough load - balancers and backend services for proxy load balancers. Not - supported by target pools. The health check supports all - backends supported by the backend service provided the - backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint - groups, and instance group backends. USE_NAMED_PORT: Not - supported. USE_SERVING_PORT: Provides an indirect method of - specifying the health check port by referring to the backend - service. Only supported by backend services for proxy load - balancers. Not supported by target pools. Not supported by - backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the - PortSpecification enum for the list of possible values. + This field is a member of `oneof`_ ``_etag``. + policy (google.cloud.compute_v1beta.types.Policy): + REQUIRED: The complete policy to be applied + to the 'resource'. The size of the policy is + limited to a few 10s of KB. An empty policy is + in general a valid policy but certain services + (like Projects) might reject them. - This field is a member of `oneof`_ ``_port_specification``. + This field is a member of `oneof`_ ``_policy``. """ - class PortSpecification(proto.Enum): - r"""Specifies how a port is selected for health checking. Can be one of - the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by - backend services for passthrough load balancers and backend services - for proxy load balancers. Not supported by target pools. The health - check supports all backends supported by the backend service - provided the backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and - instance group backends. USE_NAMED_PORT: Not supported. - USE_SERVING_PORT: Provides an indirect method of specifying the - health check port by referring to the backend service. Only - supported by backend services for proxy load balancers. Not - supported by target pools. Not supported by backend services for - passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. - - Values: - UNDEFINED_PORT_SPECIFICATION (0): - A value indicating that the enum field is not - set. - USE_FIXED_PORT (190235748): - The port number in the health check's port is - used for health checking. Applies to network - endpoint group and instance group backends. - USE_NAMED_PORT (349300671): - Not supported. - USE_SERVING_PORT (362637516): - For network endpoint group backends, the - health check uses the port number specified on - each endpoint in the network endpoint group. For - instance group backends, the health check uses - the port number specified for the backend - service's named port defined in the instance - group's named ports. - """ - UNDEFINED_PORT_SPECIFICATION = 0 - USE_FIXED_PORT = 190235748 - USE_NAMED_PORT = 349300671 - USE_SERVING_PORT = 362637516 - - grpc_service_name: str = proto.Field( - proto.STRING, - number=136533078, - optional=True, - ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, + bindings: MutableSequence["Binding"] = proto.RepeatedField( + proto.MESSAGE, + number=403251854, + message="Binding", ) - port_name: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=41534345, + number=3123477, optional=True, ) - port_specification: str = proto.Field( - proto.STRING, - number=51590597, + policy: "Policy" = proto.Field( + proto.MESSAGE, + number=91071794, optional=True, + message="Policy", ) -class GRPCTLSHealthCheck(proto.Message): - r""" +class GlobalVmExtensionPolicy(proto.Message): + r"""Message describing GlobalVmExtensionPolicy object. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - grpc_service_name (str): - The gRPC service name for the health check. This field is - optional. The value of grpc_service_name has the following - meanings by convention: - Empty service_name means the - overall status of all services at the backend. - Non-empty - service_name means the health of that gRPC service, as - defined by the owner of the service. The grpc_service_name - can only be ASCII. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_grpc_service_name``. - port (int): - The TCP port number to which the health check - prober sends packets. Valid values are 1 through - 65535. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - This field is a member of `oneof`_ ``_port``. - port_specification (str): - Specifies how a port is selected for health checking. Can be - one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health - check. Supported by backend services for passthrough load - balancers and backend services for proxy load balancers. Not - supported by target pools. The health check supports all - backends supported by the backend service provided the - backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint - groups, and instance group backends. USE_NAMED_PORT: Not - supported. USE_SERVING_PORT: Provides an indirect method of - specifying the health check port by referring to the backend - service. Only supported by backend services for proxy load - balancers. Not supported by target pools. Not supported by - backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the - PortSpecification enum for the list of possible values. + This field is a member of `oneof`_ ``_description``. + extension_policies (MutableMapping[str, google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyExtensionPolicy]): + Required. Map from extension (eg: "cloudops") + to its policy configuration. The key is the name + of the extension. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - This field is a member of `oneof`_ ``_port_specification``. + This field is a member of `oneof`_ ``_id``. + instance_selectors (MutableSequence[google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyInstanceSelector]): + Optional. Selector to target VMs for a policy. There is a + logical "AND" between instance_selectors. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#globalVmExtensionPolicy for + globalVmExtensionPolicies. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + priority (int): + Optional. Used to resolve conflicts when + multiple policies are active for the same + extension. Defaults to 0. + + Larger the number, higher the priority. When the + priority is the same, the policy with the newer + create time has higher priority. + + This field is a member of `oneof`_ ``_priority``. + rollout_operation (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperation): + Required. The rollout strategy and status. + + This field is a member of `oneof`_ ``_rollout_operation``. + scoped_resource_status (str): + Output only. [Output Only] The scoped resource status. It's + only for tracking the purging status of the policy. Check + the ScopedResourceStatus enum for the list of possible + values. + + This field is a member of `oneof`_ ``_scoped_resource_status``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource's resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + update_timestamp (str): + Output only. [Output Only] Update timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_update_timestamp``. """ - class PortSpecification(proto.Enum): - r"""Specifies how a port is selected for health checking. Can be one of - the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by - backend services for passthrough load balancers and backend services - for proxy load balancers. Not supported by target pools. The health - check supports all backends supported by the backend service - provided the backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and - instance group backends. USE_NAMED_PORT: Not supported. - USE_SERVING_PORT: Provides an indirect method of specifying the - health check port by referring to the backend service. Only - supported by backend services for proxy load balancers. Not - supported by target pools. Not supported by backend services for - passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + class ScopedResourceStatus(proto.Enum): + r"""Output only. [Output Only] The scoped resource status. It's only for + tracking the purging status of the policy. Values: - UNDEFINED_PORT_SPECIFICATION (0): + UNDEFINED_SCOPED_RESOURCE_STATUS (0): A value indicating that the enum field is not set. - USE_FIXED_PORT (190235748): - The port number in the health check's port is - used for health checking. Applies to network - endpoint group and instance group backends. - USE_NAMED_PORT (349300671): - Not supported. - USE_SERVING_PORT (362637516): - For network endpoint group backends, the - health check uses the port number specified on - each endpoint in the network endpoint group. For - instance group backends, the health check uses - the port number specified for the backend - service's named port defined in the instance - group's named ports. - """ - UNDEFINED_PORT_SPECIFICATION = 0 - USE_FIXED_PORT = 190235748 - USE_NAMED_PORT = 349300671 - USE_SERVING_PORT = 362637516 + SCOPED_RESOURCE_STATUS_DELETING (404198387): + The zonal policies are being deleted. + SCOPED_RESOURCE_STATUS_UNSPECIFIED (437941996): + Default value. This value is unused. + """ + UNDEFINED_SCOPED_RESOURCE_STATUS = 0 + SCOPED_RESOURCE_STATUS_DELETING = 404198387 + SCOPED_RESOURCE_STATUS_UNSPECIFIED = 437941996 - grpc_service_name: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=136533078, + number=30525366, optional=True, ) - port: int = proto.Field( - proto.INT32, - number=3446913, + description: str = proto.Field( + proto.STRING, + number=422937596, optional=True, ) - port_specification: str = proto.Field( + extension_policies: MutableMapping[ + str, "GlobalVmExtensionPolicyExtensionPolicy" + ] = proto.MapField( proto.STRING, - number=51590597, + proto.MESSAGE, + number=227761488, + message="GlobalVmExtensionPolicyExtensionPolicy", + ) + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - - -class GetAcceleratorTypeRequest(proto.Message): - r"""A request message for AcceleratorTypes.Get. See the method - description for details. - - Attributes: - accelerator_type (str): - Name of the accelerator type to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ - - accelerator_type: str = proto.Field( + instance_selectors: MutableSequence[ + "GlobalVmExtensionPolicyInstanceSelector" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520298826, + message="GlobalVmExtensionPolicyInstanceSelector", + ) + kind: str = proto.Field( proto.STRING, - number=138031246, + number=3292052, + optional=True, ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - zone: str = proto.Field( + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + rollout_operation: "GlobalVmExtensionPolicyRolloutOperation" = proto.Field( + proto.MESSAGE, + number=486746201, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperation", + ) + scoped_resource_status: str = proto.Field( proto.STRING, - number=3744684, + number=181976980, + optional=True, ) - - -class GetAddressRequest(proto.Message): - r"""A request message for Addresses.Get. See the method - description for details. - - Attributes: - address (str): - Name of the address resource to return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ - - address: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=462920692, + number=456214797, + optional=True, ) - project: str = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, - number=227560217, + number=44520962, + optional=True, ) - region: str = proto.Field( + update_timestamp: str = proto.Field( proto.STRING, - number=138946292, + number=120894752, + optional=True, ) -class GetAssociationFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.GetAssociation. See - the method description for details. - +class GlobalVmExtensionPolicyExtensionPolicy(proto.Message): + r"""Policy for a single extension. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - name (str): - The name of the association to get from the - firewall policy. + pinned_version (str): + Optional. The version pinning for the + extension. If empty, the extension will be + installed with the latest version released by + the extension producer. - This field is a member of `oneof`_ ``_name``. + This field is a member of `oneof`_ ``_pinned_version``. + string_config (str): + Optional. String configuration. Any string + payload that the extension understands. + + This field is a member of `oneof`_ ``_string_config``. """ - firewall_policy: str = proto.Field( + pinned_version: str = proto.Field( proto.STRING, - number=498173265, + number=446267249, + optional=True, ) - name: str = proto.Field( + string_config: str = proto.Field( proto.STRING, - number=3373707, + number=318905136, optional=True, ) -class GetAssociationNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.GetAssociation. - See the method description for details. - +class GlobalVmExtensionPolicyInstanceSelector(proto.Message): + r"""Selector to target VMs for a zone VM extension policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried association belongs. - name (str): - The name of the association to get from the - firewall policy. + label_selector (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyLabelSelector): + Optional. Labels within the LabelSelector are + OR'd. - This field is a member of `oneof`_ ``_name``. - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_label_selector``. """ - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, + label_selector: "GlobalVmExtensionPolicyLabelSelector" = proto.Field( + proto.MESSAGE, + number=349780170, optional=True, + message="GlobalVmExtensionPolicyLabelSelector", ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - - -class GetAssociationOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.GetAssociation. See the method - description for details. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class GlobalVmExtensionPolicyLabelSelector(proto.Message): + r"""A LabelSelector is applicable for a VM only if it matches all + labels in the LabelSelector. Attributes: - name (str): - The name of the association to get from the - security policy. - - This field is a member of `oneof`_ ``_name``. - security_policy (str): - Name of the security policy to which the - queried rule belongs. + inclusion_labels (MutableMapping[str, str]): + Optional. Labels as key value pairs. + A VM should contain all the pairs specified in + this map to be selected; Labels within the + LabelSelector are OR'ed. """ - name: str = proto.Field( + inclusion_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=3373707, - optional=True, - ) - security_policy: str = proto.Field( proto.STRING, - number=171082513, + number=501312642, ) -class GetAssociationRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.GetAssociation. See the method - description for details. - +class GlobalVmExtensionPolicyList(proto.Message): + r"""Response to list global VM extension policy resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried association belongs. - name (str): - The name of the association to get from the - firewall policy. + etag (str): - This field is a member of `oneof`_ ``_name``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy]): + A list of GlobalVmExtensionPolicy resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - firewall_policy: str = proto.Field( + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=498173265, + number=3123477, + optional=True, ) - name: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=3373707, + number=3355, optional=True, ) - project: str = proto.Field( + items: MutableSequence["GlobalVmExtensionPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="GlobalVmExtensionPolicy", + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - region: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=138946292, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetAssociationRegionNetworkPolicyRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.GetAssociation. - See the method description for details. - +class GlobalVmExtensionPolicyRolloutOperation(proto.Message): + r"""Represents the rollout operation .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - The name of the association to get from the - network policy. + rollout_input (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput): + Required. The rollout input which defines the + rollout plan. - This field is a member of `oneof`_ ``_name``. - network_policy (str): - Name of the network policy to which the - queried association belongs. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. + This field is a member of `oneof`_ ``_rollout_input``. + rollout_status (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatus): + Output only. [Output Only] The rollout status of the policy. + + This field is a member of `oneof`_ ``_rollout_status``. """ - name: str = proto.Field( - proto.STRING, - number=3373707, + rollout_input: "GlobalVmExtensionPolicyRolloutOperationRolloutInput" = proto.Field( + proto.MESSAGE, + number=265745340, optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutInput", ) - network_policy: str = proto.Field( - proto.STRING, - number=504961123, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + rollout_status: "GlobalVmExtensionPolicyRolloutOperationRolloutStatus" = ( + proto.Field( + proto.MESSAGE, + number=476426816, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatus", + ) ) -class GetAutoscalerRequest(proto.Message): - r"""A request message for Autoscalers.Get. See the method - description for details. +class GlobalVmExtensionPolicyRolloutOperationRolloutInput(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - autoscaler (str): - Name of the autoscaler to return. - project (str): - Project ID for this request. - zone (str): - Name of the zone for this request. - """ + conflict_behavior (str): + Optional. Specifies the behavior of the rollout if a + conflict is detected in a project during a rollout. This + only applies to ``insert`` and ``update`` methods. - autoscaler: str = proto.Field( - proto.STRING, - number=517258967, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + A conflict occurs in the following cases: + - ``insert`` method: If the zonal policy already exists when + the insert happens. + - ``update`` method: If the zonal policy was modified by a + zonal API call outside of this rollout. -class GetBackendBucketRequest(proto.Message): - r"""A request message for BackendBuckets.Get. See the method - description for details. + Possible values are the following: - Attributes: - backend_bucket (str): - Name of the BackendBucket resource to return. - project (str): - Project ID for this request. - """ + - ``""`` (empty string): If a conflict occurs, the local + value is not overwritten. This is the default behavior. + - ``"overwrite"``: If a conflict occurs, the local value is + overwritten with the rollout value. - backend_bucket: str = proto.Field( - proto.STRING, - number=91714037, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_conflict_behavior``. + name (str): + Optional. The name of the rollout plan. + Ex. + projects//locations/global/rolloutPlans/. + This field is a member of `oneof`_ ``_name``. + predefined_rollout_plan (str): + Optional. Predefined rollout plan. + Check the PredefinedRolloutPlan enum for the + list of possible values. -class GetBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.Get. See the method - description for details. + This field is a member of `oneof`_ ``_predefined_rollout_plan``. + retry_uuid (str): + Optional. The UUID that identifies a policy rollout retry + attempt for update and delete operations. Set this field + only when retrying a rollout for an existing extension + policy. - Attributes: - backend_service (str): - Name of the BackendService resource to - return. - project (str): - Project ID for this request. + - ``update`` method: Lets you retry policy rollout without + changes. An error occurs if you set retry_uuid but the + policy is modified. + - ``delete`` method: Lets you retry policy deletion rollout + if the previous deletion rollout is not finished and the + policy is in the DELETING state. If you set this field + when the policy is not in the DELETING state, an error + occurs. + + This field is a member of `oneof`_ ``_retry_uuid``. """ - backend_service: str = proto.Field( + class PredefinedRolloutPlan(proto.Enum): + r"""Optional. Predefined rollout plan. + + Values: + UNDEFINED_PREDEFINED_ROLLOUT_PLAN (0): + A value indicating that the enum field is not + set. + FAST_ROLLOUT (207153326): + No description available. + ROLLOUT_PLAN_UNSPECIFIED (144511983): + No description available. + SLOW_ROLLOUT (31032659): + No description available. + """ + UNDEFINED_PREDEFINED_ROLLOUT_PLAN = 0 + FAST_ROLLOUT = 207153326 + ROLLOUT_PLAN_UNSPECIFIED = 144511983 + SLOW_ROLLOUT = 31032659 + + conflict_behavior: str = proto.Field( proto.STRING, - number=306946058, + number=115729439, + optional=True, ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - - -class GetCrossSiteNetworkRequest(proto.Message): - r"""A request message for CrossSiteNetworks.Get. See the method - description for details. - - Attributes: - cross_site_network (str): - Name of the cross-site network to return. - project (str): - Project ID for this request. - """ - - cross_site_network: str = proto.Field( + predefined_rollout_plan: str = proto.Field( proto.STRING, - number=108192469, + number=364023440, + optional=True, ) - project: str = proto.Field( + retry_uuid: str = proto.Field( proto.STRING, - number=227560217, + number=472838898, + optional=True, ) -class GetDiagnosticsInterconnectRequest(proto.Message): - r"""A request message for Interconnects.GetDiagnostics. See the - method description for details. +class GlobalVmExtensionPolicyRolloutOperationRolloutStatus(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect (str): - Name of the interconnect resource to query. - project (str): - Project ID for this request. + current_rollouts (MutableSequence[google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata]): + Output only. [Output Only] The current rollouts for the + latest version of the resource. There should be only one + current rollout, but for scalability, we make it repeated. + previous_rollout (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata): + Output only. [Output Only] The last completed rollout + resource. This field will not be populated until the first + rollout is completed. + + This field is a member of `oneof`_ ``_previous_rollout``. """ - interconnect: str = proto.Field( - proto.STRING, - number=224601230, + current_rollouts: MutableSequence[ + "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" + ] = proto.RepeatedField( + proto.MESSAGE, + number=39829736, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + previous_rollout: "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" = proto.Field( + proto.MESSAGE, + number=375749737, + optional=True, + message="GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", ) -class GetDiskRequest(proto.Message): - r"""A request message for Disks.Get. See the method description - for details. +class GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata( + proto.Message +): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the persistent disk to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. + rollout (str): + Output only. [Output Only] The name of the rollout. Ex. + projects//locations/global/rollouts/. + + This field is a member of `oneof`_ ``_rollout``. + rollout_plan (str): + Output only. [Output Only] The name of the rollout plan. Ex. + projects//locations/global/rolloutPlans/. + + This field is a member of `oneof`_ ``_rollout_plan``. + state (str): + Output only. [Output Only] The overall state of the rollout. + Check the State enum for the list of possible values. + + This field is a member of `oneof`_ ``_state``. """ - disk: str = proto.Field( + class State(proto.Enum): + r"""Output only. [Output Only] The overall state of the rollout. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + STATE_CANCELLED (534636259): + Iteration was explicitly cancelled. + STATE_COMPLETED (265728989): + Iteration completed, with all actions being + successful. + STATE_FAILED (50857931): + Iteration completed, with failures. + STATE_PAUSED (337513660): + The rollout is paused. + STATE_PROCESSING (74195873): + Iteration is in progress. + STATE_UNKNOWN (230861404): + Impossible to determine current state of the + iteration. + STATE_UNSPECIFIED (470755401): + Default value. This value is unused. + """ + UNDEFINED_STATE = 0 + STATE_CANCELLED = 534636259 + STATE_COMPLETED = 265728989 + STATE_FAILED = 50857931 + STATE_PAUSED = 337513660 + STATE_PROCESSING = 74195873 + STATE_UNKNOWN = 230861404 + STATE_UNSPECIFIED = 470755401 + + rollout: str = proto.Field( proto.STRING, - number=3083677, + number=303366577, + optional=True, ) - project: str = proto.Field( + rollout_plan: str = proto.Field( proto.STRING, - number=227560217, + number=459057399, + optional=True, ) - zone: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=3744684, + number=109757585, + optional=True, ) -class GetDiskSettingRequest(proto.Message): - r"""A request message for DiskSettingsService.Get. See the method - description for details. +class GroupMaintenanceInfo(proto.Message): + r"""Maintenance Info for ReservationBlocks. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - zone (str): - Name of the zone for this request. - """ + instance_maintenance_ongoing_count (int): + Describes number of instances that have + ongoing maintenance. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_instance_maintenance_ongoing_count``. + instance_maintenance_pending_count (int): + Describes number of instances that have + pending maintenance. + + This field is a member of `oneof`_ ``_instance_maintenance_pending_count``. + maintenance_ongoing_count (int): + Progress for ongoing maintenance for this + group of VMs/hosts. Describes number of hosts in + the block that have ongoing maintenance. + + This field is a member of `oneof`_ ``_maintenance_ongoing_count``. + maintenance_pending_count (int): + Progress for ongoing maintenance for this + group of VMs/hosts. Describes number of hosts in + the block that have pending maintenance. + + This field is a member of `oneof`_ ``_maintenance_pending_count``. + scheduling_type (str): + The type of maintenance for the reservation. + Check the SchedulingType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_scheduling_type``. + subblock_infra_maintenance_ongoing_count (int): + Describes number of subblock Infrastructure + that has ongoing maintenance. Here, Subblock + Infrastructure Maintenance pertains to upstream + hardware contained in the Subblock that is + necessary for a VM Family(e.g. NVLink Domains). + Not all VM Families will support this field. + + This field is a member of `oneof`_ ``_subblock_infra_maintenance_ongoing_count``. + subblock_infra_maintenance_pending_count (int): + Describes number of subblock Infrastructure + that has pending maintenance. Here, Subblock + Infrastructure Maintenance pertains to upstream + hardware contained in the Subblock that is + necessary for a VM Family (e.g. NVLink + Domains). Not all VM Families will support this + field. + + This field is a member of `oneof`_ ``_subblock_infra_maintenance_pending_count``. + upcoming_group_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): + Maintenance information on this group of VMs. + This field is a member of `oneof`_ ``_upcoming_group_maintenance``. + """ -class GetDiskTypeRequest(proto.Message): - r"""A request message for DiskTypes.Get. See the method - description for details. + class SchedulingType(proto.Enum): + r"""The type of maintenance for the reservation. - Attributes: - disk_type (str): - Name of the disk type to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ + Values: + UNDEFINED_SCHEDULING_TYPE (0): + A value indicating that the enum field is not + set. + GROUPED (474540862): + Maintenance on all reserved instances in the + reservation is synchronized. + GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): + Unknown maintenance type. + INDEPENDENT (127011674): + Maintenance is not synchronized for this + reservation. Instead, each instance has its own + maintenance window. + """ + UNDEFINED_SCHEDULING_TYPE = 0 + GROUPED = 474540862 + GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 + INDEPENDENT = 127011674 - disk_type: str = proto.Field( - proto.STRING, - number=93009052, + instance_maintenance_ongoing_count: int = proto.Field( + proto.INT32, + number=137611253, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + instance_maintenance_pending_count: int = proto.Field( + proto.INT32, + number=76612881, + optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + maintenance_ongoing_count: int = proto.Field( + proto.INT32, + number=219781919, + optional=True, ) - - -class GetEffectiveFirewallsInstanceRequest(proto.Message): - r"""A request message for Instances.GetEffectiveFirewalls. See - the method description for details. - - Attributes: - instance (str): - Name of the instance scoping this request. - network_interface (str): - The name of the network interface to get the - effective firewalls. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ - - instance: str = proto.Field( - proto.STRING, - number=18257045, + maintenance_pending_count: int = proto.Field( + proto.INT32, + number=158783547, + optional=True, ) - network_interface: str = proto.Field( + scheduling_type: str = proto.Field( proto.STRING, - number=365387880, + number=199835397, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + subblock_infra_maintenance_ongoing_count: int = proto.Field( + proto.INT32, + number=366161790, + optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + subblock_infra_maintenance_pending_count: int = proto.Field( + proto.INT32, + number=305163418, + optional=True, + ) + upcoming_group_maintenance: "UpcomingMaintenance" = proto.Field( + proto.MESSAGE, + number=393438448, + optional=True, + message="UpcomingMaintenance", ) -class GetEffectiveFirewallsNetworkRequest(proto.Message): - r"""A request message for Networks.GetEffectiveFirewalls. See the - method description for details. +class GuestAttributes(proto.Message): + r"""A guest attributes entry. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network (str): - Name of the network for this request. - project (str): - Project ID for this request. - """ + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#guestAttributes for guest attributes entry. - network: str = proto.Field( - proto.STRING, - number=232872494, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_kind``. + query_path (str): + The path to be queried. This can be the + default namespace ('') or a nested namespace + ('\/') or a specified key ('\/\'). + This field is a member of `oneof`_ ``_query_path``. + query_value (google.cloud.compute_v1beta.types.GuestAttributesValue): + Output only. [Output Only] The value of the requested + queried path. -class GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.GetEffectiveFirewalls. See the - method description for details. + This field is a member of `oneof`_ ``_query_value``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Attributes: - network (str): - Network reference - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. + This field is a member of `oneof`_ ``_self_link``. + variable_key (str): + The key to search for. + + This field is a member of `oneof`_ ``_variable_key``. + variable_value (str): + Output only. [Output Only] The value found for the requested + key. + + This field is a member of `oneof`_ ``_variable_value``. """ - network: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=232872494, + number=3292052, + optional=True, ) - project: str = proto.Field( + query_path: str = proto.Field( proto.STRING, - number=227560217, + number=368591164, + optional=True, ) - region: str = proto.Field( + query_value: "GuestAttributesValue" = proto.Field( + proto.MESSAGE, + number=157570874, + optional=True, + message="GuestAttributesValue", + ) + self_link: str = proto.Field( proto.STRING, - number=138946292, + number=456214797, + optional=True, ) - - -class GetEffectiveSecurityPoliciesBackendServiceRequest(proto.Message): - r"""A request message for - BackendServices.GetEffectiveSecurityPolicies. See the method - description for details. - - Attributes: - backend_service (str): - Name of the Backend Service for this request. - project (str): - Project ID for this request. - """ - - backend_service: str = proto.Field( + variable_key: str = proto.Field( proto.STRING, - number=306946058, + number=164364828, + optional=True, ) - project: str = proto.Field( + variable_value: str = proto.Field( proto.STRING, - number=227560217, + number=124582382, + optional=True, ) -class GetExternalVpnGatewayRequest(proto.Message): - r"""A request message for ExternalVpnGateways.Get. See the method - description for details. +class GuestAttributesEntry(proto.Message): + r"""A guest attributes namespace/key/value entry. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - external_vpn_gateway (str): - Name of the externalVpnGateway to return. - project (str): - Project ID for this request. + key (str): + Key for the guest attribute entry. + + This field is a member of `oneof`_ ``_key``. + namespace (str): + Namespace for the guest attribute entry. + + This field is a member of `oneof`_ ``_namespace``. + value (str): + Value for the guest attribute entry. + + This field is a member of `oneof`_ ``_value``. """ - external_vpn_gateway: str = proto.Field( + key: str = proto.Field( proto.STRING, - number=109898629, + number=106079, + optional=True, ) - project: str = proto.Field( + namespace: str = proto.Field( proto.STRING, - number=227560217, + number=178476379, + optional=True, + ) + value: str = proto.Field( + proto.STRING, + number=111972721, + optional=True, ) -class GetFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.Get. See the method - description for details. +class GuestAttributesValue(proto.Message): + r"""Array of guest attribute namespace/key/value tuples. Attributes: - firewall_policy (str): - Name of the firewall policy to get. + items (MutableSequence[google.cloud.compute_v1beta.types.GuestAttributesEntry]): + """ - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, + items: MutableSequence["GuestAttributesEntry"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="GuestAttributesEntry", ) -class GetFirewallRequest(proto.Message): - r"""A request message for Firewalls.Get. See the method - description for details. +class GuestOsFeature(proto.Message): + r"""Guest OS features. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall (str): - Name of the firewall rule to return. - project (str): - Project ID for this request. + type_ (str): + The ID of a supported feature. To add multiple values, use + commas to separate values. Set to one or more of the + following values: + + :: + + - VIRTIO_SCSI_MULTIQUEUE + - WINDOWS + - MULTI_IP_SUBNET + - UEFI_COMPATIBLE + - GVNIC + - SEV_CAPABLE + - SUSPEND_RESUME_COMPATIBLE + - SEV_LIVE_MIGRATABLE_V2 + - SEV_SNP_CAPABLE + - TDX_CAPABLE + - IDPF + - SNP_SVSM_CAPABLE + + For more information, see Enabling guest operating system + features. Check the Type enum for the list of possible + values. + + This field is a member of `oneof`_ ``_type``. """ - firewall: str = proto.Field( - proto.STRING, - number=511016192, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + class Type(proto.Enum): + r"""The ID of a supported feature. To add multiple values, use commas to + separate values. Set to one or more of the following values: + :: -class GetForwardingRuleRequest(proto.Message): - r"""A request message for ForwardingRules.Get. See the method - description for details. + - VIRTIO_SCSI_MULTIQUEUE + - WINDOWS + - MULTI_IP_SUBNET + - UEFI_COMPATIBLE + - GVNIC + - SEV_CAPABLE + - SUSPEND_RESUME_COMPATIBLE + - SEV_LIVE_MIGRATABLE_V2 + - SEV_SNP_CAPABLE + - TDX_CAPABLE + - IDPF + - SNP_SVSM_CAPABLE - Attributes: - forwarding_rule (str): - Name of the ForwardingRule resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + For more information, see Enabling guest operating system features. - forwarding_rule: str = proto.Field( - proto.STRING, - number=269964030, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + BARE_METAL_LINUX_COMPATIBLE (354232740): + No description available. + FEATURE_TYPE_UNSPECIFIED (531767259): + No description available. + GVNIC (68209305): + No description available. + IDPF (2242641): + No description available. + MULTI_IP_SUBNET (151776719): + No description available. + SECURE_BOOT (376811194): + No description available. + SEV_CAPABLE (87083793): + No description available. + SEV_LIVE_MIGRATABLE (392039820): + No description available. + SEV_LIVE_MIGRATABLE_V2 (168551983): + No description available. + SEV_SNP_CAPABLE (426919): + No description available. + SNP_SVSM_CAPABLE (52921460): + No description available. + TDX_CAPABLE (240446133): + No description available. + UEFI_COMPATIBLE (195865408): + No description available. + VIRTIO_SCSI_MULTIQUEUE (201597069): + No description available. + WINDOWS (456863331): + No description available. + """ + UNDEFINED_TYPE = 0 + BARE_METAL_LINUX_COMPATIBLE = 354232740 + FEATURE_TYPE_UNSPECIFIED = 531767259 + GVNIC = 68209305 + IDPF = 2242641 + MULTI_IP_SUBNET = 151776719 + SECURE_BOOT = 376811194 + SEV_CAPABLE = 87083793 + SEV_LIVE_MIGRATABLE = 392039820 + SEV_LIVE_MIGRATABLE_V2 = 168551983 + SEV_SNP_CAPABLE = 426919 + SNP_SVSM_CAPABLE = 52921460 + TDX_CAPABLE = 240446133 + UEFI_COMPATIBLE = 195865408 + VIRTIO_SCSI_MULTIQUEUE = 201597069 + WINDOWS = 456863331 + + type_: str = proto.Field( proto.STRING, - number=138946292, + number=3575610, + optional=True, ) -class GetFromFamilyImageRequest(proto.Message): - r"""A request message for Images.GetFromFamily. See the method - description for details. +class HTTP2HealthCheck(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - family (str): - Name of the image family to search for. - project (str): - The image project that the image belongs to. - For example, to get a CentOS image, specify - centos-cloud as the image project. - """ + host (str): + The value of the host header in the HTTP/2 + health check request. If left empty (default + value), the host header is set to the + destination IP address to which health check + packets are sent. The destination IP address + depends on the type of load balancer. For + details, see: - family: str = proto.Field( - proto.STRING, - number=328751972, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest + This field is a member of `oneof`_ ``_host``. + port (int): + The TCP port number to which the health check + prober sends packets. The default value is 443. + Valid values are 1 through65535. -class GetFutureReservationRequest(proto.Message): - r"""A request message for FutureReservations.Get. See the method - description for details. + This field is a member of `oneof`_ ``_port``. + port_name (str): + Not supported. - Attributes: - future_reservation (str): - Name of the future reservation to retrieve. - Name should conform to RFC1035. - project (str): - Project ID for this request. - zone (str): - Name of the zone for this request. Name - should conform to RFC1035. - """ + This field is a member of `oneof`_ ``_port_name``. + port_specification (str): + Specifies how a port is selected for health checking. Can be + one of the following values: USE_FIXED_PORT: Specifies a + port number explicitly using theport field in the health + check. Supported by backend services for passthrough load + balancers and backend services for proxy load balancers. Not + supported by target pools. The health check supports all + backends supported by the backend service provided the + backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint + groups, and instance group backends. USE_NAMED_PORT: Not + supported. USE_SERVING_PORT: Provides an indirect method of + specifying the health check port by referring to the backend + service. Only supported by backend services for proxy load + balancers. Not supported by target pools. Not supported by + backend services for passthrough load balancers. Supports + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. - future_reservation: str = proto.Field( - proto.STRING, - number=56206160, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_port_specification``. + proxy_header (str): + Specifies the type of proxy header to append before sending + data to the backend, either NONE or PROXY_V1. The default is + NONE. Check the ProxyHeader enum for the list of possible + values. + + This field is a member of `oneof`_ ``_proxy_header``. + request_path (str): + The request path of the HTTP/2 health check + request. The default value is/. Must comply + withRFC3986. + This field is a member of `oneof`_ ``_request_path``. + response (str): + Creates a content-based HTTP/2 health check. + In addition to the required HTTP 200 (OK) status + code, you can configure the health check to pass + only when the backend sends this specific ASCII + response string within the first 1024 bytes of + the HTTP response body. For details, see: -class GetGlobalAddressRequest(proto.Message): - r"""A request message for GlobalAddresses.Get. See the method - description for details. + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Attributes: - address (str): - Name of the address resource to return. - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_response``. """ - address: str = proto.Field( - proto.STRING, - number=462920692, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + class PortSpecification(proto.Enum): + r"""Specifies how a port is selected for health checking. Can be one of + the following values: USE_FIXED_PORT: Specifies a port number + explicitly using theport field in the health check. Supported by + backend services for passthrough load balancers and backend services + for proxy load balancers. Not supported by target pools. The health + check supports all backends supported by the backend service + provided the backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and + instance group backends. USE_NAMED_PORT: Not supported. + USE_SERVING_PORT: Provides an indirect method of specifying the + health check port by referring to the backend service. Only + supported by backend services for proxy load balancers. Not + supported by target pools. Not supported by backend services for + passthrough load balancers. Supports all backends that can be health + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. + Values: + UNDEFINED_PORT_SPECIFICATION (0): + A value indicating that the enum field is not + set. + USE_FIXED_PORT (190235748): + The port number in the health check's port is + used for health checking. Applies to network + endpoint group and instance group backends. + USE_NAMED_PORT (349300671): + Not supported. + USE_SERVING_PORT (362637516): + For network endpoint group backends, the + health check uses the port number specified on + each endpoint in the network endpoint group. For + instance group backends, the health check uses + the port number specified for the backend + service's named port defined in the instance + group's named ports. + """ + UNDEFINED_PORT_SPECIFICATION = 0 + USE_FIXED_PORT = 190235748 + USE_NAMED_PORT = 349300671 + USE_SERVING_PORT = 362637516 -class GetGlobalForwardingRuleRequest(proto.Message): - r"""A request message for GlobalForwardingRules.Get. See the - method description for details. + class ProxyHeader(proto.Enum): + r"""Specifies the type of proxy header to append before sending data to + the backend, either NONE or PROXY_V1. The default is NONE. - Attributes: - forwarding_rule (str): - Name of the ForwardingRule resource to - return. - project (str): - Project ID for this request. - """ + Values: + UNDEFINED_PROXY_HEADER (0): + A value indicating that the enum field is not + set. + NONE (2402104): + No description available. + PROXY_V1 (334352940): + No description available. + """ + UNDEFINED_PROXY_HEADER = 0 + NONE = 2402104 + PROXY_V1 = 334352940 - forwarding_rule: str = proto.Field( + host: str = proto.Field( proto.STRING, - number=269964030, + number=3208616, + optional=True, ) - project: str = proto.Field( + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + port_name: str = proto.Field( proto.STRING, - number=227560217, + number=41534345, + optional=True, ) - - -class GetGlobalNetworkEndpointGroupRequest(proto.Message): - r"""A request message for GlobalNetworkEndpointGroups.Get. See - the method description for details. - - Attributes: - network_endpoint_group (str): - The name of the network endpoint group. It - should comply with RFC1035. - project (str): - Project ID for this request. - """ - - network_endpoint_group: str = proto.Field( + port_specification: str = proto.Field( proto.STRING, - number=433907078, + number=51590597, + optional=True, ) - project: str = proto.Field( + proxy_header: str = proto.Field( proto.STRING, - number=227560217, + number=160374142, + optional=True, ) - - -class GetGlobalOperationRequest(proto.Message): - r"""A request message for GlobalOperations.Get. See the method - description for details. - - Attributes: - operation (str): - Name of the Operations resource to return, or - its unique numeric identifier. - project (str): - Project ID for this request. - """ - - operation: str = proto.Field( + request_path: str = proto.Field( proto.STRING, - number=52090215, + number=229403605, + optional=True, ) - project: str = proto.Field( + response: str = proto.Field( proto.STRING, - number=227560217, + number=196547649, + optional=True, ) -class GetGlobalOrganizationOperationRequest(proto.Message): - r"""A request message for GlobalOrganizationOperations.Get. See - the method description for details. - +class HTTPHealthCheck(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - operation (str): - Name of the Operations resource to return. - Parent is derived from this field. - parent_id (str): - Parent ID for this request. Not used. Parent is derived from - resource_id. + host (str): + The value of the host header in the HTTP + health check request. If left empty (default + value), the host header is set to the + destination IP address to which health check + packets are sent. The destination IP address + depends on the type of load balancer. For + details, see: - This field is a member of `oneof`_ ``_parent_id``. - """ + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - operation: str = proto.Field( - proto.STRING, - number=52090215, - ) - parent_id: str = proto.Field( - proto.STRING, - number=459714768, - optional=True, - ) + This field is a member of `oneof`_ ``_host``. + port (int): + The TCP port number to which the health check + prober sends packets. The default value is 80. + Valid values are 1 through65535. + This field is a member of `oneof`_ ``_port``. + port_name (str): + Not supported. -class GetGlobalPublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for GlobalPublicDelegatedPrefixes.Get. See - the method description for details. + This field is a member of `oneof`_ ``_port_name``. + port_specification (str): + Specifies how a port is selected for health checking. Can be + one of the following values: USE_FIXED_PORT: Specifies a + port number explicitly using theport field in the health + check. Supported by backend services for passthrough load + balancers and backend services for proxy load balancers. + Also supported in legacy HTTP health checks for target + pools. The health check supports all backends supported by + the backend service provided the backend can be health + checked. For example,GCE_VM_IP network endpoint groups, + GCE_VM_IP_PORT network endpoint groups, and instance group + backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: + Provides an indirect method of specifying the health check + port by referring to the backend service. Only supported by + backend services for proxy load balancers. Not supported by + target pools. Not supported by backend services for + pass-through load balancers. Supports all backends that can + be health checked; for example,GCE_VM_IP_PORT network + endpoint groups and instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. - Attributes: - project (str): - Project ID for this request. - public_delegated_prefix (str): - Name of the PublicDelegatedPrefix resource to - return. - """ + This field is a member of `oneof`_ ``_port_specification``. + proxy_header (str): + Specifies the type of proxy header to append before sending + data to the backend, either NONE or PROXY_V1. The default is + NONE. Check the ProxyHeader enum for the list of possible + values. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - public_delegated_prefix: str = proto.Field( - proto.STRING, - number=204238440, - ) + This field is a member of `oneof`_ ``_proxy_header``. + request_path (str): + The request path of the HTTP health check + request. The default value is/. Must comply + withRFC3986. + This field is a member of `oneof`_ ``_request_path``. + response (str): + Creates a content-based HTTP health check. In + addition to the required HTTP 200 (OK) status + code, you can configure the health check to pass + only when the backend sends this specific ASCII + response string within the first 1024 bytes of + the HTTP response body. For details, see: -class GetGuestAttributesInstanceRequest(proto.Message): - r"""A request message for Instances.GetGuestAttributes. See the - method description for details. + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + This field is a member of `oneof`_ ``_response``. + """ - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + class PortSpecification(proto.Enum): + r"""Specifies how a port is selected for health checking. Can be one of + the following values: USE_FIXED_PORT: Specifies a port number + explicitly using theport field in the health check. Supported by + backend services for passthrough load balancers and backend services + for proxy load balancers. Also supported in legacy HTTP health + checks for target pools. The health check supports all backends + supported by the backend service provided the backend can be health + checked. For example,GCE_VM_IP network endpoint groups, + GCE_VM_IP_PORT network endpoint groups, and instance group backends. + USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an + indirect method of specifying the health check port by referring to + the backend service. Only supported by backend services for proxy + load balancers. Not supported by target pools. Not supported by + backend services for pass-through load balancers. Supports all + backends that can be health checked; for example,GCE_VM_IP_PORT + network endpoint groups and instance group backends. - Attributes: - instance (str): - Name of the instance scoping this request. - project (str): - Project ID for this request. - query_path (str): - Specifies the guest attributes path to be - queried. + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. - This field is a member of `oneof`_ ``_query_path``. - variable_key (str): - Specifies the key for the guest attributes - entry. + Values: + UNDEFINED_PORT_SPECIFICATION (0): + A value indicating that the enum field is not + set. + USE_FIXED_PORT (190235748): + The port number in the health check's port is + used for health checking. Applies to network + endpoint group and instance group backends. + USE_NAMED_PORT (349300671): + Not supported. + USE_SERVING_PORT (362637516): + For network endpoint group backends, the + health check uses the port number specified on + each endpoint in the network endpoint group. For + instance group backends, the health check uses + the port number specified for the backend + service's named port defined in the instance + group's named ports. + """ + UNDEFINED_PORT_SPECIFICATION = 0 + USE_FIXED_PORT = 190235748 + USE_NAMED_PORT = 349300671 + USE_SERVING_PORT = 362637516 - This field is a member of `oneof`_ ``_variable_key``. - zone (str): - The name of the zone for this request. - """ + class ProxyHeader(proto.Enum): + r"""Specifies the type of proxy header to append before sending data to + the backend, either NONE or PROXY_V1. The default is NONE. - instance: str = proto.Field( + Values: + UNDEFINED_PROXY_HEADER (0): + A value indicating that the enum field is not + set. + NONE (2402104): + No description available. + PROXY_V1 (334352940): + No description available. + """ + UNDEFINED_PROXY_HEADER = 0 + NONE = 2402104 + PROXY_V1 = 334352940 + + host: str = proto.Field( proto.STRING, - number=18257045, + number=3208616, + optional=True, ) - project: str = proto.Field( + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + port_name: str = proto.Field( proto.STRING, - number=227560217, + number=41534345, + optional=True, ) - query_path: str = proto.Field( + port_specification: str = proto.Field( proto.STRING, - number=368591164, + number=51590597, optional=True, ) - variable_key: str = proto.Field( + proxy_header: str = proto.Field( proto.STRING, - number=164364828, + number=160374142, optional=True, ) - zone: str = proto.Field( + request_path: str = proto.Field( proto.STRING, - number=3744684, + number=229403605, + optional=True, + ) + response: str = proto.Field( + proto.STRING, + number=196547649, + optional=True, ) -class GetHealthBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.GetHealth. See the - method description for details. +class HTTPSHealthCheck(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (str): - Name of the BackendService resource to which - the queried instance belongs. - project (str): + host (str): + The value of the host header in the HTTPS + health check request. If left empty (default + value), the host header is set to the + destination IP address to which health check + packets are sent. The destination IP address + depends on the type of load balancer. For + details, see: - resource_group_reference_resource (google.cloud.compute_v1beta.types.ResourceGroupReference): - The body resource for this request - """ + https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - backend_service: str = proto.Field( - proto.STRING, - number=306946058, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource_group_reference_resource: "ResourceGroupReference" = proto.Field( - proto.MESSAGE, - number=112951123, - message="ResourceGroupReference", - ) + This field is a member of `oneof`_ ``_host``. + port (int): + The TCP port number to which the health check + prober sends packets. The default value is 443. + Valid values are 1 through65535. + This field is a member of `oneof`_ ``_port``. + port_name (str): + Not supported. -class GetHealthCheckRequest(proto.Message): - r"""A request message for HealthChecks.Get. See the method - description for details. + This field is a member of `oneof`_ ``_port_name``. + port_specification (str): + Specifies how a port is selected for health checking. Can be + one of the following values: USE_FIXED_PORT: Specifies a + port number explicitly using theport field in the health + check. Supported by backend services for passthrough load + balancers and backend services for proxy load balancers. Not + supported by target pools. The health check supports all + backends supported by the backend service provided the + backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint + groups, and instance group backends. USE_NAMED_PORT: Not + supported. USE_SERVING_PORT: Provides an indirect method of + specifying the health check port by referring to the backend + service. Only supported by backend services for proxy load + balancers. Not supported by target pools. Not supported by + backend services for passthrough load balancers. Supports + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the + PortSpecification enum for the list of possible values. - Attributes: - health_check (str): - Name of the HealthCheck resource to return. - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_port_specification``. + proxy_header (str): + Specifies the type of proxy header to append before sending + data to the backend, either NONE or PROXY_V1. The default is + NONE. Check the ProxyHeader enum for the list of possible + values. + + This field is a member of `oneof`_ ``_proxy_header``. + request_path (str): + The request path of the HTTPS health check + request. The default value is/. Must comply + withRFC3986. + + This field is a member of `oneof`_ ``_request_path``. + response (str): + Creates a content-based HTTPS health check. + In addition to the required HTTP 200 (OK) status + code, you can configure the health check to pass + only when the backend sends this specific ASCII + response string within the first 1024 bytes of + the HTTP response body. For details, see: + + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + + This field is a member of `oneof`_ ``_response``. """ - health_check: str = proto.Field( - proto.STRING, - number=308876645, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + class PortSpecification(proto.Enum): + r"""Specifies how a port is selected for health checking. Can be one of + the following values: USE_FIXED_PORT: Specifies a port number + explicitly using theport field in the health check. Supported by + backend services for passthrough load balancers and backend services + for proxy load balancers. Not supported by target pools. The health + check supports all backends supported by the backend service + provided the backend can be health checked. For example, GCE_VM_IP + network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and + instance group backends. USE_NAMED_PORT: Not supported. + USE_SERVING_PORT: Provides an indirect method of specifying the + health check port by referring to the backend service. Only + supported by backend services for proxy load balancers. Not + supported by target pools. Not supported by backend services for + passthrough load balancers. Supports all backends that can be health + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. -class GetHealthRegionBackendServiceRequest(proto.Message): - r"""A request message for RegionBackendServices.GetHealth. See - the method description for details. + Values: + UNDEFINED_PORT_SPECIFICATION (0): + A value indicating that the enum field is not + set. + USE_FIXED_PORT (190235748): + The port number in the health check's port is + used for health checking. Applies to network + endpoint group and instance group backends. + USE_NAMED_PORT (349300671): + Not supported. + USE_SERVING_PORT (362637516): + For network endpoint group backends, the + health check uses the port number specified on + each endpoint in the network endpoint group. For + instance group backends, the health check uses + the port number specified for the backend + service's named port defined in the instance + group's named ports. + """ + UNDEFINED_PORT_SPECIFICATION = 0 + USE_FIXED_PORT = 190235748 + USE_NAMED_PORT = 349300671 + USE_SERVING_PORT = 362637516 - Attributes: - backend_service (str): - Name of the BackendService resource for which - to get health. - project (str): + class ProxyHeader(proto.Enum): + r"""Specifies the type of proxy header to append before sending data to + the backend, either NONE or PROXY_V1. The default is NONE. - region (str): - Name of the region scoping this request. - resource_group_reference_resource (google.cloud.compute_v1beta.types.ResourceGroupReference): - The body resource for this request - """ + Values: + UNDEFINED_PROXY_HEADER (0): + A value indicating that the enum field is not + set. + NONE (2402104): + No description available. + PROXY_V1 (334352940): + No description available. + """ + UNDEFINED_PROXY_HEADER = 0 + NONE = 2402104 + PROXY_V1 = 334352940 - backend_service: str = proto.Field( + host: str = proto.Field( proto.STRING, - number=306946058, + number=3208616, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, ) - region: str = proto.Field( + port_name: str = proto.Field( proto.STRING, - number=138946292, - ) - resource_group_reference_resource: "ResourceGroupReference" = proto.Field( - proto.MESSAGE, - number=112951123, - message="ResourceGroupReference", + number=41534345, + optional=True, ) - - -class GetHealthTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.GetHealth. See the method - description for details. - - Attributes: - instance_reference_resource (google.cloud.compute_v1beta.types.InstanceReference): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - target_pool (str): - Name of the TargetPool resource to which the - queried instance belongs. - """ - - instance_reference_resource: "InstanceReference" = proto.Field( - proto.MESSAGE, - number=292926060, - message="InstanceReference", + port_specification: str = proto.Field( + proto.STRING, + number=51590597, + optional=True, ) - project: str = proto.Field( + proxy_header: str = proto.Field( proto.STRING, - number=227560217, + number=160374142, + optional=True, ) - region: str = proto.Field( + request_path: str = proto.Field( proto.STRING, - number=138946292, + number=229403605, + optional=True, ) - target_pool: str = proto.Field( + response: str = proto.Field( proto.STRING, - number=62796298, + number=196547649, + optional=True, ) -class GetIamPolicyBackendBucketRequest(proto.Message): - r"""A request message for BackendBuckets.GetIamPolicy. See the - method description for details. - +class HealthAggregationPoliciesScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + health_aggregation_policies (MutableSequence[google.cloud.compute_v1beta.types.HealthAggregationPolicy]): + A list of HealthAggregationPolicys contained + in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of health aggregation policies when the list is + empty. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_warning``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + health_aggregation_policies: MutableSequence[ + "HealthAggregationPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=87589904, + message="HealthAggregationPolicy", ) - resource: str = proto.Field( - proto.STRING, - number=195806222, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetIamPolicyBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.GetIamPolicy. See the - method description for details. +class HealthAggregationPolicy(proto.Message): + r"""Represents a health aggregation policy. + + A health aggregation policy resource defines a policy to + aggregate health. + + For more information, see + Health checks overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a + HealthAggregationPolicy. An up-to-date + fingerprint must be provided in order to patch + the HealthAggregationPolicy; Otherwise, the + request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + HealthAggregationPolicy. + This field is a member of `oneof`_ ``_fingerprint``. + healthy_percent_threshold (int): + Can only be set if the policyType field + isBACKEND_SERVICE_POLICY. Specifies the threshold (as a + percentage) of healthy endpoints required in order to + consider the aggregated health result HEALTHY. Defaults to + 60. Must be in range [0, 100]. Not applicable if the + policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. + This field is optional, and will be set to the default if + unspecified. Note that both this threshold and + minHealthyThreshold must be satisfied in order for HEALTHY + to be the aggregated result. "Endpoints" refers to network + endpoints within a Network Endpoint Group or instances + within an Instance Group. + + This field is a member of `oneof`_ ``_healthy_percent_threshold``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. -class GetIamPolicyDiskRequest(proto.Message): - r"""A request message for Disks.GetIamPolicy. See the method - description for details. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#healthAggregationPolicy for health aggregation + policies. + This field is a member of `oneof`_ ``_kind``. + min_healthy_threshold (int): + Can only be set if the policyType field + isBACKEND_SERVICE_POLICY. Specifies the minimum number of + healthy endpoints required in order to consider the + aggregated health result HEALTHY. Defaults to 1. Must be + positive. Not applicable if the policyType field + isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is + optional, and will be set to the default if unspecified. + Note that both this threshold and healthyPercentThreshold + must be satisfied in order for HEALTHY to be the aggregated + result. "Endpoints" refers to network endpoints within a + Network Endpoint Group or instances within an Instance + Group. + + This field is a member of `oneof`_ ``_min_healthy_threshold``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_name``. + policy_type (str): + Specifies the type of the healthAggregationPolicy. The only + allowed value for global resources is DNS_PUBLIC_IP_POLICY. + The only allowed value for regional resources is + BACKEND_SERVICE_POLICY. Must be specified when the + healthAggregationPolicy is created, and cannot be mutated. + Check the PolicyType enum for the list of possible values. - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + This field is a member of `oneof`_ ``_policy_type``. + region (str): + Output only. [Output Only] URL of the region where the + health aggregation policy resides. This field applies only + to the regional resource. You must specify this field as + part of the HTTP request URL. It is not settable as a field + in the request body. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_region``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL with id for + the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + class PolicyType(proto.Enum): + r"""Specifies the type of the healthAggregationPolicy. The only allowed + value for global resources is DNS_PUBLIC_IP_POLICY. The only allowed + value for regional resources is BACKEND_SERVICE_POLICY. Must be + specified when the healthAggregationPolicy is created, and cannot be + mutated. + + Values: + UNDEFINED_POLICY_TYPE (0): + A value indicating that the enum field is not + set. + BACKEND_SERVICE_POLICY (415582023): + No description available. + DNS_PUBLIC_IP_POLICY (366354794): + No description available. + """ + UNDEFINED_POLICY_TYPE = 0 + BACKEND_SERVICE_POLICY = 415582023 + DNS_PUBLIC_IP_POLICY = 366354794 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, optional=True, ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - resource: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=195806222, + number=234678500, + optional=True, ) - zone: str = proto.Field( + healthy_percent_threshold: int = proto.Field( + proto.UINT32, + number=72242895, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=3744684, + number=3292052, + optional=True, ) - - -class GetIamPolicyFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.GetIamPolicy. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + min_healthy_threshold: int = proto.Field( + proto.UINT32, + number=132310940, optional=True, ) - resource: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=195806222, + number=3373707, + optional=True, + ) + policy_type: str = proto.Field( + proto.STRING, + number=18158119, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, ) -class GetIamPolicyImageRequest(proto.Message): - r"""A request message for Images.GetIamPolicy. See the method - description for details. - +class HealthAggregationPolicyAggregatedList(proto.Message): + r"""Contains a list of HealthAggregationPoliciesScopedList. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthAggregationPoliciesScopedList]): + A list of HealthAggregationPoliciesScopedList + resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "HealthAggregationPoliciesScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="HealthAggregationPoliciesScopedList", ) - resource: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=195806222, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetIamPolicyInstanceRequest(proto.Message): - r"""A request message for Instances.GetIamPolicy. See the method - description for details. - +class HealthAggregationPolicyList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.HealthAggregationPolicy]): + A list of HealthAggregationPolicy resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#healthAggregationPolicy for health aggregation + policies. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) - project: str = proto.Field( + items: MutableSequence["HealthAggregationPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="HealthAggregationPolicy", + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - resource: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=195806222, + number=79797525, + optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetIamPolicyInstanceTemplateRequest(proto.Message): - r"""A request message for InstanceTemplates.GetIamPolicy. See the - method description for details. +class HealthCheck(proto.Message): + r"""Represents a health check resource. + Google Compute Engine has two health check resources: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - `Regional `__ + - `Global `__ - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + These health check resources can be used for load balancing and for + autohealing VMs in a managed instance group (MIG). - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ + **Load balancing** - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + Health check requirements vary depending on the type of load + balancer. For details about the type of health check supported for + each load balancer and corresponding backend type, see Health checks + overview: Load balancer guide. + **Autohealing in MIGs** -class GetIamPolicyInstantSnapshotRequest(proto.Message): - r"""A request message for InstantSnapshots.GetIamPolicy. See the - method description for details. + The health checks that you use for autohealing VMs in a MIG can be + either regional or global. For more information, see Set up an + application health check and autohealing. + + For more information, seeHealth checks overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + check_interval_sec (int): + How often (in seconds) to send a health + check. The default value is 5 seconds. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. - """ + This field is a member of `oneof`_ ``_check_interval_sec``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp in3339 text + format. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + grpc_health_check (google.cloud.compute_v1beta.types.GRPCHealthCheck): + This field is a member of `oneof`_ ``_grpc_health_check``. + grpc_tls_health_check (google.cloud.compute_v1beta.types.GRPCTLSHealthCheck): -class GetIamPolicyInterconnectAttachmentGroupRequest(proto.Message): - r"""A request message for - InterconnectAttachmentGroups.GetIamPolicy. See the method - description for details. + This field is a member of `oneof`_ ``_grpc_tls_health_check``. + healthy_threshold (int): + A so-far unhealthy instance will be marked + healthy after this many consecutive successes. + The default value is 2. + This field is a member of `oneof`_ ``_healthy_threshold``. + http2_health_check (google.cloud.compute_v1beta.types.HTTP2HealthCheck): - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_http2_health_check``. + http_health_check (google.cloud.compute_v1beta.types.HTTPHealthCheck): - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + This field is a member of `oneof`_ ``_http_health_check``. + https_health_check (google.cloud.compute_v1beta.types.HTTPSHealthCheck): - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ + This field is a member of `oneof`_ ``_https_health_check``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. Type of the resource. + + This field is a member of `oneof`_ ``_kind``. + log_config (google.cloud.compute_v1beta.types.HealthCheckLogConfig): + Configure logging on this health check. + + This field is a member of `oneof`_ ``_log_config``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. For example, a name that is 1-63 + characters long, matches the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?``, and otherwise complies with + RFC1035. This regular expression describes a name where the + first character is a lowercase letter, and all following + characters are a dash, lowercase letter, or digit, except + the last character, which isn't a dash. + + This field is a member of `oneof`_ ``_name``. + region (str): + Output only. [Output Only] Region where the health check + resides. Not applicable to global health checks. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + [Output Only] Server-defined URL for the resource. + This field is a member of `oneof`_ ``_self_link``. + source_regions (MutableSequence[str]): + The list of cloud regions from which health + checks are performed. If any regions are + specified, then exactly 3 regions should be + specified. The region names must be valid names + of Google Cloud regions. This can only be set + for global health check. If this list is + non-empty, then there are restrictions on what + other health check fields are supported and what + other resources can use this health check: + + - SSL, HTTP2, and GRPC protocols are not + supported. + - The TCP request field is not supported. + - The proxyHeader field for HTTP, HTTPS, and + TCP is not supported. + - The checkIntervalSec field must be at least + 30. + - The health check cannot be used with + BackendService nor with managed instance + group auto-healing. + ssl_health_check (google.cloud.compute_v1beta.types.SSLHealthCheck): -class GetIamPolicyInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.GetIamPolicy. See - the method description for details. + This field is a member of `oneof`_ ``_ssl_health_check``. + tcp_health_check (google.cloud.compute_v1beta.types.TCPHealthCheck): + This field is a member of `oneof`_ ``_tcp_health_check``. + timeout_sec (int): + How long (in seconds) to wait before claiming + failure. The default value is 5 seconds. It is + invalid for timeoutSec to have greater value + than checkIntervalSec. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_timeout_sec``. + type_ (str): + Specifies the type of the healthCheck, either + TCP,SSL, HTTP, HTTPS,HTTP2 or GRPC. Exactly one + of the protocol-specific health check fields + must be specified, which must matchtype field. + Check the Type enum for the list of possible + values. - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + This field is a member of `oneof`_ ``_type``. + unhealthy_threshold (int): + A so-far healthy instance will be marked + unhealthy after this many consecutive failures. + The default value is 2. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_unhealthy_threshold``. """ - options_requested_policy_version: int = proto.Field( + class Type(proto.Enum): + r"""Specifies the type of the healthCheck, either TCP,SSL, HTTP, + HTTPS,HTTP2 or GRPC. Exactly one of the protocol-specific health + check fields must be specified, which must matchtype field. + + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + GRPC (2196510): + No description available. + GRPC_WITH_TLS (268089571): + No description available. + HTTP (2228360): + No description available. + HTTP2 (69079210): + No description available. + HTTPS (69079243): + No description available. + INVALID (530283991): + No description available. + SSL (82412): + No description available. + TCP (82881): + No description available. + """ + UNDEFINED_TYPE = 0 + GRPC = 2196510 + GRPC_WITH_TLS = 268089571 + HTTP = 2228360 + HTTP2 = 69079210 + HTTPS = 69079243 + INVALID = 530283991 + SSL = 82412 + TCP = 82881 + + check_interval_sec: int = proto.Field( proto.INT32, - number=499220029, + number=345561006, optional=True, ) - project: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=227560217, + number=30525366, + optional=True, ) - resource: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=195806222, + number=422937596, + optional=True, ) - - -class GetIamPolicyLicenseRequest(proto.Message): - r"""A request message for Licenses.GetIamPolicy. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( + grpc_health_check: "GRPCHealthCheck" = proto.Field( + proto.MESSAGE, + number=85529574, + optional=True, + message="GRPCHealthCheck", + ) + grpc_tls_health_check: "GRPCTLSHealthCheck" = proto.Field( + proto.MESSAGE, + number=267273258, + optional=True, + message="GRPCTLSHealthCheck", + ) + healthy_threshold: int = proto.Field( proto.INT32, - number=499220029, + number=403212361, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + http2_health_check: "HTTP2HealthCheck" = proto.Field( + proto.MESSAGE, + number=11360986, + optional=True, + message="HTTP2HealthCheck", ) - resource: str = proto.Field( - proto.STRING, - number=195806222, + http_health_check: "HTTPHealthCheck" = proto.Field( + proto.MESSAGE, + number=412586940, + optional=True, + message="HTTPHealthCheck", ) - - -class GetIamPolicyMachineImageRequest(proto.Message): - r"""A request message for MachineImages.GetIamPolicy. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + https_health_check: "HTTPSHealthCheck" = proto.Field( + proto.MESSAGE, + number=436046905, optional=True, + message="HTTPSHealthCheck", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - resource: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=195806222, + number=3292052, + optional=True, ) - - -class GetIamPolicyNetworkAttachmentRequest(proto.Message): - r"""A request message for NetworkAttachments.GetIamPolicy. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + log_config: "HealthCheckLogConfig" = proto.Field( + proto.MESSAGE, + number=351299741, optional=True, + message="HealthCheckLogConfig", ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) region: str = proto.Field( proto.STRING, number=138946292, + optional=True, ) - resource: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=195806222, - ) - - -class GetIamPolicyNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.GetIamPolicy. - See the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + number=456214797, optional=True, ) - project: str = proto.Field( + source_regions: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=405568475, ) - resource: str = proto.Field( - proto.STRING, - number=195806222, + ssl_health_check: "SSLHealthCheck" = proto.Field( + proto.MESSAGE, + number=280032440, + optional=True, + message="SSLHealthCheck", ) - - -class GetIamPolicyNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.GetIamPolicy. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + tcp_health_check: "TCPHealthCheck" = proto.Field( + proto.MESSAGE, + number=469980419, optional=True, + message="TCPHealthCheck", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + timeout_sec: int = proto.Field( + proto.INT32, + number=79994995, + optional=True, ) - resource: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=195806222, + number=3575610, + optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + unhealthy_threshold: int = proto.Field( + proto.INT32, + number=227958480, + optional=True, ) -class GetIamPolicyNodeTemplateRequest(proto.Message): - r"""A request message for NodeTemplates.GetIamPolicy. See the - method description for details. - +class HealthCheckList(proto.Message): + r"""Contains a list of HealthCheck resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): + A list of HealthCheck resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, optional=True, ) - project: str = proto.Field( + items: MutableSequence["HealthCheck"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="HealthCheck", + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - region: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=138946292, + number=79797525, + optional=True, ) - resource: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=195806222, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetIamPolicyRegionBackendServiceRequest(proto.Message): - r"""A request message for RegionBackendServices.GetIamPolicy. See - the method description for details. +class HealthCheckLogConfig(proto.Message): + r"""Configuration of logging on a health check. If logging is + enabled, logs will be exported to Stackdriver. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + enable (bool): + Indicates whether or not to export logs. This + is false by default, which means no health check + logging will be done. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_enable``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + enable: bool = proto.Field( + proto.BOOL, + number=311764355, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) -class GetIamPolicyRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.GetIamPolicy. See the - method description for details. +class HealthCheckReference(proto.Message): + r"""A full or valid partial URL to a health check. For example, + the following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check + - projects/project-id/global/httpHealthChecks/health-check + - global/httpHealthChecks/health-check .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + health_check (str): - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_health_check``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( + health_check: str = proto.Field( proto.STRING, - number=195806222, + number=308876645, + optional=True, ) -class GetIamPolicyRegionInstantSnapshotRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.GetIamPolicy. - See the method description for details. - +class HealthCheckService(proto.Message): + r"""Represents a Health-Check as a Service resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a HealthCheckService. An + up-to-date fingerprint must be provided in order + to patch/update the HealthCheckService; + Otherwise, the request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + HealthCheckService. -class GetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.GetIamPolicy. See the method - description for details. + This field is a member of `oneof`_ ``_fingerprint``. + health_checks (MutableSequence[str]): + A list of URLs to the HealthCheck resources. Must have at + least one HealthCheck, and not more than 10 for + regionalHealthCheckService, and not more than 1 for + globalHealthCheckService.HealthCheck resources must + haveportSpecification=USE_SERVING_PORT + orportSpecification=USE_FIXED_PORT. For regional + HealthCheckService, theHealthCheck must be regional and in + the same region. For global HealthCheckService,HealthCheck + must be global. Mix of regional and globalHealthChecks is + not supported. Multiple regionalHealthChecks must belong to + the same region. RegionalHealthChecks must belong to the + same region as zones ofNetworkEndpointGroups. For + globalHealthCheckService using globalINTERNET_IP_PORT + NetworkEndpointGroups, the global HealthChecks must specify + sourceRegions, and HealthChecks that specify sourceRegions + can only be used with global + INTERNET_IP_PORTNetworkEndpointGroups. + health_status_aggregation_policy (str): + Optional. Policy for how the results from multiple health + checks for the same endpoint are aggregated. Defaults to + NO_AGGREGATION if unspecified. + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - NO_AGGREGATION. An EndpointHealth message is + returned for each pair in the health check + service. + - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY. - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + . This is only allowed with regional HealthCheckService. + Check the HealthStatusAggregationPolicy enum for the list of + possible values. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ + This field is a member of `oneof`_ ``_health_status_aggregation_policy``. + health_status_aggregation_strategy (str): + This field is deprecated. Use + health_status_aggregation_policy instead. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + Policy for how the results from multiple health checks for + the same endpoint are aggregated. + :: -class GetIamPolicyRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.GetIamPolicy. See the - method description for details. + - NO_AGGREGATION. An EndpointHealth + message is returned for each backend in the health check + service. + - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If + all backend's are healthy, the HealthState of the + health check service is HEALTHY. + . Check the HealthStatusAggregationStrategy enum for the + list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_health_status_aggregation_strategy``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output only] Type of the resource. + Alwayscompute#healthCheckServicefor health check services. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. The name must be 1-63 characters long, + and comply with RFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + network_endpoint_groups (MutableSequence[str]): + A list of URLs to the NetworkEndpointGroup resources. Must + not have more than 100. For regionalHealthCheckService, NEGs + must be in zones in the region of the HealthCheckService. + For globalHealthCheckServices, the NetworkEndpointGroups + must be global INTERNET_IP_PORT. + notification_endpoints (MutableSequence[str]): + A list of URLs to the NotificationEndpoint + resources. Must not have more than 10. A list + of endpoints for receiving notifications of + change in health status. For + regionalHealthCheckService,NotificationEndpoint + must be regional and in the same region. For + global HealthCheckService,NotificationEndpoint + must be global. region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. + Output only. [Output Only] URL of the region where the + health check service resides. This field is not applicable + to global health check services. You must specify this field + as part of the HTTP request URL. It is not settable as a + field in the request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) + class HealthStatusAggregationPolicy(proto.Enum): + r"""Optional. Policy for how the results from multiple health checks for + the same endpoint are aggregated. Defaults to NO_AGGREGATION if + unspecified. + :: -class GetIamPolicyReservationRequest(proto.Message): - r"""A request message for Reservations.GetIamPolicy. See the - method description for details. + - NO_AGGREGATION. An EndpointHealth message is + returned for each pair in the health check + service. + - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY. + . This is only allowed with regional HealthCheckService. Additional + supported values which may be not listed in the enum directly due to + technical reasons: AND NO_AGGREGATION - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Values: + UNDEFINED_HEALTH_STATUS_AGGREGATION_POLICY (0): + A value indicating that the enum field is not + set. + AND (64951): + No description available. + NO_AGGREGATION (426445124): + No description available. + """ + UNDEFINED_HEALTH_STATUS_AGGREGATION_POLICY = 0 + AND = 64951 + NO_AGGREGATION = 426445124 - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + class HealthStatusAggregationStrategy(proto.Enum): + r"""This field is deprecated. Use health_status_aggregation_policy + instead. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. - """ + Policy for how the results from multiple health checks for the same + endpoint are aggregated. - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + :: + + - NO_AGGREGATION. An EndpointHealth + message is returned for each backend in the health check + service. + - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If + all backend's are healthy, the HealthState of the + health check service is HEALTHY. + + . Additional supported values which may be not listed in the enum + directly due to technical reasons: AND NO_AGGREGATION + + Values: + UNDEFINED_HEALTH_STATUS_AGGREGATION_STRATEGY (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_HEALTH_STATUS_AGGREGATION_STRATEGY = 0 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, optional=True, ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - resource: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=195806222, + number=234678500, + optional=True, ) - zone: str = proto.Field( + health_checks: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3744684, + number=448370606, ) - - -class GetIamPolicyResourcePolicyRequest(proto.Message): - r"""A request message for ResourcePolicies.GetIamPolicy. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + health_status_aggregation_policy: str = proto.Field( + proto.STRING, + number=253163129, optional=True, ) - project: str = proto.Field( + health_status_aggregation_strategy: str = proto.Field( proto.STRING, - number=227560217, + number=254394106, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - resource: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=195806222, + number=3292052, + optional=True, ) - - -class GetIamPolicyServiceAttachmentRequest(proto.Message): - r"""A request message for ServiceAttachments.GetIamPolicy. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - project: str = proto.Field( + network_endpoint_groups: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=29346733, + ) + notification_endpoints: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=406728490, ) region: str = proto.Field( proto.STRING, number=138946292, + optional=True, ) - resource: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=195806222, + number=456214797, + optional=True, ) -class GetIamPolicySnapshotRequest(proto.Message): - r"""A request message for Snapshots.GetIamPolicy. See the method - description for details. +class HealthCheckServiceReference(proto.Message): + r"""A full or valid partial URL to a health check service. For + example, the following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service + - + projects/project-id/regions/us-west1/healthCheckServices/health-check-service + - regions/us-west1/healthCheckServices/health-check-service .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + health_check_service (str): - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_health_check_service``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( + health_check_service: str = proto.Field( proto.STRING, - number=195806222, + number=408374747, + optional=True, ) -class GetIamPolicyStoragePoolRequest(proto.Message): - r"""A request message for StoragePools.GetIamPolicy. See the - method description for details. - +class HealthCheckServicesList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. - - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - resource (str): - Name or id of the resource for this request. - zone (str): - The name of the zone for this request. - """ - - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - resource: str = proto.Field( - proto.STRING, - number=195806222, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) - + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. -class GetIamPolicySubnetworkRequest(proto.Message): - r"""A request message for Subnetworks.GetIamPolicy. See the - method description for details. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.HealthCheckService]): + Output only. A list of HealthCheckService + resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#healthCheckServicesList for lists of + HealthCheckServices. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Attributes: - options_requested_policy_version (int): - Requested IAM Policy version. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_options_requested_policy_version``. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - resource (str): - Name or id of the resource for this request. + This field is a member of `oneof`_ ``_warning``. """ - options_requested_policy_version: int = proto.Field( - proto.INT32, - number=499220029, - optional=True, - ) - project: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=227560217, + number=3355, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + items: MutableSequence["HealthCheckService"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="HealthCheckService", ) - resource: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=195806222, + number=3292052, + optional=True, ) - - -class GetImageFamilyViewRequest(proto.Message): - r"""A request message for ImageFamilyViews.Get. See the method - description for details. - - Attributes: - family (str): - Name of the image family to search for. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ - - family: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=328751972, + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetImageRequest(proto.Message): - r"""A request message for Images.Get. See the method description - for details. +class HealthChecksAggregatedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - image (str): - Name of the image resource to return. - project (str): - Project ID for this request. - """ + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - image: str = proto.Field( - proto.STRING, - number=100313435, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthChecksScopedList]): + A list of HealthChecksScopedList resources. + kind (str): + Output only. Type of resource. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. -class GetInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.Get. See the - method description for details. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Attributes: - instance_group_manager (str): - The name of the managed instance group. - project (str): - Project ID for this request. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=249363395, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "HealthChecksScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="HealthChecksScopedList", ) - zone: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=3744684, + number=3292052, + optional=True, ) - - -class GetInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for InstanceGroupManagerResizeRequests.Get. - See the method description for details. - - Attributes: - instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. - project (str): - Project ID for this request. - resize_request (str): - The name of the resize request. Name should - conform to RFC1035 or be a resource ID. - zone (str): - Name of the - href="/compute/docs/regions-zones/#available">zone - scoping this request. Name should conform to - RFC1035. - """ - - instance_group_manager: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=249363395, + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - resize_request: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=216941060, + number=243372063, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetInstanceGroupRequest(proto.Message): - r"""A request message for InstanceGroups.Get. See the method - description for details. +class HealthChecksScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group (str): - The name of the instance group. - project (str): - Project ID for this request. - zone (str): - The name of the zone where the instance group - is located. + health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): + A list of HealthChecks contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group: str = proto.Field( - proto.STRING, - number=81095253, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + health_checks: MutableSequence["HealthCheck"] = proto.RepeatedField( + proto.MESSAGE, + number=448370606, + message="HealthCheck", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetInstanceRequest(proto.Message): - r"""A request message for Instances.Get. See the method - description for details. +class HealthSource(proto.Message): + r"""Represents a health source. + + A health source resource specifies the source resources and the + health aggregation policy applied to the source resources to + determine the aggregated health status. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance resource to return. - project (str): - Project ID for this request. - view (str): - View of the instance. - Check the View enum for the list of possible - values. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_view``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Fingerprint of this resource. A hash of the + contents stored in this object. This field is + used in optimistic locking. This field will be + ignored when inserting a HealthSource. An + up-to-date fingerprint must be provided in order + to patch the HealthSource; Otherwise, the + request will fail with error 412 + conditionNotMet. To see the latest fingerprint, + make a get() request to retrieve the + HealthSource. + + This field is a member of `oneof`_ ``_fingerprint``. + health_aggregation_policy (str): + URL to the HealthAggregationPolicy resource. + Must be set. Must be regional and in the same + region as the HealthSource. Can be mutated. + + This field is a member of `oneof`_ ``_health_aggregation_policy``. + id (int): + Output only. [Output Only] A unique identifier for this + resource type. The server generates this identifier. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#healthSource for health sources. + + This field is a member of `oneof`_ ``_kind``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + region (str): + Output only. [Output Only] URL of the region where the + health source resides. This field applies only to the + regional resource. You must specify this field as part of + the HTTP request URL. It is not settable as a field in the + request body. + + This field is a member of `oneof`_ ``_region``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL with id for + the resource. + + This field is a member of `oneof`_ ``_self_link_with_id``. + source_type (str): + Specifies the type of the HealthSource. The only allowed + value is BACKEND_SERVICE. Must be specified when + theHealthSource is created, and cannot be mutated. Check the + SourceType enum for the list of possible values. + + This field is a member of `oneof`_ ``_source_type``. + sources (MutableSequence[str]): + URLs to the source resources. Must be size 1. Must be + aBackendService if the sourceType is BACKEND_SERVICE. + TheBackendService must have load balancing schemeINTERNAL or + INTERNAL_MANAGED and must be regional and in the same region + as the HealthSource (cross-region deployment for + INTERNAL_MANAGED is not supported). TheBackendService may + use only IGs, MIGs, or NEGs of typeGCE_VM_IP or + GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can + be mutated. """ - class View(proto.Enum): - r"""View of the instance. + class SourceType(proto.Enum): + r"""Specifies the type of the HealthSource. The only allowed value is + BACKEND_SERVICE. Must be specified when theHealthSource is created, + and cannot be mutated. Values: - UNDEFINED_VIEW (0): + UNDEFINED_SOURCE_TYPE (0): A value indicating that the enum field is not set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. + BACKEND_SERVICE (285792202): + No description available. """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 + UNDEFINED_SOURCE_TYPE = 0 + BACKEND_SERVICE = 285792202 - instance: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=18257045, + number=30525366, + optional=True, ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - view: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=3619493, + number=234678500, optional=True, ) - zone: str = proto.Field( + health_aggregation_policy: str = proto.Field( proto.STRING, - number=3744684, + number=240314354, + optional=True, ) - - -class GetInstanceSettingRequest(proto.Message): - r"""A request message for InstanceSettingsService.Get. See the - method description for details. - - Attributes: - project (str): - Project ID for this request. - zone (str): - Name of the zone for this request. - """ - - project: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - zone: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=3744684, + number=3373707, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + source_type: str = proto.Field( + proto.STRING, + number=452245726, + optional=True, + ) + sources: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=125606840, ) -class GetInstanceTemplateRequest(proto.Message): - r"""A request message for InstanceTemplates.Get. See the method - description for details. - +class HealthSourceAggregatedList(proto.Message): + r"""Contains a list of HealthSourcesScopedList. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template (str): - The name of the instance template. - project (str): - Project ID for this request. - view (str): - View of the instance template. - Check the View enum for the list of possible - values. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_view``. - """ + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthSourcesScopedList]): + A list of HealthSourcesScopedList resources. + kind (str): + Output only. Type of resource. - class View(proto.Enum): - r"""View of the instance template. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - instance_template: str = proto.Field( + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=309248228, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "HealthSourcesScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="HealthSourcesScopedList", ) - view: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=3619493, + number=3292052, optional=True, ) - - -class GetInstantSnapshotRequest(proto.Message): - r"""A request message for InstantSnapshots.Get. See the method - description for details. - - Attributes: - instant_snapshot (str): - Name of the InstantSnapshot resource to - return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ - - instant_snapshot: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=391638626, + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - zone: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3744684, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetInterconnectAttachmentGroupRequest(proto.Message): - r"""A request message for InterconnectAttachmentGroups.Get. See - the method description for details. +class HealthSourceList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_attachment_group (str): - Name of the InterconnectAttachmentGroup - resource to return. - project (str): - Project ID for this request. - """ + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - interconnect_attachment_group: str = proto.Field( - proto.STRING, - number=75905012, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.HealthSource]): + A list of HealthSource resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#healthSource for health sources. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. -class GetInterconnectAttachmentRequest(proto.Message): - r"""A request message for InterconnectAttachments.Get. See the - method description for details. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. - Attributes: - interconnect_attachment (str): - Name of the interconnect attachment to - return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - interconnect_attachment: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=308135284, + number=3355, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + items: MutableSequence["HealthSource"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="HealthSource", ) - region: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=138946292, + number=3292052, + optional=True, ) - - -class GetInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.Get. See the method - description for details. - - Attributes: - interconnect_group (str): - Name of the InterconnectGroup resource to - return. - project (str): - Project ID for this request. - """ - - interconnect_group: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=388651918, + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetInterconnectLocationRequest(proto.Message): - r"""A request message for InterconnectLocations.Get. See the - method description for details. +class HealthSourcesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_location (str): - Name of the interconnect location to return. - project (str): - Project ID for this request. + health_sources (MutableSequence[google.cloud.compute_v1beta.types.HealthSource]): + A list of HealthSources contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of health sources when the list is empty. + + This field is a member of `oneof`_ ``_warning``. """ - interconnect_location: str = proto.Field( - proto.STRING, - number=492235846, + health_sources: MutableSequence["HealthSource"] = proto.RepeatedField( + proto.MESSAGE, + number=397879509, + message="HealthSource", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetInterconnectRemoteLocationRequest(proto.Message): - r"""A request message for InterconnectRemoteLocations.Get. See - the method description for details. +class HealthStatus(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_remote_location (str): - Name of the interconnect remote location to - return. - project (str): - Project ID for this request. - """ + annotations (MutableMapping[str, str]): + Metadata defined as annotations for network + endpoint. + forwarding_rule (str): + URL of the forwarding rule associated with + the health status of the instance. - interconnect_remote_location: str = proto.Field( - proto.STRING, - number=290153949, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_forwarding_rule``. + forwarding_rule_ip (str): + A forwarding rule IP address assigned to this + instance. + + This field is a member of `oneof`_ ``_forwarding_rule_ip``. + health_state (str): + Health state of the IPv4 address of the + instance. Check the HealthState enum for the + list of possible values. + + This field is a member of `oneof`_ ``_health_state``. + instance (str): + URL of the instance resource. + This field is a member of `oneof`_ ``_instance``. + ip_address (str): + For target pool based Network Load Balancing, + it indicates the forwarding rule's IP address + assigned to this instance. For other types of + load balancing, the field indicates VM internal + ip. -class GetInterconnectRequest(proto.Message): - r"""A request message for Interconnects.Get. See the method - description for details. + This field is a member of `oneof`_ ``_ip_address``. + ipv6_address (str): - Attributes: - interconnect (str): - Name of the interconnect to return. - project (str): - Project ID for this request. - """ + This field is a member of `oneof`_ ``_ipv6_address``. + ipv6_health_state (str): + Health state of the IPv6 address of the + instance. Check the Ipv6HealthState enum for the + list of possible values. - interconnect: str = proto.Field( - proto.STRING, - number=224601230, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_ipv6_health_state``. + port (int): + The named port of the instance group, not + necessarily the port that is health-checked. + This field is a member of `oneof`_ ``_port``. + weight (str): -class GetLicenseCodeRequest(proto.Message): - r"""A request message for LicenseCodes.Get. See the method - description for details. + This field is a member of `oneof`_ ``_weight``. + weight_error (str): + Check the WeightError enum for the list of + possible values. - Attributes: - license_code (str): - Number corresponding to the License code - resource to return. - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_weight_error``. """ - license_code: str = proto.Field( - proto.STRING, - number=1467179, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + class HealthState(proto.Enum): + r"""Health state of the IPv4 address of the instance. + Additional supported values which may be not listed in the enum + directly due to technical reasons: + HEALTHY + UNHEALTHY -class GetLicenseRequest(proto.Message): - r"""A request message for Licenses.Get. See the method - description for details. + Values: + UNDEFINED_HEALTH_STATE (0): + A value indicating that the enum field is not + set. + HEALTHY (439801213): + No description available. + UNHEALTHY (462118084): + No description available. + """ + UNDEFINED_HEALTH_STATE = 0 + HEALTHY = 439801213 + UNHEALTHY = 462118084 - Attributes: - license_ (str): - Name of the License resource to return. - project (str): - Project ID for this request. - """ + class Ipv6HealthState(proto.Enum): + r"""Health state of the IPv6 address of the instance. + Additional supported values which may be not listed in the enum + directly due to technical reasons: - license_: str = proto.Field( - proto.STRING, - number=166757441, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + HEALTHY + UNHEALTHY + Values: + UNDEFINED_IPV6_HEALTH_STATE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_IPV6_HEALTH_STATE = 0 -class GetMachineImageRequest(proto.Message): - r"""A request message for MachineImages.Get. See the method - description for details. + class WeightError(proto.Enum): + r""" - Attributes: - machine_image (str): - The name of the machine image. - project (str): - Project ID for this request. - """ + Values: + UNDEFINED_WEIGHT_ERROR (0): + A value indicating that the enum field is not + set. + INVALID_WEIGHT (383698400): + The response to a Health Check probe had the + HTTP response header field + X-Load-Balancing-Endpoint-Weight, but its + content was invalid (i.e., not a non-negative + single-precision floating-point number in + decimal string representation). + MISSING_WEIGHT (384027537): + The response to a Health Check probe did not + have the HTTP response header field + X-Load-Balancing-Endpoint-Weight. + UNAVAILABLE_WEIGHT (439464295): + This is the value when the accompanied health + status is either TIMEOUT (i.e.,the Health Check + probe was not able to get a response in time) or + UNKNOWN. For the latter, it should be typically + because there has not been sufficient time to + parse and report the weight for a new backend + (which is with 0.0.0.0 ip address). However, it + can be also due to an outage case for which the + health status is explicitly reset to UNKNOWN. + WEIGHT_NONE (502428831): + This is the default value when WeightReportMode is DISABLE, + and is also the initial value when WeightReportMode has just + updated to ENABLE or DRY_RUN and there has not been + sufficient time to parse and report the backend weight. + """ + UNDEFINED_WEIGHT_ERROR = 0 + INVALID_WEIGHT = 383698400 + MISSING_WEIGHT = 384027537 + UNAVAILABLE_WEIGHT = 439464295 + WEIGHT_NONE = 502428831 - machine_image: str = proto.Field( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=69189475, - ) - project: str = proto.Field( proto.STRING, - number=227560217, + number=112032548, ) - - -class GetMachineTypeRequest(proto.Message): - r"""A request message for MachineTypes.Get. See the method - description for details. - - Attributes: - machine_type (str): - Name of the machine type to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. - """ - - machine_type: str = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, - number=227711026, + number=269964030, + optional=True, ) - project: str = proto.Field( + forwarding_rule_ip: str = proto.Field( proto.STRING, - number=227560217, + number=172250632, + optional=True, ) - zone: str = proto.Field( + health_state: str = proto.Field( proto.STRING, - number=3744684, + number=324007150, + optional=True, ) - - -class GetMacsecConfigInterconnectRequest(proto.Message): - r"""A request message for Interconnects.GetMacsecConfig. See the - method description for details. - - Attributes: - interconnect (str): - Name of the interconnect resource to query. - project (str): - Project ID for this request. - """ - - interconnect: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=224601230, + number=18257045, + optional=True, ) - project: str = proto.Field( + ip_address: str = proto.Field( proto.STRING, - number=227560217, + number=406272220, + optional=True, ) - - -class GetNatIpInfoRouterRequest(proto.Message): - r"""A request message for Routers.GetNatIpInfo. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - nat_name (str): - Name of the nat service to filter the NAT IP - information. If it is omitted, all nats for this - router will be returned. Name should conform to - RFC1035. - - This field is a member of `oneof`_ ``_nat_name``. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - router (str): - Name of the Router resource to query for Nat - IP information. The name should conform to - RFC1035. - """ - - nat_name: str = proto.Field( + ipv6_address: str = proto.Field( proto.STRING, - number=425596649, + number=341563804, optional=True, ) - project: str = proto.Field( + ipv6_health_state: str = proto.Field( proto.STRING, - number=227560217, + number=190316614, + optional=True, ) - region: str = proto.Field( + port: int = proto.Field( + proto.INT32, + number=3446913, + optional=True, + ) + weight: str = proto.Field( proto.STRING, - number=138946292, + number=282149496, + optional=True, ) - router: str = proto.Field( + weight_error: str = proto.Field( proto.STRING, - number=148608841, + number=522501505, + optional=True, ) -class GetNatMappingInfoRoutersRequest(proto.Message): - r"""A request message for Routers.GetNatMappingInfo. See the - method description for details. - +class HealthStatusForNetworkEndpoint(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + backend_service (google.cloud.compute_v1beta.types.BackendServiceReference): + URL of the backend service associated with + the health state of the network endpoint. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + This field is a member of `oneof`_ ``_backend_service``. + forwarding_rule (google.cloud.compute_v1beta.types.ForwardingRuleReference): + URL of the forwarding rule associated with + the health state of the network endpoint. - This field is a member of `oneof`_ ``_max_results``. - nat_name (str): - Name of the nat service to filter the Nat - Mapping information. If it is omitted, all nats - for this router will be returned. Name should - conform to RFC1035. + This field is a member of `oneof`_ ``_forwarding_rule``. + health_check (google.cloud.compute_v1beta.types.HealthCheckReference): + URL of the health check associated with the + health state of the network endpoint. - This field is a member of `oneof`_ ``_nat_name``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + This field is a member of `oneof`_ ``_health_check``. + health_check_service (google.cloud.compute_v1beta.types.HealthCheckServiceReference): + URL of the health check service associated + with the health state of the network endpoint. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + This field is a member of `oneof`_ ``_health_check_service``. + health_state (str): + Health state of the network endpoint + determined based on the health checks + configured. Check the HealthState enum for the + list of possible values. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + This field is a member of `oneof`_ ``_health_state``. + ipv6_health_state (str): + Health state of the ipv6 network endpoint + determined based on the health checks + configured. Check the Ipv6HealthState enum for + the list of possible values. - This field is a member of `oneof`_ ``_return_partial_success``. - router (str): - Name of the Router resource to query for Nat - Mapping information of VM endpoints. + This field is a member of `oneof`_ ``_ipv6_health_state``. """ - filter: str = proto.Field( - proto.STRING, - number=336120696, + class HealthState(proto.Enum): + r"""Health state of the network endpoint determined based on the + health checks configured. + Additional supported values which may be not listed in the enum + directly due to technical reasons: + + DRAINING + HEALTHY + UNHEALTHY + UNKNOWN + + Values: + UNDEFINED_HEALTH_STATE (0): + A value indicating that the enum field is not + set. + DRAINING (480455402): + No description available. + HEALTHY (439801213): + No description available. + UNHEALTHY (462118084): + No description available. + UNKNOWN (433141802): + No description available. + """ + UNDEFINED_HEALTH_STATE = 0 + DRAINING = 480455402 + HEALTHY = 439801213 + UNHEALTHY = 462118084 + UNKNOWN = 433141802 + + class Ipv6HealthState(proto.Enum): + r"""Health state of the ipv6 network endpoint determined based on + the health checks configured. + Additional supported values which may be not listed in the enum + directly due to technical reasons: + + DRAINING + HEALTHY + UNHEALTHY + UNKNOWN + + Values: + UNDEFINED_IPV6_HEALTH_STATE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_IPV6_HEALTH_STATE = 0 + + backend_service: "BackendServiceReference" = proto.Field( + proto.MESSAGE, + number=306946058, optional=True, + message="BackendServiceReference", ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, + forwarding_rule: "ForwardingRuleReference" = proto.Field( + proto.MESSAGE, + number=269964030, optional=True, + message="ForwardingRuleReference", ) - nat_name: str = proto.Field( - proto.STRING, - number=425596649, + health_check: "HealthCheckReference" = proto.Field( + proto.MESSAGE, + number=308876645, optional=True, + message="HealthCheckReference", ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, + health_check_service: "HealthCheckServiceReference" = proto.Field( + proto.MESSAGE, + number=408374747, optional=True, + message="HealthCheckServiceReference", ) - page_token: str = proto.Field( + health_state: str = proto.Field( proto.STRING, - number=19994697, + number=324007150, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + ipv6_health_state: str = proto.Field( proto.STRING, - number=138946292, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, + number=190316614, optional=True, ) - router: str = proto.Field( - proto.STRING, - number=148608841, - ) -class GetNetworkAttachmentRequest(proto.Message): - r"""A request message for NetworkAttachments.Get. See the method - description for details. +class Help(proto.Message): + r"""Provides links to documentation or for performing an out of + band action. + For example, if a quota check failed with an error indicating + the calling project hasn't enabled the accessed service, this + can contain a URL pointing directly to the right place in the + developer console to flip the bit. Attributes: - network_attachment (str): - Name of the NetworkAttachment resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. + links (MutableSequence[google.cloud.compute_v1beta.types.HelpLink]): + URL(s) pointing to additional information on + handling the current error. """ - network_attachment: str = proto.Field( - proto.STRING, - number=224644052, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + links: MutableSequence["HelpLink"] = proto.RepeatedField( + proto.MESSAGE, + number=102977465, + message="HelpLink", ) -class GetNetworkEdgeSecurityServiceRequest(proto.Message): - r"""A request message for NetworkEdgeSecurityServices.Get. See - the method description for details. +class HelpLink(proto.Message): + r"""Describes a URL link. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_edge_security_service (str): - Name of the network edge security service to - get. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. + description (str): + Describes what the link offers. + + This field is a member of `oneof`_ ``_description``. + url (str): + The URL of the link. + + This field is a member of `oneof`_ ``_url``. """ - network_edge_security_service: str = proto.Field( - proto.STRING, - number=157011879, - ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - region: str = proto.Field( + url: str = proto.Field( proto.STRING, - number=138946292, + number=116079, + optional=True, ) -class GetNetworkEndpointGroupRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.Get. See the - method description for details. +class HostRule(proto.Message): + r"""UrlMaps + A host-matching rule for a URL. If matched, will use the + namedPathMatcher to select the BackendService. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group (str): - The name of the network endpoint group. It - should comply with RFC1035. - project (str): - Project ID for this request. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + hosts (MutableSequence[str]): + The list of host patterns to match. They must be valid + hostnames with optional port numbers in the format + host:port.\* matches any string of ([a-z0-9-.]\*). In that + case, \* must be the first character, and if followed by + anything, the immediate following character must be either - + or .. + + - based matching is not supported when the URL map is bound + to a target gRPC proxy that has the validateForProxyless + field set to true. + path_matcher (str): + The name of the PathMatcher to use to match + the path portion of the URL if the hostRule + matches the URL's host portion. + + This field is a member of `oneof`_ ``_path_matcher``. """ - network_endpoint_group: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=433907078, + number=422937596, + optional=True, ) - project: str = proto.Field( + hosts: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=99467211, ) - zone: str = proto.Field( + path_matcher: str = proto.Field( proto.STRING, - number=3744684, + number=337813272, + optional=True, ) -class GetNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.Get. See the - method description for details. +class HttpFaultAbort(proto.Message): + r"""Specification for how requests are aborted as part of fault + injection. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to get. - project (str): - Project ID for this request. + http_status (int): + The HTTP status code used to abort the + request. + The value must be from 200 to 599 inclusive. + + For gRPC protocol, the gRPC status code is + mapped to HTTP status code according to this + mapping table. HTTP status 200 is mapped to gRPC + status UNKNOWN. Injecting an OK status is + currently not supported by Traffic Director. + + This field is a member of `oneof`_ ``_http_status``. + percentage (float): + The percentage of traffic for connections, + operations, or requests that is aborted as part + of fault injection. + + The value must be from 0.0 to 100.0 inclusive. + + This field is a member of `oneof`_ ``_percentage``. """ - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, + http_status: int = proto.Field( + proto.UINT32, + number=468949897, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + percentage: float = proto.Field( + proto.DOUBLE, + number=151909018, + optional=True, ) -class GetNetworkProfileRequest(proto.Message): - r"""A request message for NetworkProfiles.Get. See the method - description for details. +class HttpFaultDelay(proto.Message): + r"""Specifies the delay introduced by the load balancer before + forwarding the request to the backend service as part of fault + injection. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_profile (str): - Name of the network profile to return. - project (str): - Project ID for this request. + fixed_delay (google.cloud.compute_v1beta.types.Duration): + Specifies the value of the fixed delay + interval. + + This field is a member of `oneof`_ ``_fixed_delay``. + percentage (float): + The percentage of traffic for connections, + operations, or requests for which a delay is + introduced as part of fault injection. + + The value must be from 0.0 to 100.0 inclusive. + + This field is a member of `oneof`_ ``_percentage``. """ - network_profile: str = proto.Field( - proto.STRING, - number=173112472, + fixed_delay: "Duration" = proto.Field( + proto.MESSAGE, + number=317037816, + optional=True, + message="Duration", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + percentage: float = proto.Field( + proto.DOUBLE, + number=151909018, + optional=True, ) -class GetNetworkRequest(proto.Message): - r"""A request message for Networks.Get. See the method - description for details. +class HttpFaultInjection(proto.Message): + r"""The specification for fault injection introduced into traffic + to test the resiliency of clients to backend service failure. As + part of fault injection, when clients send requests to a backend + service, delays can be introduced by the load balancer on a + percentage of requests before sending those request to the + backend service. Similarly requests from clients can be aborted + by the load balancer for a percentage of requests. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network (str): - Name of the network to return. - project (str): - Project ID for this request. + abort (google.cloud.compute_v1beta.types.HttpFaultAbort): + The specification for how client requests are + aborted as part of fault injection. + + This field is a member of `oneof`_ ``_abort``. + delay (google.cloud.compute_v1beta.types.HttpFaultDelay): + The specification for how client requests are + delayed as part of fault injection, before being + sent to a backend service. + + This field is a member of `oneof`_ ``_delay``. """ - network: str = proto.Field( - proto.STRING, - number=232872494, + abort: "HttpFaultAbort" = proto.Field( + proto.MESSAGE, + number=92611376, + optional=True, + message="HttpFaultAbort", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + delay: "HttpFaultDelay" = proto.Field( + proto.MESSAGE, + number=95467907, + optional=True, + message="HttpFaultDelay", ) -class GetNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.Get. See the method - description for details. +class HttpFilterConfig(proto.Message): + r"""HttpFilterConfiguration supplies additional contextual + settings for networkservices.HttpFilter resources enabled by + Traffic Director. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - node_group (str): - Name of the node group to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. + config (str): + The configuration needed to enable + thenetworkservices.HttpFilter resource. The + configuration must be YAML formatted and only + contain fields defined in the protobuf + identified in configTypeUrl + + This field is a member of `oneof`_ ``_config``. + config_type_url (str): + The fully qualified versioned proto3 type url + of the protobuf that the filter expects for its + contextual settings, for + example:type.googleapis.com/google.protobuf.Struct + + This field is a member of `oneof`_ ``_config_type_url``. + filter_name (str): + Name of the networkservices.HttpFilter + resource this configuration belongs to. This + name must be known to the xDS client. Example: + envoy.wasm + + This field is a member of `oneof`_ ``_filter_name``. """ - node_group: str = proto.Field( + config: str = proto.Field( proto.STRING, - number=469958146, + number=255820610, + optional=True, ) - project: str = proto.Field( + config_type_url: str = proto.Field( proto.STRING, - number=227560217, + number=344821575, + optional=True, ) - zone: str = proto.Field( + filter_name: str = proto.Field( proto.STRING, - number=3744684, + number=183620338, + optional=True, ) -class GetNodeTemplateRequest(proto.Message): - r"""A request message for NodeTemplates.Get. See the method - description for details. +class HttpHeaderAction(proto.Message): + r"""The request and response header transformations that take + effect before the request is passed along to the selected + backendService. Attributes: - node_template (str): - Name of the node template to return. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. + request_headers_to_add (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderOption]): + Headers to add to a matching request before + forwarding the request to thebackendService. + request_headers_to_remove (MutableSequence[str]): + A list of header names for headers that need + to be removed from the request before forwarding + the request to the backendService. + response_headers_to_add (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderOption]): + Headers to add the response before sending + the response back to the client. + response_headers_to_remove (MutableSequence[str]): + A list of header names for headers that need + to be removed from the response before sending + the response back to the client. """ - node_template: str = proto.Field( - proto.STRING, - number=323154455, + request_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( + proto.MESSAGE, + number=72111974, + message="HttpHeaderOption", ) - project: str = proto.Field( + request_headers_to_remove: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=218425247, ) - region: str = proto.Field( + response_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( + proto.MESSAGE, + number=32136052, + message="HttpHeaderOption", + ) + response_headers_to_remove: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=138946292, + number=75415761, ) -class GetNodeTypeRequest(proto.Message): - r"""A request message for NodeTypes.Get. See the method - description for details. +class HttpHeaderMatch(proto.Message): + r"""matchRule criteria for request header matches. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - node_type (str): - Name of the node type to return. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. + exact_match (str): + The value should exactly match contents of + exactMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. + + This field is a member of `oneof`_ ``_exact_match``. + header_name (str): + The name of the HTTP header to match. + + For matching against the HTTP request's authority, use a + headerMatch with the header name ":authority". + + For matching a request's method, use the headerName + ":method". + + When the URL map is bound to a target gRPC proxy that has + the validateForProxyless field set to true, only non-binary + user-specified custom metadata and the ``content-type`` + header are supported. The following transport-level headers + cannot be used in header matching rules: ``:authority``, + ``:method``, ``:path``, ``:scheme``, ``user-agent``, + ``accept-encoding``, ``content-encoding``, + ``grpc-accept-encoding``, ``grpc-encoding``, + ``grpc-previous-rpc-attempts``, ``grpc-tags-bin``, + ``grpc-timeout`` and ``grpc-trace-bin``. + + This field is a member of `oneof`_ ``_header_name``. + invert_match (bool): + If set to false, the headerMatch is + considered a match if the preceding match + criteria are met. If set to true, the + headerMatch is considered a match if the + preceding match criteria are NOT met. + + The default setting is false. + + This field is a member of `oneof`_ ``_invert_match``. + prefix_match (str): + The value of the header must start with the + contents ofprefixMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. + + This field is a member of `oneof`_ ``_prefix_match``. + present_match (bool): + A header with the contents of headerName must + exist. The match takes place whether or not the + request's header has a value. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. + + This field is a member of `oneof`_ ``_present_match``. + range_match (google.cloud.compute_v1beta.types.Int64RangeMatch): + The header value must be an integer and its value must be in + the range specified in rangeMatch. If the header does not + contain an integer, number or is empty, the match fails. + + For example for a range [-5, 0] + + :: + + - -3 will match. + - 0 will not match. + - 0.25 will not match. + - -3someString will not match. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be set. + + rangeMatch is not supported for load balancers that have + loadBalancingScheme set to EXTERNAL. + + This field is a member of `oneof`_ ``_range_match``. + regex_match (str): + The value of the header must match the regular expression + specified inregexMatch. For more information about regular + expression syntax, see Syntax. + + For matching against a port specified in the HTTP request, + use a headerMatch with headerName set to PORT and a regular + expression that satisfies the RFC2616 Host header's port + specifier. + + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be set. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED, + EXTERNAL_MANAGED (regional scope) or INTERNAL_MANAGED. + + This field is a member of `oneof`_ ``_regex_match``. + suffix_match (str): + The value of the header must end with the + contents ofsuffixMatch. + Only one of exactMatch, prefixMatch,suffixMatch, + regexMatch,presentMatch or rangeMatch must be + set. + + This field is a member of `oneof`_ ``_suffix_match``. """ - node_type: str = proto.Field( + exact_match: str = proto.Field( proto.STRING, - number=465832791, + number=457641093, + optional=True, ) - project: str = proto.Field( + header_name: str = proto.Field( proto.STRING, - number=227560217, + number=110223613, + optional=True, ) - zone: str = proto.Field( + invert_match: bool = proto.Field( + proto.BOOL, + number=501130268, + optional=True, + ) + prefix_match: str = proto.Field( proto.STRING, - number=3744684, + number=257898968, + optional=True, ) - - -class GetOperationalStatusInterconnectAttachmentGroupRequest(proto.Message): - r"""A request message for - InterconnectAttachmentGroups.GetOperationalStatus. See the - method description for details. - - Attributes: - interconnect_attachment_group (str): - Name of the interconnectAttachmentGroup - resource to query. - project (str): - Project ID for this request. - """ - - interconnect_attachment_group: str = proto.Field( + present_match: bool = proto.Field( + proto.BOOL, + number=67435841, + optional=True, + ) + range_match: "Int64RangeMatch" = proto.Field( + proto.MESSAGE, + number=97244227, + optional=True, + message="Int64RangeMatch", + ) + regex_match: str = proto.Field( proto.STRING, - number=75905012, + number=107387853, + optional=True, ) - project: str = proto.Field( + suffix_match: str = proto.Field( proto.STRING, - number=227560217, + number=426488663, + optional=True, ) -class GetOperationalStatusInterconnectGroupRequest(proto.Message): - r"""A request message for - InterconnectGroups.GetOperationalStatus. See the method - description for details. +class HttpHeaderOption(proto.Message): + r"""Specification determining how headers are added to requests + or responses. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_group (str): - Name of the interconnectGroup resource to - query. - project (str): - Project ID for this request. + header_name (str): + The name of the header. + + This field is a member of `oneof`_ ``_header_name``. + header_value (str): + The value of the header to add. + + This field is a member of `oneof`_ ``_header_value``. + replace (bool): + If false, headerValue is appended to any + values that already + exist for the header. If true, headerValue is + set for the header, discarding any values that + were set for that header. + + The default value is true, + unless a variable is present in headerValue, + in which case the default value is false. + . + + This field is a member of `oneof`_ ``_replace``. """ - interconnect_group: str = proto.Field( + header_name: str = proto.Field( proto.STRING, - number=388651918, + number=110223613, + optional=True, ) - project: str = proto.Field( + header_value: str = proto.Field( proto.STRING, - number=227560217, + number=203094335, + optional=True, + ) + replace: bool = proto.Field( + proto.BOOL, + number=20755124, + optional=True, ) -class GetOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.Get. See - the method description for details. +class HttpQueryParameterMatch(proto.Message): + r"""HttpRouteRuleMatch criteria for a request's query parameter. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - security_policy (str): - Name of the security policy to get. - """ + exact_match (str): + The queryParameterMatch matches if the value + of the parameter exactly matches the contents of + exactMatch. - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) + Only one of presentMatch, exactMatch, + orregexMatch must be set. + This field is a member of `oneof`_ ``_exact_match``. + name (str): + The name of the query parameter to match. The + query parameter must exist in the request, in + the absence of which the request match fails. -class GetPacketMirroringRequest(proto.Message): - r"""A request message for PacketMirrorings.Get. See the method - description for details. + This field is a member of `oneof`_ ``_name``. + present_match (bool): + Specifies that the queryParameterMatch + matches if the request contains the query + parameter, irrespective of whether the parameter + has a value or not. - Attributes: - packet_mirroring (str): - Name of the PacketMirroring resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. + Only one of presentMatch, exactMatch, + orregexMatch must be set. + + This field is a member of `oneof`_ ``_present_match``. + regex_match (str): + The queryParameterMatch matches if the value of the + parameter matches the regular expression specified + byregexMatch. For more information about regular expression + syntax, see Syntax. + + Only one of presentMatch, exactMatch, orregexMatch must be + set. + + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED, + EXTERNAL_MANAGED (regional scope) or INTERNAL_MANAGED. + + This field is a member of `oneof`_ ``_regex_match``. """ - packet_mirroring: str = proto.Field( + exact_match: str = proto.Field( proto.STRING, - number=22305996, + number=457641093, + optional=True, ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + present_match: bool = proto.Field( + proto.BOOL, + number=67435841, + optional=True, ) + regex_match: str = proto.Field( + proto.STRING, + number=107387853, + optional=True, + ) + - -class GetPacketMirroringRuleFirewallPolicyRequest(proto.Message): - r"""A request message for - FirewallPolicies.GetPacketMirroringRule. See the method - description for details. - +class HttpRedirectAction(proto.Message): + r"""Specifies settings for an HTTP redirect. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - firewall policy. + host_redirect (str): + The host that is used in the redirect + response instead of the one that was supplied in + the request. - This field is a member of `oneof`_ ``_priority``. - """ + The value must be from 1 to 255 + characters. - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) + This field is a member of `oneof`_ ``_host_redirect``. + https_redirect (bool): + If set to true, the URL scheme in the + redirected request is set to HTTPS. + If set to false, the URL scheme of the + redirected request remains the same as that of + the request. + This must only be set for URL maps used + inTargetHttpProxys. Setting this true + forTargetHttpsProxy is not permitted. -class GetPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - NetworkFirewallPolicies.GetPacketMirroringRule. See the method - description for details. + The default is set to false. + This field is a member of `oneof`_ ``_https_redirect``. + path_redirect (str): + The path that is used in the redirect + response instead of the one that was supplied in + the request. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + pathRedirect cannot be supplied together + withprefixRedirect. Supply one alone or neither. + If neither is supplied, the path of the original + request is used for the redirect. - Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - firewall policy. + The value must be from 1 to 1024 characters. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - """ + This field is a member of `oneof`_ ``_path_redirect``. + prefix_redirect (str): + The prefix that replaces the prefixMatch + specified in the HttpRouteRuleMatch, retaining + the remaining portion of the URL before + redirecting the request. - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + prefixRedirect cannot be supplied together + withpathRedirect. Supply one alone or neither. + If neither is supplied, the path of the original + request is used for the redirect. + The value must be from 1 to 1024 characters. -class GetPartnerMetadataInstanceRequest(proto.Message): - r"""A request message for Instances.GetPartnerMetadata. See the - method description for details. + This field is a member of `oneof`_ ``_prefix_redirect``. + redirect_response_code (str): + The HTTP Status code to use for this RedirectAction. + Supported values are: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - instance (str): - Name of the instance scoping this request. - namespaces (str): - Comma separated partner metadata namespaces. + - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds + to 301. + - FOUND, which corresponds to 302. + - SEE_OTHER which corresponds to 303. + - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request + method is retained. + - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request + method is retained. - This field is a member of `oneof`_ ``_namespaces``. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. + Check the RedirectResponseCode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_redirect_response_code``. + strip_query (bool): + If set to true, any accompanying query + portion of the original URL is + removed before redirecting the request. If set + to false, the query portion of the original URL + is retained. + + The default is set to false. + + This field is a member of `oneof`_ ``_strip_query``. """ - instance: str = proto.Field( + class RedirectResponseCode(proto.Enum): + r"""The HTTP Status code to use for this RedirectAction. + + Supported values are: + + :: + + - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds + to 301. + - FOUND, which corresponds to 302. + - SEE_OTHER which corresponds to 303. + - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request + method is retained. + - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request + method is retained. + + Values: + UNDEFINED_REDIRECT_RESPONSE_CODE (0): + A value indicating that the enum field is not + set. + FOUND (67084130): + Http Status Code 302 - Found. + MOVED_PERMANENTLY_DEFAULT (386698449): + Http Status Code 301 - Moved Permanently. + PERMANENT_REDIRECT (382006381): + Http Status Code 308 - Permanent Redirect + maintaining HTTP method. + SEE_OTHER (445380580): + Http Status Code 303 - See Other. + TEMPORARY_REDIRECT (489550378): + Http Status Code 307 - Temporary Redirect + maintaining HTTP method. + """ + UNDEFINED_REDIRECT_RESPONSE_CODE = 0 + FOUND = 67084130 + MOVED_PERMANENTLY_DEFAULT = 386698449 + PERMANENT_REDIRECT = 382006381 + SEE_OTHER = 445380580 + TEMPORARY_REDIRECT = 489550378 + + host_redirect: str = proto.Field( proto.STRING, - number=18257045, + number=107417747, + optional=True, ) - namespaces: str = proto.Field( - proto.STRING, - number=164058744, + https_redirect: bool = proto.Field( + proto.BOOL, + number=170260656, optional=True, ) - project: str = proto.Field( + path_redirect: str = proto.Field( proto.STRING, - number=227560217, + number=272342710, + optional=True, ) - zone: str = proto.Field( + prefix_redirect: str = proto.Field( proto.STRING, - number=3744684, + number=446184169, + optional=True, ) - - -class GetPreviewFeatureRequest(proto.Message): - r"""A request message for PreviewFeatures.Get. See the method - description for details. - - Attributes: - preview_feature (str): - Name of the PreviewFeature for this request. - project (str): - Project ID for this request. - """ - - preview_feature: str = proto.Field( + redirect_response_code: str = proto.Field( proto.STRING, - number=454999423, + number=436710408, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + strip_query: bool = proto.Field( + proto.BOOL, + number=52284641, + optional=True, ) -class GetProjectRequest(proto.Message): - r"""A request message for Projects.Get. See the method - description for details. +class HttpRetryPolicy(proto.Message): + r"""The retry policy associates with HttpRouteRule + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - """ + num_retries (int): + Specifies the allowed number retries. This + number must be > 0. If not specified, defaults + to 1. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) + This field is a member of `oneof`_ ``_num_retries``. + per_try_timeout (google.cloud.compute_v1beta.types.Duration): + Specifies a non-zero timeout per retry + attempt. + If not specified, will use the timeout set in + theHttpRouteAction field. If timeout in the + HttpRouteAction field is not set, this field + uses the largest timeout + among all backend services associated with the + route. + Not supported when the URL map is bound to a + target gRPC proxy that has the + validateForProxyless field set to true. -class GetPublicAdvertisedPrefixeRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.Get. See the - method description for details. + This field is a member of `oneof`_ ``_per_try_timeout``. + retry_conditions (MutableSequence[str]): + Specifies one or more conditions when this retry policy + applies. Valid values are: + + :: + + - 5xx: retry is attempted if the instance or endpoint + responds with any 5xx response code, or if the instance or + endpoint does not respond at all. For example, disconnects, reset, read + timeout, connection failure, and refused streams. + - gateway-error: Similar to 5xx, but only + applies to response codes 502, 503 or504. + - connect-failure: a retry is attempted on failures + connecting to the instance or endpoint. For example, connection + timeouts. + - retriable-4xx: a retry is attempted if the instance + or endpoint responds with a 4xx response code. + The only error that you can retry is error code 409. + - refused-stream: a retry is attempted if the instance + or endpoint resets the stream with a REFUSED_STREAM error + code. This reset type indicates that it is safe to retry. + - cancelled: a retry is attempted if the gRPC status + code in the response header is set to cancelled. + - deadline-exceeded: a retry is attempted if the gRPC + status code in the response header is set todeadline-exceeded. + - internal: a retry is attempted if the gRPC + status code in the response header is set tointernal. + - resource-exhausted: a retry is attempted if the gRPC + status code in the response header is set toresource-exhausted. + - unavailable: a retry is attempted if the gRPC + status code in the response header is set tounavailable. + + Only the following codes are supported when the URL map is + bound to target gRPC proxy that has validateForProxyless + field set to true. - Attributes: - project (str): - Project ID for this request. - public_advertised_prefix (str): - Name of the PublicAdvertisedPrefix resource - to return. + :: + + - cancelled + - deadline-exceeded + - internal + - resource-exhausted + - unavailable """ - project: str = proto.Field( - proto.STRING, - number=227560217, + num_retries: int = proto.Field( + proto.UINT32, + number=251680141, + optional=True, ) - public_advertised_prefix: str = proto.Field( + per_try_timeout: "Duration" = proto.Field( + proto.MESSAGE, + number=280041147, + optional=True, + message="Duration", + ) + retry_conditions: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=101874590, + number=28815535, ) -class GetPublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.Get. See the - method description for details. +class HttpRouteAction(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - public_delegated_prefix (str): - Name of the PublicDelegatedPrefix resource to - return. - region (str): - Name of the region of this request. - """ + cors_policy (google.cloud.compute_v1beta.types.CorsPolicy): + The specification for allowing client-side + cross-origin requests. For more information + about the W3C recommendation for cross-origin + resource sharing (CORS), see Fetch API Living + Standard. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - public_delegated_prefix: str = proto.Field( - proto.STRING, - number=204238440, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + Not supported when the URL map is bound to a + target gRPC proxy. + This field is a member of `oneof`_ ``_cors_policy``. + fault_injection_policy (google.cloud.compute_v1beta.types.HttpFaultInjection): + The specification for fault injection introduced into + traffic to test the resiliency of clients to backend service + failure. As part of fault injection, when clients send + requests to a backend service, delays can be introduced by a + load balancer on a percentage of requests before sending + those requests to the backend service. Similarly requests + from clients can be aborted by the load balancer for a + percentage of requests.timeout and retry_policy is ignored + by clients that are configured with a fault_injection_policy + if: -class GetRegionAutoscalerRequest(proto.Message): - r"""A request message for RegionAutoscalers.Get. See the method - description for details. + 1. The traffic is generated by fault injection AND + 2. The fault injection is not a delay fault injection. Fault + injection is not supported with the classic Application + Load Balancer . To see which load balancers support fault + injection, see Load balancing: Routing and traffic + management features. - Attributes: - autoscaler (str): - Name of the autoscaler to return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + This field is a member of `oneof`_ ``_fault_injection_policy``. + max_stream_duration (google.cloud.compute_v1beta.types.Duration): + Specifies the maximum duration (timeout) for streams on the + selected route. Unlike the timeout field where the timeout + duration starts from the time the request has been fully + processed (known as\ *end-of-stream*), the duration in this + field is computed from the beginning of the stream until the + response has been processed, including all retries. A stream + that does not complete in this duration is closed. - autoscaler: str = proto.Field( - proto.STRING, - number=517258967, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + If not specified, this field uses the + maximummaxStreamDuration value among all backend services + associated with the route. + This field is only allowed if the Url map is used with + backend services with loadBalancingScheme set + toINTERNAL_SELF_MANAGED. -class GetRegionBackendServiceRequest(proto.Message): - r"""A request message for RegionBackendServices.Get. See the - method description for details. + This field is a member of `oneof`_ ``_max_stream_duration``. + request_mirror_policy (google.cloud.compute_v1beta.types.RequestMirrorPolicy): + Specifies the policy on how requests intended + for the route's backends are shadowed to a + separate mirrored backend service. The load + balancer does not wait for responses from the + shadow service. Before sending traffic to the + shadow service, the host / authority header is + suffixed with-shadow. - Attributes: - backend_service (str): - Name of the BackendService resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + Not supported when the URL map is bound to a + target gRPC proxy that has the + validateForProxyless field set to true. - backend_service: str = proto.Field( - proto.STRING, - number=306946058, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_request_mirror_policy``. + retry_policy (google.cloud.compute_v1beta.types.HttpRetryPolicy): + Specifies the retry policy associated with + this route. + This field is a member of `oneof`_ ``_retry_policy``. + timeout (google.cloud.compute_v1beta.types.Duration): + Specifies the timeout for the selected route. Timeout is + computed from the time the request has been fully processed + (known as *end-of-stream*) up until the response has been + processed. Timeout includes all retries. -class GetRegionCommitmentRequest(proto.Message): - r"""A request message for RegionCommitments.Get. See the method - description for details. + If not specified, this field uses the largest timeout among + all backend services associated with the route. - Attributes: - commitment (str): - Name of the commitment to return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. - commitment: str = proto.Field( - proto.STRING, - number=482134805, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_timeout``. + url_rewrite (google.cloud.compute_v1beta.types.UrlRewrite): + The spec to modify the URL of the request, + before forwarding the request to the matched + service. + urlRewrite is the only action supported in + UrlMaps for classic Application Load Balancers. -class GetRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.Get. See the method - description for details. + Not supported when the URL map is bound to a + target gRPC proxy that has the + validateForProxyless field set to true. - Attributes: - disk (str): - Name of the regional persistent disk to - return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. + This field is a member of `oneof`_ ``_url_rewrite``. + weighted_backend_services (MutableSequence[google.cloud.compute_v1beta.types.WeightedBackendService]): + A list of weighted backend services to send + traffic to when a route match occurs. The + weights determine the fraction of traffic that + flows to their corresponding backend service. If + all traffic needs to go to a single backend + service, there must be oneweightedBackendService + with weight set to a non-zero number. + + After a backend service is identified and before + forwarding the request to + the backend service, advanced routing actions + such as URL rewrites and header transformations + are applied depending on additional settings + specified in this HttpRouteAction. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, + cors_policy: "CorsPolicy" = proto.Field( + proto.MESSAGE, + number=398943748, + optional=True, + message="CorsPolicy", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + fault_injection_policy: "HttpFaultInjection" = proto.Field( + proto.MESSAGE, + number=412781079, + optional=True, + message="HttpFaultInjection", ) - region: str = proto.Field( - proto.STRING, - number=138946292, + max_stream_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=61428376, + optional=True, + message="Duration", + ) + request_mirror_policy: "RequestMirrorPolicy" = proto.Field( + proto.MESSAGE, + number=220196866, + optional=True, + message="RequestMirrorPolicy", + ) + retry_policy: "HttpRetryPolicy" = proto.Field( + proto.MESSAGE, + number=56799913, + optional=True, + message="HttpRetryPolicy", + ) + timeout: "Duration" = proto.Field( + proto.MESSAGE, + number=296701281, + optional=True, + message="Duration", + ) + url_rewrite: "UrlRewrite" = proto.Field( + proto.MESSAGE, + number=273333948, + optional=True, + message="UrlRewrite", + ) + weighted_backend_services: MutableSequence[ + "WeightedBackendService" + ] = proto.RepeatedField( + proto.MESSAGE, + number=337028049, + message="WeightedBackendService", ) -class GetRegionDiskSettingRequest(proto.Message): - r"""A request message for RegionDiskSettings.Get. See the method - description for details. +class HttpRouteRule(proto.Message): + r"""The HttpRouteRule setting specifies how to match an HTTP + request and the corresponding routing action that load balancing + proxies perform. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): + customErrorResponsePolicy specifies how the Load Balancer + returns error responses when BackendServiceorBackendBucket + responds with an error. + + If a policy for an error code is not configured for the + RouteRule, a policy for the error code configured + inpathMatcher.defaultCustomErrorResponsePolicy is applied. + If one is not specified + inpathMatcher.defaultCustomErrorResponsePolicy, the policy + configured in UrlMap.defaultCustomErrorResponsePolicy takes + effect. -class GetRegionDiskTypeRequest(proto.Message): - r"""A request message for RegionDiskTypes.Get. See the method - description for details. + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy are configured + with policies for 5xx and 4xx errors + - A RouteRule for /coming_soon/ is configured for the + error code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in RouteRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + When used in conjunction + withrouteRules.routeAction.retryPolicy, retries take + precedence. Only once all retries are exhausted, + thecustomErrorResponsePolicy is applied. While attempting a + retry, if load balancer is successful in reaching the + service, the customErrorResponsePolicy is ignored and the + response from the service is returned to the client. - Attributes: - disk_type (str): - Name of the disk type to return. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - """ + customErrorResponsePolicy is supported only for global + external Application Load Balancers. - disk_type: str = proto.Field( - proto.STRING, - number=93009052, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_custom_error_response_policy``. + description (str): + The short description conveying the intent of + this routeRule. + The description can have a maximum length of + 1024 characters. -class GetRegionHealthCheckRequest(proto.Message): - r"""A request message for RegionHealthChecks.Get. See the method - description for details. + This field is a member of `oneof`_ ``_description``. + header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): + Specifies changes to request and response headers that need + to take effect for the selected backendService. - Attributes: - health_check (str): - Name of the HealthCheck resource to return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + The headerAction value specified here is applied before the + matching pathMatchers[].headerAction and + afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction - health_check: str = proto.Field( - proto.STRING, - number=308876645, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + HeaderAction is not supported for load balancers that have + their loadBalancingScheme set to EXTERNAL. + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. -class GetRegionHealthCheckServiceRequest(proto.Message): - r"""A request message for RegionHealthCheckServices.Get. See the - method description for details. + This field is a member of `oneof`_ ``_header_action``. + http_filter_configs (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): + Outbound route specific configuration + fornetworkservices.HttpFilter resources enabled by Traffic + Director. httpFilterConfigs only applies for load balancers + with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See + ForwardingRule for more details. - Attributes: - health_check_service (str): - Name of the HealthCheckService to update. The - name must be 1-63 characters long, and comply - with RFC1035. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. + http_filter_metadata (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): + Outbound route specific metadata supplied + tonetworkservices.HttpFilter resources enabled by Traffic + Director. httpFilterMetadata only applies for load balancers + with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See + ForwardingRule for more details. - health_check_service: str = proto.Field( - proto.STRING, - number=408374747, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + The only configTypeUrl supported + istype.googleapis.com/google.protobuf.Struct + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. + match_rules (MutableSequence[google.cloud.compute_v1beta.types.HttpRouteRuleMatch]): + The list of criteria for matching attributes + of a request to thisrouteRule. This list has OR + semantics: the request matches this routeRule + when any of thematchRules are satisfied. However + predicates within a given matchRule have AND + semantics. All predicates within a matchRule + must match for the request to match the rule. + priority (int): + For routeRules within a given pathMatcher, + priority determines the order in which a load + balancer interpretsrouteRules. RouteRules are + evaluated in order of priority, from the lowest + to highest number. The priority of a rule + decreases as its number increases (1, 2, 3, + N+1). The first rule that matches the request is + applied. -class GetRegionHealthSourceRequest(proto.Message): - r"""A request message for RegionHealthSources.Get. See the method - description for details. + You cannot configure two or more routeRules with + the same priority. Priority for each rule must + be set to a number from 0 to 2147483647 + inclusive. - Attributes: - health_source (str): - Name of the HealthSource resource to return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + Priority numbers can have gaps, which enable you + to add or remove rules in the future without + affecting the rest of the rules. For example, 1, + 2, 3, 4, 5, 9, 12, 16 is a valid series of + priority numbers to which you could add rules + numbered from 6 to 8, 10 to 11, and 13 to 15 in + the future without any impact on existing rules. - health_source: str = proto.Field( - proto.STRING, - number=376521566, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_priority``. + route_action (google.cloud.compute_v1beta.types.HttpRouteAction): + In response to a matching matchRule, the load + balancer performs advanced routing actions, such + as URL rewrites and header transformations, + before forwarding the request to the selected + backend. + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. -class GetRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.Get. See - the method description for details. + URL maps for classic Application Load Balancers + only support the urlRewrite action within a + route rule'srouteAction. - Attributes: - instance_group_manager (str): - Name of the managed instance group to return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + This field is a member of `oneof`_ ``_route_action``. + service (str): + The full or partial URL of the backend + service resource to which traffic is directed if + this rule is matched. If routeAction is also + specified, advanced routing actions, such as URL + rewrites, take effect before sending the request + to the backend. - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + This field is a member of `oneof`_ ``_service``. + url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): + When this rule is matched, the request is + redirected to a URL specified by urlRedirect. -class GetRegionInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagerResizeRequests.Get. See the method - description for details. + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. - Attributes: - instance_group_manager (str): - The name of the managed instance group. Name - should conform to RFC1035 or be a resource ID. - project (str): - Project ID for this request. - region (str): - The name of the region scoping this request. - Name should conform to RFC1035. - resize_request (str): - The name of the resize request. Name should - conform to RFC1035 or be a resource ID. + Not supported when the URL map is bound to a + target gRPC proxy. + + This field is a member of `oneof`_ ``_url_redirect``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, + custom_error_response_policy: "CustomErrorResponsePolicy" = proto.Field( + proto.MESSAGE, + number=202816619, + optional=True, + message="CustomErrorResponsePolicy", ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + header_action: "HttpHeaderAction" = proto.Field( + proto.MESSAGE, + number=328077352, + optional=True, + message="HttpHeaderAction", ) - resize_request: str = proto.Field( - proto.STRING, - number=216941060, + http_filter_configs: MutableSequence["HttpFilterConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=166372417, + message="HttpFilterConfig", ) - - -class GetRegionInstanceGroupRequest(proto.Message): - r"""A request message for RegionInstanceGroups.Get. See the - method description for details. - - Attributes: - instance_group (str): - Name of the instance group resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ - - instance_group: str = proto.Field( - proto.STRING, - number=81095253, + http_filter_metadata: MutableSequence["HttpFilterConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=455841375, + message="HttpFilterConfig", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + match_rules: MutableSequence["HttpRouteRuleMatch"] = proto.RepeatedField( + proto.MESSAGE, + number=376200701, + message="HttpRouteRuleMatch", ) - region: str = proto.Field( + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + route_action: "HttpRouteAction" = proto.Field( + proto.MESSAGE, + number=424563948, + optional=True, + message="HttpRouteAction", + ) + service: str = proto.Field( proto.STRING, - number=138946292, + number=373540533, + optional=True, + ) + url_redirect: "HttpRedirectAction" = proto.Field( + proto.MESSAGE, + number=405147820, + optional=True, + message="HttpRedirectAction", ) -class GetRegionInstanceTemplateRequest(proto.Message): - r"""A request message for RegionInstanceTemplates.Get. See the - method description for details. +class HttpRouteRuleMatch(proto.Message): + r"""HttpRouteRuleMatch specifies a set of criteria for matching + requests to an HttpRouteRule. All specified criteria must be + satisfied for a match to occur. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template (str): - The name of the instance template. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - view (str): - View of the instance template. - Check the View enum for the list of possible - values. + full_path_match (str): + For satisfying the matchRule condition, the path of the + request must exactly match the value specified + infullPathMatch after removing any query parameters and + anchor that may be part of the original URL. - This field is a member of `oneof`_ ``_view``. - """ + fullPathMatch must be from 1 to 1024 characters. - class View(proto.Enum): - r"""View of the instance template. + Only one of prefixMatch, fullPathMatch,regexMatch or + path_template_match must be specified. - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 + This field is a member of `oneof`_ ``_full_path_match``. + header_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderMatch]): + Specifies a list of header match criteria, + all of which must match corresponding headers in + the request. + ignore_case (bool): + Specifies that prefixMatch and fullPathMatch + matches are case sensitive. - instance_template: str = proto.Field( - proto.STRING, - number=309248228, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - view: str = proto.Field( - proto.STRING, - number=3619493, - optional=True, - ) + The default value is false. + ignoreCase must not be used with regexMatch. -class GetRegionInstantSnapshotRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.Get. See the - method description for details. + Not supported when the URL map is bound to a + target gRPC proxy. - Attributes: - instant_snapshot (str): - Name of the InstantSnapshot resource to - return. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - """ + This field is a member of `oneof`_ ``_ignore_case``. + metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): + Opaque filter criteria used by the load balancer to restrict + routing configuration to a limited set of xDS compliant + clients. In their xDS requests to the load balancer, xDS + clients present node metadata. When there is a match, the + relevant routing configuration is made available to those + proxies. - instant_snapshot: str = proto.Field( - proto.STRING, - number=391638626, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + For each metadataFilter in this list, if + itsfilterMatchCriteria is set to MATCH_ANY, at least one of + thefilterLabels must match the corresponding label provided + in the metadata. If its filterMatchCriteria is set to + MATCH_ALL, then all of its filterLabels must match with + corresponding labels provided in the metadata. If multiple + metadata filters are specified, all of them need to be + satisfied in order to be considered a match. + metadataFilters specified here is applied after those + specified in ForwardingRule that refers to theUrlMap this + HttpRouteRuleMatch belongs to. -class GetRegionMultiMigRequest(proto.Message): - r"""A request message for RegionMultiMigs.Get. See the method - description for details. + metadataFilters only applies to load balancers that + haveloadBalancingScheme set toINTERNAL_SELF_MANAGED. - Attributes: - multi_mig (str): - Name of the multi-MIG resource to return. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ + Not supported when the URL map is bound to a target gRPC + proxy that has validateForProxyless field set to true. + path_template_match (str): + If specified, this field defines a path template pattern + that must match the :path header after the query string is + removed. - multi_mig: str = proto.Field( - proto.STRING, - number=403990085, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + A path template pattern can include variables and wildcards. + Variables are enclosed in curly braces, for + example{variable_name}. Wildcards include \* that matches a + single path segment, and \*\* that matches zero or more path + segments. The pattern must follow these rules: + :: -class GetRegionNetworkEndpointGroupRequest(proto.Message): - r"""A request message for RegionNetworkEndpointGroups.Get. See - the method description for details. + - The value must be between 1 and 1024 characters. + - The pattern must start with a leading slash ("/"). + - No more than 5 operators (variables or wildcards) may appear in + the pattern. - Attributes: - network_endpoint_group (str): - The name of the network endpoint group. It - should comply with RFC1035. - project (str): - Project ID for this request. - region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. - """ + Precisely one ofprefixMatch, fullPathMatch,regexMatch, or + pathTemplateMatch must be set. - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_path_template_match``. + prefix_match (str): + For satisfying the matchRule condition, the request's path + must begin with the specified prefixMatch.prefixMatch must + begin with a /. + The value must be from 1 to 1024 characters. -class GetRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for RegionNetworkFirewallPolicies.Get. See - the method description for details. + The \* character inside a prefix match is treated as a + literal character, not as a wildcard. - Attributes: - firewall_policy (str): - Name of the firewall policy to get. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + Only one of prefixMatch, fullPathMatch,regexMatch or + path_template_match can be used within a matchRule. - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_prefix_match``. + query_parameter_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpQueryParameterMatch]): + Specifies a list of query parameter match + criteria, all of which must match corresponding + query parameters in the request. + Not supported when the URL map is bound to a + target gRPC proxy. + regex_match (str): + For satisfying the matchRule condition, the path of the + request must satisfy the regular expression specified + inregexMatch after removing any query parameters and anchor + supplied with the original URL. For more information about + regular expression syntax, see Syntax. -class GetRegionNetworkPolicyRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.Get. See the - method description for details. + Only one of prefixMatch, fullPathMatch,regexMatch or + path_template_match must be specified. - Attributes: - network_policy (str): - Name of the network policy resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. + Regular expressions can only be used when the + loadBalancingScheme is set to INTERNAL_SELF_MANAGED, + EXTERNAL_MANAGED (regional scope) or INTERNAL_MANAGED. + + This field is a member of `oneof`_ ``_regex_match``. """ - network_policy: str = proto.Field( + full_path_match: str = proto.Field( proto.STRING, - number=504961123, + number=214598875, + optional=True, ) - project: str = proto.Field( + header_matches: MutableSequence["HttpHeaderMatch"] = proto.RepeatedField( + proto.MESSAGE, + number=361903489, + message="HttpHeaderMatch", + ) + ignore_case: bool = proto.Field( + proto.BOOL, + number=464324989, + optional=True, + ) + metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( + proto.MESSAGE, + number=464725739, + message="MetadataFilter", + ) + path_template_match: str = proto.Field( proto.STRING, - number=227560217, + number=292348186, + optional=True, ) - region: str = proto.Field( + prefix_match: str = proto.Field( proto.STRING, - number=138946292, + number=257898968, + optional=True, + ) + query_parameter_matches: MutableSequence[ + "HttpQueryParameterMatch" + ] = proto.RepeatedField( + proto.MESSAGE, + number=286231270, + message="HttpQueryParameterMatch", + ) + regex_match: str = proto.Field( + proto.STRING, + number=107387853, + optional=True, ) -class GetRegionNotificationEndpointRequest(proto.Message): - r"""A request message for RegionNotificationEndpoints.Get. See - the method description for details. +class Image(proto.Message): + r"""Represents an Image resource. + + You can use images to create boot disks for your VM instances. + For more information, read Images. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - notification_endpoint (str): - Name of the NotificationEndpoint resource to - return. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ + architecture (str): + The architecture of the image. Valid values are ARM64 or + X86_64. Check the Architecture enum for the list of possible + values. - notification_endpoint: str = proto.Field( - proto.STRING, - number=376807017, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_architecture``. + archive_size_bytes (int): + Size of the image tar.gz archive stored in + Google Cloud Storage (in bytes). + + This field is a member of `oneof`_ ``_archive_size_bytes``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): + Output only. The deprecation status + associated with this image. + This field is a member of `oneof`_ ``_deprecated``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. -class GetRegionOperationRequest(proto.Message): - r"""A request message for RegionOperations.Get. See the method - description for details. + This field is a member of `oneof`_ ``_description``. + disk_size_gb (int): + Size of the image when restored onto a + persistent disk (in GB). - Attributes: - operation (str): - Name of the Operations resource to return, or - its unique numeric identifier. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ + This field is a member of `oneof`_ ``_disk_size_gb``. + enable_confidential_compute (bool): + Output only. Whether this image is created from a + confidential compute mode disk. [Output Only]: This field is + not set by user, but from source disk. - operation: str = proto.Field( - proto.STRING, - number=52090215, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_enable_confidential_compute``. + family (str): + The name of the image family to which this + image belongs. The image family name can be from + a publicly managed image family provided by + Compute Engine, or from a custom image family + you create. For example,centos-stream-9 is a + publicly available image family. For more + information, see Image + family best practices. + When creating disks, you can specify an image + family instead of a specific image name. The + image family always returns its latest image + that is not deprecated. The name of the image + family must comply with RFC1035. -class GetRegionRequest(proto.Message): - r"""A request message for Regions.Get. See the method description - for details. + This field is a member of `oneof`_ ``_family``. + guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): + A list of features to enable on the guest operating system. + Applicable only for bootable images. To see a list of + available options, see theguestOSfeatures[].type parameter. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region resource to return. - """ + This field is a member of `oneof`_ ``_id``. + image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Encrypts the image using acustomer-supplied + encryption key. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + After you encrypt an image with a + customer-supplied key, you must provide the same + key if you use the image later (e.g. to create a + disk from the image). + Customer-supplied encryption keys do not protect + access to metadata of the disk. -class GetRegionSecurityPolicyRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.Get. See the - method description for details. + If you do not provide an encryption key when + creating the image, then the disk will be + encrypted using an automatically generated key + and you do not need to provide a key to use the + image later. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - security_policy (str): - Name of the security policy to get. - """ + This field is a member of `oneof`_ ``_image_encryption_key``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#image for images. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) + This field is a member of `oneof`_ ``_kind``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this image, which is essentially a hash of the + labels used for optimistic locking. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You must always provide an + up-to-date fingerprint hash in order to update + or change labels, otherwise the request will + fail with error412 conditionNotMet. + To see the latest fingerprint, make a get() + request to retrieve an image. -class GetRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.Get. See the method - description for details. + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels to apply to this image. These can be + later modified by the setLabels method. + license_codes (MutableSequence[int]): + Integer license codes indicating which + licenses are attached to this image. + licenses (MutableSequence[str]): + Any applicable license URI. + locked (bool): + A flag for marketplace VM disk created from + the image, which is designed for marketplace VM + disk to prevent the proprietary data on the disk + from being accessed unwantedly. The flag will be + inherited by the disk created from the image. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - snapshot (str): - Name of the Snapshot resource to return. - """ + The disk with locked flag set to true will be + prohibited from performing the operations below: - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - snapshot: str = proto.Field( - proto.STRING, - number=284874180, - ) + - R/W or R/O disk attach + - Disk detach, if disk is created via + create-on-create + - Create images + - Create snapshots + - Create disk clone (create disk from the + current disk) + + The image with the locked field set to true will + be prohibited from performing the operations + below: + + - Create images from the current image + - Update the locked field for the current + image + + The instance with at least one disk with locked + flag set to true will be prohibited from + performing the operations below: + + - Secondary disk attach + - Create instant snapshot + - Create machine images + - Create instance template + - Delete the instance with --keep-disk + parameter set to true + This field is a member of `oneof`_ ``_locked``. + name (str): + Name of the resource; provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. -class GetRegionSnapshotSettingRequest(proto.Message): - r"""A request message for RegionSnapshotSettings.Get. See the - method description for details. + This field is a member of `oneof`_ ``_name``. + params (google.cloud.compute_v1beta.types.ImageParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - """ + This field is a member of `oneof`_ ``_params``. + raw_disk (google.cloud.compute_v1beta.types.RawDisk): + The parameters of the raw disk image. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) + This field is a member of `oneof`_ ``_raw_disk``. + rollout_override (google.cloud.compute_v1beta.types.RolloutPolicy): + A rollout policy to apply to this image. When + specified, the rollout policy overrides per-zone + references to the image via the associated image + family. The rollout policy restricts the zones + where this image is accessible when using a + zonal image family reference. When the rollout + policy does not include the user specified zone, + or if the zone is rolled out, this image is + accessible. + The rollout policy for this image is read-only, + except for allowlisted users. This field might + not be configured. To view the latest + non-deprecated image in a specific zone, use + theimageFamilyViews.get method. -class GetRegionSslCertificateRequest(proto.Message): - r"""A request message for RegionSslCertificates.Get. See the - method description for details. + This field is a member of `oneof`_ ``_rollout_override``. + satisfies_pzi (bool): + Output only. Reserved for future use. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - ssl_certificate (str): - Name of the SslCertificate resource to - return. - """ + This field is a member of `oneof`_ ``_satisfies_pzi``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - ssl_certificate: str = proto.Field( - proto.STRING, - number=46443492, - ) + This field is a member of `oneof`_ ``_satisfies_pzs``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + This field is a member of `oneof`_ ``_self_link``. + shielded_instance_initial_state (google.cloud.compute_v1beta.types.InitialStateConfig): + Set the secure boot keys of shielded + instance. -class GetRegionSslPolicyRequest(proto.Message): - r"""A request message for RegionSslPolicies.Get. See the method - description for details. + This field is a member of `oneof`_ ``_shielded_instance_initial_state``. + source_disk (str): + URL of the source disk used to create this + image. For example, the following are valid + values: - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - ssl_policy (str): - Name of the SSL policy to update. The name - must be 1-63 characters long, and comply with - RFC1035. - """ + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - ssl_policy: str = proto.Field( - proto.STRING, - number=295190213, - ) + In order to create an image, you must provide + the full or partial URL of one of the following: + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL -class GetRegionTargetHttpProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpProxies.Get. See the - method description for details. + This field is a member of `oneof`_ ``_source_disk``. + source_disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Thecustomer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - target_http_proxy (str): - Name of the TargetHttpProxy resource to - return. - """ + This field is a member of `oneof`_ ``_source_disk_encryption_key``. + source_disk_id (str): + Output only. [Output Only] The ID value of the disk used to + create this image. This value may be used to determine + whether the image was taken from the current or a previous + instance of a given disk name. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - target_http_proxy: str = proto.Field( - proto.STRING, - number=206872421, - ) + This field is a member of `oneof`_ ``_source_disk_id``. + source_image (str): + URL of the source image used to create this image. The + following are valid formats for the URL: + :: -class GetRegionTargetHttpsProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpsProxies.Get. See the - method description for details. + - https://www.googleapis.com/compute/v1/projects/project_id/global/ + images/image_name + - projects/project_id/global/images/image_name - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - target_https_proxy (str): - Name of the TargetHttpsProxy resource to - return. - """ + In order to create an image, you must provide the full or + partial URL of one of the following: - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - target_https_proxy: str = proto.Field( - proto.STRING, - number=52336748, - ) + :: + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL -class GetRegionTargetTcpProxyRequest(proto.Message): - r"""A request message for RegionTargetTcpProxies.Get. See the - method description for details. + This field is a member of `oneof`_ ``_source_image``. + source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + The customer-supplied encryption key of the + source image. Required if the source image is + protected by a customer-supplied encryption key. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - target_tcp_proxy (str): - Name of the TargetTcpProxy resource to - return. - """ + This field is a member of `oneof`_ ``_source_image_encryption_key``. + source_image_id (str): + Output only. [Output Only] The ID value of the image used to + create this image. This value may be used to determine + whether the image was taken from the current or a previous + instance of a given image name. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - target_tcp_proxy: str = proto.Field( - proto.STRING, - number=503065442, - ) + This field is a member of `oneof`_ ``_source_image_id``. + source_snapshot (str): + URL of the source snapshot used to create this image. The + following are valid formats for the URL: + :: -class GetRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.Get. See the method - description for details. + - https://www.googleapis.com/compute/v1/projects/project_id/global/ + snapshots/snapshot_name + - projects/project_id/global/snapshots/snapshot_name - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - url_map (str): - Name of the UrlMap resource to return. - """ + In order to create an image, you must provide the full or + partial URL of one of the following: - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - url_map: str = proto.Field( - proto.STRING, - number=367020684, - ) + :: + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL -class GetReservationBlockRequest(proto.Message): - r"""A request message for ReservationBlocks.Get. See the method - description for details. + This field is a member of `oneof`_ ``_source_snapshot``. + source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + The customer-supplied encryption key of the + source snapshot. Required if the source snapshot + is protected by a customer-supplied encryption + key. + This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. + source_snapshot_id (str): + Output only. [Output Only] The ID value of the snapshot used + to create this image. This value may be used to determine + whether the snapshot was taken from the current or a + previous instance of a given snapshot name. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_source_snapshot_id``. + source_type (str): + The type of the image used to create this + disk. The default and only valid value is RAW. + Check the SourceType enum for the list of + possible values. - Attributes: - project (str): - Project ID for this request. - reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. - 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 + This field is a member of `oneof`_ ``_source_type``. + status (str): + Output only. [Output Only] The status of the image. An image + can be used to create other resources, such as instances, + only after the image has been successfully created and the + status is set to READY. Possible values are FAILED, PENDING, + orREADY. Check the Status 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. + This field is a member of `oneof`_ ``_status``. + storage_locations (MutableSequence[str]): + Cloud Storage bucket storage location of the + image (regional or multi-regional). + user_licenses (MutableSequence[str]): + A list of publicly visible user-licenses. + Unlike regular licenses, user provided licenses + can be modified after the disk is created. This + includes a list of URLs to the license resource. + For example, to provide a debian license: + + https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch """ - class View(proto.Enum): - r"""View of the Block. + class Architecture(proto.Enum): + r"""The architecture of the image. Valid values are ARM64 or X86_64. Values: - UNDEFINED_VIEW (0): + UNDEFINED_ARCHITECTURE (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. + ARCHITECTURE_UNSPECIFIED (394750507): + Default value indicating Architecture is not + set. + ARM64 (62547450): + Machines with architecture ARM64 + X86_64 (425300551): + Machines with architecture X86_64 """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - BLOCK_VIEW_UNSPECIFIED = 275070479 - FULL = 2169487 + UNDEFINED_ARCHITECTURE = 0 + ARCHITECTURE_UNSPECIFIED = 394750507 + ARM64 = 62547450 + X86_64 = 425300551 - project: str = proto.Field( + class SourceType(proto.Enum): + r"""The type of the image used to create this disk. The + default and only valid value is RAW. + + Values: + UNDEFINED_SOURCE_TYPE (0): + A value indicating that the enum field is not + set. + RAW (80904): + No description available. + """ + UNDEFINED_SOURCE_TYPE = 0 + RAW = 80904 + + class Status(proto.Enum): + r"""Output only. [Output Only] The status of the image. An image can be + used to create other resources, such as instances, only after the + image has been successfully created and the status is set to READY. + Possible values are FAILED, PENDING, orREADY. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + DELETING (528602024): + Image is deleting. + FAILED (455706685): + Image creation failed due to an error. + PENDING (35394935): + Image hasn't been created as yet. + READY (77848963): + Image has been successfully created. + """ + UNDEFINED_STATUS = 0 + DELETING = 528602024 + FAILED = 455706685 + PENDING = 35394935 + READY = 77848963 + + architecture: str = proto.Field( proto.STRING, - number=227560217, + number=302803283, + optional=True, ) - reservation: str = proto.Field( - proto.STRING, - number=47530956, + archive_size_bytes: int = proto.Field( + proto.INT64, + number=381093450, + optional=True, ) - reservation_block: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=532832858, + number=30525366, + optional=True, ) - view: str = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( + proto.MESSAGE, + number=515138995, + optional=True, + message="DeprecationStatus", + ) + description: str = proto.Field( proto.STRING, - number=3619493, + number=422937596, + optional=True, + ) + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + enable_confidential_compute: bool = proto.Field( + proto.BOOL, + number=102135228, + optional=True, ) - - -class GetReservationRequest(proto.Message): - r"""A request message for Reservations.Get. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - reservation (str): - Name of the reservation to retrieve. - zone (str): - Name of the zone for this request. - """ - - project: str = proto.Field( + family: str = proto.Field( proto.STRING, - number=227560217, + number=328751972, + optional=True, ) - reservation: str = proto.Field( - proto.STRING, - number=47530956, + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( + proto.MESSAGE, + number=79294545, + message="GuestOsFeature", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - - -class GetReservationSubBlockRequest(proto.Message): - r"""A request message for ReservationSubBlocks.Get. See the - method description for details. - - Attributes: - parent_name (str): - The name of the parent reservation and parent block. In the - format of - reservations/{reservation_name}/reservationBlocks/{reservation_block_name} - project (str): - Project ID for this request. - reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. - zone (str): - Name of the zone for this request. Zone name - should conform to RFC1035. - """ - - parent_name: str = proto.Field( - proto.STRING, - number=478151936, + image_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=379512583, + optional=True, + message="CustomerEncryptionKey", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - reservation_sub_block: str = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, - number=22750491, + number=178124825, + optional=True, ) - zone: str = proto.Field( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=3744684, - ) - - -class GetResourcePolicyRequest(proto.Message): - r"""A request message for ResourcePolicies.Get. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - resource_policy (str): - Name of the resource policy to retrieve. - """ - - project: str = proto.Field( proto.STRING, - number=227560217, + number=500195327, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + license_codes: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=45482664, ) - resource_policy: str = proto.Field( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=159240835, + number=337642578, ) - - -class GetRoutePolicyRouterRequest(proto.Message): - r"""A request message for Routers.GetRoutePolicy. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - policy (str): - The Policy name for this request. Name must - conform to RFC1035 - - This field is a member of `oneof`_ ``_policy``. - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - router (str): - Name of the Router resource to query for the - route policy. The name should conform to - RFC1035. - """ - - policy: str = proto.Field( - proto.STRING, - number=91071794, + locked: bool = proto.Field( + proto.BOOL, + number=513159946, optional=True, ) - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + params: "ImageParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="ImageParams", ) - router: str = proto.Field( - proto.STRING, - number=148608841, + raw_disk: "RawDisk" = proto.Field( + proto.MESSAGE, + number=503113556, + optional=True, + message="RawDisk", ) - - -class GetRouteRequest(proto.Message): - r"""A request message for Routes.Get. See the method description - for details. - - Attributes: - project (str): - Project ID for this request. - route (str): - Name of the Route resource to return. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, + rollout_override: "RolloutPolicy" = proto.Field( + proto.MESSAGE, + number=180331162, + optional=True, + message="RolloutPolicy", ) - route: str = proto.Field( - proto.STRING, - number=108704329, + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=480964257, + optional=True, ) - - -class GetRouterRequest(proto.Message): - r"""A request message for Routers.Get. See the method description - for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - router (str): - Name of the Router resource to return. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, + optional=True, ) - region: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=138946292, + number=456214797, + optional=True, ) - router: str = proto.Field( - proto.STRING, - number=148608841, + shielded_instance_initial_state: "InitialStateConfig" = proto.Field( + proto.MESSAGE, + number=192356867, + optional=True, + message="InitialStateConfig", ) - - -class GetRouterStatusRouterRequest(proto.Message): - r"""A request message for Routers.GetRouterStatus. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - router (str): - Name of the Router resource to query. - """ - - project: str = proto.Field( + source_disk: str = proto.Field( proto.STRING, - number=227560217, + number=451753793, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + source_disk_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=531501153, + optional=True, + message="CustomerEncryptionKey", ) - router: str = proto.Field( + source_disk_id: str = proto.Field( proto.STRING, - number=148608841, + number=454190809, + optional=True, ) - - -class GetRuleFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.GetRule. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - """ - - firewall_policy: str = proto.Field( + source_image: str = proto.Field( proto.STRING, - number=498173265, + number=50443319, + optional=True, ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=381503659, optional=True, + message="CustomerEncryptionKey", ) - - -class GetRuleNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.GetRule. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - """ - - firewall_policy: str = proto.Field( + source_image_id: str = proto.Field( proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + number=55328291, optional=True, ) - project: str = proto.Field( + source_snapshot: str = proto.Field( proto.STRING, - number=227560217, + number=126061928, + optional=True, ) - - -class GetRuleOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.GetRule. - See the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - priority (int): - The priority of the rule to get from the - security policy. - - This field is a member of `oneof`_ ``_priority``. - security_policy (str): - Name of the security policy to which the - queried rule belongs. - """ - - priority: int = proto.Field( - proto.INT32, - number=445151652, + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( + proto.MESSAGE, + number=303679322, optional=True, + message="CustomerEncryptionKey", ) - security_policy: str = proto.Field( + source_snapshot_id: str = proto.Field( proto.STRING, - number=171082513, + number=98962258, + optional=True, ) - - -class GetRuleRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for RegionNetworkFirewallPolicies.GetRule. - See the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - """ - - firewall_policy: str = proto.Field( + source_type: str = proto.Field( proto.STRING, - number=498173265, + number=452245726, + optional=True, ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + status: str = proto.Field( + proto.STRING, + number=181260274, optional=True, ) - project: str = proto.Field( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=328005274, ) - region: str = proto.Field( + user_licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=138946292, + number=388193862, ) -class GetRuleRegionSecurityPolicyRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.GetRule. See the - method description for details. - +class ImageFamilyView(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - priority (int): - The priority of the rule to get from the - security policy. + image (google.cloud.compute_v1beta.types.Image): + The latest image that is part of the + specified image family in the requested + location, and that is not deprecated. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - security_policy (str): - Name of the security policy to which the - queried rule belongs. + This field is a member of `oneof`_ ``_image``. """ - priority: int = proto.Field( - proto.INT32, - number=445151652, + image: "Image" = proto.Field( + proto.MESSAGE, + number=100313435, optional=True, + message="Image", ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) - -class GetRuleSecurityPolicyRequest(proto.Message): - r"""A request message for SecurityPolicies.GetRule. See the - method description for details. +class ImageList(proto.Message): + r"""Contains a list of images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - priority (int): - The priority of the rule to get from the - security policy. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - security_policy (str): - Name of the security policy to which the - queried rule belongs. - """ + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Image]): + A list of Image resources. + kind (str): + Output only. Type of resource. - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, - ) + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. -class GetScreenshotInstanceRequest(proto.Message): - r"""A request message for Instances.GetScreenshot. See the method - description for details. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - Attributes: - instance (str): - Name of the instance scoping this request. - project (str): - Project ID for this request. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_warning``. """ - instance: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["Image"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Image", + ) + kind: str = proto.Field( proto.STRING, - number=18257045, + number=3292052, + optional=True, ) - project: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=227560217, + number=79797525, + optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class GetSecurityPolicyRequest(proto.Message): - r"""A request message for SecurityPolicies.Get. See the method - description for details. +class ImageParams(proto.Message): + r"""Additional image params. Attributes: - project (str): - Project ID for this request. - security_policy (str): - Name of the security policy to get. + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to be bound to the image. Tag keys and + values have the same definition as resource manager tags. + Keys and values can be either in numeric format, such as + ``tagKeys/{tag_key_id}`` and ``tagValues/456`` or in + namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. The field is ignored (both PUT & + PATCH) when empty. """ - project: str = proto.Field( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=227560217, - ) - security_policy: str = proto.Field( proto.STRING, - number=171082513, + number=377671164, ) -class GetSerialPortOutputInstanceRequest(proto.Message): - r"""A request message for Instances.GetSerialPortOutput. See the - method description for details. +class InitialStateConfig(proto.Message): + r"""Initial State for shielded instance, + these are public keys which are safe to store in public .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance for this request. - port (int): - Specifies which COM or serial port to - retrieve data from. - - This field is a member of `oneof`_ ``_port``. - project (str): - Project ID for this request. - start (int): - Specifies the starting byte position of the output to - return. To start with the first byte of output to the - specified port, omit this field or set it to ``0``. If the - output for that byte position is available, this field - matches the ``start`` parameter sent with the request. If - the amount of serial console output exceeds the size of the - buffer (1 MB), the oldest output is discarded and is no - longer available. If the requested start position refers to - discarded output, the start position is adjusted to the - oldest output still available, and the adjusted start - position is returned as the ``start`` property value. You - can also provide a negative start position, which translates - to the most recent number of bytes written to the serial - port. For example, -3 is interpreted as the most recent 3 - bytes written to the serial console. Note that the negative - start is bounded by the retained buffer size, and the - returned serial console output will not exceed the max - buffer size. + dbs (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): + The Key Database (db). + dbxs (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): + The forbidden key database (dbx). + keks (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): + The Key Exchange Key (KEK). + pk (google.cloud.compute_v1beta.types.FileContentBuffer): + The Platform Key (PK). - This field is a member of `oneof`_ ``_start``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_pk``. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, + dbs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( + proto.MESSAGE, + number=99253, + message="FileContentBuffer", ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, + dbxs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( + proto.MESSAGE, + number=3077113, + message="FileContentBuffer", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + keks: MutableSequence["FileContentBuffer"] = proto.RepeatedField( + proto.MESSAGE, + number=3288130, + message="FileContentBuffer", ) - start: int = proto.Field( - proto.INT64, - number=109757538, + pk: "FileContentBuffer" = proto.Field( + proto.MESSAGE, + number=3579, optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + message="FileContentBuffer", ) -class GetServiceAttachmentRequest(proto.Message): - r"""A request message for ServiceAttachments.Get. See the method +class InsertAddressRequest(proto.Message): + r"""A request message for Addresses.Insert. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + address_resource (google.cloud.compute_v1beta.types.Address): + The body resource for this request project (str): Project ID for this request. region (str): - Name of the region of this request. - service_attachment (str): - Name of the ServiceAttachment resource to - return. - show_nat_ips (bool): - Indicates whether NAT IPs should be included - in the response. + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_show_nat_ips``. + This field is a member of `oneof`_ ``_request_id``. """ + address_resource: "Address" = proto.Field( + proto.MESSAGE, + number=483888121, + message="Address", + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -41781,227 +54378,295 @@ class GetServiceAttachmentRequest(proto.Message): proto.STRING, number=138946292, ) - service_attachment: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=338957549, - ) - show_nat_ips: bool = proto.Field( - proto.BOOL, - number=485502156, + number=37109963, optional=True, ) -class GetShieldedInstanceIdentityInstanceRequest(proto.Message): - r"""A request message for Instances.GetShieldedInstanceIdentity. - See the method description for details. +class InsertAutoscalerRequest(proto.Message): + r"""A request message for Autoscalers.Insert. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name or id of the instance scoping this - request. + autoscaler_resource (google.cloud.compute_v1beta.types.Autoscaler): + The body resource for this request project (str): Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone for this request. + Name of the zone for this request. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, + autoscaler_resource: "Autoscaler" = proto.Field( + proto.MESSAGE, + number=207616118, + message="Autoscaler", ) project: str = proto.Field( proto.STRING, number=227560217, ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class GetShieldedVmIdentityInstanceRequest(proto.Message): - r"""A request message for Instances.GetShieldedVmIdentity. See - the method description for details. +class InsertBackendBucketRequest(proto.Message): + r"""A request message for BackendBuckets.Insert. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance scoping this request. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request project (str): Project ID for this request. - zone (str): - The name of the zone for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, + backend_bucket_resource: "BackendBucket" = proto.Field( + proto.MESSAGE, + number=380757784, + message="BackendBucket", ) project: str = proto.Field( proto.STRING, number=227560217, ) - zone: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3744684, + number=37109963, + optional=True, ) -class GetSnapshotRequest(proto.Message): - r"""A request message for Snapshots.Get. See the method +class InsertBackendServiceRequest(proto.Message): + r"""A request message for BackendServices.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + backend_service_resource (google.cloud.compute_v1beta.types.BackendService): + The body resource for this request project (str): Project ID for this request. - snapshot (str): - Name of the Snapshot resource to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + backend_service_resource: "BackendService" = proto.Field( + proto.MESSAGE, + number=347586723, + message="BackendService", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - snapshot: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=284874180, + number=37109963, + optional=True, ) -class GetSnapshotSettingRequest(proto.Message): - r"""A request message for SnapshotSettingsService.Get. See the +class InsertCrossSiteNetworkRequest(proto.Message): + r"""A request message for CrossSiteNetworks.Insert. See the method description for details. - Attributes: - project (str): - Project ID for this request. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - -class GetSslCertificateRequest(proto.Message): - r"""A request message for SslCertificates.Get. See the method - description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + cross_site_network_resource (google.cloud.compute_v1beta.types.CrossSiteNetwork): + The body resource for this request project (str): Project ID for this request. - ssl_certificate (str): - Name of the SslCertificate resource to - return. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - ssl_certificate: str = proto.Field( - proto.STRING, - number=46443492, - ) - + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder -class GetSslPolicyRequest(proto.Message): - r"""A request message for SslPolicies.Get. See the method - description for details. + This field is a member of `oneof`_ ``_request_id``. + validate_only (bool): + [Input Only] Validate the new configuration, but don't + create it. - Attributes: - project (str): - Project ID for this request. - ssl_policy (str): - Name of the SSL policy to update. The name - must be 1-63 characters long, and comply with - RFC1035. + This field is a member of `oneof`_ ``_validate_only``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - ssl_policy: str = proto.Field( - proto.STRING, - number=295190213, + cross_site_network_resource: "CrossSiteNetwork" = proto.Field( + proto.MESSAGE, + number=30896696, + message="CrossSiteNetwork", ) - - -class GetStatusVpnGatewayRequest(proto.Message): - r"""A request message for VpnGateways.GetStatus. See the method - description for details. - - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - vpn_gateway (str): - Name of the VPN gateway to return. - """ - project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=138946292, + number=37109963, + optional=True, ) - vpn_gateway: str = proto.Field( - proto.STRING, - number=406684153, + validate_only: bool = proto.Field( + proto.BOOL, + number=242744629, + optional=True, ) -class GetStoragePoolRequest(proto.Message): - r"""A request message for StoragePools.Get. See the method +class InsertDiskRequest(proto.Message): + r"""A request message for Disks.Insert. See the method description for details. - Attributes: - project (str): - Project ID for this request. - storage_pool (str): - Name of the storage pool to return. - zone (str): - The name of the zone for this request. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - storage_pool: str = proto.Field( - proto.STRING, - number=360473440, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) - -class GetStoragePoolTypeRequest(proto.Message): - r"""A request message for StoragePoolTypes.Get. See the method - description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + disk_resource (google.cloud.compute_v1beta.types.Disk): + The body resource for this request project (str): Project ID for this request. - storage_pool_type (str): - Name of the storage pool type to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + source_image (str): + Source image to restore onto a disk. This + field is optional. + + This field is a member of `oneof`_ ``_source_image``. zone (str): The name of the zone for this request. """ + disk_resource: "Disk" = proto.Field( + proto.MESSAGE, + number=25880688, + message="Disk", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - storage_pool_type: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=285999289, + number=37109963, + optional=True, + ) + source_image: str = proto.Field( + proto.STRING, + number=50443319, + optional=True, ) zone: str = proto.Field( proto.STRING, @@ -42009,173 +54674,208 @@ class GetStoragePoolTypeRequest(proto.Message): ) -class GetSubnetworkRequest(proto.Message): - r"""A request message for Subnetworks.Get. See the method - description for details. +class InsertExternalVpnGatewayRequest(proto.Message): + r"""A request message for ExternalVpnGateways.Insert. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + external_vpn_gateway_resource (google.cloud.compute_v1beta.types.ExternalVpnGateway): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region scoping this request. - subnetwork (str): - Name of the Subnetwork resource to return. - views (str): - Defines the extra views returned back in the subnetwork - resource. Supported values: - WITH_UTILIZATION: Utilization - data is included in the response. Check the Views enum for - the list of possible values. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_views``. + This field is a member of `oneof`_ ``_request_id``. """ - class Views(proto.Enum): - r"""Defines the extra views returned back in the subnetwork resource. - Supported values: - WITH_UTILIZATION: Utilization data is included - in the response. - - Values: - UNDEFINED_VIEWS (0): - A value indicating that the enum field is not - set. - DEFAULT (115302945): - No description available. - WITH_UTILIZATION (504090633): - Utilization data is included in the response. - """ - UNDEFINED_VIEWS = 0 - DEFAULT = 115302945 - WITH_UTILIZATION = 504090633 - + external_vpn_gateway_resource: "ExternalVpnGateway" = proto.Field( + proto.MESSAGE, + number=486813576, + message="ExternalVpnGateway", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - subnetwork: str = proto.Field( - proto.STRING, - number=307827694, - ) - views: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=112204398, + number=37109963, optional=True, ) -class GetTargetGrpcProxyRequest(proto.Message): - r"""A request message for TargetGrpcProxies.Get. See the method +class InsertFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.Insert. See the method description for details. - Attributes: - project (str): - Project ID for this request. - target_grpc_proxy (str): - Name of the TargetGrpcProxy resource to - return. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - target_grpc_proxy: str = proto.Field( - proto.STRING, - number=5020283, - ) - -class GetTargetHttpProxyRequest(proto.Message): - r"""A request message for TargetHttpProxies.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. - target_http_proxy (str): - Name of the TargetHttpProxy resource to - return. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - target_http_proxy: str = proto.Field( - proto.STRING, - number=206872421, - ) - - -class GetTargetHttpsProxyRequest(proto.Message): - r"""A request message for TargetHttpsProxies.Get. See the method - description for details. + firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): + The body resource for this request + parent_id (str): + Parent ID for this request. The ID can be either be + "folders/[FOLDER_ID]" if the parent is a folder or + "organizations/[ORGANIZATION_ID]" if the parent is an + organization. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - Attributes: - project (str): - Project ID for this request. - target_https_proxy (str): - Name of the TargetHttpsProxy resource to - return. + This field is a member of `oneof`_ ``_request_id``. """ - project: str = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( + proto.MESSAGE, + number=495049532, + message="FirewallPolicy", + ) + parent_id: str = proto.Field( proto.STRING, - number=227560217, + number=459714768, ) - target_https_proxy: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=52336748, + number=37109963, + optional=True, ) -class GetTargetInstanceRequest(proto.Message): - r"""A request message for TargetInstances.Get. See the method +class InsertFirewallRequest(proto.Message): + r"""A request message for Firewalls.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + firewall_resource (google.cloud.compute_v1beta.types.Firewall): + The body resource for this request project (str): Project ID for this request. - target_instance (str): - Name of the TargetInstance resource to - return. - zone (str): - Name of the zone scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + firewall_resource: "Firewall" = proto.Field( + proto.MESSAGE, + number=41425005, + message="Firewall", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - target_instance: str = proto.Field( - proto.STRING, - number=289769347, - ) - zone: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3744684, + number=37109963, + optional=True, ) -class GetTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.Get. See the method +class InsertForwardingRuleRequest(proto.Message): + r"""A request message for ForwardingRules.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + forwarding_rule_resource (google.cloud.compute_v1beta.types.ForwardingRule): + The body resource for this request project (str): Project ID for this request. region (str): Name of the region scoping this request. - target_pool (str): - Name of the TargetPool resource to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + forwarding_rule_resource: "ForwardingRule" = proto.Field( + proto.MESSAGE, + number=301211695, + message="ForwardingRule", + ) project: str = proto.Field( proto.STRING, number=227560217, @@ -42184,4586 +54884,5276 @@ class GetTargetPoolRequest(proto.Message): proto.STRING, number=138946292, ) - target_pool: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=62796298, + number=37109963, + optional=True, ) -class GetTargetSslProxyRequest(proto.Message): - r"""A request message for TargetSslProxies.Get. See the method - description for details. +class InsertFutureReservationRequest(proto.Message): + r"""A request message for FutureReservations.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + future_reservation_resource (google.cloud.compute_v1beta.types.FutureReservation): + The body resource for this request project (str): Project ID for this request. - target_ssl_proxy (str): - Name of the TargetSslProxy resource to - return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + Name of the zone for this request. Name + should conform to RFC1035. """ + future_reservation_resource: "FutureReservation" = proto.Field( + proto.MESSAGE, + number=466750493, + message="FutureReservation", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - target_ssl_proxy: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=338795853, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class GetTargetTcpProxyRequest(proto.Message): - r"""A request message for TargetTcpProxies.Get. See the method +class InsertGlobalAddressRequest(proto.Message): + r"""A request message for GlobalAddresses.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + address_resource (google.cloud.compute_v1beta.types.Address): + The body resource for this request project (str): Project ID for this request. - target_tcp_proxy (str): - Name of the TargetTcpProxy resource to - return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + address_resource: "Address" = proto.Field( + proto.MESSAGE, + number=483888121, + message="Address", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - target_tcp_proxy: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=503065442, + number=37109963, + optional=True, ) -class GetTargetVpnGatewayRequest(proto.Message): - r"""A request message for TargetVpnGateways.Get. See the method - description for details. +class InsertGlobalForwardingRuleRequest(proto.Message): + r"""A request message for GlobalForwardingRules.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + forwarding_rule_resource (google.cloud.compute_v1beta.types.ForwardingRule): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region for this request. - target_vpn_gateway (str): - Name of the target VPN gateway to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + forwarding_rule_resource: "ForwardingRule" = proto.Field( + proto.MESSAGE, + number=301211695, + message="ForwardingRule", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - target_vpn_gateway: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=532512843, + number=37109963, + optional=True, ) -class GetTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkPolicies.GetTrafficClassificationRule. See the - method description for details. +class InsertGlobalNetworkEndpointGroupRequest(proto.Message): + r"""A request message for GlobalNetworkEndpointGroups.Insert. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_policy (str): - Name of the network policy to which the - queried rule belongs. - priority (int): - The priority of the rule to get from the - network policy. - - This field is a member of `oneof`_ ``_priority``. + network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - network_policy: str = proto.Field( - proto.STRING, - number=504961123, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( + proto.MESSAGE, + number=525788839, + message="NetworkEndpointGroup", ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=138946292, + number=37109963, + optional=True, ) -class GetUrlMapRequest(proto.Message): - r"""A request message for UrlMaps.Get. See the method description - for details. +class InsertGlobalPublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for GlobalPublicDelegatedPrefixes.Insert. + 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. - url_map (str): - Name of the UrlMap resource to return. + public_delegated_prefix_resource (google.cloud.compute_v1beta.types.PublicDelegatedPrefix): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ project: str = proto.Field( proto.STRING, number=227560217, ) - url_map: str = proto.Field( + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( + proto.MESSAGE, + number=47594501, + message="PublicDelegatedPrefix", + ) + request_id: str = proto.Field( proto.STRING, - number=367020684, + number=37109963, + optional=True, ) -class GetVpnGatewayRequest(proto.Message): - r"""A request message for VpnGateways.Get. See the method - description for details. +class InsertGlobalVmExtensionPolicyRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.Insert. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region for this request. - vpn_gateway (str): - Name of the VPN gateway to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + global_vm_extension_policy_resource: "GlobalVmExtensionPolicy" = proto.Field( + proto.MESSAGE, + number=101542927, + message="GlobalVmExtensionPolicy", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - vpn_gateway: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=406684153, + number=37109963, + optional=True, ) -class GetVpnTunnelRequest(proto.Message): - r"""A request message for VpnTunnels.Get. See the method +class InsertHealthCheckRequest(proto.Message): + r"""A request message for HealthChecks.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + health_check_resource (google.cloud.compute_v1beta.types.HealthCheck): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region for this request. - vpn_tunnel (str): - Name of the VpnTunnel resource to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ + health_check_resource: "HealthCheck" = proto.Field( + proto.MESSAGE, + number=201925032, + message="HealthCheck", + ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - vpn_tunnel: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=143821331, + number=37109963, + optional=True, ) -class GetWireGroupRequest(proto.Message): - r"""A request message for WireGroups.Get. See the method +class InsertImageRequest(proto.Message): + r"""A request message for Images.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - cross_site_network (str): + force_create (bool): + Force image creation if true. + This field is a member of `oneof`_ ``_force_create``. + image_resource (google.cloud.compute_v1beta.types.Image): + The body resource for this request project (str): Project ID for this request. - wire_group (str): - Name of the wire group resource to return. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - cross_site_network: str = proto.Field( - proto.STRING, - number=108192469, + force_create: bool = proto.Field( + proto.BOOL, + number=197723344, + optional=True, + ) + image_resource: "Image" = proto.Field( + proto.MESSAGE, + number=371171954, + message="Image", ) project: str = proto.Field( proto.STRING, number=227560217, ) - wire_group: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=122540613, + number=37109963, + optional=True, ) -class GetXpnHostProjectRequest(proto.Message): - r"""A request message for Projects.GetXpnHost. See the method - description for details. +class InsertInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_group_manager_resource (google.cloud.compute_v1beta.types.InstanceGroupManager): + The body resource for this request project (str): Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone + where you want to create the managed instance + group. """ + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( + proto.MESSAGE, + number=261063946, + message="InstanceGroupManager", + ) project: str = proto.Field( proto.STRING, number=227560217, ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class GetXpnResourcesProjectsRequest(proto.Message): - r"""A request message for Projects.GetXpnResources. See the - method description for details. +class InsertInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + InstanceGroupManagerResizeRequests.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. - - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) - - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. - - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. - - This field is a member of `oneof`_ ``_page_token``. + instance_group_manager (str): + The name of the managed instance group to + which the resize request will be added. + Name should conform to RFC1035 or be a resource + ID. + instance_group_manager_resize_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest): + The body resource for this request project (str): Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_return_partial_success``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of thezone where the managed + instance group is located and where the resize + request will be created. Name should conform to + RFC1035. """ - filter: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=336120696, - optional=True, + number=249363395, ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, + instance_group_manager_resize_request_resource: "InstanceGroupManagerResizeRequest" = proto.Field( + proto.MESSAGE, + number=468541293, + message="InstanceGroupManagerResizeRequest", ) - order_by: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=160562920, - optional=True, + number=227560217, ) - page_token: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=19994697, + number=37109963, optional=True, ) - project: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, + number=3744684, ) -class GetZoneOperationRequest(proto.Message): - r"""A request message for ZoneOperations.Get. See the method +class InsertInstanceGroupRequest(proto.Message): + r"""A request message for InstanceGroups.Insert. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - operation (str): - Name of the Operations resource to return, or - its unique numeric identifier. + instance_group_resource (google.cloud.compute_v1beta.types.InstanceGroup): + The body resource for this request project (str): Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. zone (str): - Name of the zone for this request. + The name of the zone + where you want to create the instance group. """ - operation: str = proto.Field( - proto.STRING, - number=52090215, + instance_group_resource: "InstanceGroup" = proto.Field( + proto.MESSAGE, + number=286612152, + message="InstanceGroup", ) project: str = proto.Field( proto.STRING, number=227560217, ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class GetZoneRequest(proto.Message): - r"""A request message for Zones.Get. See the method description - for details. +class InsertInstanceRequest(proto.Message): + r"""A request message for Instances.Insert. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + instance_resource (google.cloud.compute_v1beta.types.Instance): + The body resource for this request project (str): Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + source_instance_template (str): + Specifies instance template to create the + instance. + This field is optional. It can be a full or + partial URL. For example, the following are all + valid URLs to an instance template: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + - + projects/project/global/instanceTemplates/instanceTemplate + - + global/instanceTemplates/instanceTemplate + + This field is a member of `oneof`_ ``_source_instance_template``. + source_machine_image (str): + Specifies the machine image to use to create + the instance. + This field is optional. It can be a full or + partial URL. For example, the following are all + valid URLs to a machine image: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage + - + projects/project/global/global/machineImages/machineImage + - global/machineImages/machineImage + + This field is a member of `oneof`_ ``_source_machine_image``. zone (str): - Name of the zone resource to return. + The name of the zone for this request. """ + instance_resource: "Instance" = proto.Field( + proto.MESSAGE, + number=215988344, + message="Instance", + ) project: str = proto.Field( proto.STRING, number=227560217, ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + source_instance_template: str = proto.Field( + proto.STRING, + number=332423616, + optional=True, + ) + source_machine_image: str = proto.Field( + proto.STRING, + number=21769791, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class GlobalAddressesMoveRequest(proto.Message): - r""" +class InsertInstanceTemplateRequest(proto.Message): + r"""A request message for InstanceTemplates.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - An optional destination address description - if intended to be different from the source. - - This field is a member of `oneof`_ ``_description``. - destination_address (str): - The URL of the destination address to move - to. This can be a full or partial URL. For - example, the following are all valid URLs to a - address: - - https://www.googleapis.com/compute/v1/projects/project - /global/addresses/address - - projects/project/global/addresses/address Note - that destination project must be different from - the source project. So /global/addresses/address - is not valid partial url. + instance_template_resource (google.cloud.compute_v1beta.types.InstanceTemplate): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_destination_address``. + This field is a member of `oneof`_ ``_request_id``. """ - description: str = proto.Field( + instance_template_resource: "InstanceTemplate" = proto.Field( + proto.MESSAGE, + number=10679561, + message="InstanceTemplate", + ) + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=227560217, ) - destination_address: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=371693763, + number=37109963, optional=True, ) -class GlobalNetworkEndpointGroupsAttachEndpointsRequest(proto.Message): - r""" - - Attributes: - network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): - The list of network endpoints to be attached. - """ - - network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( - proto.MESSAGE, - number=149850285, - message="NetworkEndpoint", - ) +class InsertInstantSnapshotRequest(proto.Message): + r"""A request message for InstantSnapshots.Insert. See the method + description for details. -class GlobalNetworkEndpointGroupsDetachEndpointsRequest(proto.Message): - r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): - The list of network endpoints to be detached. + instant_snapshot_resource (google.cloud.compute_v1beta.types.InstantSnapshot): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + Name of the zone for this request. """ - network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( + instant_snapshot_resource: "InstantSnapshot" = proto.Field( proto.MESSAGE, - number=149850285, - message="NetworkEndpoint", + number=383915339, + message="InstantSnapshot", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class GlobalOrganizationSetPolicyRequest(proto.Message): - r""" +class InsertInterconnectAttachmentGroupRequest(proto.Message): + r"""A request message for InterconnectAttachmentGroups.Insert. + See the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): - Flatten Policy to create a backward - compatible wire-format. Deprecated. Use 'policy' - to specify bindings. - etag (str): - Flatten Policy to create a backward - compatible wire-format. Deprecated. Use 'policy' - to specify the etag. - - This field is a member of `oneof`_ ``_etag``. - policy (google.cloud.compute_v1beta.types.Policy): - REQUIRED: The complete policy to be applied - to the 'resource'. The size of the policy is - limited to a few 10s of KB. An empty policy is - in general a valid policy but certain services - (like Projects) might reject them. + interconnect_attachment_group_resource (google.cloud.compute_v1beta.types.InterconnectAttachmentGroup): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_policy``. + This field is a member of `oneof`_ ``_request_id``. """ - bindings: MutableSequence["Binding"] = proto.RepeatedField( + interconnect_attachment_group_resource: "InterconnectAttachmentGroup" = proto.Field( proto.MESSAGE, - number=403251854, - message="Binding", + number=9990137, + message="InterconnectAttachmentGroup", ) - etag: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3123477, - optional=True, + number=227560217, ) - policy: "Policy" = proto.Field( - proto.MESSAGE, - number=91071794, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Policy", ) -class GlobalSetLabelsRequest(proto.Message): - r""" +class InsertInterconnectAttachmentRequest(proto.Message): + r"""A request message for InterconnectAttachments.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - label_fingerprint (str): - The fingerprint of the previous set of labels - for this resource, used to detect conflicts. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You must always provide an - up-to-date fingerprint hash when updating or - changing labels, otherwise the request will fail - with error 412 conditionNotMet. Make a get() - request to the resource to get the latest - fingerprint. + interconnect_attachment_resource (google.cloud.compute_v1beta.types.InterconnectAttachment): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - A list of labels to apply for this resource. - Each label must comply with the requirements for - labels. For example, "webserver-frontend": - "images". A label value can also be empty (e.g. - "my-label": ""). + This field is a member of `oneof`_ ``_request_id``. + validate_only (bool): + If true, the request will not be committed. + + This field is a member of `oneof`_ ``_validate_only``. """ - label_fingerprint: str = proto.Field( + interconnect_attachment_resource: "InterconnectAttachment" = proto.Field( + proto.MESSAGE, + number=212341369, + message="InterconnectAttachment", + ) + project: str = proto.Field( proto.STRING, - number=178124825, - optional=True, + number=227560217, ) - labels: MutableMapping[str, str] = proto.MapField( + region: str = proto.Field( proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( proto.STRING, - number=500195327, + number=37109963, + optional=True, + ) + validate_only: bool = proto.Field( + proto.BOOL, + number=242744629, + optional=True, ) -class GlobalSetPolicyRequest(proto.Message): - r""" +class InsertInterconnectGroupRequest(proto.Message): + r"""A request message for InterconnectGroups.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): - Flatten Policy to create a backward - compatible wire-format. Deprecated. Use 'policy' - to specify bindings. - etag (str): - Flatten Policy to create a backward - compatible wire-format. Deprecated. Use 'policy' - to specify the etag. - - This field is a member of `oneof`_ ``_etag``. - policy (google.cloud.compute_v1beta.types.Policy): - REQUIRED: The complete policy to be applied - to the 'resource'. The size of the policy is - limited to a few 10s of KB. An empty policy is - in general a valid policy but certain services - (like Projects) might reject them. + interconnect_group_resource (google.cloud.compute_v1beta.types.InterconnectGroup): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_policy``. + This field is a member of `oneof`_ ``_request_id``. """ - bindings: MutableSequence["Binding"] = proto.RepeatedField( + interconnect_group_resource: "InterconnectGroup" = proto.Field( proto.MESSAGE, - number=403251854, - message="Binding", + number=85571999, + message="InterconnectGroup", ) - etag: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3123477, - optional=True, + number=227560217, ) - policy: "Policy" = proto.Field( - proto.MESSAGE, - number=91071794, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Policy", ) -class GroupMaintenanceInfo(proto.Message): - r"""Maintenance Info for ReservationBlocks. +class InsertInterconnectRequest(proto.Message): + r"""A request message for Interconnects.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_maintenance_ongoing_count (int): - Describes number of instances that have - ongoing maintenance. - - This field is a member of `oneof`_ ``_instance_maintenance_ongoing_count``. - instance_maintenance_pending_count (int): - Describes number of instances that have - pending maintenance. - - This field is a member of `oneof`_ ``_instance_maintenance_pending_count``. - maintenance_ongoing_count (int): - Progress for ongoing maintenance for this - group of VMs/hosts. Describes number of hosts in - the block that have ongoing maintenance. - - This field is a member of `oneof`_ ``_maintenance_ongoing_count``. - maintenance_pending_count (int): - Progress for ongoing maintenance for this - group of VMs/hosts. Describes number of hosts in - the block that have pending maintenance. - - This field is a member of `oneof`_ ``_maintenance_pending_count``. - scheduling_type (str): - The type of maintenance for the reservation. - Check the SchedulingType enum for the list of - possible values. - - This field is a member of `oneof`_ ``_scheduling_type``. - subblock_infra_maintenance_ongoing_count (int): - Describes number of subblock Infrastructure - that has ongoing maintenance. Here, Subblock - Infrastructure Maintenance pertains to upstream - hardware contained in the Subblock that is - necessary for a VM Family(e.g. NVLink Domains). - Not all VM Families will support this field. - - This field is a member of `oneof`_ ``_subblock_infra_maintenance_ongoing_count``. - subblock_infra_maintenance_pending_count (int): - Describes number of subblock Infrastructure - that has pending maintenance. Here, Subblock - Infrastructure Maintenance pertains to upstream - hardware contained in the Subblock that is - necessary for a VM Family (e.g. NVLink Domains). - Not all VM Families will support this field. - - This field is a member of `oneof`_ ``_subblock_infra_maintenance_pending_count``. - upcoming_group_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): - Maintenance information on this group of VMs. + interconnect_resource (google.cloud.compute_v1beta.types.Interconnect): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_upcoming_group_maintenance``. + This field is a member of `oneof`_ ``_request_id``. """ - class SchedulingType(proto.Enum): - r"""The type of maintenance for the reservation. - - Values: - UNDEFINED_SCHEDULING_TYPE (0): - A value indicating that the enum field is not - set. - GROUPED (474540862): - Maintenance on all reserved instances in the - reservation is synchronized. - GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): - Unknown maintenance type. - INDEPENDENT (127011674): - Maintenance is not synchronized for this - reservation. Instead, each instance has its own - maintenance window. - """ - UNDEFINED_SCHEDULING_TYPE = 0 - GROUPED = 474540862 - GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 - INDEPENDENT = 127011674 - - instance_maintenance_ongoing_count: int = proto.Field( - proto.INT32, - number=137611253, - optional=True, - ) - instance_maintenance_pending_count: int = proto.Field( - proto.INT32, - number=76612881, - optional=True, - ) - maintenance_ongoing_count: int = proto.Field( - proto.INT32, - number=219781919, - optional=True, - ) - maintenance_pending_count: int = proto.Field( - proto.INT32, - number=158783547, - optional=True, + interconnect_resource: "Interconnect" = proto.Field( + proto.MESSAGE, + number=397611167, + message="Interconnect", ) - scheduling_type: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=199835397, - optional=True, - ) - subblock_infra_maintenance_ongoing_count: int = proto.Field( - proto.INT32, - number=366161790, - optional=True, - ) - subblock_infra_maintenance_pending_count: int = proto.Field( - proto.INT32, - number=305163418, - optional=True, + number=227560217, ) - upcoming_group_maintenance: "UpcomingMaintenance" = proto.Field( - proto.MESSAGE, - number=393438448, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="UpcomingMaintenance", ) -class GuestAttributes(proto.Message): - r"""A guest attributes entry. +class InsertLicenseRequest(proto.Message): + r"""A request message for Licenses.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - kind (str): - [Output Only] Type of the resource. Always - compute#guestAttributes for guest attributes entry. - - This field is a member of `oneof`_ ``_kind``. - query_path (str): - The path to be queried. This can be the - default namespace ('') or a nested namespace - ('\/') or a specified key ('\/\'). - - This field is a member of `oneof`_ ``_query_path``. - query_value (google.cloud.compute_v1beta.types.GuestAttributesValue): - [Output Only] The value of the requested queried path. - - This field is a member of `oneof`_ ``_query_value``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - variable_key (str): - The key to search for. - - This field is a member of `oneof`_ ``_variable_key``. - variable_value (str): - [Output Only] The value found for the requested key. + license_resource (google.cloud.compute_v1beta.types.License): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_variable_value``. + This field is a member of `oneof`_ ``_request_id``. """ - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - query_path: str = proto.Field( - proto.STRING, - number=368591164, - optional=True, - ) - query_value: "GuestAttributesValue" = proto.Field( + license_resource: "License" = proto.Field( proto.MESSAGE, - number=157570874, - optional=True, - message="GuestAttributesValue", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + number=437955148, + message="License", ) - variable_key: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=164364828, - optional=True, + number=227560217, ) - variable_value: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=124582382, + number=37109963, optional=True, ) -class GuestAttributesEntry(proto.Message): - r"""A guest attributes namespace/key/value entry. +class InsertMachineImageRequest(proto.Message): + r"""A request message for MachineImages.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - key (str): - Key for the guest attribute entry. - - This field is a member of `oneof`_ ``_key``. - namespace (str): - Namespace for the guest attribute entry. + machine_image_resource (google.cloud.compute_v1beta.types.MachineImage): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_namespace``. - value (str): - Value for the guest attribute entry. + This field is a member of `oneof`_ ``_request_id``. + source_instance (str): + Required. Source instance that is used to + create the machine image from. - This field is a member of `oneof`_ ``_value``. + This field is a member of `oneof`_ ``_source_instance``. """ - key: str = proto.Field( + machine_image_resource: "MachineImage" = proto.Field( + proto.MESSAGE, + number=60740970, + message="MachineImage", + ) + project: str = proto.Field( proto.STRING, - number=106079, - optional=True, + number=227560217, ) - namespace: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=178476379, + number=37109963, optional=True, ) - value: str = proto.Field( + source_instance: str = proto.Field( proto.STRING, - number=111972721, + number=396315705, optional=True, ) -class GuestAttributesValue(proto.Message): - r"""Array of guest attribute namespace/key/value tuples. - - Attributes: - items (MutableSequence[google.cloud.compute_v1beta.types.GuestAttributesEntry]): - - """ - - items: MutableSequence["GuestAttributesEntry"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="GuestAttributesEntry", - ) - +class InsertNetworkAttachmentRequest(proto.Message): + r"""A request message for NetworkAttachments.Insert. See the + method description for details. -class GuestOsFeature(proto.Message): - r"""Guest OS features. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - type_ (str): - The ID of a supported feature. To add multiple values, use - commas to separate values. Set to one or more of the - following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF - SNP_SVSM_CAPABLE For - more information, see Enabling guest operating system - features. Check the Type enum for the list of possible - values. + network_attachment_resource (google.cloud.compute_v1beta.types.NetworkAttachment): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_type``. + This field is a member of `oneof`_ ``_request_id``. """ - class Type(proto.Enum): - r"""The ID of a supported feature. To add multiple values, use commas to - separate values. Set to one or more of the following values: - - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF - - SNP_SVSM_CAPABLE For more information, see Enabling guest operating - system features. - - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - BARE_METAL_LINUX_COMPATIBLE (354232740): - No description available. - FEATURE_TYPE_UNSPECIFIED (531767259): - No description available. - GVNIC (68209305): - No description available. - IDPF (2242641): - No description available. - MULTI_IP_SUBNET (151776719): - No description available. - SECURE_BOOT (376811194): - No description available. - SEV_CAPABLE (87083793): - No description available. - SEV_LIVE_MIGRATABLE (392039820): - No description available. - SEV_LIVE_MIGRATABLE_V2 (168551983): - No description available. - SEV_SNP_CAPABLE (426919): - No description available. - SNP_SVSM_CAPABLE (52921460): - No description available. - TDX_CAPABLE (240446133): - No description available. - UEFI_COMPATIBLE (195865408): - No description available. - VIRTIO_SCSI_MULTIQUEUE (201597069): - No description available. - WINDOWS (456863331): - No description available. - """ - UNDEFINED_TYPE = 0 - BARE_METAL_LINUX_COMPATIBLE = 354232740 - FEATURE_TYPE_UNSPECIFIED = 531767259 - GVNIC = 68209305 - IDPF = 2242641 - MULTI_IP_SUBNET = 151776719 - SECURE_BOOT = 376811194 - SEV_CAPABLE = 87083793 - SEV_LIVE_MIGRATABLE = 392039820 - SEV_LIVE_MIGRATABLE_V2 = 168551983 - SEV_SNP_CAPABLE = 426919 - SNP_SVSM_CAPABLE = 52921460 - TDX_CAPABLE = 240446133 - UEFI_COMPATIBLE = 195865408 - VIRTIO_SCSI_MULTIQUEUE = 201597069 - WINDOWS = 456863331 - - type_: str = proto.Field( + network_attachment_resource: "NetworkAttachment" = proto.Field( + proto.MESSAGE, + number=210974745, + message="NetworkAttachment", + ) + project: str = proto.Field( proto.STRING, - number=3575610, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class HTTP2HealthCheck(proto.Message): - r""" +class InsertNetworkEdgeSecurityServiceRequest(proto.Message): + r"""A request message for NetworkEdgeSecurityServices.Insert. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - host (str): - The value of the host header in the HTTP/2 - health check request. If left empty (default - value), the host header is set to the - destination IP address to which health check - packets are sent. The destination IP address - depends on the type of load balancer. For - details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - - This field is a member of `oneof`_ ``_host``. - port (int): - The TCP port number to which the health check - prober sends packets. The default value is 443. - Valid values are 1 through 65535. - - This field is a member of `oneof`_ ``_port``. - port_name (str): - Not supported. - - This field is a member of `oneof`_ ``_port_name``. - port_specification (str): - Specifies how a port is selected for health checking. Can be - one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health - check. Supported by backend services for passthrough load - balancers and backend services for proxy load balancers. Not - supported by target pools. The health check supports all - backends supported by the backend service provided the - backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint - groups, and instance group backends. USE_NAMED_PORT: Not - supported. USE_SERVING_PORT: Provides an indirect method of - specifying the health check port by referring to the backend - service. Only supported by backend services for proxy load - balancers. Not supported by target pools. Not supported by - backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the - PortSpecification enum for the list of possible values. - - This field is a member of `oneof`_ ``_port_specification``. - proxy_header (str): - Specifies the type of proxy header to append before sending - data to the backend, either NONE or PROXY_V1. The default is - NONE. Check the ProxyHeader enum for the list of possible - values. - - This field is a member of `oneof`_ ``_proxy_header``. - request_path (str): - The request path of the HTTP/2 health check - request. The default value is /. Must comply - with RFC3986. + network_edge_security_service_resource (google.cloud.compute_v1beta.types.NetworkEdgeSecurityService): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_request_path``. - response (str): - Creates a content-based HTTP/2 health check. - In addition to the required HTTP 200 (OK) status - code, you can configure the health check to pass - only when the backend sends this specific ASCII - response string within the first 1024 bytes of - the HTTP response body. For details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + This field is a member of `oneof`_ ``_request_id``. + validate_only (bool): + If true, the request will not be committed. - This field is a member of `oneof`_ ``_response``. + This field is a member of `oneof`_ ``_validate_only``. """ - class PortSpecification(proto.Enum): - r"""Specifies how a port is selected for health checking. Can be one of - the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by - backend services for passthrough load balancers and backend services - for proxy load balancers. Not supported by target pools. The health - check supports all backends supported by the backend service - provided the backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and - instance group backends. USE_NAMED_PORT: Not supported. - USE_SERVING_PORT: Provides an indirect method of specifying the - health check port by referring to the backend service. Only - supported by backend services for proxy load balancers. Not - supported by target pools. Not supported by backend services for - passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. - - Values: - UNDEFINED_PORT_SPECIFICATION (0): - A value indicating that the enum field is not - set. - USE_FIXED_PORT (190235748): - The port number in the health check's port is - used for health checking. Applies to network - endpoint group and instance group backends. - USE_NAMED_PORT (349300671): - Not supported. - USE_SERVING_PORT (362637516): - For network endpoint group backends, the - health check uses the port number specified on - each endpoint in the network endpoint group. For - instance group backends, the health check uses - the port number specified for the backend - service's named port defined in the instance - group's named ports. - """ - UNDEFINED_PORT_SPECIFICATION = 0 - USE_FIXED_PORT = 190235748 - USE_NAMED_PORT = 349300671 - USE_SERVING_PORT = 362637516 - - class ProxyHeader(proto.Enum): - r"""Specifies the type of proxy header to append before sending data to - the backend, either NONE or PROXY_V1. The default is NONE. - - Values: - UNDEFINED_PROXY_HEADER (0): - A value indicating that the enum field is not - set. - NONE (2402104): - No description available. - PROXY_V1 (334352940): - No description available. - """ - UNDEFINED_PROXY_HEADER = 0 - NONE = 2402104 - PROXY_V1 = 334352940 - - host: str = proto.Field( - proto.STRING, - number=3208616, - optional=True, - ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, - ) - port_name: str = proto.Field( - proto.STRING, - number=41534345, - optional=True, + network_edge_security_service_resource: "NetworkEdgeSecurityService" = proto.Field( + proto.MESSAGE, + number=477548966, + message="NetworkEdgeSecurityService", ) - port_specification: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=51590597, - optional=True, + number=227560217, ) - proxy_header: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=160374142, - optional=True, + number=138946292, ) - request_path: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=229403605, + number=37109963, optional=True, ) - response: str = proto.Field( - proto.STRING, - number=196547649, + validate_only: bool = proto.Field( + proto.BOOL, + number=242744629, optional=True, ) -class HTTPHealthCheck(proto.Message): - r""" +class InsertNetworkEndpointGroupRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - host (str): - The value of the host header in the HTTP - health check request. If left empty (default - value), the host header is set to the - destination IP address to which health check - packets are sent. The destination IP address - depends on the type of load balancer. For - details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - - This field is a member of `oneof`_ ``_host``. - port (int): - The TCP port number to which the health check - prober sends packets. The default value is 80. - Valid values are 1 through 65535. - - This field is a member of `oneof`_ ``_port``. - port_name (str): - Not supported. - - This field is a member of `oneof`_ ``_port_name``. - port_specification (str): - Specifies how a port is selected for health checking. Can be - one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health - check. Supported by backend services for passthrough load - balancers and backend services for proxy load balancers. - Also supported in legacy HTTP health checks for target - pools. The health check supports all backends supported by - the backend service provided the backend can be health - checked. For example, GCE_VM_IP network endpoint groups, - GCE_VM_IP_PORT network endpoint groups, and instance group - backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: - Provides an indirect method of specifying the health check - port by referring to the backend service. Only supported by - backend services for proxy load balancers. Not supported by - target pools. Not supported by backend services for - pass-through load balancers. Supports all backends that can - be health checked; for example, GCE_VM_IP_PORT network - endpoint groups and instance group backends. For - GCE_VM_IP_PORT network endpoint group backends, the health - check uses the port number specified for each endpoint in - the network endpoint group. For instance group backends, the - health check uses the port number determined by looking up - the backend service's named port in the instance group's - list of named ports. Check the PortSpecification enum for - the list of possible values. - - This field is a member of `oneof`_ ``_port_specification``. - proxy_header (str): - Specifies the type of proxy header to append before sending - data to the backend, either NONE or PROXY_V1. The default is - NONE. Check the ProxyHeader enum for the list of possible - values. - - This field is a member of `oneof`_ ``_proxy_header``. - request_path (str): - The request path of the HTTP health check - request. The default value is /. Must comply - with RFC3986. - - This field is a member of `oneof`_ ``_request_path``. - response (str): - Creates a content-based HTTP health check. In - addition to the required HTTP 200 (OK) status - code, you can configure the health check to pass - only when the backend sends this specific ASCII - response string within the first 1024 bytes of - the HTTP response body. For details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_response``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone where + you want to create the network endpoint group. + It should comply with RFC1035. """ - class PortSpecification(proto.Enum): - r"""Specifies how a port is selected for health checking. Can be one of - the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by - backend services for passthrough load balancers and backend services - for proxy load balancers. Also supported in legacy HTTP health - checks for target pools. The health check supports all backends - supported by the backend service provided the backend can be health - checked. For example, GCE_VM_IP network endpoint groups, - GCE_VM_IP_PORT network endpoint groups, and instance group backends. - USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an - indirect method of specifying the health check port by referring to - the backend service. Only supported by backend services for proxy - load balancers. Not supported by target pools. Not supported by - backend services for pass-through load balancers. Supports all - backends that can be health checked; for example, GCE_VM_IP_PORT - network endpoint groups and instance group backends. For - GCE_VM_IP_PORT network endpoint group backends, the health check - uses the port number specified for each endpoint in the network - endpoint group. For instance group backends, the health check uses - the port number determined by looking up the backend service's named - port in the instance group's list of named ports. - - Values: - UNDEFINED_PORT_SPECIFICATION (0): - A value indicating that the enum field is not - set. - USE_FIXED_PORT (190235748): - The port number in the health check's port is - used for health checking. Applies to network - endpoint group and instance group backends. - USE_NAMED_PORT (349300671): - Not supported. - USE_SERVING_PORT (362637516): - For network endpoint group backends, the - health check uses the port number specified on - each endpoint in the network endpoint group. For - instance group backends, the health check uses - the port number specified for the backend - service's named port defined in the instance - group's named ports. - """ - UNDEFINED_PORT_SPECIFICATION = 0 - USE_FIXED_PORT = 190235748 - USE_NAMED_PORT = 349300671 - USE_SERVING_PORT = 362637516 - - class ProxyHeader(proto.Enum): - r"""Specifies the type of proxy header to append before sending data to - the backend, either NONE or PROXY_V1. The default is NONE. - - Values: - UNDEFINED_PROXY_HEADER (0): - A value indicating that the enum field is not - set. - NONE (2402104): - No description available. - PROXY_V1 (334352940): - No description available. - """ - UNDEFINED_PROXY_HEADER = 0 - NONE = 2402104 - PROXY_V1 = 334352940 - - host: str = proto.Field( - proto.STRING, - number=3208616, - optional=True, - ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( + proto.MESSAGE, + number=525788839, + message="NetworkEndpointGroup", ) - port_name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=41534345, - optional=True, + number=227560217, ) - port_specification: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=51590597, + number=37109963, optional=True, ) - proxy_header: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=160374142, - optional=True, + number=3744684, + ) + + +class InsertNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + firewall_policy_resource: "FirewallPolicy" = proto.Field( + proto.MESSAGE, + number=495049532, + message="FirewallPolicy", ) - request_path: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=229403605, - optional=True, + number=227560217, ) - response: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=196547649, + number=37109963, optional=True, ) -class HTTPSHealthCheck(proto.Message): - r""" +class InsertNetworkRequest(proto.Message): + r"""A request message for Networks.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - host (str): - The value of the host header in the HTTPS - health check request. If left empty (default - value), the host header is set to the - destination IP address to which health check - packets are sent. The destination IP address - depends on the type of load balancer. For - details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - - This field is a member of `oneof`_ ``_host``. - port (int): - The TCP port number to which the health check - prober sends packets. The default value is 443. - Valid values are 1 through 65535. - - This field is a member of `oneof`_ ``_port``. - port_name (str): - Not supported. - - This field is a member of `oneof`_ ``_port_name``. - port_specification (str): - Specifies how a port is selected for health checking. Can be - one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health - check. Supported by backend services for passthrough load - balancers and backend services for proxy load balancers. Not - supported by target pools. The health check supports all - backends supported by the backend service provided the - backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint - groups, and instance group backends. USE_NAMED_PORT: Not - supported. USE_SERVING_PORT: Provides an indirect method of - specifying the health check port by referring to the backend - service. Only supported by backend services for proxy load - balancers. Not supported by target pools. Not supported by - backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the - PortSpecification enum for the list of possible values. + network_resource (google.cloud.compute_v1beta.types.Network): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_port_specification``. - proxy_header (str): - Specifies the type of proxy header to append before sending - data to the backend, either NONE or PROXY_V1. The default is - NONE. Check the ProxyHeader enum for the list of possible - values. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_proxy_header``. - request_path (str): - The request path of the HTTPS health check - request. The default value is /. Must comply - with RFC3986. + network_resource: "Network" = proto.Field( + proto.MESSAGE, + number=122105599, + message="Network", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_request_path``. - response (str): - Creates a content-based HTTPS health check. - In addition to the required HTTP 200 (OK) status - code, you can configure the health check to pass - only when the backend sends this specific ASCII - response string within the first 1024 bytes of - the HTTP response body. For details, see: - https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - This field is a member of `oneof`_ ``_response``. - """ +class InsertNodeGroupRequest(proto.Message): + r"""A request message for NodeGroups.Insert. See the method + description for details. - class PortSpecification(proto.Enum): - r"""Specifies how a port is selected for health checking. Can be one of - the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by - backend services for passthrough load balancers and backend services - for proxy load balancers. Not supported by target pools. The health - check supports all backends supported by the backend service - provided the backend can be health checked. For example, GCE_VM_IP - network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and - instance group backends. USE_NAMED_PORT: Not supported. - USE_SERVING_PORT: Provides an indirect method of specifying the - health check port by referring to the backend service. Only - supported by backend services for proxy load balancers. Not - supported by target pools. Not supported by backend services for - passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. - Values: - UNDEFINED_PORT_SPECIFICATION (0): - A value indicating that the enum field is not - set. - USE_FIXED_PORT (190235748): - The port number in the health check's port is - used for health checking. Applies to network - endpoint group and instance group backends. - USE_NAMED_PORT (349300671): - Not supported. - USE_SERVING_PORT (362637516): - For network endpoint group backends, the - health check uses the port number specified on - each endpoint in the network endpoint group. For - instance group backends, the health check uses - the port number specified for the backend - service's named port defined in the instance - group's named ports. - """ - UNDEFINED_PORT_SPECIFICATION = 0 - USE_FIXED_PORT = 190235748 - USE_NAMED_PORT = 349300671 - USE_SERVING_PORT = 362637516 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class ProxyHeader(proto.Enum): - r"""Specifies the type of proxy header to append before sending data to - the backend, either NONE or PROXY_V1. The default is NONE. + Attributes: + initial_node_count (int): + Initial count of nodes in the node group. + node_group_resource (google.cloud.compute_v1beta.types.NodeGroup): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - Values: - UNDEFINED_PROXY_HEADER (0): - A value indicating that the enum field is not - set. - NONE (2402104): - No description available. - PROXY_V1 (334352940): - No description available. - """ - UNDEFINED_PROXY_HEADER = 0 - NONE = 2402104 - PROXY_V1 = 334352940 + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. + """ - host: str = proto.Field( - proto.STRING, - number=3208616, - optional=True, - ) - port: int = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, - number=3446913, - optional=True, - ) - port_name: str = proto.Field( - proto.STRING, - number=41534345, - optional=True, + number=71951469, ) - port_specification: str = proto.Field( - proto.STRING, - number=51590597, - optional=True, + node_group_resource: "NodeGroup" = proto.Field( + proto.MESSAGE, + number=505321899, + message="NodeGroup", ) - proxy_header: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=160374142, - optional=True, + number=227560217, ) - request_path: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=229403605, + number=37109963, optional=True, ) - response: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=196547649, - optional=True, + number=3744684, ) -class HealthCheck(proto.Message): - r"""Represents a health check resource. Google Compute Engine has two - health check resources: \* - `Regional `__ - \* `Global `__ These - health check resources can be used for load balancing and for - autohealing VMs in a managed instance group (MIG). **Load - balancing** Health check requirements vary depending on the type of - load balancer. For details about the type of health check supported - for each load balancer and corresponding backend type, see Health - checks overview: Load balancer guide. **Autohealing in MIGs** The - health checks that you use for autohealing VMs in a MIG can be - either regional or global. For more information, see Set up an - application health check and autohealing. For more information, see - Health checks overview. +class InsertNodeTemplateRequest(proto.Message): + r"""A request message for NodeTemplates.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - check_interval_sec (int): - How often (in seconds) to send a health - check. The default value is 5 seconds. - - This field is a member of `oneof`_ ``_check_interval_sec``. - creation_timestamp (str): - [Output Only] Creation timestamp in 3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - grpc_health_check (google.cloud.compute_v1beta.types.GRPCHealthCheck): - - This field is a member of `oneof`_ ``_grpc_health_check``. - grpc_tls_health_check (google.cloud.compute_v1beta.types.GRPCTLSHealthCheck): + node_template_resource (google.cloud.compute_v1beta.types.NodeTemplate): + The body resource for this request + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_grpc_tls_health_check``. - healthy_threshold (int): - A so-far unhealthy instance will be marked - healthy after this many consecutive successes. - The default value is 2. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_healthy_threshold``. - http2_health_check (google.cloud.compute_v1beta.types.HTTP2HealthCheck): + node_template_resource: "NodeTemplate" = proto.Field( + proto.MESSAGE, + number=127364406, + message="NodeTemplate", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_http2_health_check``. - http_health_check (google.cloud.compute_v1beta.types.HTTPHealthCheck): - This field is a member of `oneof`_ ``_http_health_check``. - https_health_check (google.cloud.compute_v1beta.types.HTTPSHealthCheck): +class InsertOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.Insert. + See the method description for details. - This field is a member of `oneof`_ ``_https_health_check``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - This field is a member of `oneof`_ ``_id``. - kind (str): - Type of the resource. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_kind``. - log_config (google.cloud.compute_v1beta.types.HealthCheckLogConfig): - Configure logging on this health check. + Attributes: + parent_id (str): + Parent ID for this request. The ID can be either be + "folders/[FOLDER_ID]" if the parent is a folder or + "organizations/[ORGANIZATION_ID]" if the parent is an + organization. - This field is a member of `oneof`_ ``_log_config``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. For example, a name that is 1-63 - characters long, matches the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?``, and otherwise complies with - RFC1035. This regular expression describes a name where the - first character is a lowercase letter, and all following - characters are a dash, lowercase letter, or digit, except - the last character, which isn't a dash. + This field is a member of `oneof`_ ``_parent_id``. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_name``. - region (str): - [Output Only] Region where the health check resides. Not - applicable to global health checks. + This field is a member of `oneof`_ ``_request_id``. + security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): + The body resource for this request + """ - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. + parent_id: str = proto.Field( + proto.STRING, + number=459714768, + optional=True, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + security_policy_resource: "SecurityPolicy" = proto.Field( + proto.MESSAGE, + number=216159612, + message="SecurityPolicy", + ) - This field is a member of `oneof`_ ``_self_link``. - source_regions (MutableSequence[str]): - The list of cloud regions from which health - checks are performed. If any regions are - specified, then exactly 3 regions should be - specified. The region names must be valid names - of Google Cloud regions. This can only be set - for global health check. If this list is - non-empty, then there are restrictions on what - other health check fields are supported and what - other resources can use this health check: - - SSL, HTTP2, and GRPC protocols are not - supported. - The TCP request field is not - supported. - The proxyHeader field for HTTP, - HTTPS, and TCP is not supported. - The - checkIntervalSec field must be at least 30. - - The health check cannot be used with - BackendService nor with managed instance group - auto-healing. - ssl_health_check (google.cloud.compute_v1beta.types.SSLHealthCheck): - This field is a member of `oneof`_ ``_ssl_health_check``. - tcp_health_check (google.cloud.compute_v1beta.types.TCPHealthCheck): +class InsertPacketMirroringRequest(proto.Message): + r"""A request message for PacketMirrorings.Insert. See the method + description for details. - This field is a member of `oneof`_ ``_tcp_health_check``. - timeout_sec (int): - How long (in seconds) to wait before claiming - failure. The default value is 5 seconds. It is - invalid for timeoutSec to have greater value - than checkIntervalSec. - This field is a member of `oneof`_ ``_timeout_sec``. - type_ (str): - Specifies the type of the healthCheck, either - TCP, SSL, HTTP, HTTPS, HTTP2 or GRPC. Exactly - one of the protocol-specific health check fields - must be specified, which must match type field. - Check the Type enum for the list of possible - values. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_type``. - unhealthy_threshold (int): - A so-far healthy instance will be marked - unhealthy after this many consecutive failures. - The default value is 2. + Attributes: + packet_mirroring_resource (google.cloud.compute_v1beta.types.PacketMirroring): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_unhealthy_threshold``. + This field is a member of `oneof`_ ``_request_id``. """ - class Type(proto.Enum): - r"""Specifies the type of the healthCheck, either TCP, SSL, HTTP, - HTTPS, HTTP2 or GRPC. Exactly one of the protocol-specific - health check fields must be specified, which must match type - field. - - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - GRPC (2196510): - No description available. - GRPC_WITH_TLS (268089571): - No description available. - HTTP (2228360): - No description available. - HTTP2 (69079210): - No description available. - HTTPS (69079243): - No description available. - INVALID (530283991): - No description available. - SSL (82412): - No description available. - TCP (82881): - No description available. - """ - UNDEFINED_TYPE = 0 - GRPC = 2196510 - GRPC_WITH_TLS = 268089571 - HTTP = 2228360 - HTTP2 = 69079210 - HTTPS = 69079243 - INVALID = 530283991 - SSL = 82412 - TCP = 82881 - - check_interval_sec: int = proto.Field( - proto.INT32, - number=345561006, - optional=True, + packet_mirroring_resource: "PacketMirroring" = proto.Field( + proto.MESSAGE, + number=493501985, + message="PacketMirroring", ) - creation_timestamp: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=227560217, ) - description: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=422937596, - optional=True, - ) - grpc_health_check: "GRPCHealthCheck" = proto.Field( - proto.MESSAGE, - number=85529574, - optional=True, - message="GRPCHealthCheck", + number=138946292, ) - grpc_tls_health_check: "GRPCTLSHealthCheck" = proto.Field( - proto.MESSAGE, - number=267273258, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="GRPCTLSHealthCheck", ) - healthy_threshold: int = proto.Field( - proto.INT32, - number=403212361, - optional=True, + + +class InsertPublicAdvertisedPrefixeRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.Insert. 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. + public_advertised_prefix_resource (google.cloud.compute_v1beta.types.PublicAdvertisedPrefix): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - http2_health_check: "HTTP2HealthCheck" = proto.Field( + public_advertised_prefix_resource: "PublicAdvertisedPrefix" = proto.Field( proto.MESSAGE, - number=11360986, - optional=True, - message="HTTP2HealthCheck", + number=233614223, + message="PublicAdvertisedPrefix", ) - http_health_check: "HTTPHealthCheck" = proto.Field( - proto.MESSAGE, - number=412586940, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="HTTPHealthCheck", ) - https_health_check: "HTTPSHealthCheck" = proto.Field( + + +class InsertPublicDelegatedPrefixeRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.Insert. 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. + public_delegated_prefix_resource (google.cloud.compute_v1beta.types.PublicDelegatedPrefix): + The body resource for this request + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( proto.MESSAGE, - number=436046905, - optional=True, - message="HTTPSHealthCheck", + number=47594501, + message="PublicDelegatedPrefix", ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + region: str = proto.Field( + proto.STRING, + number=138946292, ) - kind: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3292052, + number=37109963, optional=True, ) - log_config: "HealthCheckLogConfig" = proto.Field( + + +class InsertRegionAutoscalerRequest(proto.Message): + r"""A request message for RegionAutoscalers.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + autoscaler_resource (google.cloud.compute_v1beta.types.Autoscaler): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, - number=351299741, - optional=True, - message="HealthCheckLogConfig", + number=207616118, + message="Autoscaler", ) - name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=227560217, ) region: str = proto.Field( proto.STRING, number=138946292, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, ) - source_regions: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=405568475, - ) - ssl_health_check: "SSLHealthCheck" = proto.Field( - proto.MESSAGE, - number=280032440, + number=37109963, optional=True, - message="SSLHealthCheck", ) - tcp_health_check: "TCPHealthCheck" = proto.Field( + + +class InsertRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + backend_bucket_resource: "BackendBucket" = proto.Field( proto.MESSAGE, - number=469980419, - optional=True, - message="TCPHealthCheck", + number=380757784, + message="BackendBucket", ) - timeout_sec: int = proto.Field( - proto.INT32, - number=79994995, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - type_: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=3575610, - optional=True, + number=138946292, ) - unhealthy_threshold: int = proto.Field( - proto.INT32, - number=227958480, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class HealthCheckList(proto.Message): - r"""Contains a list of HealthCheck resources. +class InsertRegionBackendServiceRequest(proto.Message): + r"""A request message for RegionBackendServices.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): - A list of HealthCheck resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + backend_service_resource (google.cloud.compute_v1beta.types.BackendService): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["HealthCheck"] = proto.RepeatedField( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, - number=100526016, - message="HealthCheck", + number=347586723, + message="BackendService", ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class HealthCheckLogConfig(proto.Message): - r"""Configuration of logging on a health check. If logging is - enabled, logs will be exported to Stackdriver. +class InsertRegionCommitmentRequest(proto.Message): + r"""A request message for RegionCommitments.Insert. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - enable (bool): - Indicates whether or not to export logs. This - is false by default, which means no health check - logging will be done. + commitment_resource (google.cloud.compute_v1beta.types.Commitment): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_enable``. + This field is a member of `oneof`_ ``_request_id``. """ - enable: bool = proto.Field( - proto.BOOL, - number=311764355, + commitment_resource: "Commitment" = proto.Field( + proto.MESSAGE, + number=244240888, + message="Commitment", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class HealthCheckReference(proto.Message): - r"""A full or valid partial URL to a health check. For example, - the following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check - - projects/project-id/global/httpHealthChecks/health-check - - global/httpHealthChecks/health-check +class InsertRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Insert. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check (str): + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_health_check``. + This field is a member of `oneof`_ ``_request_id``. """ - health_check: str = proto.Field( + composite_health_check_resource: "CompositeHealthCheck" = proto.Field( + proto.MESSAGE, + number=132195824, + message="CompositeHealthCheck", + ) + project: str = proto.Field( proto.STRING, - number=308876645, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class HealthCheckService(proto.Message): - r"""Represents a Health-Check as a Service resource. +class InsertRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + disk_resource (google.cloud.compute_v1beta.types.Disk): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + This field is a member of `oneof`_ ``_request_id``. + source_image (str): + Source image to restore onto a disk. This + field is optional. - This field is a member of `oneof`_ ``_description``. - fingerprint (str): - Fingerprint of this resource. A hash of the - contents stored in this object. This field is - used in optimistic locking. This field will be - ignored when inserting a HealthCheckService. An - up-to-date fingerprint must be provided in order - to patch/update the HealthCheckService; - Otherwise, the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve the - HealthCheckService. + This field is a member of `oneof`_ ``_source_image``. + """ - This field is a member of `oneof`_ ``_fingerprint``. - health_checks (MutableSequence[str]): - A list of URLs to the HealthCheck resources. Must have at - least one HealthCheck, and not more than 10 for regional - HealthCheckService, and not more than 1 for global - HealthCheckService. HealthCheck resources must have - portSpecification=USE_SERVING_PORT or - portSpecification=USE_FIXED_PORT. For regional - HealthCheckService, the HealthCheck must be regional and in - the same region. For global HealthCheckService, HealthCheck - must be global. Mix of regional and global HealthChecks is - not supported. Multiple regional HealthChecks must belong to - the same region. Regional HealthChecks must belong to the - same region as zones of NetworkEndpointGroups. For global - HealthCheckService using global INTERNET_IP_PORT - NetworkEndpointGroups, the global HealthChecks must specify - sourceRegions, and HealthChecks that specify sourceRegions - can only be used with global INTERNET_IP_PORT - NetworkEndpointGroups. - health_status_aggregation_policy (str): - Optional. Policy for how the results from multiple health - checks for the same endpoint are aggregated. Defaults to - NO_AGGREGATION if unspecified. - NO_AGGREGATION. An - EndpointHealth message is returned for each pair in the - health check service. - AND. If any health check of an - endpoint reports UNHEALTHY, then UNHEALTHY is the - HealthState of the endpoint. If all health checks report - HEALTHY, the HealthState of the endpoint is HEALTHY. . This - is only allowed with regional HealthCheckService. Check the - HealthStatusAggregationPolicy enum for the list of possible - values. + disk_resource: "Disk" = proto.Field( + proto.MESSAGE, + number=25880688, + message="Disk", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + source_image: str = proto.Field( + proto.STRING, + number=50443319, + optional=True, + ) - This field is a member of `oneof`_ ``_health_status_aggregation_policy``. - health_status_aggregation_strategy (str): - This field is deprecated. Use - health_status_aggregation_policy instead. Policy for how the - results from multiple health checks for the same endpoint - are aggregated. - NO_AGGREGATION. An EndpointHealth message - is returned for each backend in the health check service. - - AND. If any backend's health check reports UNHEALTHY, then - UNHEALTHY is the HealthState of the entire health check - service. If all backend's are healthy, the HealthState of - the health check service is HEALTHY. . Check the - HealthStatusAggregationStrategy enum for the list of - possible values. - This field is a member of `oneof`_ ``_health_status_aggregation_strategy``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. +class InsertRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Insert. + See the method description for details. - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output only] Type of the resource. Always - compute#healthCheckServicefor health check services. - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_name``. - network_endpoint_groups (MutableSequence[str]): - A list of URLs to the NetworkEndpointGroup resources. Must - not have more than 100. For regional HealthCheckService, - NEGs must be in zones in the region of the - HealthCheckService. For global HealthCheckServices, the - NetworkEndpointGroups must be global INTERNET_IP_PORT. - notification_endpoints (MutableSequence[str]): - A list of URLs to the NotificationEndpoint - resources. Must not have more than 10. A list of - endpoints for receiving notifications of change - in health status. For regional - HealthCheckService, NotificationEndpoint must be - regional and in the same region. For global - HealthCheckService, NotificationEndpoint must be - global. + Attributes: + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + project (str): + Project ID for this request. region (str): - [Output Only] URL of the region where the health check - service resides. This field is not applicable to global - health check services. You must specify this field as part - of the HTTP request URL. It is not settable as a field in - the request body. - - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_self_link``. + This field is a member of `oneof`_ ``_request_id``. """ - class HealthStatusAggregationPolicy(proto.Enum): - r"""Optional. Policy for how the results from multiple health checks for - the same endpoint are aggregated. Defaults to NO_AGGREGATION if - unspecified. - NO_AGGREGATION. An EndpointHealth message is returned - for each pair in the health check service. - AND. If any health - check of an endpoint reports UNHEALTHY, then UNHEALTHY is the - HealthState of the endpoint. If all health checks report HEALTHY, - the HealthState of the endpoint is HEALTHY. . This is only allowed - with regional HealthCheckService. Additional supported values which - may be not listed in the enum directly due to technical reasons: AND - NO_AGGREGATION - - Values: - UNDEFINED_HEALTH_STATUS_AGGREGATION_POLICY (0): - A value indicating that the enum field is not - set. - AND (64951): - No description available. - NO_AGGREGATION (426445124): - No description available. - """ - UNDEFINED_HEALTH_STATUS_AGGREGATION_POLICY = 0 - AND = 64951 - NO_AGGREGATION = 426445124 - - class HealthStatusAggregationStrategy(proto.Enum): - r"""This field is deprecated. Use health_status_aggregation_policy - instead. Policy for how the results from multiple health checks for - the same endpoint are aggregated. - NO_AGGREGATION. An - EndpointHealth message is returned for each backend in the health - check service. - AND. If any backend's health check reports - UNHEALTHY, then UNHEALTHY is the HealthState of the entire health - check service. If all backend's are healthy, the HealthState of the - health check service is HEALTHY. . Additional supported values which - may be not listed in the enum directly due to technical reasons: AND - NO_AGGREGATION - - Values: - UNDEFINED_HEALTH_STATUS_AGGREGATION_STRATEGY (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_HEALTH_STATUS_AGGREGATION_STRATEGY = 0 - - creation_timestamp: str = proto.Field( + health_aggregation_policy_resource: "HealthAggregationPolicy" = proto.Field( + proto.MESSAGE, + number=293526971, + message="HealthAggregationPolicy", + ) + project: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=227560217, ) - description: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=138946292, ) - fingerprint: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=234678500, + number=37109963, optional=True, ) - health_checks: MutableSequence[str] = proto.RepeatedField( + + +class InsertRegionHealthCheckRequest(proto.Message): + r"""A request message for RegionHealthChecks.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_check_resource (google.cloud.compute_v1beta.types.HealthCheck): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_check_resource: "HealthCheck" = proto.Field( + proto.MESSAGE, + number=201925032, + message="HealthCheck", + ) + project: str = proto.Field( proto.STRING, - number=448370606, + number=227560217, ) - health_status_aggregation_policy: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=253163129, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) - health_status_aggregation_strategy: str = proto.Field( + + +class InsertRegionHealthCheckServiceRequest(proto.Message): + r"""A request message for RegionHealthCheckServices.Insert. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_check_service_resource (google.cloud.compute_v1beta.types.HealthCheckService): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_check_service_resource: "HealthCheckService" = proto.Field( + proto.MESSAGE, + number=477367794, + message="HealthCheckService", + ) + project: str = proto.Field( proto.STRING, - number=254394106, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=227560217, ) - kind: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=138946292, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, + number=37109963, optional=True, ) - network_endpoint_groups: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=29346733, + + +class InsertRegionHealthSourceRequest(proto.Message): + r"""A request message for RegionHealthSources.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_source_resource (google.cloud.compute_v1beta.types.HealthSource): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_source_resource: "HealthSource" = proto.Field( + proto.MESSAGE, + number=357735375, + message="HealthSource", ) - notification_endpoints: MutableSequence[str] = proto.RepeatedField( + project: str = proto.Field( proto.STRING, - number=406728490, + number=227560217, ) region: str = proto.Field( proto.STRING, number=138946292, - optional=True, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) -class HealthCheckServiceReference(proto.Message): - r"""A full or valid partial URL to a health check service. For - example, the following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service - - - projects/project-id/regions/us-west1/healthCheckServices/health-check-service - - regions/us-west1/healthCheckServices/health-check-service +class InsertRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.Insert. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check_service (str): + instance_group_manager_resource (google.cloud.compute_v1beta.types.InstanceGroupManager): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_health_check_service``. + This field is a member of `oneof`_ ``_request_id``. """ - health_check_service: str = proto.Field( + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( + proto.MESSAGE, + number=261063946, + message="InstanceGroupManager", + ) + project: str = proto.Field( proto.STRING, - number=408374747, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class HealthCheckServicesList(proto.Message): - r""" +class InsertRegionInstanceGroupManagerResizeRequestRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagerResizeRequests.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.HealthCheckService]): - A list of HealthCheckService resources. - kind (str): - [Output Only] Type of the resource. Always - compute#healthCheckServicesList for lists of - HealthCheckServices. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + instance_group_manager (str): + Name of the managed instance group to which + the resize request is scoped. Name should + conform to RFC1035 or be a resource ID. + instance_group_manager_resize_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region + scoping this request. Name should conform to + RFC1035. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=249363395, ) - items: MutableSequence["HealthCheckService"] = proto.RepeatedField( + instance_group_manager_resize_request_resource: "InstanceGroupManagerResizeRequest" = proto.Field( proto.MESSAGE, - number=100526016, - message="HealthCheckService", + number=468541293, + message="InstanceGroupManagerResizeRequest", ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class HealthChecksAggregatedList(proto.Message): - r""" +class InsertRegionInstanceTemplateRequest(proto.Message): + r"""A request message for RegionInstanceTemplates.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthChecksScopedList]): - A list of HealthChecksScopedList resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + instance_template_resource (google.cloud.compute_v1beta.types.InstanceTemplate): + The body resource for this request + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, + instance_template_resource: "InstanceTemplate" = proto.Field( + proto.MESSAGE, + number=10679561, + message="InstanceTemplate", ) - items: MutableMapping[str, "HealthChecksScopedList"] = proto.MapField( + project: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=100526016, - message="HealthChecksScopedList", + number=227560217, ) - kind: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=138946292, ) - next_page_token: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=79797525, + number=37109963, optional=True, ) - self_link: str = proto.Field( + + +class InsertRegionInstantSnapshotRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instant_snapshot_resource (google.cloud.compute_v1beta.types.InstantSnapshot): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + instant_snapshot_resource: "InstantSnapshot" = proto.Field( + proto.MESSAGE, + number=383915339, + message="InstantSnapshot", + ) + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + region: str = proto.Field( proto.STRING, - number=243372063, + number=138946292, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", ) -class HealthChecksScopedList(proto.Message): - r""" +class InsertRegionMultiMigRequest(proto.Message): + r"""A request message for RegionMultiMigs.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheck]): - A list of HealthChecks contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of backend services when the list is empty. + multi_mig_resource (google.cloud.compute_v1beta.types.MultiMig): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents you from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - health_checks: MutableSequence["HealthCheck"] = proto.RepeatedField( + multi_mig_resource: "MultiMig" = proto.Field( proto.MESSAGE, - number=448370606, - message="HealthCheck", + number=173722824, + message="MultiMig", ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", ) -class HealthSource(proto.Message): - r"""Represents a health source. A health source resource - specifies the source resources and the health aggregation policy - applied to the source resources to determine the aggregated - health status. +class InsertRegionNetworkEndpointGroupRequest(proto.Message): + r"""A request message for RegionNetworkEndpointGroups.Insert. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): + The body resource for this request + project (str): + Project ID for this request. + region (str): + The name of the region where + you want to create the network endpoint group. + It should comply with RFC1035. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + This field is a member of `oneof`_ ``_request_id``. + """ - This field is a member of `oneof`_ ``_description``. - fingerprint (str): - Fingerprint of this resource. A hash of the - contents stored in this object. This field is - used in optimistic locking. This field will be - ignored when inserting a HealthSource. An - up-to-date fingerprint must be provided in order - to patch the HealthSource; Otherwise, the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve the - HealthSource. + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( + proto.MESSAGE, + number=525788839, + message="NetworkEndpointGroup", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) - This field is a member of `oneof`_ ``_fingerprint``. - health_aggregation_policy (str): - URL to the HealthAggregationPolicy resource. - Must be set. Must be regional and in the same - region as the HealthSource. Can be mutated. - This field is a member of `oneof`_ ``_health_aggregation_policy``. - id (int): - [Output Only] A unique identifier for this resource type. - The server generates this identifier. +class InsertRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for RegionNetworkFirewallPolicies.Insert. + See the method description for details. - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#healthSource for health sources. - This field is a member of `oneof`_ ``_kind``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_name``. + Attributes: + firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): + The body resource for this request + project (str): + Project ID for this request. region (str): - [Output Only] URL of the region where the health source - resides. This field applies only to the regional resource. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. - - This field is a member of `oneof`_ ``_region``. - self_link (str): - [Output Only] Server-defined URL for the resource. - - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL with id for the resource. - - This field is a member of `oneof`_ ``_self_link_with_id``. - source_type (str): - Specifies the type of the HealthSource. The only allowed - value is BACKEND_SERVICE. Must be specified when the - HealthSource is created, and cannot be mutated. Check the - SourceType enum for the list of possible values. + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_source_type``. - sources (MutableSequence[str]): - URLs to the source resources. Must be size 1. Must be a - BackendService if the sourceType is BACKEND_SERVICE. The - BackendService must have load balancing scheme INTERNAL or - INTERNAL_MANAGED and must be regional and in the same region - as the HealthSource (cross-region deployment for - INTERNAL_MANAGED is not supported). The BackendService may - use only IGs, MIGs, or NEGs of type GCE_VM_IP or - GCE_VM_IP_PORT. The BackendService may not use haPolicy. Can - be mutated. + This field is a member of `oneof`_ ``_request_id``. """ - class SourceType(proto.Enum): - r"""Specifies the type of the HealthSource. The only allowed value is - BACKEND_SERVICE. Must be specified when the HealthSource is created, - and cannot be mutated. - - Values: - UNDEFINED_SOURCE_TYPE (0): - A value indicating that the enum field is not - set. - BACKEND_SERVICE (285792202): - No description available. - """ - UNDEFINED_SOURCE_TYPE = 0 - BACKEND_SERVICE = 285792202 - - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, + firewall_policy_resource: "FirewallPolicy" = proto.Field( + proto.MESSAGE, + number=495049532, + message="FirewallPolicy", ) - description: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=227560217, ) - fingerprint: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=234678500, - optional=True, + number=138946292, ) - health_aggregation_policy: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=240314354, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, + number=37109963, optional=True, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, + + +class InsertRegionNetworkPolicyRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + network_policy_resource (google.cloud.compute_v1beta.types.NetworkPolicy): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + network_policy_resource: "NetworkPolicy" = proto.Field( + proto.MESSAGE, + number=437886058, + message="NetworkPolicy", ) - name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=227560217, ) region: str = proto.Field( proto.STRING, number=138946292, - optional=True, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - self_link_with_id: str = proto.Field( + + +class InsertRegionNotificationEndpointRequest(proto.Message): + r"""A request message for RegionNotificationEndpoints.Insert. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + notification_endpoint_resource (google.cloud.compute_v1beta.types.NotificationEndpoint): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + notification_endpoint_resource: "NotificationEndpoint" = proto.Field( + proto.MESSAGE, + number=338459940, + message="NotificationEndpoint", + ) + project: str = proto.Field( proto.STRING, - number=44520962, - optional=True, + number=227560217, ) - source_type: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=452245726, - optional=True, + number=138946292, ) - sources: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=125606840, + number=37109963, + optional=True, ) -class HealthSourceAggregatedList(proto.Message): - r"""Contains a list of HealthSourcesScopedList. +class InsertRegionSecurityPolicyRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.HealthSourcesScopedList]): - A list of HealthSourcesScopedList resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_request_id``. + security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): + The body resource for this request + validate_only (bool): + If true, the request will not be committed. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_validate_only``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "HealthSourcesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="HealthSourcesScopedList", - ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - warning: "Warning" = proto.Field( + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, - number=50704284, + number=216159612, + message="SecurityPolicy", + ) + validate_only: bool = proto.Field( + proto.BOOL, + number=242744629, optional=True, - message="Warning", ) -class HealthSourceList(proto.Message): - r""" +class InsertRegionSnapshotRequest(proto.Message): + r"""A request message for RegionSnapshots.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.HealthSource]): - A list of HealthSource resources. - kind (str): - [Output Only] Type of the resource. Always - compute#healthSource for health sources. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): + The body resource for this request """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3355, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) - items: MutableSequence["HealthSource"] = proto.RepeatedField( + snapshot_resource: "Snapshot" = proto.Field( proto.MESSAGE, - number=100526016, - message="HealthSource", + number=481319977, + message="Snapshot", ) - kind: str = proto.Field( + + +class InsertRegionSslCertificateRequest(proto.Message): + r"""A request message for RegionSslCertificates.Insert. 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. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): + The body resource for this request + """ + + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=138946292, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, + number=37109963, optional=True, ) - warning: "Warning" = proto.Field( + ssl_certificate_resource: "SslCertificate" = proto.Field( proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=180709897, + message="SslCertificate", ) -class HealthSourcesScopedList(proto.Message): - r""" +class InsertRegionSslPolicyRequest(proto.Message): + r"""A request message for RegionSslPolicies.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_sources (MutableSequence[google.cloud.compute_v1beta.types.HealthSource]): - A list of HealthSources contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of health sources when the list is empty. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): + The body resource for this request """ - health_sources: MutableSequence["HealthSource"] = proto.RepeatedField( - proto.MESSAGE, - number=397879509, - message="HealthSource", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", + ) + ssl_policy_resource: "SslPolicy" = proto.Field( + proto.MESSAGE, + number=274891848, + message="SslPolicy", ) -class HealthStatus(proto.Message): - r""" +class InsertRegionTargetHttpProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpProxies.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - annotations (MutableMapping[str, str]): - Metadata defined as annotations for network - endpoint. - forwarding_rule (str): - URL of the forwarding rule associated with - the health status of the instance. - - This field is a member of `oneof`_ ``_forwarding_rule``. - forwarding_rule_ip (str): - A forwarding rule IP address assigned to this - instance. - - This field is a member of `oneof`_ ``_forwarding_rule_ip``. - health_state (str): - Health state of the IPv4 address of the - instance. Check the HealthState enum for the - list of possible values. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_health_state``. - instance (str): - URL of the instance resource. + This field is a member of `oneof`_ ``_request_id``. + target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): + The body resource for this request + """ - This field is a member of `oneof`_ ``_instance``. - ip_address (str): - For target pool based Network Load Balancing, - it indicates the forwarding rule's IP address - assigned to this instance. For other types of - load balancing, the field indicates VM internal - ip. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + target_http_proxy_resource: "TargetHttpProxy" = proto.Field( + proto.MESSAGE, + number=24696744, + message="TargetHttpProxy", + ) - This field is a member of `oneof`_ ``_ip_address``. - ipv6_address (str): - This field is a member of `oneof`_ ``_ipv6_address``. - ipv6_health_state (str): - Health state of the IPv6 address of the - instance. Check the Ipv6HealthState enum for the - list of possible values. +class InsertRegionTargetHttpsProxyRequest(proto.Message): + r"""A request message for RegionTargetHttpsProxies.Insert. See + the method description for details. - This field is a member of `oneof`_ ``_ipv6_health_state``. - port (int): - The named port of the instance group, not - necessarily the port that is health-checked. - This field is a member of `oneof`_ ``_port``. - weight (str): + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_weight``. - weight_error (str): - Check the WeightError enum for the list of - possible values. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_weight_error``. + This field is a member of `oneof`_ ``_request_id``. + target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): + The body resource for this request """ - class HealthState(proto.Enum): - r"""Health state of the IPv4 address of the instance. - Additional supported values which may be not listed in the enum - directly due to technical reasons: - - HEALTHY - UNHEALTHY - - Values: - UNDEFINED_HEALTH_STATE (0): - A value indicating that the enum field is not - set. - HEALTHY (439801213): - No description available. - UNHEALTHY (462118084): - No description available. - """ - UNDEFINED_HEALTH_STATE = 0 - HEALTHY = 439801213 - UNHEALTHY = 462118084 + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( + proto.MESSAGE, + number=433657473, + message="TargetHttpsProxy", + ) - class Ipv6HealthState(proto.Enum): - r"""Health state of the IPv6 address of the instance. - Additional supported values which may be not listed in the enum - directly due to technical reasons: - HEALTHY - UNHEALTHY +class InsertRegionTargetTcpProxyRequest(proto.Message): + r"""A request message for RegionTargetTcpProxies.Insert. See the + method description for details. - Values: - UNDEFINED_IPV6_HEALTH_STATE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_IPV6_HEALTH_STATE = 0 - class WeightError(proto.Enum): - r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Values: - UNDEFINED_WEIGHT_ERROR (0): - A value indicating that the enum field is not - set. - INVALID_WEIGHT (383698400): - The response to a Health Check probe had the - HTTP response header field - X-Load-Balancing-Endpoint-Weight, but its - content was invalid (i.e., not a non-negative - single-precision floating-point number in - decimal string representation). - MISSING_WEIGHT (384027537): - The response to a Health Check probe did not - have the HTTP response header field - X-Load-Balancing-Endpoint-Weight. - UNAVAILABLE_WEIGHT (439464295): - This is the value when the accompanied health - status is either TIMEOUT (i.e.,the Health Check - probe was not able to get a response in time) or - UNKNOWN. For the latter, it should be typically - because there has not been sufficient time to - parse and report the weight for a new backend - (which is with 0.0.0.0 ip address). However, it - can be also due to an outage case for which the - health status is explicitly reset to UNKNOWN. - WEIGHT_NONE (502428831): - This is the default value when WeightReportMode is DISABLE, - and is also the initial value when WeightReportMode has just - updated to ENABLE or DRY_RUN and there has not been - sufficient time to parse and report the backend weight. - """ - UNDEFINED_WEIGHT_ERROR = 0 - INVALID_WEIGHT = 383698400 - MISSING_WEIGHT = 384027537 - UNAVAILABLE_WEIGHT = 439464295 - WEIGHT_NONE = 502428831 + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - annotations: MutableMapping[str, str] = proto.MapField( - proto.STRING, + This field is a member of `oneof`_ ``_request_id``. + target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): + The body resource for this request + """ + + project: str = proto.Field( proto.STRING, - number=112032548, + number=227560217, ) - forwarding_rule: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=269964030, - optional=True, + number=138946292, ) - forwarding_rule_ip: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=172250632, + number=37109963, optional=True, ) - health_state: str = proto.Field( - proto.STRING, - number=324007150, - optional=True, + target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( + proto.MESSAGE, + number=145913931, + message="TargetTcpProxy", ) - instance: str = proto.Field( + + +class InsertRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.Insert. 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. + region (str): + Name of the region scoping this request. + request_id (str): + begin_interface: MixerMutationRequestBuilder Request ID to + support idempotency. + + This field is a member of `oneof`_ ``_request_id``. + url_map_resource (google.cloud.compute_v1beta.types.UrlMap): + The body resource for this request + """ + + project: str = proto.Field( proto.STRING, - number=18257045, - optional=True, + number=227560217, ) - ip_address: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=406272220, - optional=True, + number=138946292, ) - ipv6_address: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=341563804, + number=37109963, optional=True, ) - ipv6_health_state: str = proto.Field( - proto.STRING, - number=190316614, - optional=True, + url_map_resource: "UrlMap" = proto.Field( + proto.MESSAGE, + number=168675425, + message="UrlMap", ) - port: int = proto.Field( - proto.INT32, - number=3446913, - optional=True, + + +class InsertReservationRequest(proto.Message): + r"""A request message for Reservations.Insert. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + reservation_resource (google.cloud.compute_v1beta.types.Reservation): + The body resource for this request + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - weight: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=282149496, + number=37109963, optional=True, ) - weight_error: str = proto.Field( + reservation_resource: "Reservation" = proto.Field( + proto.MESSAGE, + number=285030177, + message="Reservation", + ) + zone: str = proto.Field( proto.STRING, - number=522501505, - optional=True, + number=3744684, ) -class HealthStatusForNetworkEndpoint(proto.Message): - r""" +class InsertResourcePolicyRequest(proto.Message): + r"""A request message for ResourcePolicies.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (google.cloud.compute_v1beta.types.BackendServiceReference): - URL of the backend service associated with - the health state of the network endpoint. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_backend_service``. - forwarding_rule (google.cloud.compute_v1beta.types.ForwardingRuleReference): - URL of the forwarding rule associated with - the health state of the network endpoint. + This field is a member of `oneof`_ ``_request_id``. + resource_policy_resource (google.cloud.compute_v1beta.types.ResourcePolicy): + The body resource for this request + """ - This field is a member of `oneof`_ ``_forwarding_rule``. - health_check (google.cloud.compute_v1beta.types.HealthCheckReference): - URL of the health check associated with the - health state of the network endpoint. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + resource_policy_resource: "ResourcePolicy" = proto.Field( + proto.MESSAGE, + number=76826186, + message="ResourcePolicy", + ) - This field is a member of `oneof`_ ``_health_check``. - health_check_service (google.cloud.compute_v1beta.types.HealthCheckServiceReference): - URL of the health check service associated - with the health state of the network endpoint. - This field is a member of `oneof`_ ``_health_check_service``. - health_state (str): - Health state of the network endpoint - determined based on the health checks - configured. Check the HealthState enum for the - list of possible values. +class InsertRolloutPlanRequest(proto.Message): + r"""A request message for RolloutPlans.Insert. See the method + description for details. - This field is a member of `oneof`_ ``_health_state``. - ipv6_health_state (str): - Health state of the ipv6 network endpoint - determined based on the health checks - configured. Check the Ipv6HealthState enum for - the list of possible values. - This field is a member of `oneof`_ ``_ipv6_health_state``. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + rollout_plan_resource (google.cloud.compute_v1beta.types.RolloutPlan): + The body resource for this request """ - class HealthState(proto.Enum): - r"""Health state of the network endpoint determined based on the - health checks configured. Additional supported values which may - be not listed in the enum directly due to technical reasons: + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + rollout_plan_resource: "RolloutPlan" = proto.Field( + proto.MESSAGE, + number=38629974, + message="RolloutPlan", + ) - DRAINING - HEALTHY - UNHEALTHY - UNKNOWN - Values: - UNDEFINED_HEALTH_STATE (0): - A value indicating that the enum field is not - set. - DRAINING (480455402): - No description available. - HEALTHY (439801213): - No description available. - UNHEALTHY (462118084): - No description available. - UNKNOWN (433141802): - No description available. - """ - UNDEFINED_HEALTH_STATE = 0 - DRAINING = 480455402 - HEALTHY = 439801213 - UNHEALTHY = 462118084 - UNKNOWN = 433141802 +class InsertRouteRequest(proto.Message): + r"""A request message for Routes.Insert. See the method + description for details. - class Ipv6HealthState(proto.Enum): - r"""Health state of the ipv6 network endpoint determined based on - the health checks configured. Additional supported values which - may be not listed in the enum directly due to technical reasons: - DRAINING - HEALTHY - UNHEALTHY - UNKNOWN + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Values: - UNDEFINED_IPV6_HEALTH_STATE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_IPV6_HEALTH_STATE = 0 + Attributes: + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - backend_service: "BackendServiceReference" = proto.Field( - proto.MESSAGE, - number=306946058, - optional=True, - message="BackendServiceReference", + This field is a member of `oneof`_ ``_request_id``. + route_resource (google.cloud.compute_v1beta.types.Route): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - forwarding_rule: "ForwardingRuleReference" = proto.Field( - proto.MESSAGE, - number=269964030, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="ForwardingRuleReference", ) - health_check: "HealthCheckReference" = proto.Field( + route_resource: "Route" = proto.Field( proto.MESSAGE, - number=308876645, - optional=True, - message="HealthCheckReference", + number=225428804, + message="Route", ) - health_check_service: "HealthCheckServiceReference" = proto.Field( - proto.MESSAGE, - number=408374747, - optional=True, - message="HealthCheckServiceReference", + + +class InsertRouterRequest(proto.Message): + r"""A request message for Routers.Insert. 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. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + router_resource (google.cloud.compute_v1beta.types.Router): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - health_state: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=324007150, - optional=True, + number=138946292, ) - ipv6_health_state: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=190316614, + number=37109963, optional=True, ) + router_resource: "Router" = proto.Field( + proto.MESSAGE, + number=155222084, + message="Router", + ) -class Help(proto.Message): - r"""Provides links to documentation or for performing an out of - band action. For example, if a quota check failed with an error - indicating the calling project hasn't enabled the accessed - service, this can contain a URL pointing directly to the right - place in the developer console to flip the bit. +class InsertSecurityPolicyRequest(proto.Message): + r"""A request message for SecurityPolicies.Insert. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - links (MutableSequence[google.cloud.compute_v1beta.types.HelpLink]): - URL(s) pointing to additional information on - handling the current error. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): + The body resource for this request + validate_only (bool): + If true, the request will not be committed. + + This field is a member of `oneof`_ ``_validate_only``. """ - links: MutableSequence["HelpLink"] = proto.RepeatedField( + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, - number=102977465, - message="HelpLink", + number=216159612, + message="SecurityPolicy", + ) + validate_only: bool = proto.Field( + proto.BOOL, + number=242744629, + optional=True, ) -class HelpLink(proto.Message): - r"""Describes a URL link. +class InsertServiceAttachmentRequest(proto.Message): + r"""A request message for ServiceAttachments.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - Describes what the link offers. - - This field is a member of `oneof`_ ``_description``. - url (str): - The URL of the link. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_url``. + This field is a member of `oneof`_ ``_request_id``. + service_attachment_resource (google.cloud.compute_v1beta.types.ServiceAttachment): + The body resource for this request """ - description: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=227560217, ) - url: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=116079, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + service_attachment_resource: "ServiceAttachment" = proto.Field( + proto.MESSAGE, + number=472980256, + message="ServiceAttachment", + ) -class HostRule(proto.Message): - r"""UrlMaps A host-matching rule for a URL. If matched, will use - the named PathMatcher to select the BackendService. +class InsertSnapshotRequest(proto.Message): + r"""A request message for Snapshots.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - hosts (MutableSequence[str]): - The list of host patterns to match. They must be valid - hostnames with optional port numbers in the format - host:port. \* matches any string of ([a-z0-9-.]\*). In that - case, \* must be the first character, and if followed by - anything, the immediate following character must be either - - or .. \* based matching is not supported when the URL map is - bound to a target gRPC proxy that has the - validateForProxyless field set to true. - path_matcher (str): - The name of the PathMatcher to use to match - the path portion of the URL if the hostRule - matches the URL's host portion. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_path_matcher``. + This field is a member of `oneof`_ ``_request_id``. + snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): + The body resource for this request """ - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - hosts: MutableSequence[str] = proto.RepeatedField( + project: str = proto.Field( proto.STRING, - number=99467211, + number=227560217, ) - path_matcher: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=337813272, + number=37109963, optional=True, ) + snapshot_resource: "Snapshot" = proto.Field( + proto.MESSAGE, + number=481319977, + message="Snapshot", + ) -class HttpFaultAbort(proto.Message): - r"""Specification for how requests are aborted as part of fault - injection. +class InsertSslCertificateRequest(proto.Message): + r"""A request message for SslCertificates.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - http_status (int): - The HTTP status code used to abort the - request. The value must be from 200 to 599 - inclusive. For gRPC protocol, the gRPC status - code is mapped to HTTP status code according to - this mapping table. HTTP status 200 is mapped to - gRPC status UNKNOWN. Injecting an OK status is - currently not supported by Traffic Director. - - This field is a member of `oneof`_ ``_http_status``. - percentage (float): - The percentage of traffic for connections, - operations, or requests that is aborted as part - of fault injection. The value must be from 0.0 - to 100.0 inclusive. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_percentage``. + This field is a member of `oneof`_ ``_request_id``. + ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): + The body resource for this request """ - http_status: int = proto.Field( - proto.UINT32, - number=468949897, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - percentage: float = proto.Field( - proto.DOUBLE, - number=151909018, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + ssl_certificate_resource: "SslCertificate" = proto.Field( + proto.MESSAGE, + number=180709897, + message="SslCertificate", + ) -class HttpFaultDelay(proto.Message): - r"""Specifies the delay introduced by the load balancer before - forwarding the request to the backend service as part of fault - injection. +class InsertSslPolicyRequest(proto.Message): + r"""A request message for SslPolicies.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fixed_delay (google.cloud.compute_v1beta.types.Duration): - Specifies the value of the fixed delay - interval. - - This field is a member of `oneof`_ ``_fixed_delay``. - percentage (float): - The percentage of traffic for connections, - operations, or requests for which a delay is - introduced as part of fault injection. The value - must be from 0.0 to 100.0 inclusive. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_percentage``. + This field is a member of `oneof`_ ``_request_id``. + ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): + The body resource for this request """ - fixed_delay: "Duration" = proto.Field( - proto.MESSAGE, - number=317037816, - optional=True, - message="Duration", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - percentage: float = proto.Field( - proto.DOUBLE, - number=151909018, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + ssl_policy_resource: "SslPolicy" = proto.Field( + proto.MESSAGE, + number=274891848, + message="SslPolicy", + ) -class HttpFaultInjection(proto.Message): - r"""The specification for fault injection introduced into traffic - to test the resiliency of clients to backend service failure. As - part of fault injection, when clients send requests to a backend - service, delays can be introduced by the load balancer on a - percentage of requests before sending those request to the - backend service. Similarly requests from clients can be aborted - by the load balancer for a percentage of requests. +class InsertStoragePoolRequest(proto.Message): + r"""A request message for StoragePools.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - abort (google.cloud.compute_v1beta.types.HttpFaultAbort): - The specification for how client requests are - aborted as part of fault injection. - - This field is a member of `oneof`_ ``_abort``. - delay (google.cloud.compute_v1beta.types.HttpFaultDelay): - The specification for how client requests are - delayed as part of fault injection, before being - sent to a backend service. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_delay``. + This field is a member of `oneof`_ ``_request_id``. + storage_pool_resource (google.cloud.compute_v1beta.types.StoragePool): + The body resource for this request + zone (str): + The name of the zone for this request. """ - abort: "HttpFaultAbort" = proto.Field( - proto.MESSAGE, - number=92611376, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="HttpFaultAbort", ) - delay: "HttpFaultDelay" = proto.Field( + storage_pool_resource: "StoragePool" = proto.Field( proto.MESSAGE, - number=95467907, - optional=True, - message="HttpFaultDelay", + number=157179405, + message="StoragePool", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class HttpFilterConfig(proto.Message): - r"""HttpFilterConfiguration supplies additional contextual - settings for networkservices.HttpFilter resources enabled by - Traffic Director. +class InsertSubnetworkRequest(proto.Message): + r"""A request message for Subnetworks.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - config (str): - The configuration needed to enable the - networkservices.HttpFilter resource. The - configuration must be YAML formatted and only - contain fields defined in the protobuf - identified in configTypeUrl - - This field is a member of `oneof`_ ``_config``. - config_type_url (str): - The fully qualified versioned proto3 type url - of the protobuf that the filter expects for its - contextual settings, for example: - type.googleapis.com/google.protobuf.Struct - - This field is a member of `oneof`_ ``_config_type_url``. - filter_name (str): - Name of the networkservices.HttpFilter - resource this configuration belongs to. This - name must be known to the xDS client. Example: - envoy.wasm + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_filter_name``. + This field is a member of `oneof`_ ``_request_id``. + subnetwork_resource (google.cloud.compute_v1beta.types.Subnetwork): + The body resource for this request """ - config: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=255820610, - optional=True, + number=227560217, ) - config_type_url: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=344821575, - optional=True, + number=138946292, ) - filter_name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=183620338, + number=37109963, optional=True, ) + subnetwork_resource: "Subnetwork" = proto.Field( + proto.MESSAGE, + number=42233151, + message="Subnetwork", + ) -class HttpHeaderAction(proto.Message): - r"""The request and response header transformations that take - effect before the request is passed along to the selected - backendService. +class InsertTargetGrpcProxyRequest(proto.Message): + r"""A request message for TargetGrpcProxies.Insert. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - request_headers_to_add (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderOption]): - Headers to add to a matching request before - forwarding the request to the backendService. - request_headers_to_remove (MutableSequence[str]): - A list of header names for headers that need - to be removed from the request before forwarding - the request to the backendService. - response_headers_to_add (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderOption]): - Headers to add the response before sending - the response back to the client. - response_headers_to_remove (MutableSequence[str]): - A list of header names for headers that need - to be removed from the response before sending - the response back to the client. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_grpc_proxy_resource (google.cloud.compute_v1beta.types.TargetGrpcProxy): + The body resource for this request """ - request_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( - proto.MESSAGE, - number=72111974, - message="HttpHeaderOption", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - request_headers_to_remove: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=218425247, + number=37109963, + optional=True, ) - response_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( + target_grpc_proxy_resource: "TargetGrpcProxy" = proto.Field( proto.MESSAGE, - number=32136052, - message="HttpHeaderOption", - ) - response_headers_to_remove: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=75415761, + number=328922450, + message="TargetGrpcProxy", ) -class HttpHeaderMatch(proto.Message): - r"""matchRule criteria for request header matches. +class InsertTargetHttpProxyRequest(proto.Message): + r"""A request message for TargetHttpProxies.Insert. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - exact_match (str): - The value should exactly match contents of - exactMatch. Only one of exactMatch, prefixMatch, - suffixMatch, regexMatch, presentMatch or - rangeMatch must be set. - - This field is a member of `oneof`_ ``_exact_match``. - header_name (str): - The name of the HTTP header to match. For matching against - the HTTP request's authority, use a headerMatch with the - header name ":authority". For matching a request's method, - use the headerName ":method". When the URL map is bound to a - target gRPC proxy that has the validateForProxyless field - set to true, only non-binary user-specified custom metadata - and the ``content-type`` header are supported. The following - transport-level headers cannot be used in header matching - rules: ``:authority``, ``:method``, ``:path``, ``:scheme``, - ``user-agent``, ``accept-encoding``, ``content-encoding``, - ``grpc-accept-encoding``, ``grpc-encoding``, - ``grpc-previous-rpc-attempts``, ``grpc-tags-bin``, - ``grpc-timeout`` and ``grpc-trace-bin``. - - This field is a member of `oneof`_ ``_header_name``. - invert_match (bool): - If set to false, the headerMatch is - considered a match if the preceding match - criteria are met. If set to true, the - headerMatch is considered a match if the - preceding match criteria are NOT met. The - default setting is false. - - This field is a member of `oneof`_ ``_invert_match``. - prefix_match (str): - The value of the header must start with the - contents of prefixMatch. Only one of exactMatch, - prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. - - This field is a member of `oneof`_ ``_prefix_match``. - present_match (bool): - A header with the contents of headerName must - exist. The match takes place whether or not the - request's header has a value. Only one of - exactMatch, prefixMatch, suffixMatch, - regexMatch, presentMatch or rangeMatch must be - set. - - This field is a member of `oneof`_ ``_present_match``. - range_match (google.cloud.compute_v1beta.types.Int64RangeMatch): - The header value must be an integer and its value must be in - the range specified in rangeMatch. If the header does not - contain an integer, number or is empty, the match fails. For - example for a range [-5, 0] - -3 will match. - 0 will not - match. - 0.25 will not match. - -3someString will not match. - Only one of exactMatch, prefixMatch, suffixMatch, - regexMatch, presentMatch or rangeMatch must be set. - rangeMatch is not supported for load balancers that have - loadBalancingScheme set to EXTERNAL. - - This field is a member of `oneof`_ ``_range_match``. - regex_match (str): - The value of the header must match the regular expression - specified in regexMatch. For more information about regular - expression syntax, see Syntax. For matching against a port - specified in the HTTP request, use a headerMatch with - headerName set to PORT and a regular expression that - satisfies the RFC2616 Host header's port specifier. Only one - of exactMatch, prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. Regular expressions - can only be used when the loadBalancingScheme is set to - INTERNAL_SELF_MANAGED. - - This field is a member of `oneof`_ ``_regex_match``. - suffix_match (str): - The value of the header must end with the - contents of suffixMatch. Only one of exactMatch, - prefixMatch, suffixMatch, regexMatch, - presentMatch or rangeMatch must be set. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_suffix_match``. + This field is a member of `oneof`_ ``_request_id``. + target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): + The body resource for this request """ - exact_match: str = proto.Field( - proto.STRING, - number=457641093, - optional=True, - ) - header_name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=110223613, - optional=True, - ) - invert_match: bool = proto.Field( - proto.BOOL, - number=501130268, - optional=True, + number=227560217, ) - prefix_match: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=257898968, - optional=True, - ) - present_match: bool = proto.Field( - proto.BOOL, - number=67435841, + number=37109963, optional=True, ) - range_match: "Int64RangeMatch" = proto.Field( + target_http_proxy_resource: "TargetHttpProxy" = proto.Field( proto.MESSAGE, - number=97244227, - optional=True, - message="Int64RangeMatch", - ) - regex_match: str = proto.Field( - proto.STRING, - number=107387853, - optional=True, - ) - suffix_match: str = proto.Field( - proto.STRING, - number=426488663, - optional=True, + number=24696744, + message="TargetHttpProxy", ) -class HttpHeaderOption(proto.Message): - r"""Specification determining how headers are added to requests - or responses. +class InsertTargetHttpsProxyRequest(proto.Message): + r"""A request message for TargetHttpsProxies.Insert. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - header_name (str): - The name of the header. - - This field is a member of `oneof`_ ``_header_name``. - header_value (str): - The value of the header to add. - - This field is a member of `oneof`_ ``_header_value``. - replace (bool): - If false, headerValue is appended to any - values that already exist for the header. If - true, headerValue is set for the header, - discarding any values that were set for that - header. The default value is true, unless a - variable is present in headerValue, in which - case the default value is false. . + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_replace``. + This field is a member of `oneof`_ ``_request_id``. + target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): + The body resource for this request """ - header_name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=110223613, - optional=True, + number=227560217, ) - header_value: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=203094335, + number=37109963, optional=True, ) - replace: bool = proto.Field( - proto.BOOL, - number=20755124, - optional=True, + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( + proto.MESSAGE, + number=433657473, + message="TargetHttpsProxy", ) -class HttpQueryParameterMatch(proto.Message): - r"""HttpRouteRuleMatch criteria for a request's query parameter. +class InsertTargetInstanceRequest(proto.Message): + r"""A request message for TargetInstances.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - exact_match (str): - The queryParameterMatch matches if the value - of the parameter exactly matches the contents of - exactMatch. Only one of presentMatch, - exactMatch, or regexMatch must be set. - - This field is a member of `oneof`_ ``_exact_match``. - name (str): - The name of the query parameter to match. The - query parameter must exist in the request, in - the absence of which the request match fails. - - This field is a member of `oneof`_ ``_name``. - present_match (bool): - Specifies that the queryParameterMatch - matches if the request contains the query - parameter, irrespective of whether the parameter - has a value or not. Only one of presentMatch, - exactMatch, or regexMatch must be set. - - This field is a member of `oneof`_ ``_present_match``. - regex_match (str): - The queryParameterMatch matches if the value of the - parameter matches the regular expression specified by - regexMatch. For more information about regular expression - syntax, see Syntax. Only one of presentMatch, exactMatch, or - regexMatch must be set. Regular expressions can only be used - when the loadBalancingScheme is set to - INTERNAL_SELF_MANAGED. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_regex_match``. + This field is a member of `oneof`_ ``_request_id``. + target_instance_resource (google.cloud.compute_v1beta.types.TargetInstance): + The body resource for this request + zone (str): + Name of the zone scoping this request. """ - exact_match: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=457641093, - optional=True, + number=227560217, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, + number=37109963, optional=True, ) - present_match: bool = proto.Field( - proto.BOOL, - number=67435841, - optional=True, + target_instance_resource: "TargetInstance" = proto.Field( + proto.MESSAGE, + number=430453066, + message="TargetInstance", ) - regex_match: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=107387853, - optional=True, + number=3744684, ) -class HttpRedirectAction(proto.Message): - r"""Specifies settings for an HTTP redirect. +class InsertTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - host_redirect (str): - The host that is used in the redirect - response instead of the one that was supplied in - the request. The value must be from 1 to 255 - characters. - - This field is a member of `oneof`_ ``_host_redirect``. - https_redirect (bool): - If set to true, the URL scheme in the - redirected request is set to HTTPS. If set to - false, the URL scheme of the redirected request - remains the same as that of the request. This - must only be set for URL maps used in - TargetHttpProxys. Setting this true for - TargetHttpsProxy is not permitted. The default - is set to false. - - This field is a member of `oneof`_ ``_https_redirect``. - path_redirect (str): - The path that is used in the redirect - response instead of the one that was supplied in - the request. pathRedirect cannot be supplied - together with prefixRedirect. Supply one alone - or neither. If neither is supplied, the path of - the original request is used for the redirect. - The value must be from 1 to 1024 characters. - - This field is a member of `oneof`_ ``_path_redirect``. - prefix_redirect (str): - The prefix that replaces the prefixMatch - specified in the HttpRouteRuleMatch, retaining - the remaining portion of the URL before - redirecting the request. prefixRedirect cannot - be supplied together with pathRedirect. Supply - one alone or neither. If neither is supplied, - the path of the original request is used for the - redirect. The value must be from 1 to 1024 - characters. - - This field is a member of `oneof`_ ``_prefix_redirect``. - redirect_response_code (str): - The HTTP Status code to use for this RedirectAction. - Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is - the default value and corresponds to 301. - FOUND, which - corresponds to 302. - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, - the request method is retained. - PERMANENT_REDIRECT, which - corresponds to 308. In this case, the request method is - retained. Check the RedirectResponseCode enum for the list - of possible values. - - This field is a member of `oneof`_ ``_redirect_response_code``. - strip_query (bool): - If set to true, any accompanying query - portion of the original URL is removed before - redirecting the request. If set to false, the - query portion of the original URL is retained. - The default is set to false. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_strip_query``. + This field is a member of `oneof`_ ``_request_id``. + target_pool_resource (google.cloud.compute_v1beta.types.TargetPool): + The body resource for this request """ - class RedirectResponseCode(proto.Enum): - r"""The HTTP Status code to use for this RedirectAction. Supported - values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value - and corresponds to 301. - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which - corresponds to 307. In this case, the request method is retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, the - request method is retained. - - Values: - UNDEFINED_REDIRECT_RESPONSE_CODE (0): - A value indicating that the enum field is not - set. - FOUND (67084130): - Http Status Code 302 - Found. - MOVED_PERMANENTLY_DEFAULT (386698449): - Http Status Code 301 - Moved Permanently. - PERMANENT_REDIRECT (382006381): - Http Status Code 308 - Permanent Redirect - maintaining HTTP method. - SEE_OTHER (445380580): - Http Status Code 303 - See Other. - TEMPORARY_REDIRECT (489550378): - Http Status Code 307 - Temporary Redirect - maintaining HTTP method. - """ - UNDEFINED_REDIRECT_RESPONSE_CODE = 0 - FOUND = 67084130 - MOVED_PERMANENTLY_DEFAULT = 386698449 - PERMANENT_REDIRECT = 382006381 - SEE_OTHER = 445380580 - TEMPORARY_REDIRECT = 489550378 - - host_redirect: str = proto.Field( - proto.STRING, - number=107417747, - optional=True, - ) - https_redirect: bool = proto.Field( - proto.BOOL, - number=170260656, - optional=True, - ) - path_redirect: str = proto.Field( - proto.STRING, - number=272342710, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - prefix_redirect: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=446184169, - optional=True, + number=138946292, ) - redirect_response_code: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=436710408, + number=37109963, optional=True, ) - strip_query: bool = proto.Field( - proto.BOOL, - number=52284641, - optional=True, + target_pool_resource: "TargetPool" = proto.Field( + proto.MESSAGE, + number=101281443, + message="TargetPool", ) -class HttpRetryPolicy(proto.Message): - r"""The retry policy associates with HttpRouteRule +class InsertTargetSslProxyRequest(proto.Message): + r"""A request message for TargetSslProxies.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - num_retries (int): - Specifies the allowed number retries. This - number must be > 0. If not specified, defaults - to 1. - - This field is a member of `oneof`_ ``_num_retries``. - per_try_timeout (google.cloud.compute_v1beta.types.Duration): - Specifies a non-zero timeout per retry - attempt. If not specified, will use the timeout - set in the HttpRouteAction field. If timeout in - the HttpRouteAction field is not set, this field - uses the largest timeout among all backend - services associated with the route. Not - supported when the URL map is bound to a target - gRPC proxy that has the validateForProxyless - field set to true. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_per_try_timeout``. - retry_conditions (MutableSequence[str]): - Specifies one or more conditions when this retry policy - applies. Valid values are: - 5xx: retry is attempted if the - instance or endpoint responds with any 5xx response code, or - if the instance or endpoint does not respond at all. For - example, disconnects, reset, read timeout, connection - failure, and refused streams. - gateway-error: Similar to - 5xx, but only applies to response codes 502, 503 or 504. - - connect-failure: a retry is attempted on failures connecting - to the instance or endpoint. For example, connection - timeouts. - retriable-4xx: a retry is attempted if the - instance or endpoint responds with a 4xx response code. The - only error that you can retry is error code 409. - - refused-stream: a retry is attempted if the instance or - endpoint resets the stream with a REFUSED_STREAM error code. - This reset type indicates that it is safe to retry. - - cancelled: a retry is attempted if the gRPC status code in - the response header is set to cancelled. - - deadline-exceeded: a retry is attempted if the gRPC status - code in the response header is set to deadline-exceeded. - - internal: a retry is attempted if the gRPC status code in - the response header is set to internal. - - resource-exhausted: a retry is attempted if the gRPC status - code in the response header is set to resource-exhausted. - - unavailable: a retry is attempted if the gRPC status code in - the response header is set to unavailable. Only the - following codes are supported when the URL map is bound to - target gRPC proxy that has validateForProxyless field set to - true. - cancelled - deadline-exceeded - internal - - resource-exhausted - unavailable + This field is a member of `oneof`_ ``_request_id``. + target_ssl_proxy_resource (google.cloud.compute_v1beta.types.TargetSslProxy): + The body resource for this request """ - num_retries: int = proto.Field( - proto.UINT32, - number=251680141, - optional=True, + project: str = proto.Field( + proto.STRING, + number=227560217, ) - per_try_timeout: "Duration" = proto.Field( - proto.MESSAGE, - number=280041147, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Duration", ) - retry_conditions: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=28815535, + target_ssl_proxy_resource: "TargetSslProxy" = proto.Field( + proto.MESSAGE, + number=142016192, + message="TargetSslProxy", ) -class HttpRouteAction(proto.Message): - r""" +class InsertTargetTcpProxyRequest(proto.Message): + r"""A request message for TargetTcpProxies.Insert. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cors_policy (google.cloud.compute_v1beta.types.CorsPolicy): - The specification for allowing client-side - cross-origin requests. For more information - about the W3C recommendation for cross-origin - resource sharing (CORS), see Fetch API Living - Standard. Not supported when the URL map is - bound to a target gRPC proxy. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_cors_policy``. - fault_injection_policy (google.cloud.compute_v1beta.types.HttpFaultInjection): - The specification for fault injection introduced into - traffic to test the resiliency of clients to backend service - failure. As part of fault injection, when clients send - requests to a backend service, delays can be introduced by a - load balancer on a percentage of requests before sending - those requests to the backend service. Similarly requests - from clients can be aborted by the load balancer for a - percentage of requests. timeout and retry_policy is ignored - by clients that are configured with a fault_injection_policy - if: 1. The traffic is generated by fault injection AND 2. - The fault injection is not a delay fault injection. Fault - injection is not supported with the classic Application Load - Balancer . To see which load balancers support fault - injection, see Load balancing: Routing and traffic - management features. + This field is a member of `oneof`_ ``_request_id``. + target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): + The body resource for this request + """ - This field is a member of `oneof`_ ``_fault_injection_policy``. - max_stream_duration (google.cloud.compute_v1beta.types.Duration): - Specifies the maximum duration (timeout) for streams on the - selected route. Unlike the timeout field where the timeout - duration starts from the time the request has been fully - processed (known as *end-of-stream*), the duration in this - field is computed from the beginning of the stream until the - response has been processed, including all retries. A stream - that does not complete in this duration is closed. If not - specified, this field uses the maximum maxStreamDuration - value among all backend services associated with the route. - This field is only allowed if the Url map is used with - backend services with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( + proto.MESSAGE, + number=145913931, + message="TargetTcpProxy", + ) - This field is a member of `oneof`_ ``_max_stream_duration``. - request_mirror_policy (google.cloud.compute_v1beta.types.RequestMirrorPolicy): - Specifies the policy on how requests intended - for the route's backends are shadowed to a - separate mirrored backend service. The load - balancer does not wait for responses from the - shadow service. Before sending traffic to the - shadow service, the host / authority header is - suffixed with -shadow. Not supported when the - URL map is bound to a target gRPC proxy that has - the validateForProxyless field set to true. - This field is a member of `oneof`_ ``_request_mirror_policy``. - retry_policy (google.cloud.compute_v1beta.types.HttpRetryPolicy): - Specifies the retry policy associated with - this route. +class InsertTargetVpnGatewayRequest(proto.Message): + r"""A request message for TargetVpnGateways.Insert. See the + method description for details. - This field is a member of `oneof`_ ``_retry_policy``. - timeout (google.cloud.compute_v1beta.types.Duration): - Specifies the timeout for the selected route. Timeout is - computed from the time the request has been fully processed - (known as *end-of-stream*) up until the response has been - processed. Timeout includes all retries. If not specified, - this field uses the largest timeout among all backend - services associated with the route. Not supported when the - URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. - This field is a member of `oneof`_ ``_timeout``. - url_rewrite (google.cloud.compute_v1beta.types.UrlRewrite): - The spec to modify the URL of the request, - before forwarding the request to the matched - service. urlRewrite is the only action supported - in UrlMaps for classic Application Load - Balancers. Not supported when the URL map is - bound to a target gRPC proxy that has the - validateForProxyless field set to true. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_url_rewrite``. - weighted_backend_services (MutableSequence[google.cloud.compute_v1beta.types.WeightedBackendService]): - A list of weighted backend services to send - traffic to when a route match occurs. The - weights determine the fraction of traffic that - flows to their corresponding backend service. If - all traffic needs to go to a single backend - service, there must be one - weightedBackendService with weight set to a - non-zero number. After a backend service is - identified and before forwarding the request to - the backend service, advanced routing actions - such as URL rewrites and header transformations - are applied depending on additional settings - specified in this HttpRouteAction. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_vpn_gateway_resource (google.cloud.compute_v1beta.types.TargetVpnGateway): + The body resource for this request """ - cors_policy: "CorsPolicy" = proto.Field( - proto.MESSAGE, - number=398943748, - optional=True, - message="CorsPolicy", - ) - fault_injection_policy: "HttpFaultInjection" = proto.Field( - proto.MESSAGE, - number=412781079, - optional=True, - message="HttpFaultInjection", - ) - max_stream_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=61428376, - optional=True, - message="Duration", - ) - request_mirror_policy: "RequestMirrorPolicy" = proto.Field( - proto.MESSAGE, - number=220196866, - optional=True, - message="RequestMirrorPolicy", - ) - retry_policy: "HttpRetryPolicy" = proto.Field( - proto.MESSAGE, - number=56799913, - optional=True, - message="HttpRetryPolicy", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - timeout: "Duration" = proto.Field( - proto.MESSAGE, - number=296701281, - optional=True, - message="Duration", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - url_rewrite: "UrlRewrite" = proto.Field( - proto.MESSAGE, - number=273333948, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="UrlRewrite", ) - weighted_backend_services: MutableSequence[ - "WeightedBackendService" - ] = proto.RepeatedField( + target_vpn_gateway_resource: "TargetVpnGateway" = proto.Field( proto.MESSAGE, - number=337028049, - message="WeightedBackendService", + number=498050, + message="TargetVpnGateway", ) -class HttpRouteRule(proto.Message): - r"""The HttpRouteRule setting specifies how to match an HTTP - request and the corresponding routing action that load balancing - proxies perform. +class InsertUrlMapRequest(proto.Message): + r"""A request message for UrlMaps.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): - customErrorResponsePolicy specifies how the Load Balancer - returns error responses when BackendServiceor BackendBucket - responds with an error. If a policy for an error code is not - configured for the RouteRule, a policy for the error code - configured in pathMatcher.defaultCustomErrorResponsePolicy - is applied. If one is not specified in - pathMatcher.defaultCustomErrorResponsePolicy, the policy - configured in UrlMap.defaultCustomErrorResponsePolicy takes - effect. For example, consider a UrlMap with the following - configuration: - UrlMap.defaultCustomErrorResponsePolicy are - configured with policies for 5xx and 4xx errors - A - RouteRule for /coming_soon/ is configured for the error code - 404. If the request is for www.myotherdomain.com and a 404 - is encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - RouteRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. When used in conjunction with - routeRules.routeAction.retryPolicy, retries take precedence. - Only once all retries are exhausted, the - customErrorResponsePolicy is applied. While attempting a - retry, if load balancer is successful in reaching the - service, the customErrorResponsePolicy is ignored and the - response from the service is returned to the client. - customErrorResponsePolicy is supported only for global - external Application Load Balancers. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_custom_error_response_policy``. - description (str): - The short description conveying the intent of - this routeRule. The description can have a - maximum length of 1024 characters. + This field is a member of `oneof`_ ``_request_id``. + url_map_resource (google.cloud.compute_v1beta.types.UrlMap): + The body resource for this request + """ - This field is a member of `oneof`_ ``_description``. - header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): - Specifies changes to request and response headers that need - to take effect for the selected backendService. The - headerAction value specified here is applied before the - matching pathMatchers[].headerAction and after - pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction - HeaderAction is not supported for load balancers that have - their loadBalancingScheme set to EXTERNAL. Not supported - when the URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + url_map_resource: "UrlMap" = proto.Field( + proto.MESSAGE, + number=168675425, + message="UrlMap", + ) - This field is a member of `oneof`_ ``_header_action``. - http_filter_configs (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): - Outbound route specific configuration for - networkservices.HttpFilter resources enabled by Traffic - Director. httpFilterConfigs only applies for load balancers - with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - ForwardingRule for more details. Not supported when the URL - map is bound to a target gRPC proxy that has - validateForProxyless field set to true. - http_filter_metadata (MutableSequence[google.cloud.compute_v1beta.types.HttpFilterConfig]): - Outbound route specific metadata supplied to - networkservices.HttpFilter resources enabled by Traffic - Director. httpFilterMetadata only applies for load balancers - with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - ForwardingRule for more details. The only configTypeUrl - supported is type.googleapis.com/google.protobuf.Struct Not - supported when the URL map is bound to a target gRPC proxy - that has validateForProxyless field set to true. - match_rules (MutableSequence[google.cloud.compute_v1beta.types.HttpRouteRuleMatch]): - The list of criteria for matching attributes - of a request to this routeRule. This list has OR - semantics: the request matches this routeRule - when any of the matchRules are satisfied. - However predicates within a given matchRule have - AND semantics. All predicates within a matchRule - must match for the request to match the rule. - priority (int): - For routeRules within a given pathMatcher, - priority determines the order in which a load - balancer interprets routeRules. RouteRules are - evaluated in order of priority, from the lowest - to highest number. The priority of a rule - decreases as its number increases (1, 2, 3, - N+1). The first rule that matches the request is - applied. You cannot configure two or more - routeRules with the same priority. Priority for - each rule must be set to a number from 0 to - 2147483647 inclusive. Priority numbers can have - gaps, which enable you to add or remove rules in - the future without affecting the rest of the - rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is - a valid series of priority numbers to which you - could add rules numbered from 6 to 8, 10 to 11, - and 13 to 15 in the future without any impact on - existing rules. - This field is a member of `oneof`_ ``_priority``. - route_action (google.cloud.compute_v1beta.types.HttpRouteAction): - In response to a matching matchRule, the load - balancer performs advanced routing actions, such - as URL rewrites and header transformations, - before forwarding the request to the selected - backend. Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. - URL maps for classic Application Load Balancers - only support the urlRewrite action within a - route rule's routeAction. +class InsertVpnGatewayRequest(proto.Message): + r"""A request message for VpnGateways.Insert. See the method + description for details. - This field is a member of `oneof`_ ``_route_action``. - service (str): - The full or partial URL of the backend - service resource to which traffic is directed if - this rule is matched. If routeAction is also - specified, advanced routing actions, such as URL - rewrites, take effect before sending the request - to the backend. Only one of urlRedirect, service - or routeAction.weightedBackendService can be - set. - This field is a member of `oneof`_ ``_service``. - url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): - When this rule is matched, the request is - redirected to a URL specified by urlRedirect. - Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. - Not supported when the URL map is bound to a - target gRPC proxy. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_url_redirect``. + Attributes: + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vpn_gateway_resource (google.cloud.compute_v1beta.types.VpnGateway): + The body resource for this request """ - custom_error_response_policy: "CustomErrorResponsePolicy" = proto.Field( - proto.MESSAGE, - number=202816619, - optional=True, - message="CustomErrorResponsePolicy", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - description: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=138946292, ) - header_action: "HttpHeaderAction" = proto.Field( - proto.MESSAGE, - number=328077352, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="HttpHeaderAction", - ) - http_filter_configs: MutableSequence["HttpFilterConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=166372417, - message="HttpFilterConfig", - ) - http_filter_metadata: MutableSequence["HttpFilterConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=455841375, - message="HttpFilterConfig", ) - match_rules: MutableSequence["HttpRouteRuleMatch"] = proto.RepeatedField( + vpn_gateway_resource: "VpnGateway" = proto.Field( proto.MESSAGE, - number=376200701, - message="HttpRouteRuleMatch", + number=182688660, + message="VpnGateway", ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, + + +class InsertVpnTunnelRequest(proto.Message): + r"""A request message for VpnTunnels.Insert. 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. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vpn_tunnel_resource (google.cloud.compute_v1beta.types.VpnTunnel): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, ) - route_action: "HttpRouteAction" = proto.Field( - proto.MESSAGE, - number=424563948, - optional=True, - message="HttpRouteAction", + region: str = proto.Field( + proto.STRING, + number=138946292, ) - service: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=373540533, + number=37109963, optional=True, ) - url_redirect: "HttpRedirectAction" = proto.Field( + vpn_tunnel_resource: "VpnTunnel" = proto.Field( proto.MESSAGE, - number=405147820, - optional=True, - message="HttpRedirectAction", + number=86839482, + message="VpnTunnel", ) -class HttpRouteRuleMatch(proto.Message): - r"""HttpRouteRuleMatch specifies a set of criteria for matching - requests to an HttpRouteRule. All specified criteria must be - satisfied for a match to occur. +class InsertWireGroupRequest(proto.Message): + r"""A request message for WireGroups.Insert. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - full_path_match (str): - For satisfying the matchRule condition, the - path of the request must exactly match the value - specified in fullPathMatch after removing any - query parameters and anchor that may be part of - the original URL. fullPathMatch must be from 1 - to 1024 characters. Only one of prefixMatch, - fullPathMatch or regexMatch must be specified. - - This field is a member of `oneof`_ ``_full_path_match``. - header_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpHeaderMatch]): - Specifies a list of header match criteria, - all of which must match corresponding headers in - the request. - ignore_case (bool): - Specifies that prefixMatch and fullPathMatch - matches are case sensitive. The default value is - false. ignoreCase must not be used with - regexMatch. Not supported when the URL map is - bound to a target gRPC proxy. - - This field is a member of `oneof`_ ``_ignore_case``. - metadata_filters (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilter]): - Opaque filter criteria used by the load balancer to restrict - routing configuration to a limited set of xDS compliant - clients. In their xDS requests to the load balancer, xDS - clients present node metadata. When there is a match, the - relevant routing configuration is made available to those - proxies. For each metadataFilter in this list, if its - filterMatchCriteria is set to MATCH_ANY, at least one of the - filterLabels must match the corresponding label provided in - the metadata. If its filterMatchCriteria is set to - MATCH_ALL, then all of its filterLabels must match with - corresponding labels provided in the metadata. If multiple - metadata filters are specified, all of them need to be - satisfied in order to be considered a match. metadataFilters - specified here is applied after those specified in - ForwardingRule that refers to the UrlMap this - HttpRouteRuleMatch belongs to. metadataFilters only applies - to load balancers that have loadBalancingScheme set to - INTERNAL_SELF_MANAGED. Not supported when the URL map is - bound to a target gRPC proxy that has validateForProxyless - field set to true. - path_template_match (str): - If specified, the route is a pattern match expression that - must match the :path header once the query string is - removed. A pattern match allows you to match - The value - must be between 1 and 1024 characters - The pattern must - start with a leading slash ("/") - There may be no more than - 5 operators in pattern Precisely one of prefix_match, - full_path_match, regex_match or path_template_match must be - set. + cross_site_network (str): - This field is a member of `oneof`_ ``_path_template_match``. - prefix_match (str): - For satisfying the matchRule condition, the - request's path must begin with the specified - prefixMatch. prefixMatch must begin with a /. - The value must be from 1 to 1024 characters. - Only one of prefixMatch, fullPathMatch or - regexMatch must be specified. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder - This field is a member of `oneof`_ ``_prefix_match``. - query_parameter_matches (MutableSequence[google.cloud.compute_v1beta.types.HttpQueryParameterMatch]): - Specifies a list of query parameter match - criteria, all of which must match corresponding - query parameters in the request. Not supported - when the URL map is bound to a target gRPC - proxy. - regex_match (str): - For satisfying the matchRule condition, the path of the - request must satisfy the regular expression specified in - regexMatch after removing any query parameters and anchor - supplied with the original URL. For more information about - regular expression syntax, see Syntax. Only one of - prefixMatch, fullPathMatch or regexMatch must be specified. - Regular expressions can only be used when the - loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + This field is a member of `oneof`_ ``_request_id``. + validate_only (bool): + [Input Only] Validate the new configuration, but don't + create it. - This field is a member of `oneof`_ ``_regex_match``. + This field is a member of `oneof`_ ``_validate_only``. + wire_group_resource (google.cloud.compute_v1beta.types.WireGroup): + The body resource for this request """ - full_path_match: str = proto.Field( + cross_site_network: str = proto.Field( proto.STRING, - number=214598875, - optional=True, + number=108192469, ) - header_matches: MutableSequence["HttpHeaderMatch"] = proto.RepeatedField( - proto.MESSAGE, - number=361903489, - message="HttpHeaderMatch", + project: str = proto.Field( + proto.STRING, + number=227560217, ) - ignore_case: bool = proto.Field( + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + validate_only: bool = proto.Field( proto.BOOL, - number=464324989, + number=242744629, optional=True, ) - metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( + wire_group_resource: "WireGroup" = proto.Field( proto.MESSAGE, - number=464725739, - message="MetadataFilter", + number=117104840, + message="WireGroup", ) - path_template_match: str = proto.Field( + + +class InsertZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Insert. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( proto.STRING, - number=292348186, - optional=True, + number=227560217, ) - prefix_match: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=257898968, + number=37109963, optional=True, ) - query_parameter_matches: MutableSequence[ - "HttpQueryParameterMatch" - ] = proto.RepeatedField( + vm_extension_policy_resource: "VmExtensionPolicy" = proto.Field( proto.MESSAGE, - number=286231270, - message="HttpQueryParameterMatch", + number=515669235, + message="VmExtensionPolicy", ) - regex_match: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=107387853, - optional=True, + number=3744684, ) -class Image(proto.Message): - r"""Represents an Image resource. You can use images to create - boot disks for your VM instances. For more information, read - Images. +class Instance(proto.Message): + r"""Represents an Instance resource. + + An instance is a virtual machine that is hosted on Google Cloud + Platform. For more information, readVirtual Machine Instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - architecture (str): - The architecture of the image. Valid values are ARM64 or - X86_64. Check the Architecture enum for the list of possible - values. + advanced_machine_features (google.cloud.compute_v1beta.types.AdvancedMachineFeatures): + Controls for advanced machine-related + behavior features. - This field is a member of `oneof`_ ``_architecture``. - archive_size_bytes (int): - Size of the image tar.gz archive stored in - Google Cloud Storage (in bytes). + This field is a member of `oneof`_ ``_advanced_machine_features``. + can_ip_forward (bool): + Allows this instance to send and receive + packets with non-matching destination or source + IPs. This is required if you plan to use this + instance to forward routes. For more + information, seeEnabling IP Forwarding. - This field is a member of `oneof`_ ``_archive_size_bytes``. + This field is a member of `oneof`_ ``_can_ip_forward``. + confidential_instance_config (google.cloud.compute_v1beta.types.ConfidentialInstanceConfig): + + This field is a member of `oneof`_ ``_confidential_instance_config``. + cpu_platform (str): + Output only. [Output Only] The CPU platform used by this + instance. + + This field is a member of `oneof`_ ``_cpu_platform``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. - deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): - The deprecation status associated with this - image. + deletion_protection (bool): + Whether the resource should be protected + against deletion. - This field is a member of `oneof`_ ``_deprecated``. + This field is a member of `oneof`_ ``_deletion_protection``. description (str): An optional description of this resource. Provide this property when you create the resource. This field is a member of `oneof`_ ``_description``. - disk_size_gb (int): - Size of the image when restored onto a - persistent disk (in GB). + disks (MutableSequence[google.cloud.compute_v1beta.types.AttachedDisk]): + Array of disks associated with this instance. + Persistent disks must be created before you can + assign them. + display_device (google.cloud.compute_v1beta.types.DisplayDevice): + Enables display device for the instance. - This field is a member of `oneof`_ ``_disk_size_gb``. - enable_confidential_compute (bool): - Whether this image is created from a confidential compute - mode disk. [Output Only]: This field is not set by user, but - from source disk. + This field is a member of `oneof`_ ``_display_device``. + erase_windows_vss_signature (bool): + Specifies whether the disks restored from + source snapshots or source machine image should + erase Windows specific VSS signature. - This field is a member of `oneof`_ ``_enable_confidential_compute``. - family (str): - The name of the image family to which this - image belongs. The image family name can be from - a publicly managed image family provided by - Compute Engine, or from a custom image family - you create. For example, centos-stream-9 is a - publicly available image family. For more - information, see Image family best practices. - When creating disks, you can specify an image - family instead of a specific image name. The - image family always returns its latest image - that is not deprecated. The name of the image - family must comply with RFC1035. + This field is a member of `oneof`_ ``_erase_windows_vss_signature``. + fingerprint (str): + Specifies a fingerprint for this resource, + which is essentially a hash of the instance's + contents and used for optimistic locking. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update the instance. You must always provide + an up-to-date fingerprint hash in order to + update the instance. - This field is a member of `oneof`_ ``_family``. - guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): - A list of features to enable on the guest operating system. - Applicable only for bootable images. To see a list of - available options, see the guestOSfeatures[].type parameter. + To see the latest fingerprint, make get() + request to the instance. + + This field is a member of `oneof`_ ``_fingerprint``. + guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): + A list of the type and count of accelerator + cards attached to the instance. + hostname (str): + Specifies the hostname of the instance. The specified + hostname must be RFC1035 compliant. If hostname is not + specified, the default hostname is + [INSTANCE_NAME].c.[PROJECT_ID].internal when using the + global DNS, and + [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using + zonal DNS. + + This field is a member of `oneof`_ ``_hostname``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the image using a customer-supplied - encryption key. After you encrypt an image with - a customer-supplied key, you must provide the - same key if you use the image later (e.g. to - create a disk from the image). Customer-supplied - encryption keys do not protect access to - metadata of the disk. If you do not provide an - encryption key when creating the image, then the - disk will be encrypted using an automatically - generated key and you do not need to provide a - key to use the image later. + instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Encrypts suspended data for an instance with + acustomer-managed encryption key. - This field is a member of `oneof`_ ``_image_encryption_key``. + If you are creating a new instance, this field + will encrypt the local SSD and in-memory + contents of the instance during the suspend + operation. + + If you do not provide an encryption key when + creating the instance, then the local SSD and + in-memory contents will be encrypted using an + automatically generated key during the suspend + operation. + + This field is a member of `oneof`_ ``_instance_encryption_key``. + key_revocation_action_type (str): + KeyRevocationActionType of the instance. + Supported options are "STOP" and "NONE". The + default value is "NONE" if it is not specified. + Check the KeyRevocationActionType enum for the + list of possible values. + + This field is a member of `oneof`_ ``_key_revocation_action_type``. kind (str): - [Output Only] Type of the resource. Always compute#image for - images. + Output only. [Output Only] Type of the resource. Always + compute#instance for instances. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): - A fingerprint for the labels being applied to - this image, which is essentially a hash of the - labels used for optimistic locking. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You must always provide an - up-to-date fingerprint hash in order to update - or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve an image. + A fingerprint for this request, which is + essentially a hash of the label's contents and + used for optimistic locking. The fingerprint is + initially generated by Compute Engine and + changes after every request to modify or update + labels. You must always provide an up-to-date + fingerprint hash in order to update or change + labels. + + To see the latest fingerprint, make get() + request to the instance. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): - Labels to apply to this image. These can be - later modified by the setLabels method. - license_codes (MutableSequence[int]): - Integer license codes indicating which - licenses are attached to this image. - licenses (MutableSequence[str]): - Any applicable license URI. - locked (bool): - A flag for marketplace VM disk created from - the image, which is designed for marketplace VM - disk to prevent the proprietary data on the disk - from being accessed unwantedly. The flag will be - inherited by the disk created from the image. - The disk with locked flag set to true will be - prohibited from performing the operations below: - - R/W or R/O disk attach - Disk detach, if disk - is created via create-on-create - Create images - - Create snapshots - Create disk clone (create - disk from the current disk) The image with the - locked field set to true will be prohibited from - performing the operations below: - Create images - from the current image - Update the locked field - for the current image The instance with at least - one disk with locked flag set to true will be - prohibited from performing the operations below: - - Secondary disk attach - Create instant - snapshot - Create machine images - Create - instance template - Delete the instance with - --keep-disk parameter set to true + Labels to apply to this instance. These can + be later modified by the setLabels method. + last_start_timestamp (str): + Output only. [Output Only] Last start timestamp inRFC3339 + text format. - This field is a member of `oneof`_ ``_locked``. + This field is a member of `oneof`_ ``_last_start_timestamp``. + last_stop_timestamp (str): + Output only. [Output Only] Last stop timestamp inRFC3339 + text format. + + This field is a member of `oneof`_ ``_last_stop_timestamp``. + last_suspended_timestamp (str): + Output only. [Output Only] Last suspended timestamp + inRFC3339 text format. + + This field is a member of `oneof`_ ``_last_suspended_timestamp``. + machine_type (str): + Full or partial URL of the machine type + resource to use for this instance, in the + format:zones/zone/machineTypes/machine-type. + This is provided by the client when the instance + is created. For example, the following is a + valid partial url to a predefined + machine type: + + zones/us-central1-f/machineTypes/n1-standard-1 + + To create acustom + machine type, provide a URL to a machine type in + the following format, where CPUS is 1 or an even + number up to 32 (2, 4, 6, ... 24, etc), and + MEMORY is the total + memory for this instance. Memory must be a + multiple of 256 MB and must be supplied in MB + (e.g. 5 GB of memory is 5120 MB): + + zones/zone/machineTypes/custom-CPUS-MEMORY + + For example: + zones/us-central1-f/machineTypes/custom-4-5120 + For a full list of restrictions, read + theSpecifications for custom machine types. + + This field is a member of `oneof`_ ``_machine_type``. + metadata (google.cloud.compute_v1beta.types.Metadata): + The metadata key/value pairs assigned + to this instance. This includes metadata keys + that were explicitly defined for the instance. + + This field is a member of `oneof`_ ``_metadata``. + min_cpu_platform (str): + Specifies aminimum CPU + platform for the VM instance. Applicable values + are the friendly names of CPU platforms, such as + minCpuPlatform: "Intel Haswell" or + minCpuPlatform: "Intel Sandy + Bridge". + + This field is a member of `oneof`_ ``_min_cpu_platform``. name (str): - Name of the resource; provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + The name of the resource, provided by the client when + initially creating the resource. The resource name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - params (google.cloud.compute_v1beta.types.ImageParams): + network_interfaces (MutableSequence[google.cloud.compute_v1beta.types.NetworkInterface]): + An array of network configurations for this + instance. These specify how interfaces are + configured to interact with other network + services, such as connecting to the internet. + Multiple interfaces are supported per instance. + network_performance_config (google.cloud.compute_v1beta.types.NetworkPerformanceConfig): + + This field is a member of `oneof`_ ``_network_performance_config``. + params (google.cloud.compute_v1beta.types.InstanceParams): Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. This field is a member of `oneof`_ ``_params``. - raw_disk (google.cloud.compute_v1beta.types.RawDisk): - The parameters of the raw disk image. + partner_metadata (MutableMapping[str, google.cloud.compute_v1beta.types.StructuredEntries]): + Partner Metadata assigned to the instance. A + map from a subdomain (namespace) to entries map. + post_key_revocation_action_type (str): + PostKeyRevocationActionType of the instance. + Check the PostKeyRevocationActionType enum for + the list of possible values. - This field is a member of `oneof`_ ``_raw_disk``. - rollout_override (google.cloud.compute_v1beta.types.RolloutPolicy): - A rollout policy to apply to this image. When - specified, the rollout policy overrides per-zone - references to the image via the associated image - family. The rollout policy restricts the zones - where this image is accessible when using a - zonal image family reference. When the rollout - policy does not include the user specified zone, - or if the zone is rolled out, this image is - accessible. The rollout policy for this image is - read-only, except for allowlisted users. This - field might not be configured. To view the - latest non-deprecated image in a specific zone, - use the imageFamilyViews.get method. + This field is a member of `oneof`_ ``_post_key_revocation_action_type``. + private_ipv6_google_access (str): + The private IPv6 google access type for the VM. If not + specified, use INHERIT_FROM_SUBNETWORK as default. Check the + PrivateIpv6GoogleAccess enum for the list of possible + values. - This field is a member of `oneof`_ ``_rollout_override``. + This field is a member of `oneof`_ ``_private_ipv6_google_access``. + reservation_affinity (google.cloud.compute_v1beta.types.ReservationAffinity): + Specifies the reservations that this instance + can consume from. + + This field is a member of `oneof`_ ``_reservation_affinity``. + resource_policies (MutableSequence[str]): + Resource policies applied to this instance. + resource_status (google.cloud.compute_v1beta.types.ResourceStatus): + Output only. [Output Only] Specifies values set for instance + attributes as compared to the values requested by user in + the corresponding input only field. + + This field is a member of `oneof`_ ``_resource_status``. satisfies_pzi (bool): - Output only. Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzi``. satisfies_pzs (bool): - [Output Only] Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzs``. + scheduling (google.cloud.compute_v1beta.types.Scheduling): + Sets the scheduling options for this + instance. + + This field is a member of `oneof`_ ``_scheduling``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - shielded_instance_initial_state (google.cloud.compute_v1beta.types.InitialStateConfig): - Set the secure boot keys of shielded - instance. + service_accounts (MutableSequence[google.cloud.compute_v1beta.types.ServiceAccount]): + A list of service accounts, with their + specified scopes, authorized for this instance. + Only one service account per VM instance is + supported. - This field is a member of `oneof`_ ``_shielded_instance_initial_state``. - source_disk (str): - URL of the source disk used to create this - image. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk In order to create an - image, you must provide the full or partial URL - of one of the following: - The rawDisk.source - URL - The sourceDisk URL - The sourceImage URL - - The sourceSnapshot URL + Service accounts generate access tokens that can + be accessed through the metadata server and used + to authenticate applications on the instance. + SeeService Accounts + for more information. + shielded_instance_config (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): - This field is a member of `oneof`_ ``_source_disk``. - source_disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + This field is a member of `oneof`_ ``_shielded_instance_config``. + shielded_instance_integrity_policy (google.cloud.compute_v1beta.types.ShieldedInstanceIntegrityPolicy): - This field is a member of `oneof`_ ``_source_disk_encryption_key``. - source_disk_id (str): - [Output Only] The ID value of the disk used to create this - image. This value may be used to determine whether the image - was taken from the current or a previous instance of a given - disk name. + This field is a member of `oneof`_ ``_shielded_instance_integrity_policy``. + shielded_vm_config (google.cloud.compute_v1beta.types.ShieldedVmConfig): + Output only. Deprecating, please use + shielded_instance_config. - This field is a member of `oneof`_ ``_source_disk_id``. - source_image (str): - URL of the source image used to create this image. The - following are valid formats for the URL: - - https://www.googleapis.com/compute/v1/projects/project_id/global/ - images/image_name - - projects/project_id/global/images/image_name In order to - create an image, you must provide the full or partial URL of - one of the following: - The rawDisk.source URL - The - sourceDisk URL - The sourceImage URL - The sourceSnapshot - URL + This field is a member of `oneof`_ ``_shielded_vm_config``. + shielded_vm_integrity_policy (google.cloud.compute_v1beta.types.ShieldedVmIntegrityPolicy): + Output only. Deprecating, please use + shielded_instance_integrity_policy. - This field is a member of `oneof`_ ``_source_image``. - source_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source image. Required if the source image is - protected by a customer-supplied encryption key. + This field is a member of `oneof`_ ``_shielded_vm_integrity_policy``. + source_machine_image (str): + Source machine image - This field is a member of `oneof`_ ``_source_image_encryption_key``. - source_image_id (str): - [Output Only] The ID value of the image used to create this - image. This value may be used to determine whether the image - was taken from the current or a previous instance of a given - image name. + This field is a member of `oneof`_ ``_source_machine_image``. + source_machine_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Source machine image encryption key when + creating an instance from a machine image. - This field is a member of `oneof`_ ``_source_image_id``. - source_snapshot (str): - URL of the source snapshot used to create this image. The - following are valid formats for the URL: - - https://www.googleapis.com/compute/v1/projects/project_id/global/ - snapshots/snapshot_name - - projects/project_id/global/snapshots/snapshot_name In order - to create an image, you must provide the full or partial URL - of one of the following: - The rawDisk.source URL - The - sourceDisk URL - The sourceImage URL - The sourceSnapshot - URL + This field is a member of `oneof`_ ``_source_machine_image_encryption_key``. + start_restricted (bool): + Output only. [Output Only] Whether a VM has been restricted + for start because Compute Engine has detected suspicious + activity. - This field is a member of `oneof`_ ``_source_snapshot``. - source_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source snapshot. Required if the source snapshot - is protected by a customer-supplied encryption - key. + This field is a member of `oneof`_ ``_start_restricted``. + status (str): + Output only. [Output Only] The status of the instance. One + of the following values: PROVISIONING, STAGING,RUNNING, + STOPPING, SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. + For more information about the status of the instance, see + Instance life cycle. Check the Status enum for the list of + possible values. - This field is a member of `oneof`_ ``_source_snapshot_encryption_key``. - source_snapshot_id (str): - [Output Only] The ID value of the snapshot used to create - this image. This value may be used to determine whether the - snapshot was taken from the current or a previous instance - of a given snapshot name. + This field is a member of `oneof`_ ``_status``. + status_message (str): + Output only. [Output Only] An optional, human-readable + explanation of the status. - This field is a member of `oneof`_ ``_source_snapshot_id``. - source_type (str): - The type of the image used to create this - disk. The default and only valid value is RAW. - Check the SourceType enum for the list of - possible values. + This field is a member of `oneof`_ ``_status_message``. + tags (google.cloud.compute_v1beta.types.Tags): + Tags to apply to this instance. Tags are used + to identify valid sources or targets for network + firewalls and are specified by the client during + instance creation. The tags can be later + modified by the setTags method. Each tag within + the list must comply withRFC1035. Multiple tags + can be specified via the 'tags.items' field. - This field is a member of `oneof`_ ``_source_type``. - status (str): - [Output Only] The status of the image. An image can be used - to create other resources, such as instances, only after the - image has been successfully created and the status is set to - READY. Possible values are FAILED, PENDING, or READY. Check - the Status enum for the list of possible values. + This field is a member of `oneof`_ ``_tags``. + zone (str): + Output only. [Output Only] URL of the zone where the + instance resides. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. - This field is a member of `oneof`_ ``_status``. - storage_locations (MutableSequence[str]): - Cloud Storage bucket storage location of the - image (regional or multi-regional). - user_licenses (MutableSequence[str]): - A list of publicly visible user-licenses. - Unlike regular licenses, user provided licenses - can be modified after the disk is created. This - includes a list of URLs to the license resource. - For example, to provide a debian license: - https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch + This field is a member of `oneof`_ ``_zone``. """ - class Architecture(proto.Enum): - r"""The architecture of the image. Valid values are ARM64 or X86_64. + class KeyRevocationActionType(proto.Enum): + r"""KeyRevocationActionType of the instance. Supported options + are "STOP" and "NONE". The default value is "NONE" if it is not + specified. Values: - UNDEFINED_ARCHITECTURE (0): + UNDEFINED_KEY_REVOCATION_ACTION_TYPE (0): A value indicating that the enum field is not set. - ARCHITECTURE_UNSPECIFIED (394750507): - Default value indicating Architecture is not + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED (467110106): + Default value. This value is unused. + NONE (2402104): + Indicates user chose no operation. + STOP (2555906): + Indicates user chose to opt for VM shutdown + on key revocation. + """ + UNDEFINED_KEY_REVOCATION_ACTION_TYPE = 0 + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 467110106 + NONE = 2402104 + STOP = 2555906 + + class PostKeyRevocationActionType(proto.Enum): + r"""PostKeyRevocationActionType of the instance. + + Values: + UNDEFINED_POST_KEY_REVOCATION_ACTION_TYPE (0): + A value indicating that the enum field is not set. - ARM64 (62547450): - Machines with architecture ARM64 - X86_64 (425300551): - Machines with architecture X86_64 + NOOP (2402146): + Indicates user chose no operation. + POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED (228738393): + Default value. This value is unused. + SHUTDOWN (76412502): + Indicates user chose to opt for VM shutdown + on key revocation. """ - UNDEFINED_ARCHITECTURE = 0 - ARCHITECTURE_UNSPECIFIED = 394750507 - ARM64 = 62547450 - X86_64 = 425300551 + UNDEFINED_POST_KEY_REVOCATION_ACTION_TYPE = 0 + NOOP = 2402146 + POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 228738393 + SHUTDOWN = 76412502 - class SourceType(proto.Enum): - r"""The type of the image used to create this disk. The default - and only valid value is RAW. + class PrivateIpv6GoogleAccess(proto.Enum): + r"""The private IPv6 google access type for the VM. If not specified, + use INHERIT_FROM_SUBNETWORK as default. Values: - UNDEFINED_SOURCE_TYPE (0): + UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS (0): A value indicating that the enum field is not set. - RAW (80904): - No description available. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE (427975994): + Bidirectional private IPv6 access to/from + Google services. If specified, the subnetwork + who is attached to the instance's default + network interface will be assigned an internal + IPv6 prefix if it doesn't have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE (288210263): + Outbound private IPv6 access from VMs in this + subnet to Google services. If specified, the + subnetwork who is attached to the instance's + default network interface will be assigned an + internal IPv6 prefix if it doesn't have before. + INHERIT_FROM_SUBNETWORK (530256959): + Each network interface inherits + PrivateIpv6GoogleAccess from its subnetwork. """ - UNDEFINED_SOURCE_TYPE = 0 - RAW = 80904 + UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS = 0 + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 427975994 + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 288210263 + INHERIT_FROM_SUBNETWORK = 530256959 class Status(proto.Enum): - r"""[Output Only] The status of the image. An image can be used to - create other resources, such as instances, only after the image has - been successfully created and the status is set to READY. Possible - values are FAILED, PENDING, or READY. + r"""Output only. [Output Only] The status of the instance. One of the + following values: PROVISIONING, STAGING,RUNNING, STOPPING, + SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information + about the status of the instance, see Instance life cycle. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - DELETING (528602024): - Image is deleting. - FAILED (455706685): - Image creation failed due to an error. + DEPROVISIONING (428935662): + The instance is halted and we are performing + tear down tasks like network deprogramming, + releasing quota, IP, tearing down disks etc. PENDING (35394935): - Image hasn't been created as yet. - READY (77848963): - Image has been successfully created. + For Flex Start provisioning instance is + waiting for available capacity from Dynamic + Workload Scheduler (DWS). + PENDING_STOP (362509770): + The instance is gracefully shutting down. + PROVISIONING (290896621): + Resources are being allocated for the + instance. + REPAIRING (413483285): + The instance is in repair. + RUNNING (121282975): + The instance is running. + STAGING (431072283): + All required resources have been allocated + and the instance is being started. + STOPPED (444276141): + The instance has stopped successfully. + STOPPING (350791796): + The instance is currently stopping (either + being deleted or killed). + SUSPENDED (51223995): + The instance has suspended. + SUSPENDING (514206246): + The instance is suspending. + TERMINATED (250018339): + The instance has stopped (either by explicit + action or underlying failure). """ UNDEFINED_STATUS = 0 - DELETING = 528602024 - FAILED = 455706685 + DEPROVISIONING = 428935662 PENDING = 35394935 - READY = 77848963 + PENDING_STOP = 362509770 + PROVISIONING = 290896621 + REPAIRING = 413483285 + RUNNING = 121282975 + STAGING = 431072283 + STOPPED = 444276141 + STOPPING = 350791796 + SUSPENDED = 51223995 + SUSPENDING = 514206246 + TERMINATED = 250018339 - architecture: str = proto.Field( - proto.STRING, - number=302803283, + advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( + proto.MESSAGE, + number=409646002, + optional=True, + message="AdvancedMachineFeatures", + ) + can_ip_forward: bool = proto.Field( + proto.BOOL, + number=467731324, optional=True, ) - archive_size_bytes: int = proto.Field( - proto.INT64, - number=381093450, + confidential_instance_config: "ConfidentialInstanceConfig" = proto.Field( + proto.MESSAGE, + number=490637685, + optional=True, + message="ConfidentialInstanceConfig", + ) + cpu_platform: str = proto.Field( + proto.STRING, + number=410285354, optional=True, ) creation_timestamp: str = proto.Field( @@ -46771,48 +60161,63 @@ class Status(proto.Enum): number=30525366, optional=True, ) - deprecated: "DeprecationStatus" = proto.Field( - proto.MESSAGE, - number=515138995, + deletion_protection: bool = proto.Field( + proto.BOOL, + number=458014698, optional=True, - message="DeprecationStatus", ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, + disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( + proto.MESSAGE, + number=95594102, + message="AttachedDisk", + ) + display_device: "DisplayDevice" = proto.Field( + proto.MESSAGE, + number=258933875, optional=True, + message="DisplayDevice", ) - enable_confidential_compute: bool = proto.Field( + erase_windows_vss_signature: bool = proto.Field( proto.BOOL, - number=102135228, + number=52637562, optional=True, ) - family: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=328751972, + number=234678500, optional=True, ) - guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, - number=79294545, - message="GuestOsFeature", + number=463595119, + message="AcceleratorConfig", + ) + hostname: str = proto.Field( + proto.STRING, + number=237067315, + optional=True, ) id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - image_encryption_key: "CustomerEncryptionKey" = proto.Field( + instance_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, - number=379512583, + number=64741517, optional=True, message="CustomerEncryptionKey", ) + key_revocation_action_type: str = proto.Field( + proto.STRING, + number=235941474, + optional=True, + ) kind: str = proto.Field( proto.STRING, number=3292052, @@ -46828,17 +60233,35 @@ class Status(proto.Enum): proto.STRING, number=500195327, ) - license_codes: MutableSequence[int] = proto.RepeatedField( - proto.INT64, - number=45482664, + last_start_timestamp: str = proto.Field( + proto.STRING, + number=443830736, + optional=True, ) - licenses: MutableSequence[str] = proto.RepeatedField( + last_stop_timestamp: str = proto.Field( proto.STRING, - number=337642578, + number=412823010, + optional=True, ) - locked: bool = proto.Field( - proto.BOOL, - number=513159946, + last_suspended_timestamp: str = proto.Field( + proto.STRING, + number=356275337, + optional=True, + ) + machine_type: str = proto.Field( + proto.STRING, + number=227711026, + optional=True, + ) + metadata: "Metadata" = proto.Field( + proto.MESSAGE, + number=86866735, + optional=True, + message="Metadata", + ) + min_cpu_platform: str = proto.Field( + proto.STRING, + number=242912759, optional=True, ) name: str = proto.Field( @@ -46846,23 +60269,54 @@ class Status(proto.Enum): number=3373707, optional=True, ) - params: "ImageParams" = proto.Field( + network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( + proto.MESSAGE, + number=52735243, + message="NetworkInterface", + ) + network_performance_config: "NetworkPerformanceConfig" = proto.Field( + proto.MESSAGE, + number=398330850, + optional=True, + message="NetworkPerformanceConfig", + ) + params: "InstanceParams" = proto.Field( proto.MESSAGE, number=78313862, optional=True, - message="ImageParams", + message="InstanceParams", ) - raw_disk: "RawDisk" = proto.Field( + partner_metadata: MutableMapping[str, "StructuredEntries"] = proto.MapField( + proto.STRING, proto.MESSAGE, - number=503113556, + number=65908934, + message="StructuredEntries", + ) + post_key_revocation_action_type: str = proto.Field( + proto.STRING, + number=292972897, optional=True, - message="RawDisk", ) - rollout_override: "RolloutPolicy" = proto.Field( + private_ipv6_google_access: str = proto.Field( + proto.STRING, + number=48277006, + optional=True, + ) + reservation_affinity: "ReservationAffinity" = proto.Field( proto.MESSAGE, - number=180331162, + number=157850683, optional=True, - message="RolloutPolicy", + message="ReservationAffinity", + ) + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) + resource_status: "ResourceStatus" = proto.Field( + proto.MESSAGE, + number=249429315, + optional=True, + message="ResourceStatus", ) satisfies_pzi: bool = proto.Field( proto.BOOL, @@ -46874,139 +60328,458 @@ class Status(proto.Enum): number=480964267, optional=True, ) + scheduling: "Scheduling" = proto.Field( + proto.MESSAGE, + number=386688404, + optional=True, + message="Scheduling", + ) self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - shielded_instance_initial_state: "InitialStateConfig" = proto.Field( + service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( proto.MESSAGE, - number=192356867, + number=277537328, + message="ServiceAccount", + ) + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( + proto.MESSAGE, + number=12862901, optional=True, - message="InitialStateConfig", + message="ShieldedInstanceConfig", ) - source_disk: str = proto.Field( - proto.STRING, - number=451753793, + shielded_instance_integrity_policy: "ShieldedInstanceIntegrityPolicy" = proto.Field( + proto.MESSAGE, + number=163696919, optional=True, + message="ShieldedInstanceIntegrityPolicy", ) - source_disk_encryption_key: "CustomerEncryptionKey" = proto.Field( + shielded_vm_config: "ShieldedVmConfig" = proto.Field( proto.MESSAGE, - number=531501153, + number=477568019, optional=True, - message="CustomerEncryptionKey", + message="ShieldedVmConfig", ) - source_disk_id: str = proto.Field( - proto.STRING, - number=454190809, + shielded_vm_integrity_policy: "ShieldedVmIntegrityPolicy" = proto.Field( + proto.MESSAGE, + number=140167669, optional=True, + message="ShieldedVmIntegrityPolicy", ) - source_image: str = proto.Field( + source_machine_image: str = proto.Field( proto.STRING, - number=50443319, + number=21769791, optional=True, ) - source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( + source_machine_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, - number=381503659, + number=192839075, optional=True, message="CustomerEncryptionKey", ) - source_image_id: str = proto.Field( + start_restricted: bool = proto.Field( + proto.BOOL, + number=123693144, + optional=True, + ) + status: str = proto.Field( proto.STRING, - number=55328291, + number=181260274, optional=True, ) - source_snapshot: str = proto.Field( + status_message: str = proto.Field( proto.STRING, - number=126061928, + number=297428154, optional=True, ) - source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( + tags: "Tags" = proto.Field( proto.MESSAGE, - number=303679322, + number=3552281, optional=True, - message="CustomerEncryptionKey", + message="Tags", ) - source_snapshot_id: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=98962258, + number=3744684, optional=True, ) - source_type: str = proto.Field( + + +class InstanceAggregatedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InstancesScopedList]): + An object that contains a list of instances + scoped by zone. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#instanceAggregatedList for aggregated lists of + Instance resources. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=452245726, + number=3355, optional=True, ) - status: str = proto.Field( + items: MutableMapping[str, "InstancesScopedList"] = proto.MapField( proto.STRING, - number=181260274, + proto.MESSAGE, + number=100526016, + message="InstancesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - storage_locations: MutableSequence[str] = proto.RepeatedField( + next_page_token: str = proto.Field( proto.STRING, - number=328005274, + number=79797525, + optional=True, ) - user_licenses: MutableSequence[str] = proto.RepeatedField( + self_link: str = proto.Field( proto.STRING, - number=388193862, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class ImageFamilyView(proto.Message): +class InstanceConsumptionData(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - image (google.cloud.compute_v1beta.types.Image): - The latest image that is part of the - specified image family in the requested - location, and that is not deprecated. + consumption_info (google.cloud.compute_v1beta.types.InstanceConsumptionInfo): + Output only. Resources consumed by the + instance. - This field is a member of `oneof`_ ``_image``. + This field is a member of `oneof`_ ``_consumption_info``. + instance (str): + Output only. Server-defined URL for the + instance. + + This field is a member of `oneof`_ ``_instance``. """ - image: "Image" = proto.Field( + consumption_info: "InstanceConsumptionInfo" = proto.Field( proto.MESSAGE, - number=100313435, + number=146354898, + optional=True, + message="InstanceConsumptionInfo", + ) + instance: str = proto.Field( + proto.STRING, + number=18257045, optional=True, - message="Image", ) -class ImageList(proto.Message): - r"""Contains a list of images. +class InstanceConsumptionInfo(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + guest_cpus (int): + Output only. The number of virtual CPUs that + are available to the instance. + + This field is a member of `oneof`_ ``_guest_cpus``. + local_ssd_gb (int): + Output only. The amount of local SSD storage + available to the instance, defined in GiB. + + This field is a member of `oneof`_ ``_local_ssd_gb``. + memory_mb (int): + Output only. The amount of physical memory + available to the instance, defined in MiB. + + This field is a member of `oneof`_ ``_memory_mb``. + min_node_cpus (int): + Output only. The minimal guaranteed number of + virtual CPUs that are reserved. + + This field is a member of `oneof`_ ``_min_node_cpus``. + """ + + guest_cpus: int = proto.Field( + proto.INT32, + number=393356754, + optional=True, + ) + local_ssd_gb: int = proto.Field( + proto.INT32, + number=329237578, + optional=True, + ) + memory_mb: int = proto.Field( + proto.INT32, + number=116001171, + optional=True, + ) + min_node_cpus: int = proto.Field( + proto.INT32, + number=317231675, + optional=True, + ) + + +class InstanceGroup(proto.Message): + r"""Represents an Instance Group resource. + + Instance Groups can be used to configure a target forload + balancing. + + Instance groups can either be managed or unmanaged. + + To create + managed instance groups, use the instanceGroupManager + orregionInstanceGroupManager resource instead. + + Use zonal unmanaged instance groups if you need to applyload + balancing to groups of heterogeneous instances or if you need to + manage the instances yourself. You cannot create regional + unmanaged instance groups. + + For more information, readInstance + groups. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + Output only. [Output Only] The creation timestamp for this + instance group inRFC3339 text format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + fingerprint (str): + Output only. [Output Only] The fingerprint of the named + ports. The system uses this fingerprint to detect conflicts + when multiple users change the named ports concurrently. + + This field is a member of `oneof`_ ``_fingerprint``. + id (int): + Output only. [Output Only] A unique identifier for this + instance group, generated by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Image]): - A list of Image resources. kind (str): - Type of resource. + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroup for instance groups. This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + name (str): + The name of the instance group. The name must + be 1-63 characters long, and comply withRFC1035. + + This field is a member of `oneof`_ ``_name``. + named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): + Optional. Assigns a name to a port number. For + example:{name: "http", port: 80} + + This allows the system to reference ports by the assigned + name instead of a port number. Named ports can also contain + multiple ports. For example:[{name: "app1", port: 8080}, + {name: "app1", port: 8081}, {name: "app2", port: 8082}] + + Named ports apply to all instances in this instance group. + network (str): + [Output Only] The URL of the network to which all instances + in the instance group belong. If your instance has multiple + network interfaces, then the network and subnetwork fields + only refer to the network and subnet used by your primary + interface (nic0). + + This field is a member of `oneof`_ ``_network``. + region (str): + Output only. [Output Only] The URL of theregion where the + instance group is located (for regional resources). + + This field is a member of `oneof`_ ``_region``. + self_link (str): + Output only. [Output Only] The URL for this instance group. + The server generates this URL. + + This field is a member of `oneof`_ ``_self_link``. + size (int): + Output only. [Output Only] The total number of instances in + the instance group. + + This field is a member of `oneof`_ ``_size``. + subnetwork (str): + Output only. [Output Only] The URL of the subnetwork to + which all instances in the instance group belong. If your + instance has multiple network interfaces, then the network + and subnetwork fields only refer to the network and subnet + used by your primary interface (nic0). + + This field is a member of `oneof`_ ``_subnetwork``. + zone (str): + Output only. [Output Only] The URL of thezone where the + instance group is located (for zonal resources). + + This field is a member of `oneof`_ ``_zone``. + """ + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( + proto.MESSAGE, + number=427598732, + message="NamedPort", + ) + network: str = proto.Field( + proto.STRING, + number=232872494, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + size: int = proto.Field( + proto.INT32, + number=3530753, + optional=True, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=307827694, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + optional=True, + ) + + +class InstanceGroupAggregatedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupsScopedList]): + A list of InstanceGroupsScopedList resources. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupAggregatedList for aggregated + lists of instance groups. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Output only. [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -47020,10 +60793,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["Image"] = proto.RepeatedField( + items: MutableMapping[str, "InstanceGroupsScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, number=100526016, - message="Image", + message="InstanceGroupsScopedList", ) kind: str = proto.Field( proto.STRING, @@ -47040,6 +60814,10 @@ def raw_page(self): number=456214797, optional=True, ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -47048,4818 +60826,3940 @@ def raw_page(self): ) -class ImageParams(proto.Message): - r"""Additional image params. - - Attributes: - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to be bound to the image. Tag keys and - values have the same definition as resource manager tags. - Keys must be in the format ``tagKeys/{tag_key_id}``, and - values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. - """ - - resource_manager_tags: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=377671164, - ) - - -class InitialStateConfig(proto.Message): - r"""Initial State for shielded instance, these are public keys - which are safe to store in public - +class InstanceGroupList(proto.Message): + r"""A list of InstanceGroup resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - dbs (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): - The Key Database (db). - dbxs (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): - The forbidden key database (dbx). - keks (MutableSequence[google.cloud.compute_v1beta.types.FileContentBuffer]): - The Key Exchange Key (KEK). - pk (google.cloud.compute_v1beta.types.FileContentBuffer): - The Platform Key (PK). - - This field is a member of `oneof`_ ``_pk``. - """ - - dbs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( - proto.MESSAGE, - number=99253, - message="FileContentBuffer", - ) - dbxs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( - proto.MESSAGE, - number=3077113, - message="FileContentBuffer", - ) - keks: MutableSequence["FileContentBuffer"] = proto.RepeatedField( - proto.MESSAGE, - number=3288130, - message="FileContentBuffer", - ) - pk: "FileContentBuffer" = proto.Field( - proto.MESSAGE, - number=3579, - optional=True, - message="FileContentBuffer", - ) - + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. -class InsertAddressRequest(proto.Message): - r"""A request message for Addresses.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): + A list of InstanceGroup resources. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupList for instance group lists. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Attributes: - address_resource (google.cloud.compute_v1beta.types.Address): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_warning``. """ - address_resource: "Address" = proto.Field( - proto.MESSAGE, - number=483888121, - message="Address", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=37109963, + number=3355, optional=True, ) - - -class InsertAutoscalerRequest(proto.Message): - r"""A request message for Autoscalers.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - autoscaler_resource (google.cloud.compute_v1beta.types.Autoscaler): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - Name of the zone for this request. - """ - - autoscaler_resource: "Autoscaler" = proto.Field( + items: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, - number=207616118, - message="Autoscaler", + number=100526016, + message="InstanceGroup", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, ) - - -class InsertBackendBucketRequest(proto.Message): - r"""A request message for BackendBuckets.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - backend_bucket_resource: "BackendBucket" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=380757784, - message="BackendBucket", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + number=50704284, optional=True, + message="Warning", ) -class InsertBackendServiceRequest(proto.Message): - r"""A request message for BackendServices.Insert. See the method - description for details. +class InstanceGroupManager(proto.Message): + r"""Represents a Managed Instance Group resource. + An instance group is a collection of VM instances that you can + manage as a single entity. For more information, readInstance + groups. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + For zonal Managed Instance Group, use the instanceGroupManagers + resource. - Attributes: - backend_service_resource (google.cloud.compute_v1beta.types.BackendService): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + For regional Managed Instance Group, use + theregionInstanceGroupManagers resource. - This field is a member of `oneof`_ ``_request_id``. - """ - backend_service_resource: "BackendService" = proto.Field( - proto.MESSAGE, - number=347586723, - message="BackendService", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + all_instances_config (google.cloud.compute_v1beta.types.InstanceGroupManagerAllInstancesConfig): + Specifies configuration that overrides the + instance template configuration for the group. -class InsertCrossSiteNetworkRequest(proto.Message): - r"""A request message for CrossSiteNetworks.Insert. See the - method description for details. + This field is a member of `oneof`_ ``_all_instances_config``. + auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): + The autohealing policy for this managed + instance group. You can specify only one value. + base_instance_name (str): + The base instance name is a prefix that you want to attach + to the names of all VMs in a MIG. The maximum character + length is 58 and the name must comply with RFC1035 format. + When a VM is created in the group, the MIG appends a hyphen + and a random four-character string to the base instance + name. If you want the MIG to assign sequential numbers + instead of a random string, then end the base instance name + with a hyphen followed by one or more hash symbols. The hash + symbols indicate the number of digits. For example, a base + instance name of "vm-###" results in "vm-001" as a VM name. + @pattern + `a-z <([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\[[0-9]{1,10}\])?)>`__ - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_base_instance_name``. + creation_timestamp (str): + Output only. [Output Only] The creation timestamp for this + managed instance group inRFC3339 text format. - Attributes: - cross_site_network_resource (google.cloud.compute_v1beta.types.CrossSiteNetwork): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + This field is a member of `oneof`_ ``_creation_timestamp``. + current_actions (google.cloud.compute_v1beta.types.InstanceGroupManagerActionsSummary): + Output only. [Output Only] The list of instance actions and + the number of instances in this managed instance group that + are scheduled for each of those actions. - This field is a member of `oneof`_ ``_request_id``. - validate_only (bool): - [Input Only] Validate the new configuration, but don't - create it. + This field is a member of `oneof`_ ``_current_actions``. + description (str): + An optional description of this resource. - This field is a member of `oneof`_ ``_validate_only``. - """ + This field is a member of `oneof`_ ``_description``. + distribution_policy (google.cloud.compute_v1beta.types.DistributionPolicy): + Policy specifying the intended distribution + of managed instances across zones in a regional + managed instance group. - cross_site_network_resource: "CrossSiteNetwork" = proto.Field( - proto.MESSAGE, - number=30896696, - message="CrossSiteNetwork", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, - optional=True, - ) + This field is a member of `oneof`_ ``_distribution_policy``. + failover_action (str): + The action to perform in case of zone failure. Only one + value is supported,NO_FAILOVER. The default is NO_FAILOVER. + Check the FailoverAction enum for the list of possible + values. + This field is a member of `oneof`_ ``_failover_action``. + fingerprint (str): + Fingerprint of this resource. This field may + be used in optimistic locking. It will be + ignored when inserting an InstanceGroupManager. + An up-to-date fingerprint must be provided in + order to update the InstanceGroupManager, + otherwise the request will fail with error412 + conditionNotMet. -class InsertDiskRequest(proto.Message): - r"""A request message for Disks.Insert. See the method - description for details. + To see the latest fingerprint, make a get() + request to retrieve an InstanceGroupManager. + This field is a member of `oneof`_ ``_fingerprint``. + id (int): + Output only. [Output Only] A unique identifier for this + resource type. The server generates this identifier. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_id``. + instance_flexibility_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicy): + Instance flexibility allowing MIG to create + VMs from multiple types of machines. + Instance flexibility configuration on MIG + overrides instance template configuration. - Attributes: - disk_resource (google.cloud.compute_v1beta.types.Disk): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_instance_flexibility_policy``. + instance_group (str): + Output only. [Output Only] The URL of the Instance Group + resource. - This field is a member of `oneof`_ ``_request_id``. - source_image (str): - Source image to restore onto a disk. This - field is optional. + This field is a member of `oneof`_ ``_instance_group``. + instance_lifecycle_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceLifecyclePolicy): + The repair policy for this managed instance + group. - This field is a member of `oneof`_ ``_source_image``. - zone (str): - The name of the zone for this request. - """ + This field is a member of `oneof`_ ``_instance_lifecycle_policy``. + instance_template (str): + The URL of the instance template that is + specified for this managed instance group. The + group uses this template to create all new + instances in the managed instance group. The + templates for existing instances in the group do + not change unless you run recreateInstances, + runapplyUpdatesToInstances, or set the + group'supdatePolicy.type to PROACTIVE. - disk_resource: "Disk" = proto.Field( - proto.MESSAGE, - number=25880688, - message="Disk", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - source_image: str = proto.Field( - proto.STRING, - number=50443319, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_instance_template``. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupManager for managed instance + groups. + This field is a member of `oneof`_ ``_kind``. + list_managed_instances_results (str): + Pagination behavior of the + listManagedInstances API method for this managed + instance group. Check the + ListManagedInstancesResults enum for the list of + possible values. -class InsertExternalVpnGatewayRequest(proto.Message): - r"""A request message for ExternalVpnGateways.Insert. See the - method description for details. + This field is a member of `oneof`_ ``_list_managed_instances_results``. + multi_mig (str): + URL to the multi-MIG that this Managed + Instance Group belongs to. + This field is a member of `oneof`_ ``_multi_mig``. + name (str): + The name of the managed instance group. The + name must be 1-63 characters long, and comply + withRFC1035. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_name``. + named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): + [Output Only] Named ports configured on the Instance Groups + complementary to this Instance Group Manager. + params (google.cloud.compute_v1beta.types.InstanceGroupManagerParams): + Input only. Additional params passed with the + request, but not persisted as part of resource + payload. - Attributes: - external_vpn_gateway_resource (google.cloud.compute_v1beta.types.ExternalVpnGateway): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_params``. + region (str): + Output only. [Output Only] The URL of theregion where the + managed instance group resides (for regional resources). - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_region``. + resource_policies (google.cloud.compute_v1beta.types.InstanceGroupManagerResourcePolicies): + Resource policies for this managed instance + group. - external_vpn_gateway_resource: "ExternalVpnGateway" = proto.Field( - proto.MESSAGE, - number=486813576, - message="ExternalVpnGateway", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_resource_policies``. + satisfies_pzi (bool): + Output only. [Output Only] Reserved for future use. + This field is a member of `oneof`_ ``_satisfies_pzi``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. -class InsertFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_satisfies_pzs``. + self_link (str): + Output only. [Output Only] The URL for this managed instance + group. The server defines this URL. + This field is a member of `oneof`_ ``_self_link``. + service_account (str): + The service account to be used as credentials + for all operations performed by the managed + instance group on instances. The service + accounts needs all permissions required to + create and delete instances. By default, the + service account + {projectNumber}@cloudservices.gserviceaccount.com + is used. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_service_account``. + standby_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerStandbyPolicy): + Standby policy for stopped and suspended + instances. - Attributes: - firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): - The body resource for this request - parent_id (str): - Parent ID for this request. The ID can be either be - "folders/[FOLDER_ID]" if the parent is a folder or - "organizations/[ORGANIZATION_ID]" if the parent is an - organization. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_standby_policy``. + stateful_policy (google.cloud.compute_v1beta.types.StatefulPolicy): + Stateful configuration for this Instanced + Group Manager - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_stateful_policy``. + status (google.cloud.compute_v1beta.types.InstanceGroupManagerStatus): + Output only. [Output Only] The status of this managed + instance group. - firewall_policy_resource: "FirewallPolicy" = proto.Field( - proto.MESSAGE, - number=495049532, - message="FirewallPolicy", - ) - parent_id: str = proto.Field( - proto.STRING, - number=459714768, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_status``. + target_pools (MutableSequence[str]): + The URLs for all TargetPool resources to + which instances in theinstanceGroup field are + added. The target pools automatically apply to + all of the instances in the managed instance + group. + target_size (int): + The target number of running instances for + this managed instance group. You can reduce this + number by using the instanceGroupManager + deleteInstances or abandonInstances methods. + Resizing the group also changes this number. + This field is a member of `oneof`_ ``_target_size``. + target_size_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerTargetSizePolicy): + The policy that specifies how the MIG creates + its VMs to achieve the target size. -class InsertFirewallRequest(proto.Message): - r"""A request message for Firewalls.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_target_size_policy``. + target_stopped_size (int): + The target number of stopped instances for + this managed instance group. This number changes + when you: + - Stop instance using the stopInstances + method or start instances using the + startInstances method. + - Manually change the targetStoppedSize using + the update method. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_target_stopped_size``. + target_suspended_size (int): + The target number of suspended instances for + this managed instance group. This number changes + when you: - Attributes: - firewall_resource (google.cloud.compute_v1beta.types.Firewall): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + - Suspend instance using the suspendInstances + method or resume instances using the + resumeInstances method. + - Manually change the targetSuspendedSize + using the update method. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_target_suspended_size``. + update_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerUpdatePolicy): + The update policy for this managed instance + group. - firewall_resource: "Firewall" = proto.Field( - proto.MESSAGE, - number=41425005, - message="Firewall", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_update_policy``. + versions (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerVersion]): + Specifies the instance templates used by this + managed instance group to create instances. + Each version is defined by an instanceTemplate + and aname. Every version can appear at most once + per instance group. This field overrides the + top-level instanceTemplate field. Read more + about therelationships + between these fields. Exactly one version must + leave thetargetSize field unset. That version + will be applied to all remaining instances. For + more information, read aboutcanary updates. + zone (str): + Output only. [Output Only] The URL of azone where the + managed instance group is located (for zonal resources). -class InsertForwardingRuleRequest(proto.Message): - r"""A request message for ForwardingRules.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_zone``. + """ + class FailoverAction(proto.Enum): + r"""The action to perform in case of zone failure. Only one value is + supported,NO_FAILOVER. The default is NO_FAILOVER. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Values: + UNDEFINED_FAILOVER_ACTION (0): + A value indicating that the enum field is not + set. + NO_FAILOVER (480957872): + No description available. + UNKNOWN (433141802): + No description available. + """ + UNDEFINED_FAILOVER_ACTION = 0 + NO_FAILOVER = 480957872 + UNKNOWN = 433141802 - Attributes: - forwarding_rule_resource (google.cloud.compute_v1beta.types.ForwardingRule): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + class ListManagedInstancesResults(proto.Enum): + r"""Pagination behavior of the listManagedInstances API method + for this managed instance group. - This field is a member of `oneof`_ ``_request_id``. - """ + Values: + UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS (0): + A value indicating that the enum field is not + set. + PAGELESS (32183464): + (Default) Pagination is disabled for the + group'slistManagedInstances API method. + maxResults and pageToken query parameters are + ignored and all instances are returned in a + single response. + PAGINATED (40190637): + Pagination is enabled for the group's + listManagedInstances API method. maxResults and + pageToken query parameters are respected. + """ + UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS = 0 + PAGELESS = 32183464 + PAGINATED = 40190637 - forwarding_rule_resource: "ForwardingRule" = proto.Field( + all_instances_config: "InstanceGroupManagerAllInstancesConfig" = proto.Field( proto.MESSAGE, - number=301211695, - message="ForwardingRule", + number=112596737, + optional=True, + message="InstanceGroupManagerAllInstancesConfig", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + auto_healing_policies: MutableSequence[ + "InstanceGroupManagerAutoHealingPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=456799109, + message="InstanceGroupManagerAutoHealingPolicy", ) - region: str = proto.Field( + base_instance_name: str = proto.Field( proto.STRING, - number=138946292, + number=389106439, + optional=True, ) - request_id: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=30525366, optional=True, ) - - -class InsertFutureReservationRequest(proto.Message): - r"""A request message for FutureReservations.Insert. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - future_reservation_resource (google.cloud.compute_v1beta.types.FutureReservation): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - Name of the zone for this request. Name - should conform to RFC1035. - """ - - future_reservation_resource: "FutureReservation" = proto.Field( + current_actions: "InstanceGroupManagerActionsSummary" = proto.Field( proto.MESSAGE, - number=466750493, - message="FutureReservation", + number=164045879, + optional=True, + message="InstanceGroupManagerActionsSummary", ) - project: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=227560217, + number=422937596, + optional=True, ) - request_id: str = proto.Field( + distribution_policy: "DistributionPolicy" = proto.Field( + proto.MESSAGE, + number=534558541, + optional=True, + message="DistributionPolicy", + ) + failover_action: str = proto.Field( proto.STRING, - number=37109963, + number=202248739, optional=True, ) - zone: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=3744684, + number=234678500, + optional=True, ) - - -class InsertGlobalAddressRequest(proto.Message): - r"""A request message for GlobalAddresses.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - address_resource (google.cloud.compute_v1beta.types.Address): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - address_resource: "Address" = proto.Field( - proto.MESSAGE, - number=483888121, - message="Address", + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + instance_flexibility_policy: "InstanceGroupManagerInstanceFlexibilityPolicy" = ( + proto.Field( + proto.MESSAGE, + number=26937090, + optional=True, + message="InstanceGroupManagerInstanceFlexibilityPolicy", + ) ) - request_id: str = proto.Field( + instance_group: str = proto.Field( proto.STRING, - number=37109963, + number=81095253, optional=True, ) - - -class InsertGlobalForwardingRuleRequest(proto.Message): - r"""A request message for GlobalForwardingRules.Insert. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - forwarding_rule_resource (google.cloud.compute_v1beta.types.ForwardingRule): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - forwarding_rule_resource: "ForwardingRule" = proto.Field( - proto.MESSAGE, - number=301211695, - message="ForwardingRule", + instance_lifecycle_policy: "InstanceGroupManagerInstanceLifecyclePolicy" = ( + proto.Field( + proto.MESSAGE, + number=447961617, + optional=True, + message="InstanceGroupManagerInstanceLifecyclePolicy", + ) ) - project: str = proto.Field( + instance_template: str = proto.Field( proto.STRING, - number=227560217, + number=309248228, + optional=True, ) - request_id: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - - -class InsertGlobalNetworkEndpointGroupRequest(proto.Message): - r"""A request message for GlobalNetworkEndpointGroups.Insert. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( - proto.MESSAGE, - number=525788839, - message="NetworkEndpointGroup", - ) - project: str = proto.Field( + list_managed_instances_results: str = proto.Field( proto.STRING, - number=227560217, + number=296047156, + optional=True, ) - request_id: str = proto.Field( + multi_mig: str = proto.Field( proto.STRING, - number=37109963, + number=403990085, optional=True, ) - - -class InsertGlobalPublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for GlobalPublicDelegatedPrefixes.Insert. - 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. - public_delegated_prefix_resource (google.cloud.compute_v1beta.types.PublicDelegatedPrefix): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - project: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=227560217, + number=3373707, + optional=True, ) - public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, - number=47594501, - message="PublicDelegatedPrefix", + number=427598732, + message="NamedPort", ) - request_id: str = proto.Field( + params: "InstanceGroupManagerParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="InstanceGroupManagerParams", + ) + region: str = proto.Field( proto.STRING, - number=37109963, + number=138946292, optional=True, ) - - -class InsertHealthCheckRequest(proto.Message): - r"""A request message for HealthChecks.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - health_check_resource (google.cloud.compute_v1beta.types.HealthCheck): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - health_check_resource: "HealthCheck" = proto.Field( + resource_policies: "InstanceGroupManagerResourcePolicies" = proto.Field( proto.MESSAGE, - number=201925032, - message="HealthCheck", + number=22220385, + optional=True, + message="InstanceGroupManagerResourcePolicies", ) - project: str = proto.Field( + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=480964257, + optional=True, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, + optional=True, + ) + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - request_id: str = proto.Field( + service_account: str = proto.Field( proto.STRING, - number=37109963, + number=199455395, optional=True, ) - - -class InsertImageRequest(proto.Message): - r"""A request message for Images.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - force_create (bool): - Force image creation if true. - - This field is a member of `oneof`_ ``_force_create``. - image_resource (google.cloud.compute_v1beta.types.Image): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - force_create: bool = proto.Field( - proto.BOOL, - number=197723344, + standby_policy: "InstanceGroupManagerStandbyPolicy" = proto.Field( + proto.MESSAGE, + number=499352324, optional=True, + message="InstanceGroupManagerStandbyPolicy", ) - image_resource: "Image" = proto.Field( + stateful_policy: "StatefulPolicy" = proto.Field( proto.MESSAGE, - number=371171954, - message="Image", + number=47538565, + optional=True, + message="StatefulPolicy", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + status: "InstanceGroupManagerStatus" = proto.Field( + proto.MESSAGE, + number=181260274, + optional=True, + message="InstanceGroupManagerStatus", ) - request_id: str = proto.Field( + target_pools: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, + number=336072617, + ) + target_size: int = proto.Field( + proto.INT32, + number=62880239, optional=True, ) - - -class InsertInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.Insert. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_group_manager_resource (google.cloud.compute_v1beta.types.InstanceGroupManager): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where you want to create - the managed instance group. - """ - - instance_group_manager_resource: "InstanceGroupManager" = proto.Field( + target_size_policy: "InstanceGroupManagerTargetSizePolicy" = proto.Field( proto.MESSAGE, - number=261063946, - message="InstanceGroupManager", + number=128773506, + optional=True, + message="InstanceGroupManagerTargetSizePolicy", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + target_stopped_size: int = proto.Field( + proto.INT32, + number=2419489, + optional=True, + ) + target_suspended_size: int = proto.Field( + proto.INT32, + number=308085843, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + update_policy: "InstanceGroupManagerUpdatePolicy" = proto.Field( + proto.MESSAGE, + number=175809896, optional=True, + message="InstanceGroupManagerUpdatePolicy", + ) + versions: MutableSequence["InstanceGroupManagerVersion"] = proto.RepeatedField( + proto.MESSAGE, + number=162430619, + message="InstanceGroupManagerVersion", ) zone: str = proto.Field( proto.STRING, number=3744684, + optional=True, ) -class InsertInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - InstanceGroupManagerResizeRequests.Insert. See the method - description for details. - +class InstanceGroupManagerActionsSummary(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group to - which the resize request will be added. Name - should conform to RFC1035 or be a resource ID. - instance_group_manager_resize_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located and where the resize - request will be created. Name should conform to - RFC1035. - """ - - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - instance_group_manager_resize_request_resource: "InstanceGroupManagerResizeRequest" = proto.Field( - proto.MESSAGE, - number=468541293, - message="InstanceGroupManagerResizeRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + abandoning (int): + Output only. [Output Only] The total number of instances in + the managed instance group that are scheduled to be + abandoned. Abandoning an instance removes it from the + managed instance group without deleting it. + This field is a member of `oneof`_ ``_abandoning``. + adopting (int): + [Output Only] The number of instances in the managed + instance group that are scheduled to be adopted or are + currently being adopted. -class InsertInstanceGroupRequest(proto.Message): - r"""A request message for InstanceGroups.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_adopting``. + creating (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be created or + are currently being created. If the group fails to create + any of these instances, it tries again until it creates the + instance successfully. + If you have disabled creation retries, this field will not + be populated; instead, the creatingWithoutRetries field will + be populated. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_creating``. + creating_without_retries (int): + Output only. [Output Only] The number of instances that the + managed instance group will attempt to create. The group + attempts to create each instance only once. If the group + fails to create any of these instances, it decreases the + group's targetSize value accordingly. - Attributes: - instance_group_resource (google.cloud.compute_v1beta.types.InstanceGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_creating_without_retries``. + deleting (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be deleted or + are currently being deleted. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where you want to create - the instance group. - """ + This field is a member of `oneof`_ ``_deleting``. + none (int): + Output only. [Output Only] The number of instances in the + managed instance group that are running and have no + scheduled actions. - instance_group_resource: "InstanceGroup" = proto.Field( - proto.MESSAGE, - number=286612152, - message="InstanceGroup", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_none``. + recreating (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be recreated or + are currently being being recreated. Recreating an instance + deletes the existing root persistent disk and creates a new + disk from the image that is defined in the instance + template. + This field is a member of `oneof`_ ``_recreating``. + refreshing (int): + Output only. [Output Only] The number of instances in the + managed instance group that are being reconfigured with + properties that do not require a restart or a recreate + action. For example, setting or removing target pools for + the instance. -class InsertInstanceRequest(proto.Message): - r"""A request message for Instances.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_refreshing``. + restarting (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be restarted or + are currently being restarted. + This field is a member of `oneof`_ ``_restarting``. + resuming (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be resumed or + are currently being resumed. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_resuming``. + starting (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be started or + are currently being started. - Attributes: - instance_resource (google.cloud.compute_v1beta.types.Instance): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_starting``. + stopping (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be stopped or + are currently being stopped. - This field is a member of `oneof`_ ``_request_id``. - source_instance_template (str): - Specifies instance template to create the - instance. This field is optional. It can be a - full or partial URL. For example, the following - are all valid URLs to an instance template: - - https://www.googleapis.com/compute/v1/projects/project - /global/instanceTemplates/instanceTemplate - - projects/project/global/instanceTemplates/instanceTemplate - - global/instanceTemplates/instanceTemplate + This field is a member of `oneof`_ ``_stopping``. + suspending (int): + Output only. [Output Only] The number of instances in the + managed instance group that are scheduled to be suspended or + are currently being suspended. - This field is a member of `oneof`_ ``_source_instance_template``. - source_machine_image (str): - Specifies the machine image to use to create - the instance. This field is optional. It can be - a full or partial URL. For example, the - following are all valid URLs to a machine image: - - - https://www.googleapis.com/compute/v1/projects/project/global/global - /machineImages/machineImage - - projects/project/global/global/machineImages/machineImage - - global/machineImages/machineImage + This field is a member of `oneof`_ ``_suspending``. + verifying (int): + Output only. [Output Only] The number of instances in the + managed instance group that are being verified. See the + managedInstances[].currentAction property in the + listManagedInstances method documentation. - This field is a member of `oneof`_ ``_source_machine_image``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_verifying``. """ - instance_resource: "Instance" = proto.Field( - proto.MESSAGE, - number=215988344, - message="Instance", + abandoning: int = proto.Field( + proto.INT32, + number=440023373, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + adopting: int = proto.Field( + proto.INT32, + number=168537650, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + creating: int = proto.Field( + proto.INT32, + number=209809081, optional=True, ) - source_instance_template: str = proto.Field( - proto.STRING, - number=332423616, + creating_without_retries: int = proto.Field( + proto.INT32, + number=369916745, optional=True, ) - source_machine_image: str = proto.Field( - proto.STRING, - number=21769791, + deleting: int = proto.Field( + proto.INT32, + number=282846120, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + none: int = proto.Field( + proto.INT32, + number=3387192, + optional=True, ) - - -class InsertInstanceTemplateRequest(proto.Message): - r"""A request message for InstanceTemplates.Insert. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_template_resource (google.cloud.compute_v1beta.types.InstanceTemplate): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - instance_template_resource: "InstanceTemplate" = proto.Field( - proto.MESSAGE, - number=10679561, - message="InstanceTemplate", + recreating: int = proto.Field( + proto.INT32, + number=339057132, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + refreshing: int = proto.Field( + proto.INT32, + number=215044903, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + restarting: int = proto.Field( + proto.INT32, + number=372312947, + optional=True, + ) + resuming: int = proto.Field( + proto.INT32, + number=201100714, + optional=True, + ) + starting: int = proto.Field( + proto.INT32, + number=243064896, + optional=True, + ) + stopping: int = proto.Field( + proto.INT32, + number=105035892, + optional=True, + ) + suspending: int = proto.Field( + proto.INT32, + number=29113894, + optional=True, + ) + verifying: int = proto.Field( + proto.INT32, + number=451612873, optional=True, ) -class InsertInstantSnapshotRequest(proto.Message): - r"""A request message for InstantSnapshots.Insert. See the method - description for details. - +class InstanceGroupManagerAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instant_snapshot_resource (google.cloud.compute_v1beta.types.InstantSnapshot): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - Name of the zone for this request. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagersScopedList]): + A list of InstanceGroupManagersScopedList + resources. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupManagerAggregatedList for an + aggregated list of managed instance groups. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instant_snapshot_resource: "InstantSnapshot" = proto.Field( - proto.MESSAGE, - number=383915339, - message="InstantSnapshot", + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, ) - project: str = proto.Field( + items: MutableMapping[str, "InstanceGroupManagersScopedList"] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=100526016, + message="InstanceGroupManagersScopedList", ) - request_id: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - zone: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=3744684, - ) - - -class InsertInterconnectAttachmentGroupRequest(proto.Message): - r"""A request message for InterconnectAttachmentGroups.Insert. - See the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - interconnect_attachment_group_resource (google.cloud.compute_v1beta.types.InterconnectAttachmentGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder - - This field is a member of `oneof`_ ``_request_id``. - """ - - interconnect_attachment_group_resource: "InterconnectAttachmentGroup" = proto.Field( - proto.MESSAGE, - number=9990137, - message="InterconnectAttachmentGroup", + number=79797525, + optional=True, ) - project: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - request_id: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class InsertInterconnectAttachmentRequest(proto.Message): - r"""A request message for InterconnectAttachments.Insert. See the - method description for details. - +class InstanceGroupManagerAllInstancesConfig(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_attachment_resource (google.cloud.compute_v1beta.types.InterconnectAttachment): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - validate_only (bool): - If true, the request will not be committed. + properties (google.cloud.compute_v1beta.types.InstancePropertiesPatch): + Properties to set on all instances in the + group. + You can add or modify properties using + theinstanceGroupManagers.patch + orregionInstanceGroupManagers.patch. After + settingallInstancesConfig on the group, you must + update the group's instances to apply the + configuration. To apply the configuration, set + the group's updatePolicy.type field to use + proactive updates or use the + applyUpdatesToInstances method. - This field is a member of `oneof`_ ``_validate_only``. + This field is a member of `oneof`_ ``_properties``. """ - interconnect_attachment_resource: "InterconnectAttachment" = proto.Field( + properties: "InstancePropertiesPatch" = proto.Field( proto.MESSAGE, - number=212341369, - message="InterconnectAttachment", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, + number=147688755, optional=True, + message="InstancePropertiesPatch", ) -class InsertInterconnectGroupRequest(proto.Message): - r"""A request message for InterconnectGroups.Insert. See the - method description for details. - +class InstanceGroupManagerAutoHealingPolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_group_resource (google.cloud.compute_v1beta.types.InterconnectGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + health_check (str): + The URL for the health check that signals + autohealing. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_health_check``. + initial_delay_sec (int): + The initial delay is the number of seconds + that a new VM takes to initialize and run its + startup script. During a VM's initial delay + period, the MIG ignores unsuccessful health + checks because the VM might be in the startup + process. This prevents the MIG from prematurely + recreating a VM. If the health check receives a + healthy response during the initial delay, it + indicates that the startup process is complete + and the VM is ready. The value of initial delay + must be between 0 and 3600 seconds. The default + value is 0. + + This field is a member of `oneof`_ ``_initial_delay_sec``. """ - interconnect_group_resource: "InterconnectGroup" = proto.Field( - proto.MESSAGE, - number=85571999, - message="InterconnectGroup", - ) - project: str = proto.Field( + health_check: str = proto.Field( proto.STRING, - number=227560217, + number=308876645, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + initial_delay_sec: int = proto.Field( + proto.INT32, + number=263207002, optional=True, ) -class InsertInterconnectRequest(proto.Message): - r"""A request message for Interconnects.Insert. See the method - description for details. - +class InstanceGroupManagerInstanceFlexibilityPolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_resource (google.cloud.compute_v1beta.types.Interconnect): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_selections (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection]): + Named instance selections configuring + properties that the group will use when creating + new VMs. + provisioning_model_mix (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix): + Provisioning model configuration used by this + managed instance group to create instances. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_provisioning_model_mix``. """ - interconnect_resource: "Interconnect" = proto.Field( - proto.MESSAGE, - number=397611167, - message="Interconnect", - ) - project: str = proto.Field( + instance_selections: MutableMapping[ + str, "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection" + ] = proto.MapField( proto.STRING, - number=227560217, + proto.MESSAGE, + number=22954577, + message="InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + provisioning_model_mix: "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix" = proto.Field( + proto.MESSAGE, + number=272686452, optional=True, + message="InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", ) -class InsertLicenseRequest(proto.Message): - r"""A request message for Licenses.Insert. See the method - description for details. - +class InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - license_resource (google.cloud.compute_v1beta.types.License): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + disks (MutableSequence[google.cloud.compute_v1beta.types.AttachedDisk]): + List of disks to be attached to the instances + created from this selection. + machine_types (MutableSequence[str]): + Full machine-type names, e.g. + "n1-standard-16". + min_cpu_platform (str): + Name of the minimum CPU platform to be used + by this instance selection. e.g. 'Intel Ice + Lake'. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_min_cpu_platform``. + rank (int): + Preference of this instance selection. Lower + number means higher preference. MIG will first + try to create a VM based on the machine-type + with lowest rank and fallback to next rank based + on availability. Machine types and instance + selections with the same rank have the same + preference. + + This field is a member of `oneof`_ ``_rank``. """ - license_resource: "License" = proto.Field( + disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( proto.MESSAGE, - number=437955148, - message="License", + number=95594102, + message="AttachedDisk", ) - project: str = proto.Field( + machine_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=79720065, ) - request_id: str = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, - number=37109963, + number=242912759, + optional=True, + ) + rank: int = proto.Field( + proto.INT32, + number=3492908, optional=True, ) -class InsertMachineImageRequest(proto.Message): - r"""A request message for MachineImages.Insert. See the method - description for details. - +class InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - machine_image_resource (google.cloud.compute_v1beta.types.MachineImage): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + standard_capacity_base (int): + The base capacity that will always use Standard VMs to avoid + risk of more preemption than the minimum capacity user + needs. MIG will create only Standard VMs until it reaches + standard_capacity_base and only then will start using + standard_capacity_percent_above_base to mix Spot with + Standard VMs. - This field is a member of `oneof`_ ``_request_id``. - source_instance (str): - Required. Source instance that is used to - create the machine image from. + This field is a member of `oneof`_ ``_standard_capacity_base``. + standard_capacity_percent_above_base (int): + The percentage of target capacity that should use Standard + VM. The remaining percentage will use Spot VMs. The + percentage applies only to the capacity above + standard_capacity_base. - This field is a member of `oneof`_ ``_source_instance``. + This field is a member of `oneof`_ ``_standard_capacity_percent_above_base``. """ - machine_image_resource: "MachineImage" = proto.Field( - proto.MESSAGE, - number=60740970, - message="MachineImage", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + standard_capacity_base: int = proto.Field( + proto.INT32, + number=388067636, optional=True, ) - source_instance: str = proto.Field( - proto.STRING, - number=396315705, + standard_capacity_percent_above_base: int = proto.Field( + proto.INT32, + number=401038224, optional=True, ) -class InsertNetworkAttachmentRequest(proto.Message): - r"""A request message for NetworkAttachments.Insert. See the - method description for details. - +class InstanceGroupManagerInstanceLifecyclePolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_attachment_resource (google.cloud.compute_v1beta.types.NetworkAttachment): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder + default_action_on_failure (str): + The action that a MIG performs on a failed VM. If the value + of the onFailedHealthCheck field is ``DEFAULT_ACTION``, then + the same action also applies to the VMs on which your + application fails a health check. Valid values are - REPAIR + (default): MIG automatically repairs a failed VM by + recreating it. For more information, seeAbout repairing VMs + in a MIG. - DO_NOTHING: MIG does not repair a failed VM. + Check the DefaultActionOnFailure enum for the list of + possible values. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_default_action_on_failure``. + force_update_on_repair (str): + A bit indicating whether to forcefully apply + the group's latest configuration when repairing + a VM. Valid options are: - network_attachment_resource: "NetworkAttachment" = proto.Field( - proto.MESSAGE, - number=210974745, - message="NetworkAttachment", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) -class InsertNetworkEdgeSecurityServiceRequest(proto.Message): - r"""A request message for NetworkEdgeSecurityServices.Insert. See - the method description for details. + - NO (default): If configuration updates + are available, they are not forcefully + applied during repair. Instead, configuration + updates are applied according to the + group's update policy. + - YES: If configuration updates are + available, they are applied during + repair. + Check the ForceUpdateOnRepair enum for the list + of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_force_update_on_repair``. + on_failed_health_check (str): + The action that a MIG performs on an unhealthy VM. A VM is + marked as unhealthy when the application running on that VM + fails a health check. Valid values are: - Attributes: - network_edge_security_service_resource (google.cloud.compute_v1beta.types.NetworkEdgeSecurityService): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + :: - This field is a member of `oneof`_ ``_request_id``. - validate_only (bool): - If true, the request will not be committed. + - DEFAULT_ACTION (default): MIG uses the same action + configured for instanceLifecyclePolicy.defaultActionOnFailure field. + - REPAIR: MIG automatically repairs an unhealthy VM by + recreating it. + - DO_NOTHING: MIG doesn't repair an unhealthy VM. + For more information, see + About repairing VMs in a MIG. - This field is a member of `oneof`_ ``_validate_only``. + Check the OnFailedHealthCheck enum for the list of possible + values. + + This field is a member of `oneof`_ ``_on_failed_health_check``. + on_repair (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceLifecyclePolicyOnRepair): + Configuration for VM repairs in the MIG. + + This field is a member of `oneof`_ ``_on_repair``. """ - network_edge_security_service_resource: "NetworkEdgeSecurityService" = proto.Field( - proto.MESSAGE, - number=477548966, - message="NetworkEdgeSecurityService", - ) - project: str = proto.Field( + class DefaultActionOnFailure(proto.Enum): + r"""The action that a MIG performs on a failed VM. If the value of the + onFailedHealthCheck field is ``DEFAULT_ACTION``, then the same + action also applies to the VMs on which your application fails a + health check. Valid values are - REPAIR (default): MIG automatically + repairs a failed VM by recreating it. For more information, seeAbout + repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed + VM. Additional supported values which may be not listed in the enum + directly due to technical reasons: DO_NOTHING REPAIR + + Values: + UNDEFINED_DEFAULT_ACTION_ON_FAILURE (0): + A value indicating that the enum field is not + set. + DELETE (402225579): + MIG deletes a failed or an unhealthy VM. + Deleting the VM decreases the target size of the + MIG. + DO_NOTHING (451307513): + No description available. + REPAIR (266277773): + No description available. + """ + UNDEFINED_DEFAULT_ACTION_ON_FAILURE = 0 + DELETE = 402225579 + DO_NOTHING = 451307513 + REPAIR = 266277773 + + class ForceUpdateOnRepair(proto.Enum): + r"""A bit indicating whether to forcefully apply the group's + latest configuration when repairing a VM. Valid options are: + + + + - NO (default): If configuration updates are available, + they are not forcefully applied during repair. Instead, + configuration updates are applied according to the + group's update policy. + + - YES: If configuration updates are available, they are + applied during repair. + + Values: + UNDEFINED_FORCE_UPDATE_ON_REPAIR (0): + A value indicating that the enum field is not + set. + NO (2497): + No description available. + YES (87751): + No description available. + """ + UNDEFINED_FORCE_UPDATE_ON_REPAIR = 0 + NO = 2497 + YES = 87751 + + class OnFailedHealthCheck(proto.Enum): + r"""The action that a MIG performs on an unhealthy VM. A VM is marked as + unhealthy when the application running on that VM fails a health + check. Valid values are: + + :: + + - DEFAULT_ACTION (default): MIG uses the same action + configured for instanceLifecyclePolicy.defaultActionOnFailure field. + - REPAIR: MIG automatically repairs an unhealthy VM by + recreating it. + - DO_NOTHING: MIG doesn't repair an unhealthy VM. + For more information, see + About repairing VMs in a MIG. + + Additional supported values which may be not listed in the enum + directly due to technical reasons: DO_NOTHING REPAIR + + Values: + UNDEFINED_ON_FAILED_HEALTH_CHECK (0): + A value indicating that the enum field is not + set. + DEFAULT_ACTION (463967764): + (Default) MIG uses the same action configured + for + instanceLifecyclePolicy.defaultActionOnFailure + field. + """ + UNDEFINED_ON_FAILED_HEALTH_CHECK = 0 + DEFAULT_ACTION = 463967764 + + default_action_on_failure: str = proto.Field( proto.STRING, - number=227560217, + number=61383253, + optional=True, ) - region: str = proto.Field( + force_update_on_repair: str = proto.Field( proto.STRING, - number=138946292, + number=356302027, + optional=True, ) - request_id: str = proto.Field( + on_failed_health_check: str = proto.Field( proto.STRING, - number=37109963, + number=39807943, optional=True, ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, + on_repair: "InstanceGroupManagerInstanceLifecyclePolicyOnRepair" = proto.Field( + proto.MESSAGE, + number=371820013, optional=True, + message="InstanceGroupManagerInstanceLifecyclePolicyOnRepair", ) -class InsertNetworkEndpointGroupRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.Insert. See the - method description for details. - +class InstanceGroupManagerInstanceLifecyclePolicyOnRepair(proto.Message): + r"""Configuration for VM repairs in the MIG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + allow_changing_zone (str): + Specifies whether the MIG can change a VM's + zone during a repair. Valid values are: - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where you want to create - the network endpoint group. It should comply - with RFC1035. + - NO (default): MIG cannot change a VM's zone + during a repair. + - YES: MIG can select a different zone for + the VM during a repair. + Check the AllowChangingZone enum for the list of + possible values. + + This field is a member of `oneof`_ ``_allow_changing_zone``. """ - network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( - proto.MESSAGE, - number=525788839, - message="NetworkEndpointGroup", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + class AllowChangingZone(proto.Enum): + r"""Specifies whether the MIG can change a VM's zone during a + repair. Valid values are: + + - NO (default): MIG cannot change a VM's zone during a + repair. + - YES: MIG can select a different zone for the VM during a + repair. + + Values: + UNDEFINED_ALLOW_CHANGING_ZONE (0): + A value indicating that the enum field is not + set. + NO (2497): + [Default] MIG cannot change a VM's zone during a repair. + YES (87751): + MIG can select a different zone for the VM + during a repair. + """ + UNDEFINED_ALLOW_CHANGING_ZONE = 0 + NO = 2497 + YES = 87751 + + allow_changing_zone: str = proto.Field( proto.STRING, - number=37109963, + number=426055112, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class InsertNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.Insert. See the - method description for details. - +class InstanceGroupManagerList(proto.Message): + r"""[Output Only] A list of managed instance groups. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): + A list of InstanceGroupManager resources. + kind (str): + Output only. [Output Only] The resource type, which is + always compute#instanceGroupManagerList for a list of + managed instance groups. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - firewall_policy_resource: "FirewallPolicy" = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( proto.MESSAGE, - number=495049532, - message="FirewallPolicy", + number=100526016, + message="InstanceGroupManager", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class InsertNetworkRequest(proto.Message): - r"""A request message for Networks.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class InstanceGroupManagerParams(proto.Message): + r"""Input only additional params for instance group manager + creation. Attributes: - network_resource (google.cloud.compute_v1beta.types.Network): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to bind to the managed instance group. + The tags are key-value pairs. Keys and values can be either + in numeric format, such as ``tagKeys/{tag_key_id}`` and + ``tagValues/456`` or in namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. For more information, seeManage + tags for resources. """ - network_resource: "Network" = proto.Field( - proto.MESSAGE, - number=122105599, - message="Network", - ) - project: str = proto.Field( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( proto.STRING, - number=37109963, - optional=True, + number=377671164, ) -class InsertNodeGroupRequest(proto.Message): - r"""A request message for NodeGroups.Insert. See the method - description for details. +class InstanceGroupManagerResizeRequest(proto.Message): + r"""InstanceGroupManagerResizeRequest represents a request to + create a number of VMs: either immediately or by queuing the + request for the specified time. This resize request is nested + under InstanceGroupManager and the VMs created by this request + are added to the owning InstanceGroupManager. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - initial_node_count (int): - Initial count of nodes in the node group. - node_group_resource (google.cloud.compute_v1beta.types.NodeGroup): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. - """ + count (int): + This field is deprecated, please use resize_by instead. The + count of instances to create as part of this resize request. - initial_node_count: int = proto.Field( - proto.INT32, - number=71951469, - ) - node_group_resource: "NodeGroup" = proto.Field( - proto.MESSAGE, - number=505321899, - message="NodeGroup", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + This field is a member of `oneof`_ ``_count``. + creation_timestamp (str): + Output only. [Output Only] The creation timestamp for this + resize request inRFC3339 text format. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. -class InsertNodeTemplateRequest(proto.Message): - r"""A request message for NodeTemplates.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_description``. + id (int): + Output only. [Output Only] A unique identifier for this + resource type. The server generates this identifier. + This field is a member of `oneof`_ ``_id``. + instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The names of instances to be created by this resize request. + The number of names specified determines the number of + instances to create. The group's target size will be + increased by this number. This field cannot be used together + with 'resize_by'. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupManagerResizeRequest for resize + requests. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + name (str): + The name of this resize request. The name + must be 1-63 characters long, and comply + withRFC1035. - Attributes: - node_template_resource (google.cloud.compute_v1beta.types.NodeTemplate): - The body resource for this request - project (str): - Project ID for this request. + This field is a member of `oneof`_ ``_name``. region (str): - The name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ + Output only. [Output Only] The URL of aregion where the + resize request is located. Populated only for regional + resize requests. - node_template_resource: "NodeTemplate" = proto.Field( - proto.MESSAGE, - number=127364406, - message="NodeTemplate", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_region``. + requested_run_duration (google.cloud.compute_v1beta.types.Duration): + Requested run duration for instances that + will be created by this request. At the end of + the run duration instance will be deleted. + This field is a member of `oneof`_ ``_requested_run_duration``. + resize_by (int): + The number of instances to be created by this + resize request. The group's target size will be + increased by this number. This field cannot be + used together with 'instances'. -class InsertOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.Insert. - See the method description for details. + This field is a member of `oneof`_ ``_resize_by``. + self_link (str): + Output only. [Output Only] The URL for this resize request. + The server defines this URL. + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_self_link_with_id``. + state (str): + Output only. [Output only] Current state of the request. + Check the State enum for the list of possible values. - Attributes: - parent_id (str): - Parent ID for this request. The ID can be either be - "folders/[FOLDER_ID]" if the parent is a folder or - "organizations/[ORGANIZATION_ID]" if the parent is an - organization. + This field is a member of `oneof`_ ``_state``. + status (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequestStatus): + Output only. [Output only] Status of the request. - This field is a member of `oneof`_ ``_parent_id``. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_status``. + zone (str): + Output only. [Output Only] The URL of azone where the resize + request is located. Populated only for zonal resize + requests. - This field is a member of `oneof`_ ``_request_id``. - security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): - The body resource for this request + This field is a member of `oneof`_ ``_zone``. """ - parent_id: str = proto.Field( + class State(proto.Enum): + r"""Output only. [Output only] Current state of the request. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACCEPTED (246714279): + The request was created successfully and was + accepted for provisioning when the capacity + becomes available. + CANCELLED (41957681): + The request is cancelled. + CREATING (455564985): + Resize request is being created and may still + fail creation. + FAILED (455706685): + The request failed before or during + provisioning. If the request fails during + provisioning, any VMs that were created during + provisioning are rolled back and removed from + the MIG. + PROVISIONING (290896621): + The value is deprecated. ResizeRequests would + stay in the ACCEPTED state during provisioning + attempts. The target resource(s) are being + provisioned. + STATE_UNSPECIFIED (470755401): + Default value. This value should never be + returned. + SUCCEEDED (511103553): + The request succeeded. + """ + UNDEFINED_STATE = 0 + ACCEPTED = 246714279 + CANCELLED = 41957681 + CREATING = 455564985 + FAILED = 455706685 + PROVISIONING = 290896621 + STATE_UNSPECIFIED = 470755401 + SUCCEEDED = 511103553 + + count: int = proto.Field( + proto.INT32, + number=94851343, + optional=True, + ) + creation_timestamp: str = proto.Field( proto.STRING, - number=459714768, + number=30525366, optional=True, ) - request_id: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=37109963, + number=422937596, optional=True, ) - security_policy_resource: "SecurityPolicy" = proto.Field( - proto.MESSAGE, - number=216159612, - message="SecurityPolicy", + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - - -class InsertPacketMirroringRequest(proto.Message): - r"""A request message for PacketMirrorings.Insert. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - packet_mirroring_resource (google.cloud.compute_v1beta.types.PacketMirroring): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - packet_mirroring_resource: "PacketMirroring" = proto.Field( + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, - number=493501985, - message="PacketMirroring", + number=29097598, + message="PerInstanceConfig", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, ) region: str = proto.Field( proto.STRING, number=138946292, + optional=True, ) - request_id: str = proto.Field( + requested_run_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=232146425, + optional=True, + message="Duration", + ) + resize_by: int = proto.Field( + proto.INT32, + number=533735362, + optional=True, + ) + self_link: str = proto.Field( proto.STRING, - number=37109963, + number=456214797, optional=True, ) - - -class InsertPublicAdvertisedPrefixeRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.Insert. 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. - public_advertised_prefix_resource (google.cloud.compute_v1beta.types.PublicAdvertisedPrefix): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - project: str = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, - number=227560217, + number=44520962, + optional=True, ) - public_advertised_prefix_resource: "PublicAdvertisedPrefix" = proto.Field( + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + status: "InstanceGroupManagerResizeRequestStatus" = proto.Field( proto.MESSAGE, - number=233614223, - message="PublicAdvertisedPrefix", + number=181260274, + optional=True, + message="InstanceGroupManagerResizeRequestStatus", ) - request_id: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=37109963, + number=3744684, optional=True, ) -class InsertPublicDelegatedPrefixeRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.Insert. See the - method description for details. - +class InstanceGroupManagerResizeRequestStatus(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - public_delegated_prefix_resource (google.cloud.compute_v1beta.types.PublicDelegatedPrefix): - The body resource for this request - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + error (google.cloud.compute_v1beta.types.Error): + Output only. [Output only] Fatal errors encountered during + the queueing or provisioning phases of the ResizeRequest + that caused the transition to the FAILED state. Contrary to + the last_attempt errors, this field is final and errors are + never removed from here, as the ResizeRequest is not going + to retry. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_error``. + last_attempt (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequestStatusLastAttempt): + Output only. [Output only] Information about the last + attempt to fulfill the request. The value is temporary since + the ResizeRequest can retry, as long as it's still active + and the last attempt value can either be cleared or replaced + with a different error. Since ResizeRequest retries + infrequently, the value may be stale and no longer show an + active problem. The value is cleared when ResizeRequest + transitions to the final state (becomes inactive). If the + final state is FAILED the error describing it will be + storred in the "error" field only. + + This field is a member of `oneof`_ ``_last_attempt``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( + error: "Error" = proto.Field( proto.MESSAGE, - number=47594501, - message="PublicDelegatedPrefix", - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + number=96784904, + optional=True, + message="Error", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + last_attempt: "InstanceGroupManagerResizeRequestStatusLastAttempt" = proto.Field( + proto.MESSAGE, + number=434771492, optional=True, + message="InstanceGroupManagerResizeRequestStatusLastAttempt", ) -class InsertRegionAutoscalerRequest(proto.Message): - r"""A request message for RegionAutoscalers.Insert. See the - method description for details. - +class InstanceGroupManagerResizeRequestStatusLastAttempt(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - autoscaler_resource (google.cloud.compute_v1beta.types.Autoscaler): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + error (google.cloud.compute_v1beta.types.Error): + Output only. Errors that prevented the + ResizeRequest to be fulfilled. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_error``. """ - autoscaler_resource: "Autoscaler" = proto.Field( + error: "Error" = proto.Field( proto.MESSAGE, - number=207616118, - message="Autoscaler", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + number=96784904, optional=True, + message="Error", ) -class InsertRegionBackendServiceRequest(proto.Message): - r"""A request message for RegionBackendServices.Insert. See the - method description for details. - +class InstanceGroupManagerResizeRequestsListResponse(proto.Message): + r"""[Output Only] A list of resize requests. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service_resource (google.cloud.compute_v1beta.types.BackendService): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): + A list of resize request resources. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#instanceGroupManagerResizeRequestList for a + list of resize requests. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - backend_service_resource: "BackendService" = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["InstanceGroupManagerResizeRequest"] = proto.RepeatedField( proto.MESSAGE, - number=347586723, - message="BackendService", + number=100526016, + message="InstanceGroupManagerResizeRequest", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - region: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=138946292, + number=79797525, + optional=True, ) - request_id: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=37109963, + number=456214797, optional=True, ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class InsertRegionCommitmentRequest(proto.Message): - r"""A request message for RegionCommitments.Insert. See the - method description for details. - +class InstanceGroupManagerResourcePolicies(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - commitment_resource (google.cloud.compute_v1beta.types.Commitment): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + workload_policy (str): + The URL of the workload policy that is + specified for this managed instance group. + It can be a full or partial URL. For example, + the following are all valid URLs to a workload + policy: - This field is a member of `oneof`_ ``_request_id``. + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + - + projects/project/regions/region/resourcePolicies/resourcePolicy + - + regions/region/resourcePolicies/resourcePolicy + + This field is a member of `oneof`_ ``_workload_policy``. """ - commitment_resource: "Commitment" = proto.Field( - proto.MESSAGE, - number=244240888, - message="Commitment", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + workload_policy: str = proto.Field( proto.STRING, - number=37109963, + number=114721530, optional=True, ) -class InsertRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.Insert. See the method - description for details. - +class InstanceGroupManagerStandbyPolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk_resource (google.cloud.compute_v1beta.types.Disk): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + initial_delay_sec (int): + Specifies the number of seconds that the MIG + should wait to suspend or stop a VM after that + VM was created. The initial delay gives the + initialization script the time to prepare your + VM for a quick scale out. The value of initial + delay must be between 0 and 3600 seconds. The + default value is 0. - This field is a member of `oneof`_ ``_request_id``. - source_image (str): - Source image to restore onto a disk. This - field is optional. + This field is a member of `oneof`_ ``_initial_delay_sec``. + mode (str): + Defines how a MIG resumes or starts VMs from a standby pool + when the group scales out. The default mode is ``MANUAL``. + Check the Mode enum for the list of possible values. - This field is a member of `oneof`_ ``_source_image``. + This field is a member of `oneof`_ ``_mode``. """ - disk_resource: "Disk" = proto.Field( - proto.MESSAGE, - number=25880688, - message="Disk", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + class Mode(proto.Enum): + r"""Defines how a MIG resumes or starts VMs from a standby pool when the + group scales out. The default mode is ``MANUAL``. + + Values: + UNDEFINED_MODE (0): + A value indicating that the enum field is not + set. + MANUAL (119397318): + MIG does not automatically resume or start + VMs in the standby pool when the group scales + out. + SCALE_OUT_POOL (635394): + MIG automatically resumes or starts VMs in + the standby pool when the group scales out, and + replenishes the standby pool afterwards. + """ + UNDEFINED_MODE = 0 + MANUAL = 119397318 + SCALE_OUT_POOL = 635394 + + initial_delay_sec: int = proto.Field( + proto.INT32, + number=263207002, optional=True, ) - source_image: str = proto.Field( + mode: str = proto.Field( proto.STRING, - number=50443319, + number=3357091, optional=True, ) -class InsertRegionHealthCheckRequest(proto.Message): - r"""A request message for RegionHealthChecks.Insert. See the - method description for details. - +class InstanceGroupManagerStatus(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check_resource (google.cloud.compute_v1beta.types.HealthCheck): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + all_instances_config (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusAllInstancesConfig): + Output only. [Output only] Status of all-instances + configuration on the group. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_all_instances_config``. + autoscaler (str): + Output only. [Output Only] The URL of theAutoscaler that + targets this instance group manager. + + This field is a member of `oneof`_ ``_autoscaler``. + bulk_instance_operation (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusBulkInstanceOperation): + Output only. [Output Only] The status of bulk instance + operation. + + This field is a member of `oneof`_ ``_bulk_instance_operation``. + is_stable (bool): + Output only. [Output Only] A bit indicating whether the + managed instance group is in a stable state. A stable state + means that: none of the instances in the managed instance + group is currently undergoing any type of change (for + example, creation, restart, or deletion); no future changes + are scheduled for instances in the managed instance group; + and the managed instance group itself is not being modified. + + This field is a member of `oneof`_ ``_is_stable``. + stateful (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusStateful): + Output only. [Output Only] Stateful status of the given + Instance Group Manager. + + This field is a member of `oneof`_ ``_stateful``. + version_target (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusVersionTarget): + Output only. [Output Only] A status of consistency of + Instances' versions with their target version specified by + version field on Instance Group Manager. + + This field is a member of `oneof`_ ``_version_target``. """ - health_check_resource: "HealthCheck" = proto.Field( + all_instances_config: "InstanceGroupManagerStatusAllInstancesConfig" = proto.Field( proto.MESSAGE, - number=201925032, - message="HealthCheck", + number=112596737, + optional=True, + message="InstanceGroupManagerStatusAllInstancesConfig", ) - project: str = proto.Field( + autoscaler: str = proto.Field( proto.STRING, - number=227560217, + number=517258967, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + bulk_instance_operation: "InstanceGroupManagerStatusBulkInstanceOperation" = ( + proto.Field( + proto.MESSAGE, + number=501667466, + optional=True, + message="InstanceGroupManagerStatusBulkInstanceOperation", + ) ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + is_stable: bool = proto.Field( + proto.BOOL, + number=108410864, optional=True, ) + stateful: "InstanceGroupManagerStatusStateful" = proto.Field( + proto.MESSAGE, + number=244462412, + optional=True, + message="InstanceGroupManagerStatusStateful", + ) + version_target: "InstanceGroupManagerStatusVersionTarget" = proto.Field( + proto.MESSAGE, + number=289386200, + optional=True, + message="InstanceGroupManagerStatusVersionTarget", + ) -class InsertRegionHealthCheckServiceRequest(proto.Message): - r"""A request message for RegionHealthCheckServices.Insert. See - the method description for details. - +class InstanceGroupManagerStatusAllInstancesConfig(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check_service_resource (google.cloud.compute_v1beta.types.HealthCheckService): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + current_revision (str): + Output only. [Output Only] Current all-instances + configuration revision. This value is in RFC3339 text + format. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_current_revision``. + effective (bool): + Output only. [Output Only] A bit indicating whether this + configuration has been applied to all managed instances in + the group. + + This field is a member of `oneof`_ ``_effective``. """ - health_check_service_resource: "HealthCheckService" = proto.Field( - proto.MESSAGE, - number=477367794, - message="HealthCheckService", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + current_revision: str = proto.Field( proto.STRING, - number=138946292, + number=38355937, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + effective: bool = proto.Field( + proto.BOOL, + number=141961639, optional=True, ) -class InsertRegionHealthSourceRequest(proto.Message): - r"""A request message for RegionHealthSources.Insert. See the - method description for details. +class InstanceGroupManagerStatusBulkInstanceOperation(proto.Message): + r"""Bulk instance operation is the creation of VMs in a MIG when + the targetSizePolicy.mode is set to BULK. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_source_resource (google.cloud.compute_v1beta.types.HealthSource): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + in_progress (bool): + Output only. [Output Only] Informs whether bulk instance + operation is in progress. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_in_progress``. + last_progress_check (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck): + Output only. [Output Only] Information from the last + progress check of bulk instance operation. + + This field is a member of `oneof`_ ``_last_progress_check``. """ - health_source_resource: "HealthSource" = proto.Field( - proto.MESSAGE, - number=357735375, - message="HealthSource", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + in_progress: bool = proto.Field( + proto.BOOL, + number=320200711, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + last_progress_check: "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck" = proto.Field( + proto.MESSAGE, + number=208638271, optional=True, + message="InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", ) -class InsertRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.Insert. See - the method description for details. - +class InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager_resource (google.cloud.compute_v1beta.types.InstanceGroupManager): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + error (google.cloud.compute_v1beta.types.Error): + Output only. [Output Only] Errors encountered during bulk + instance operation. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_error``. + timestamp (str): + Output only. [Output Only] Timestamp of the last progress + check of bulk instance operation. Timestamp is in RFC3339 + text format. + + This field is a member of `oneof`_ ``_timestamp``. """ - instance_group_manager_resource: "InstanceGroupManager" = proto.Field( + error: "Error" = proto.Field( proto.MESSAGE, - number=261063946, - message="InstanceGroupManager", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + number=96784904, + optional=True, + message="Error", ) - request_id: str = proto.Field( + timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=55126294, optional=True, ) -class InsertRegionInstanceGroupManagerResizeRequestRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagerResizeRequests.Insert. See the method - description for details. - +class InstanceGroupManagerStatusStateful(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group to which - the resize request is scoped. Name should - conform to RFC1035 or be a resource ID. - instance_group_manager_resize_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. Name - should conform to RFC1035. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + has_stateful_config (bool): + Output only. [Output Only] A bit indicating whether the + managed instance group has stateful configuration, that is, + if you have configured any items in a stateful policy or in + per-instance configs. The group might report that it has no + stateful configuration even when there is still some + preserved state on a managed instance, for example, if you + have deleted all PICs but not yet applied those deletions. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_has_stateful_config``. + is_stateful (bool): + Output only. [Output Only] A bit indicating whether the + managed instance group has stateful configuration, that is, + if you have configured any items in a stateful policy or in + per-instance configs. The group might report that it has no + stateful configuration even when there is still some + preserved state on a managed instance, for example, if you + have deleted all PICs but not yet applied those deletions. + This field is deprecated in favor of has_stateful_config. + + This field is a member of `oneof`_ ``_is_stateful``. + per_instance_configs (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusStatefulPerInstanceConfigs): + Output only. [Output Only] Status of per-instance + configurations on the instances. + + This field is a member of `oneof`_ ``_per_instance_configs``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - instance_group_manager_resize_request_resource: "InstanceGroupManagerResizeRequest" = proto.Field( - proto.MESSAGE, - number=468541293, - message="InstanceGroupManagerResizeRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + has_stateful_config: bool = proto.Field( + proto.BOOL, + number=110474224, + optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + is_stateful: bool = proto.Field( + proto.BOOL, + number=46302913, optional=True, ) + per_instance_configs: "InstanceGroupManagerStatusStatefulPerInstanceConfigs" = ( + proto.Field( + proto.MESSAGE, + number=526265001, + optional=True, + message="InstanceGroupManagerStatusStatefulPerInstanceConfigs", + ) + ) -class InsertRegionInstanceTemplateRequest(proto.Message): - r"""A request message for RegionInstanceTemplates.Insert. See the - method description for details. - +class InstanceGroupManagerStatusStatefulPerInstanceConfigs(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template_resource (google.cloud.compute_v1beta.types.InstanceTemplate): - The body resource for this request - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + all_effective (bool): + Output only. A bit indicating if all of the + group's per-instance configurations (listed in + the output of a listPerInstanceConfigs API call) + have status EFFECTIVE or there are no + per-instance-configs. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_all_effective``. """ - instance_template_resource: "InstanceTemplate" = proto.Field( - proto.MESSAGE, - number=10679561, - message="InstanceTemplate", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + all_effective: bool = proto.Field( + proto.BOOL, + number=516540553, optional=True, ) -class InsertRegionInstantSnapshotRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.Insert. See the - method description for details. - +class InstanceGroupManagerStatusVersionTarget(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instant_snapshot_resource (google.cloud.compute_v1beta.types.InstantSnapshot): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + is_reached (bool): + Output only. [Output Only] A bit indicating whether version + target has been reached in this managed instance group, i.e. + all instances are in their target version. Instances' target + version are specified byversion field on Instance Group + Manager. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_is_reached``. """ - instant_snapshot_resource: "InstantSnapshot" = proto.Field( - proto.MESSAGE, - number=383915339, - message="InstantSnapshot", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + is_reached: bool = proto.Field( + proto.BOOL, + number=433209149, optional=True, ) -class InsertRegionMultiMigRequest(proto.Message): - r"""A request message for RegionMultiMigs.Insert. See the method - description for details. - +class InstanceGroupManagerTargetSizePolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - multi_mig_resource (google.cloud.compute_v1beta.types.MultiMig): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents you from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + mode (str): + The mode of target size policy based on which + the MIG creates its VMs individually or all at + once. Check the Mode enum for the list of + possible values. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_mode``. """ - multi_mig_resource: "MultiMig" = proto.Field( - proto.MESSAGE, - number=173722824, - message="MultiMig", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + class Mode(proto.Enum): + r"""The mode of target size policy based on which the MIG creates + its VMs individually or all at once. + + Values: + UNDEFINED_MODE (0): + A value indicating that the enum field is not + set. + BULK (2050322): + The mode in which the MIG creates VMs all at + once. In this mode, if the MIG is unable to + create even one VM, the MIG waits until all VMs + can be created at the same time. + INDIVIDUAL (438800025): + The mode in which the MIG creates VMs + individually. In this mode, if the MIG is unable + to create a VM, the MIG will continue to create + the other VMs in the group. This is the default + mode. + UNSPECIFIED_MODE (53715403): + If mode is unspecified, MIG will behave as in the default + ``INDIVIDUAL`` mode. + """ + UNDEFINED_MODE = 0 + BULK = 2050322 + INDIVIDUAL = 438800025 + UNSPECIFIED_MODE = 53715403 + + mode: str = proto.Field( proto.STRING, - number=37109963, + number=3357091, optional=True, ) -class InsertRegionNetworkEndpointGroupRequest(proto.Message): - r"""A request message for RegionNetworkEndpointGroups.Insert. See - the method description for details. - +class InstanceGroupManagerUpdatePolicy(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoint_group_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroup): - The body resource for this request - project (str): - Project ID for this request. - region (str): - The name of the region where you want to - create the network endpoint group. It should - comply with RFC1035. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_redistribution_type (str): + The + instance redistribution policy for regional + managed instance groups. Valid values are: + + - PROACTIVE (default): The group attempts to + maintain an even distribution of VM + instances across zones in the region. + - NONE: For non-autoscaled groups, proactive + redistribution is disabled. + Check the InstanceRedistributionType enum for + the list of possible values. + + This field is a member of `oneof`_ ``_instance_redistribution_type``. + max_surge (google.cloud.compute_v1beta.types.FixedOrPercent): + The maximum number of instances that can be + created above the specifiedtargetSize during the + update process. This value can be either a fixed + number or, if the group has 10 or more + instances, a percentage. If you set a + percentage, the number of instances is rounded + if necessary. The default value for maxSurge is + a fixed value equal to the number of zones in + which the managed instance group operates. + + At least one of either maxSurge ormaxUnavailable + must be greater than 0. Learn more about + maxSurge. + + This field is a member of `oneof`_ ``_max_surge``. + max_unavailable (google.cloud.compute_v1beta.types.FixedOrPercent): + The maximum number of instances that can be + unavailable during the update process. An + instance is considered available if all of the + following conditions are satisfied: + + + + - The instance's status is + RUNNING. + - If there is a health + check on the instance group, the instance's + health check status must be HEALTHY at + least once. If there is no health check on + the group, then the instance only needs to have + a status of RUNNING to be considered + available. + + This value can be either a fixed number or, if + the group has 10 or more instances, a + percentage. If you set a percentage, the number + of instances is rounded if necessary. The + default value formaxUnavailable is a fixed value + equal to the number of zones in which the + managed instance group operates. + + At least one of either maxSurge ormaxUnavailable + must be greater than 0. Learn more about + maxUnavailable. + + This field is a member of `oneof`_ ``_max_unavailable``. + min_ready_sec (int): + Minimum number of seconds to wait for after a newly created + instance becomes available. This value must be from range + [0, 3600]. + + This field is a member of `oneof`_ ``_min_ready_sec``. + minimal_action (str): + Minimal action to be taken on an instance. + Use this option to minimize disruption as much + as possible or to apply a more disruptive action + than is necessary. + + - To limit disruption as much as possible, + set the minimal action toREFRESH. If your + update requires a more disruptive action, + Compute Engine performs the necessary action + to execute the update. + - To apply a more disruptive action than is + strictly necessary, set the minimal action + to RESTART or REPLACE. For + example, Compute Engine does not need to + restart a VM to change its metadata. But if + your application reads instance metadata only + when a VM is restarted, you can set the + minimal action to RESTART in order to pick up + metadata changes. + Check the MinimalAction enum for the list of + possible values. + + This field is a member of `oneof`_ ``_minimal_action``. + most_disruptive_allowed_action (str): + Most disruptive action that is allowed to be + taken on an instance. You can specify either + NONE to forbid any actions,REFRESH to avoid + restarting the VM and to limit disruption as + much as possible. RESTART to allow actions that + can be applied without instance replacing or + REPLACE to allow all possible actions. If the + Updater determines that the minimal update + action needed is more disruptive than most + disruptive allowed action you specify it will + not perform the update at all. Check the + MostDisruptiveAllowedAction enum for the list of + possible values. + + This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. + replacement_method (str): + What action should be used to replace instances. See + minimal_action.REPLACE Check the ReplacementMethod enum for + the list of possible values. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_replacement_method``. + type_ (str): + The type + of update process. You can specify either + PROACTIVE so that the MIG automatically updates + VMs to the latest configurations orOPPORTUNISTIC + so that you can select the VMs that you want to + update. + Check the Type enum for the list of possible + values. + + This field is a member of `oneof`_ ``_type``. """ - network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( - proto.MESSAGE, - number=525788839, - message="NetworkEndpointGroup", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + class InstanceRedistributionType(proto.Enum): + r"""The + instance redistribution policy for regional managed instance + groups. Valid values are: + + - PROACTIVE (default): The group attempts to maintain an + even distribution of VM instances across zones in the region. + - NONE: For non-autoscaled groups, proactive + redistribution is disabled. + Additional supported values which may be not listed in the enum + directly due to technical reasons: + NONE + PROACTIVE -class InsertRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for RegionNetworkFirewallPolicies.Insert. - See the method description for details. + Values: + UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE = 0 + class MinimalAction(proto.Enum): + r"""Minimal action to be taken on an instance. Use this option to + minimize disruption as much as possible or to apply a more + disruptive action than is necessary. + + - To limit disruption as much as possible, set the minimal + action toREFRESH. If your update requires a more disruptive + action, Compute Engine performs the necessary action to + execute the update. + - To apply a more disruptive action than is strictly + necessary, set the minimal action to RESTART or REPLACE. + For + example, Compute Engine does not need to restart a VM to + change its metadata. But if your application reads instance + metadata only when a VM is restarted, you can set the minimal + action to RESTART in order to pick up metadata changes. + Additional supported values which may be not listed in the enum + directly due to technical reasons: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + NONE + REFRESH + REPLACE + RESTART - Attributes: - firewall_policy_resource (google.cloud.compute_v1beta.types.FirewallPolicy): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + Values: + UNDEFINED_MINIMAL_ACTION (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_MINIMAL_ACTION = 0 - This field is a member of `oneof`_ ``_request_id``. - """ + class MostDisruptiveAllowedAction(proto.Enum): + r"""Most disruptive action that is allowed to be taken on an + instance. You can specify either NONE to forbid any + actions,REFRESH to avoid restarting the VM and to limit + disruption as much as possible. RESTART to allow actions that + can be applied without instance replacing or REPLACE to allow + all possible actions. If the Updater determines that the minimal + update action needed is more disruptive than most disruptive + allowed action you specify it will not perform the update at + all. + Additional supported values which may be not listed in the enum + directly due to technical reasons: - firewall_policy_resource: "FirewallPolicy" = proto.Field( - proto.MESSAGE, - number=495049532, - message="FirewallPolicy", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + NONE + REFRESH + REPLACE + RESTART + Values: + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 -class InsertRegionNetworkPolicyRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.Insert. See the - method description for details. + class ReplacementMethod(proto.Enum): + r"""What action should be used to replace instances. See + minimal_action.REPLACE + Values: + UNDEFINED_REPLACEMENT_METHOD (0): + A value indicating that the enum field is not + set. + RECREATE (522644719): + Instances will be recreated (with the same + name) + SUBSTITUTE (280924314): + Default option: instances will be deleted and + created (with a new name) + """ + UNDEFINED_REPLACEMENT_METHOD = 0 + RECREATE = 522644719 + SUBSTITUTE = 280924314 - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + class Type(proto.Enum): + r"""The type + of update process. You can specify either PROACTIVE so that the + MIG automatically updates VMs to the latest configurations + orOPPORTUNISTIC so that you can select the VMs that you want to + update. + Additional supported values which may be not listed in the enum + directly due to technical reasons: - Attributes: - network_policy_resource (google.cloud.compute_v1beta.types.NetworkPolicy): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + PROACTIVE - This field is a member of `oneof`_ ``_request_id``. - """ + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + OPPORTUNISTIC (429530089): + MIG will apply new configurations + to existing VMs only when you selectively target + specific or all VMs to be updated. + """ + UNDEFINED_TYPE = 0 + OPPORTUNISTIC = 429530089 - network_policy_resource: "NetworkPolicy" = proto.Field( + instance_redistribution_type: str = proto.Field( + proto.STRING, + number=292630424, + optional=True, + ) + max_surge: "FixedOrPercent" = proto.Field( proto.MESSAGE, - number=437886058, - message="NetworkPolicy", + number=302572691, + optional=True, + message="FixedOrPercent", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + max_unavailable: "FixedOrPercent" = proto.Field( + proto.MESSAGE, + number=404940277, + optional=True, + message="FixedOrPercent", ) - region: str = proto.Field( - proto.STRING, - number=138946292, + min_ready_sec: int = proto.Field( + proto.INT32, + number=372481544, + optional=True, ) - request_id: str = proto.Field( + minimal_action: str = proto.Field( proto.STRING, - number=37109963, + number=270567060, optional=True, ) - - -class InsertRegionNotificationEndpointRequest(proto.Message): - r"""A request message for RegionNotificationEndpoints.Insert. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - notification_endpoint_resource (google.cloud.compute_v1beta.types.NotificationEndpoint): - The body resource for this request - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - notification_endpoint_resource: "NotificationEndpoint" = proto.Field( - proto.MESSAGE, - number=338459940, - message="NotificationEndpoint", - ) - project: str = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, - number=227560217, + number=66103053, + optional=True, ) - region: str = proto.Field( + replacement_method: str = proto.Field( proto.STRING, - number=138946292, + number=505931694, + optional=True, ) - request_id: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=37109963, + number=3575610, optional=True, ) -class InsertRegionSecurityPolicyRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.Insert. See the - method description for details. - +class InstanceGroupManagerVersion(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): - The body resource for this request - validate_only (bool): - If true, the request will not be committed. - - This field is a member of `oneof`_ ``_validate_only``. - """ - - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - security_policy_resource: "SecurityPolicy" = proto.Field( - proto.MESSAGE, - number=216159612, - message="SecurityPolicy", - ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, - optional=True, - ) + instance_template (str): + The URL of the instance template that is specified for this + managed instance group. The group uses this template to + create new instances in the managed instance group until the + ``targetSize`` for this version is reached. The templates + for existing instances in the group do not change unless you + run recreateInstances, runapplyUpdatesToInstances, or set + the group'supdatePolicy.type to PROACTIVE; in those cases, + existing instances are updated until the ``targetSize`` for + this version is reached. + This field is a member of `oneof`_ ``_instance_template``. + name (str): + Name of the version. Unique among all + versions in the scope of this managed instance + group. -class InsertRegionSnapshotRequest(proto.Message): - r"""A request message for RegionSnapshots.Insert. See the method - description for details. + This field is a member of `oneof`_ ``_name``. + target_size (google.cloud.compute_v1beta.types.FixedOrPercent): + Specifies the intended number of instances to be created + from theinstanceTemplate. The final number of instances + created from the template will be equal to: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - If expressed as a fixed number, the minimum of either + targetSize.fixed or + instanceGroupManager.targetSize is used. + - if expressed as a percent, the targetSize + would be (targetSize.percent/100 * + InstanceGroupManager.targetSize) If there is a remainder, the + number is rounded. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + If unset, this version will update any remaining instances + not updated by another version. ReadStarting a canary update + for more information. - This field is a member of `oneof`_ ``_request_id``. - snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): - The body resource for this request + This field is a member of `oneof`_ ``_target_size``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + instance_template: str = proto.Field( proto.STRING, - number=138946292, + number=309248228, + optional=True, ) - request_id: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=37109963, + number=3373707, optional=True, ) - snapshot_resource: "Snapshot" = proto.Field( + target_size: "FixedOrPercent" = proto.Field( proto.MESSAGE, - number=481319977, - message="Snapshot", + number=62880239, + optional=True, + message="FixedOrPercent", ) -class InsertRegionSslCertificateRequest(proto.Message): - r"""A request message for RegionSslCertificates.Insert. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class InstanceGroupManagersAbandonInstancesRequest(proto.Message): + r""" Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): - The body resource for this request + instances (MutableSequence[str]): + The URLs of one or more instances to abandon. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, - optional=True, - ) - ssl_certificate_resource: "SslCertificate" = proto.Field( - proto.MESSAGE, - number=180709897, - message="SslCertificate", + number=29097598, ) -class InsertRegionSslPolicyRequest(proto.Message): - r"""A request message for RegionSslPolicies.Insert. See the - method description for details. - +class InstanceGroupManagersApplyUpdatesRequest(proto.Message): + r"""InstanceGroupManagers.applyUpdatesToInstances .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + all_instances (bool): + Flag to update all instances instead of + specified list of “instances”. If the flag is + set to true then the instances may not be + specified in the request. - This field is a member of `oneof`_ ``_request_id``. - ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): - The body resource for this request - """ + This field is a member of `oneof`_ ``_all_instances``. + instances (MutableSequence[str]): + The list of URLs of one or more instances for which you want + to apply updates. Each URL can be a full URL or a partial + URL, such aszones/[ZONE]/instances/[INSTANCE_NAME]. + minimal_action (str): + The minimal action that you want to perform + on each instance during the update: + + + - REPLACE: At minimum, delete the instance + and create it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + + By default, the minimum action is NONE. If your + update requires a more disruptive action than + you set with this flag, the necessary action is + performed to execute the update. Check the + MinimalAction enum for the list of possible + values. - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - ssl_policy_resource: "SslPolicy" = proto.Field( - proto.MESSAGE, - number=274891848, - message="SslPolicy", - ) + This field is a member of `oneof`_ ``_minimal_action``. + most_disruptive_allowed_action (str): + The most disruptive action that you want to + perform on each instance during the update: + + + - REPLACE: Delete the instance and create + it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and + limit disruption as much as possible. + - NONE: Do not disrupt the + instance at all. + + By default, the most disruptive allowed action + is REPLACE. If your update requires a more + disruptive action than you set with this flag, + the update request will fail. + Check the MostDisruptiveAllowedAction enum for + the list of possible values. + This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. + """ -class InsertRegionTargetHttpProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpProxies.Insert. See the - method description for details. + class MinimalAction(proto.Enum): + r"""The minimal action that you want to perform on each instance + during the update: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - REPLACE: At minimum, delete the instance and create it + again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + By default, the minimum action is NONE. If your update requires + a more disruptive action than you set with this flag, the + necessary action is performed to execute the update. Additional + supported values which may be not listed in the enum directly + due to technical reasons: - This field is a member of `oneof`_ ``_request_id``. - target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): - The body resource for this request - """ + NONE + REFRESH + REPLACE + RESTART - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - target_http_proxy_resource: "TargetHttpProxy" = proto.Field( - proto.MESSAGE, - number=24696744, - message="TargetHttpProxy", - ) + Values: + UNDEFINED_MINIMAL_ACTION (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_MINIMAL_ACTION = 0 + class MostDisruptiveAllowedAction(proto.Enum): + r"""The most disruptive action that you want to perform on each + instance during the update: -class InsertRegionTargetHttpsProxyRequest(proto.Message): - r"""A request message for RegionTargetHttpsProxies.Insert. See - the method description for details. + - REPLACE: Delete the instance and create it again. + - RESTART: Stop the instance and start it again. + - REFRESH: Do not stop the instance and limit disruption + as much as possible. + - NONE: Do not disrupt the + instance at all. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + By default, the most disruptive allowed action is REPLACE. If + your update requires a more disruptive action than you set with + this flag, the update request will fail. + Additional supported values which may be not listed in the enum + directly due to technical reasons: - Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + NONE + REFRESH + REPLACE + RESTART - This field is a member of `oneof`_ ``_request_id``. - target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): - The body resource for this request - """ + Values: + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 - project: str = proto.Field( + all_instances: bool = proto.Field( + proto.BOOL, + number=403676512, + optional=True, + ) + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=29097598, ) - region: str = proto.Field( + minimal_action: str = proto.Field( proto.STRING, - number=138946292, + number=270567060, + optional=True, ) - request_id: str = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, - number=37109963, + number=66103053, optional=True, ) - target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( + + +class InstanceGroupManagersCreateInstancesRequest(proto.Message): + r"""InstanceGroupManagers.createInstances + + Attributes: + instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + [Required] List of specifications of per-instance configs. + """ + + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, - number=433657473, - message="TargetHttpsProxy", + number=29097598, + message="PerInstanceConfig", ) -class InsertRegionTargetTcpProxyRequest(proto.Message): - r"""A request message for RegionTargetTcpProxies.Insert. See the - method description for details. - +class InstanceGroupManagersDeleteInstancesRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instances (MutableSequence[str]): + The URLs of one or more instances to delete. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. Queued instances do + not have URL and can be deleted only by name. One cannot + specify both URLs and names in a single request. + skip_instances_on_validation_error (bool): + Specifies whether the request should proceed despite the + inclusion of instances that are not members of the group or + that are already in the process of being deleted or + abandoned. If this field is set to ``false`` and such an + instance is specified in the request, the operation fails. + The operation always fails if the request contains a + malformed instance URL or a reference to an instance that + exists in a zone or region other than the group's zone or + region. - This field is a member of `oneof`_ ``_request_id``. - target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): - The body resource for this request + This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=138946292, + number=29097598, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + skip_instances_on_validation_error: bool = proto.Field( + proto.BOOL, + number=40631073, optional=True, ) - target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( - proto.MESSAGE, - number=145913931, - message="TargetTcpProxy", - ) - - -class InsertRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.Insert. See the method - description for details. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class InstanceGroupManagersDeletePerInstanceConfigsReq(proto.Message): + r"""InstanceGroupManagers.deletePerInstanceConfigs Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - begin_interface: MixerMutationRequestBuilder Request ID to - support idempotency. - - This field is a member of `oneof`_ ``_request_id``. - url_map_resource (google.cloud.compute_v1beta.types.UrlMap): - The body resource for this request + names (MutableSequence[str]): + The list of instance names for which we want + to delete per-instance configs on this managed + instance group. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + names: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=138946292, + number=104585032, ) - request_id: str = proto.Field( + + +class InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse(proto.Message): + r""" + + Attributes: + accelerator_topologies_info (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo]): + The accelerator topology information returned + per id of the topology location. + """ + + accelerator_topologies_info: MutableMapping[ + str, + "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", + ] = proto.MapField( proto.STRING, - number=37109963, - optional=True, - ) - url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, - number=168675425, - message="UrlMap", + number=84833420, + message="InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", ) -class InsertReservationRequest(proto.Message): - r"""A request message for Reservations.Insert. See the method - description for details. - +class InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo( + proto.Message +): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + accelerator_topology (str): + Topology in the format of: "16x16", "4x4x4", + etc. - This field is a member of `oneof`_ ``_request_id``. - reservation_resource (google.cloud.compute_v1beta.types.Reservation): - The body resource for this request - zone (str): - Name of the zone for this request. + This field is a member of `oneof`_ ``_accelerator_topology``. + accelerator_topology_health (str): + Check the AcceleratorTopologyHealth enum for + the list of possible values. + + This field is a member of `oneof`_ ``_accelerator_topology_health``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + class AcceleratorTopologyHealth(proto.Enum): + r""" + + Values: + UNDEFINED_ACCELERATOR_TOPOLOGY_HEALTH (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + All VM are in RUNNING state, but there is an + issue with the inter-chip connectivity that + makes this part of the infrastructure ready to + use as a working inter-chip connected group only + in a degraded mode. This is allowed only for + Instances configured with ICI resiliency + HEALTHY (439801213): + All VM are in RUNNING state, there are no + issues with the inter-chip connectivity. + UNHEALTHY (462118084): + Some VMs may not be in RUNNING state, or + there is an issue with the inter-chip + connectivity that makes this part of the + infrastructure unsuitable for forming a working + inter-chip connected group. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_HEALTH = 0 + DEGRADED = 396890926 + HEALTHY = 439801213 + UNHEALTHY = 462118084 + + accelerator_topology: str = proto.Field( proto.STRING, - number=37109963, + number=389323203, optional=True, ) - reservation_resource: "Reservation" = proto.Field( - proto.MESSAGE, - number=285030177, - message="Reservation", - ) - zone: str = proto.Field( + accelerator_topology_health: str = proto.Field( proto.STRING, - number=3744684, + number=323449944, + optional=True, ) -class InsertResourcePolicyRequest(proto.Message): - r"""A request message for ResourcePolicies.Insert. See the method - description for details. - +class InstanceGroupManagersListErrorsResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceManagedByIgmError]): + Output only. [Output Only] The list of errors of the managed + instance group. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - This field is a member of `oneof`_ ``_request_id``. - resource_policy_resource (google.cloud.compute_v1beta.types.ResourcePolicy): - The body resource for this request + This field is a member of `oneof`_ ``_next_page_token``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + @property + def raw_page(self): + return self + + items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceManagedByIgmError", ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - resource_policy_resource: "ResourcePolicy" = proto.Field( - proto.MESSAGE, - number=76826186, - message="ResourcePolicy", - ) -class InsertRouteRequest(proto.Message): - r"""A request message for Routes.Insert. See the method - description for details. - +class InstanceGroupManagersListManagedInstancesResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + managed_instances (MutableSequence[google.cloud.compute_v1beta.types.ManagedInstance]): + Output only. [Output Only] The list of instances in the + managed instance group. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - This field is a member of `oneof`_ ``_request_id``. - route_resource (google.cloud.compute_v1beta.types.Route): - The body resource for this request + This field is a member of `oneof`_ ``_next_page_token``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, + @property + def raw_page(self): + return self + + managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=336219614, + message="ManagedInstance", ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - route_resource: "Route" = proto.Field( - proto.MESSAGE, - number=225428804, - message="Route", - ) - -class InsertRouterRequest(proto.Message): - r"""A request message for Routers.Insert. See the method - description for details. +class InstanceGroupManagersListPerInstanceConfigsResp(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + items (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + Output only. [Output Only] The list of PerInstanceConfig. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - This field is a member of `oneof`_ ``_request_id``. - router_resource (google.cloud.compute_v1beta.types.Router): - The body resource for this request + This field is a member of `oneof`_ ``_next_page_token``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + @property + def raw_page(self): + return self + + items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="PerInstanceConfig", ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - router_resource: "Router" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=155222084, - message="Router", + number=50704284, + optional=True, + message="Warning", ) -class InsertSecurityPolicyRequest(proto.Message): - r"""A request message for SecurityPolicies.Insert. See the method - description for details. +class InstanceGroupManagersPatchPerInstanceConfigsReq(proto.Message): + r"""InstanceGroupManagers.patchPerInstanceConfigs + Attributes: + per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The list of per-instance configurations to + insert or patch on this managed instance group. + """ - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=526265001, + message="PerInstanceConfig", + ) - Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_request_id``. - security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): - The body resource for this request - validate_only (bool): - If true, the request will not be committed. +class InstanceGroupManagersRecreateInstancesRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_validate_only``. + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to recreate. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, - optional=True, - ) - security_policy_resource: "SecurityPolicy" = proto.Field( - proto.MESSAGE, - number=216159612, - message="SecurityPolicy", - ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, - optional=True, + number=29097598, ) -class InsertServiceAttachmentRequest(proto.Message): - r"""A request message for ServiceAttachments.Insert. See the - method description for details. - +class InstanceGroupManagersResizeAdvancedRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + no_creation_retries (bool): + If this flag is true, the managed instance + group attempts to create all instances initiated + by this resize request only once. If there is an + error during creation, the managed instance + group does not retry create this instance, and + we will decrease the targetSize of the request + instead. If the flag is false, the group + attempts to recreate each instance continuously + until it succeeds. + + This flag matters only in the first attempt of + creation of an instance. After an instance is + successfully created while this flag is enabled, + the instance behaves the same way as all the + other instances created with a regular resize + request. In particular, if a running instance + dies unexpectedly at a later time and needs to + be recreated, this mode does not affect the + recreation behavior in that scenario. + + This flag is applicable only to the current + resize request. It does not influence other + resize requests in any way. + + You can see which instances is being creating in + which mode by calling the get or + listManagedInstances API. - This field is a member of `oneof`_ ``_request_id``. - service_attachment_resource (google.cloud.compute_v1beta.types.ServiceAttachment): - The body resource for this request + This field is a member of `oneof`_ ``_no_creation_retries``. + target_size (int): + The number of running instances that the + managed instance group should maintain at any + given time. The group automatically adds or + removes instances to maintain the number of + instances specified by this parameter. + + This field is a member of `oneof`_ ``_target_size``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + no_creation_retries: bool = proto.Field( + proto.BOOL, + number=39329444, optional=True, ) - service_attachment_resource: "ServiceAttachment" = proto.Field( - proto.MESSAGE, - number=472980256, - message="ServiceAttachment", + target_size: int = proto.Field( + proto.INT32, + number=62880239, + optional=True, ) -class InsertSnapshotRequest(proto.Message): - r"""A request message for Snapshots.Insert. See the method - description for details. +class InstanceGroupManagersResumeInstancesRequest(proto.Message): + r""" + + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to resume. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) + +class InstanceGroupManagersScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_group_managers (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): + Output only. [Output Only] The list of managed instance + groups that are contained in the specified project and zone. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] The warning that replaces the + list of managed instance groups when the list is empty. - This field is a member of `oneof`_ ``_request_id``. - snapshot_resource (google.cloud.compute_v1beta.types.Snapshot): - The body resource for this request + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, + instance_group_managers: MutableSequence[ + "InstanceGroupManager" + ] = proto.RepeatedField( + proto.MESSAGE, + number=214072592, + message="InstanceGroupManager", ) - snapshot_resource: "Snapshot" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=481319977, - message="Snapshot", + number=50704284, + optional=True, + message="Warning", ) -class InsertSslCertificateRequest(proto.Message): - r"""A request message for SslCertificates.Insert. See the method - description for details. +class InstanceGroupManagersSetAutoHealingRequest(proto.Message): + r""" + + Attributes: + auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): + + """ + + auto_healing_policies: MutableSequence[ + "InstanceGroupManagerAutoHealingPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=456799109, + message="InstanceGroupManagerAutoHealingPolicy", + ) +class InstanceGroupManagersSetInstanceTemplateRequest(proto.Message): + r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_template (str): + The URL of the instance template that is + specified for this managed instance group. The + group uses this template to create all new + instances in the managed instance group. The + templates for existing instances in the group do + not change unless you run recreateInstances, + runapplyUpdatesToInstances, or set the + group'supdatePolicy.type to PROACTIVE. - This field is a member of `oneof`_ ``_request_id``. - ssl_certificate_resource (google.cloud.compute_v1beta.types.SslCertificate): - The body resource for this request + This field is a member of `oneof`_ ``_instance_template``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + instance_template: str = proto.Field( proto.STRING, - number=37109963, + number=309248228, optional=True, ) - ssl_certificate_resource: "SslCertificate" = proto.Field( - proto.MESSAGE, - number=180709897, - message="SslCertificate", - ) - -class InsertSslPolicyRequest(proto.Message): - r"""A request message for SslPolicies.Insert. See the method - description for details. +class InstanceGroupManagersSetTargetPoolsRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + fingerprint (str): + The fingerprint of the target pools + information. Use this optional property to + prevent conflicts when multiple users change the + target pools settings concurrently. Obtain the + fingerprint with theinstanceGroupManagers.get + method. Then, include the fingerprint in your + request to ensure that you do not overwrite + changes that were applied from another + concurrent request. - This field is a member of `oneof`_ ``_request_id``. - ssl_policy_resource (google.cloud.compute_v1beta.types.SslPolicy): - The body resource for this request + This field is a member of `oneof`_ ``_fingerprint``. + target_pools (MutableSequence[str]): + The list of target pool URLs that instances + in this managed instance group belong to. The + managed instance group applies these target + pools to all of the instances in the group. + Existing instances and new instances in the + group all receive these target pool settings. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=37109963, + number=234678500, optional=True, ) - ssl_policy_resource: "SslPolicy" = proto.Field( - proto.MESSAGE, - number=274891848, - message="SslPolicy", + target_pools: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=336072617, ) -class InsertStoragePoolRequest(proto.Message): - r"""A request message for StoragePools.Insert. See the method - description for details. +class InstanceGroupManagersStartInstancesRequest(proto.Message): + r""" + + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to start. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) +class InstanceGroupManagersStopInstancesRequest(proto.Message): + r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + force_stop (bool): + If this flag is set to true, the Instance + Group Manager will proceed to stop the + instances, skipping initialization on them. - This field is a member of `oneof`_ ``_request_id``. - storage_pool_resource (google.cloud.compute_v1beta.types.StoragePool): - The body resource for this request - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_force_stop``. + instances (MutableSequence[str]): + The URLs of one or more instances to stop. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + force_stop: bool = proto.Field( + proto.BOOL, + number=134762710, optional=True, ) - storage_pool_resource: "StoragePool" = proto.Field( - proto.MESSAGE, - number=157179405, - message="StoragePool", - ) - zone: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3744684, + number=29097598, ) -class InsertSubnetworkRequest(proto.Message): - r"""A request message for Subnetworks.Insert. See the method - description for details. - +class InstanceGroupManagersSuspendInstancesRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + force_suspend (bool): + If this flag is set to true, the Instance + Group Manager will proceed to suspend the + instances, skipping initialization on them. - This field is a member of `oneof`_ ``_request_id``. - subnetwork_resource (google.cloud.compute_v1beta.types.Subnetwork): - The body resource for this request + This field is a member of `oneof`_ ``_force_suspend``. + instances (MutableSequence[str]): + The URLs of one or more instances to suspend. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + force_suspend: bool = proto.Field( + proto.BOOL, + number=27637480, optional=True, ) - subnetwork_resource: "Subnetwork" = proto.Field( - proto.MESSAGE, - number=42233151, - message="Subnetwork", + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, ) -class InsertTargetGrpcProxyRequest(proto.Message): - r"""A request message for TargetGrpcProxies.Insert. See the - method description for details. +class InstanceGroupManagersUpdatePerInstanceConfigsReq(proto.Message): + r"""InstanceGroupManagers.updatePerInstanceConfigs + Attributes: + per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The list of per-instance configurations to + insert or patch on this managed instance group. + """ - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=526265001, + message="PerInstanceConfig", + ) - Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_request_id``. - target_grpc_proxy_resource (google.cloud.compute_v1beta.types.TargetGrpcProxy): - The body resource for this request +class InstanceGroupsAddInstancesRequest(proto.Message): + r""" + + Attributes: + instances (MutableSequence[google.cloud.compute_v1beta.types.InstanceReference]): + The list of instances to add to the instance + group. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - target_grpc_proxy_resource: "TargetGrpcProxy" = proto.Field( + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, - number=328922450, - message="TargetGrpcProxy", + number=29097598, + message="InstanceReference", ) -class InsertTargetHttpProxyRequest(proto.Message): - r"""A request message for TargetHttpProxies.Insert. See the - method description for details. - +class InstanceGroupsListInstances(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. - target_http_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpProxy): - The body resource for this request + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceWithNamedPorts]): + A list of InstanceWithNamedPorts resources. + kind (str): + Output only. [Output Only] The resource type, which is + alwayscompute#instanceGroupsListInstances for the list of + instances in the specified instance group. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=227560217, + number=3355, + optional=True, ) - request_id: str = proto.Field( + items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceWithNamedPorts", + ) + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - target_http_proxy_resource: "TargetHttpProxy" = proto.Field( + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( proto.MESSAGE, - number=24696744, - message="TargetHttpProxy", + number=50704284, + optional=True, + message="Warning", ) -class InsertTargetHttpsProxyRequest(proto.Message): - r"""A request message for TargetHttpsProxies.Insert. See the - method description for details. - +class InstanceGroupsListInstancesRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_state (str): + A filter for the state of the instances in + the instance group. Valid options are ALL or + RUNNING. If you do not specify this parameter + the list includes all instances regardless of + their state. Check the InstanceState enum for + the list of possible values. - This field is a member of `oneof`_ ``_request_id``. - target_https_proxy_resource (google.cloud.compute_v1beta.types.TargetHttpsProxy): - The body resource for this request + This field is a member of `oneof`_ ``_instance_state``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + class InstanceState(proto.Enum): + r"""A filter for the state of the instances in the instance + group. Valid options are ALL or RUNNING. If you do not specify + this parameter the list includes all instances regardless of + their state. + + Values: + UNDEFINED_INSTANCE_STATE (0): + A value indicating that the enum field is not + set. + ALL (64897): + Includes all instances in the generated list + regardless of their state. + RUNNING (121282975): + Includes instances in the generated list only + if they have a RUNNING state. + """ + UNDEFINED_INSTANCE_STATE = 0 + ALL = 64897 + RUNNING = 121282975 + + instance_state: str = proto.Field( proto.STRING, - number=37109963, + number=92223591, optional=True, ) - target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( + + +class InstanceGroupsRemoveInstancesRequest(proto.Message): + r""" + + Attributes: + instances (MutableSequence[google.cloud.compute_v1beta.types.InstanceReference]): + The list of instances to remove from the + instance group. + """ + + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, - number=433657473, - message="TargetHttpsProxy", + number=29097598, + message="InstanceReference", ) -class InsertTargetInstanceRequest(proto.Message): - r"""A request message for TargetInstances.Insert. See the method - description for details. - +class InstanceGroupsScopedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_groups (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): + Output only. [Output Only] The list ofinstance groups that + are contained in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] An informational warning that + replaces the list of instance groups when the list is empty. - This field is a member of `oneof`_ ``_request_id``. - target_instance_resource (google.cloud.compute_v1beta.types.TargetInstance): - The body resource for this request - zone (str): - Name of the zone scoping this request. + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - target_instance_resource: "TargetInstance" = proto.Field( + instance_groups: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, - number=430453066, - message="TargetInstance", + number=366469310, + message="InstanceGroup", ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class InsertTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.Insert. See the method - description for details. - +class InstanceGroupsSetNamedPortsRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + fingerprint (str): + The fingerprint of the named ports + information for this instance group. Use this + optional property to prevent conflicts when + multiple users change the named ports settings + concurrently. Obtain the fingerprint with + theinstanceGroups.get method. Then, include the + fingerprint in your request to ensure that you + do not overwrite changes that were applied from + another concurrent request. A request with an + incorrect fingerprint will fail with error412 + conditionNotMet. - This field is a member of `oneof`_ ``_request_id``. - target_pool_resource (google.cloud.compute_v1beta.types.TargetPool): - The body resource for this request + This field is a member of `oneof`_ ``_fingerprint``. + named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): + The list of named ports to set for this + instance group. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - request_id: str = proto.Field( + fingerprint: str = proto.Field( proto.STRING, - number=37109963, + number=234678500, optional=True, ) - target_pool_resource: "TargetPool" = proto.Field( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, - number=101281443, - message="TargetPool", + number=427598732, + message="NamedPort", ) -class InsertTargetSslProxyRequest(proto.Message): - r"""A request message for TargetSslProxies.Insert. See the method - description for details. - +class InstanceList(proto.Message): + r"""Contains a list of instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. - target_ssl_proxy_resource (google.cloud.compute_v1beta.types.TargetSslProxy): - The body resource for this request + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Instance]): + A list of Instance resources. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#instanceList for lists of Instance resources. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=227560217, + number=3355, + optional=True, ) - request_id: str = proto.Field( + items: MutableSequence["Instance"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Instance", + ) + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - target_ssl_proxy_resource: "TargetSslProxy" = proto.Field( + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( proto.MESSAGE, - number=142016192, - message="TargetSslProxy", + number=50704284, + optional=True, + message="Warning", ) -class InsertTargetTcpProxyRequest(proto.Message): - r"""A request message for TargetTcpProxies.Insert. See the method - description for details. - +class InstanceListReferrers(proto.Message): + r"""Contains a list of instance referrers. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. - target_tcp_proxy_resource (google.cloud.compute_v1beta.types.TargetTcpProxy): - The body resource for this request + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Reference]): + A list of Reference resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#instanceListReferrers for lists of Instance + referrers. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - project: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=227560217, + number=3355, + optional=True, ) - request_id: str = proto.Field( + items: MutableSequence["Reference"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Reference", + ) + kind: str = proto.Field( proto.STRING, - number=37109963, + number=3292052, optional=True, ) - target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( proto.MESSAGE, - number=145913931, - message="TargetTcpProxy", + number=50704284, + optional=True, + message="Warning", ) -class InsertTargetVpnGatewayRequest(proto.Message): - r"""A request message for TargetVpnGateways.Insert. See the - method description for details. - +class InstanceManagedByIgmError(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + error (google.cloud.compute_v1beta.types.InstanceManagedByIgmErrorManagedInstanceError): + Output only. [Output Only] Contents of the error. - This field is a member of `oneof`_ ``_request_id``. - target_vpn_gateway_resource (google.cloud.compute_v1beta.types.TargetVpnGateway): - The body resource for this request + This field is a member of `oneof`_ ``_error``. + instance_action_details (google.cloud.compute_v1beta.types.InstanceManagedByIgmErrorInstanceActionDetails): + Output only. [Output Only] Details of the instance action + that triggered this error. May be null, if the error was not + caused by an action on an instance. This field is optional. + + This field is a member of `oneof`_ ``_instance_action_details``. + timestamp (str): + Output only. [Output Only] The time that this error + occurred. This value is in RFC3339 text format. + + This field is a member of `oneof`_ ``_timestamp``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, + error: "InstanceManagedByIgmErrorManagedInstanceError" = proto.Field( + proto.MESSAGE, + number=96784904, + optional=True, + message="InstanceManagedByIgmErrorManagedInstanceError", ) - region: str = proto.Field( - proto.STRING, - number=138946292, + instance_action_details: "InstanceManagedByIgmErrorInstanceActionDetails" = ( + proto.Field( + proto.MESSAGE, + number=292224547, + optional=True, + message="InstanceManagedByIgmErrorInstanceActionDetails", + ) ) - request_id: str = proto.Field( + timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=55126294, optional=True, ) - target_vpn_gateway_resource: "TargetVpnGateway" = proto.Field( - proto.MESSAGE, - number=498050, - message="TargetVpnGateway", - ) - -class InsertUrlMapRequest(proto.Message): - r"""A request message for UrlMaps.Insert. See the method - description for details. +class InstanceManagedByIgmErrorInstanceActionDetails(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + action (str): + Output only. [Output Only] Action that managed instance + group was executing on the instance when the error occurred. + Possible values: Check the Action enum for the list of + possible values. - This field is a member of `oneof`_ ``_request_id``. - url_map_resource (google.cloud.compute_v1beta.types.UrlMap): - The body resource for this request + This field is a member of `oneof`_ ``_action``. + instance (str): + Output only. [Output Only] The URL of the instance. The URL + can be set even if the instance has not yet been created. + + This field is a member of `oneof`_ ``_instance``. + version (google.cloud.compute_v1beta.types.ManagedInstanceVersion): + Output only. [Output Only] Version this instance was created + from, or was being created from, but the creation failed. + Corresponds to one of the versions that were set on the + Instance Group Manager resource at the time this instance + was being created. + + This field is a member of `oneof`_ ``_version``. """ - project: str = proto.Field( + class Action(proto.Enum): + r"""Output only. [Output Only] Action that managed instance group was + executing on the instance when the error occurred. Possible values: + + Values: + UNDEFINED_ACTION (0): + A value indicating that the enum field is not + set. + ABANDONING (388244813): + The managed instance group is abandoning this + instance. The instance will be removed from the + instance group and from any target pools that + are associated with this group. + ADOPTING (414293554): + The managed instance group is adopting this + instance. + CREATING (455564985): + The managed instance group is creating this + instance. If the group fails to create this + instance, it will try again until it is + successful. + CREATING_WITHOUT_RETRIES (428843785): + The managed instance group is attempting to + create this instance only once. If the group + fails to create this instance, it does not try + again and the group's targetSize value is + decreased. + DELETING (528602024): + The managed instance group is permanently + deleting this instance. + NONE (2402104): + The managed instance group has not scheduled + any actions for this instance. + RECREATING (287278572): + The managed instance group is recreating this + instance. + REFRESHING (163266343): + The managed instance group is applying + configuration changes to the instance without + stopping it. For example, the group can update + the target pool list for an instance without + stopping that instance. + RESTARTING (320534387): + The managed instance group is restarting this + instance. + RESUMING (446856618): + The managed instance group is resuming this + instance. + STARTING (488820800): + The managed instance group is starting this + instance. + STOPPING (350791796): + The managed instance group is stopping this + instance. + SUSPENDING (514206246): + The managed instance group is suspending this + instance. + VERIFYING (16982185): + The managed instance group is verifying this + already created instance. Verification happens + every time the instance is (re)created or + restarted and consists of: + + 1. Waiting until health check specified as part + of this managed instance group's + autohealing policy reports HEALTHY. + Note: Applies only if autohealing policy has + a health check specified + 2. Waiting for addition verification steps + performed as post-instance creation + (subject to future extensions). + """ + UNDEFINED_ACTION = 0 + ABANDONING = 388244813 + ADOPTING = 414293554 + CREATING = 455564985 + CREATING_WITHOUT_RETRIES = 428843785 + DELETING = 528602024 + NONE = 2402104 + RECREATING = 287278572 + REFRESHING = 163266343 + RESTARTING = 320534387 + RESUMING = 446856618 + STARTING = 488820800 + STOPPING = 350791796 + SUSPENDING = 514206246 + VERIFYING = 16982185 + + action: str = proto.Field( proto.STRING, - number=227560217, + number=187661878, + optional=True, ) - request_id: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=37109963, + number=18257045, optional=True, ) - url_map_resource: "UrlMap" = proto.Field( + version: "ManagedInstanceVersion" = proto.Field( proto.MESSAGE, - number=168675425, - message="UrlMap", + number=351608024, + optional=True, + message="ManagedInstanceVersion", ) -class InsertVpnGatewayRequest(proto.Message): - r"""A request message for VpnGateways.Insert. See the method - description for details. - +class InstanceManagedByIgmErrorManagedInstanceError(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + code (str): + Output only. [Output Only] Error code. - This field is a member of `oneof`_ ``_request_id``. - vpn_gateway_resource (google.cloud.compute_v1beta.types.VpnGateway): - The body resource for this request + This field is a member of `oneof`_ ``_code``. + message (str): + Output only. [Output Only] Error message. + + This field is a member of `oneof`_ ``_message``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + code: str = proto.Field( proto.STRING, - number=138946292, + number=3059181, + optional=True, ) - request_id: str = proto.Field( + message: str = proto.Field( proto.STRING, - number=37109963, + number=418054151, optional=True, ) - vpn_gateway_resource: "VpnGateway" = proto.Field( - proto.MESSAGE, - number=182688660, - message="VpnGateway", - ) -class InsertVpnTunnelRequest(proto.Message): - r"""A request message for VpnTunnels.Insert. See the method - description for details. - +class InstanceMoveRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + destination_zone (str): + The URL of the destination zone to move the + instance. This can be a full or partial URL. For + example, the following are all valid URLs to a + zone: - This field is a member of `oneof`_ ``_request_id``. - vpn_tunnel_resource (google.cloud.compute_v1beta.types.VpnTunnel): - The body resource for this request + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone + - projects/project/zones/zone + - zones/zone + + This field is a member of `oneof`_ ``_destination_zone``. + target_instance (str): + The URL of the target instance to move. This + can be a full or partial URL. For example, the + following are all valid URLs to an instance: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance + - zones/zone/instances/instance + + This field is a member of `oneof`_ ``_target_instance``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + destination_zone: str = proto.Field( proto.STRING, - number=138946292, + number=131854653, + optional=True, ) - request_id: str = proto.Field( + target_instance: str = proto.Field( proto.STRING, - number=37109963, + number=289769347, optional=True, ) - vpn_tunnel_resource: "VpnTunnel" = proto.Field( - proto.MESSAGE, - number=86839482, - message="VpnTunnel", - ) -class InsertWireGroupRequest(proto.Message): - r"""A request message for WireGroups.Insert. See the method - description for details. - +class InstanceParams(proto.Message): + r"""Additional instance params. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cross_site_network (str): - - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. Specify a - unique request ID so that if you must retry your request, - the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: - MixerMutationRequestBuilder - - This field is a member of `oneof`_ ``_request_id``. - validate_only (bool): - [Input Only] Validate the new configuration, but don't - create it. + request_valid_for_duration (google.cloud.compute_v1beta.types.Duration): + Relative deadline for waiting for capacity. + Relevant only for Instances.Insert API. - This field is a member of `oneof`_ ``_validate_only``. - wire_group_resource (google.cloud.compute_v1beta.types.WireGroup): - The body resource for this request + This field is a member of `oneof`_ ``_request_valid_for_duration``. + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to be bound to the instance. Tag keys + and values have the same definition as resource manager + tags. Keys and values can be either in numeric format, such + as ``tagKeys/{tag_key_id}`` and ``tagValues/456`` or in + namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. The field is ignored (both PUT & + PATCH) when empty. """ - cross_site_network: str = proto.Field( - proto.STRING, - number=108192469, + request_valid_for_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=116247389, + optional=True, + message="Duration", ) - project: str = proto.Field( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( proto.STRING, - number=37109963, - optional=True, - ) - validate_only: bool = proto.Field( - proto.BOOL, - number=242744629, - optional=True, - ) - wire_group_resource: "WireGroup" = proto.Field( - proto.MESSAGE, - number=117104840, - message="WireGroup", + number=377671164, ) -class Instance(proto.Message): - r"""Represents an Instance resource. An instance is a virtual - machine that is hosted on Google Cloud Platform. For more - information, read Virtual Machine Instances. - +class InstanceProperties(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: advanced_machine_features (google.cloud.compute_v1beta.types.AdvancedMachineFeatures): Controls for advanced machine-related - behavior features. + behavior features. Note that for MachineImage, + this is not supported yet. This field is a member of `oneof`_ ``_advanced_machine_features``. can_ip_forward (bool): - Allows this instance to send and receive - packets with non-matching destination or source - IPs. This is required if you plan to use this - instance to forward routes. For more - information, see Enabling IP Forwarding . + Enables instances created based on these + properties to send packets with source IP + addresses other than their own and receive + packets with destination IP addresses other than + their own. If these instances will be used as an + IP gateway or it will be set as the next-hop in + a Route resource, specify true. If unsure, leave + this set tofalse. See theEnable IP forwarding + documentation for more information. This field is a member of `oneof`_ ``_can_ip_forward``. confidential_instance_config (google.cloud.compute_v1beta.types.ConfidentialInstanceConfig): + Specifies the Confidential Instance options. + Note that for MachineImage, this is not + supported yet. This field is a member of `oneof`_ ``_confidential_instance_config``. - cpu_platform (str): - [Output Only] The CPU platform used by this instance. - - This field is a member of `oneof`_ ``_cpu_platform``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - deletion_protection (bool): - Whether the resource should be protected - against deletion. - - This field is a member of `oneof`_ ``_deletion_protection``. description (str): - An optional description of this resource. - Provide this property when you create the - resource. + An optional text description for the + instances that are created from these + properties. This field is a member of `oneof`_ ``_description``. disks (MutableSequence[google.cloud.compute_v1beta.types.AttachedDisk]): - Array of disks associated with this instance. - Persistent disks must be created before you can - assign them. + An array of disks that are associated with + the instances that are created from these + properties. display_device (google.cloud.compute_v1beta.types.DisplayDevice): - Enables display device for the instance. - - This field is a member of `oneof`_ ``_display_device``. - erase_windows_vss_signature (bool): - Specifies whether the disks restored from - source snapshots or source machine image should - erase Windows specific VSS signature. - - This field is a member of `oneof`_ ``_erase_windows_vss_signature``. - fingerprint (str): - Specifies a fingerprint for this resource, - which is essentially a hash of the instance's - contents and used for optimistic locking. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update the instance. You must always provide - an up-to-date fingerprint hash in order to - update the instance. To see the latest - fingerprint, make get() request to the instance. - - This field is a member of `oneof`_ ``_fingerprint``. - guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): - A list of the type and count of accelerator - cards attached to the instance. - hostname (str): - Specifies the hostname of the instance. The specified - hostname must be RFC1035 compliant. If hostname is not - specified, the default hostname is - [INSTANCE_NAME].c.[PROJECT_ID].internal when using the - global DNS, and - [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using - zonal DNS. - - This field is a member of `oneof`_ ``_hostname``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts suspended data for an instance with - a customer-managed encryption key. If you are - creating a new instance, this field will encrypt - the local SSD and in-memory contents of the - instance during the suspend operation. If you do - not provide an encryption key when creating the - instance, then the local SSD and in-memory - contents will be encrypted using an - automatically generated key during the suspend - operation. + Display Device properties to enable support + for remote display products like: Teradici, + VNC and TeamViewer + Note that for MachineImage, this is not + supported yet. - This field is a member of `oneof`_ ``_instance_encryption_key``. + This field is a member of `oneof`_ ``_display_device``. + guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): + A list of guest accelerator cards' type and + count to use for instances created from these + properties. key_revocation_action_type (str): KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The @@ -51868,103 +64768,49 @@ class Instance(proto.Message): list of possible values. This field is a member of `oneof`_ ``_key_revocation_action_type``. - kind (str): - [Output Only] Type of the resource. Always compute#instance - for instances. - - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for this request, which is - essentially a hash of the label's contents and - used for optimistic locking. The fingerprint is - initially generated by Compute Engine and - changes after every request to modify or update - labels. You must always provide an up-to-date - fingerprint hash in order to update or change - labels. To see the latest fingerprint, make - get() request to the instance. - - This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): - Labels to apply to this instance. These can - be later modified by the setLabels method. - last_start_timestamp (str): - [Output Only] Last start timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_last_start_timestamp``. - last_stop_timestamp (str): - [Output Only] Last stop timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_last_stop_timestamp``. - last_suspended_timestamp (str): - [Output Only] Last suspended timestamp in RFC3339 text - format. - - This field is a member of `oneof`_ ``_last_suspended_timestamp``. + Labels to apply to instances that are created + from these properties. machine_type (str): - Full or partial URL of the machine type - resource to use for this instance, in the - format: zones/zone/machineTypes/machine-type. - This is provided by the client when the instance - is created. For example, the following is a - valid partial url to a predefined machine type: - zones/us-central1-f/machineTypes/n1-standard-1 - To create a custom machine type, provide a URL - to a machine type in the following format, where - CPUS is 1 or an even number up to 32 (2, 4, 6, - ... 24, etc), and MEMORY is the total memory for - this instance. Memory must be a multiple of 256 - MB and must be supplied in MB (e.g. 5 GB of - memory is 5120 MB): - zones/zone/machineTypes/custom-CPUS-MEMORY For - example: - zones/us-central1-f/machineTypes/custom-4-5120 - For a full list of restrictions, read the - Specifications for custom machine types. + The machine type to use for instances that are created from + these properties. This field only accepts a machine type + name, for example ``n2-standard-4``. If you use the machine + type full or partial URL, for example + ``projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4``, + the request will result in an ``INTERNAL_ERROR``. This field is a member of `oneof`_ ``_machine_type``. metadata (google.cloud.compute_v1beta.types.Metadata): - The metadata key/value pairs assigned to this - instance. This includes metadata keys that were - explicitly defined for the instance. + The metadata key/value pairs to assign to + instances that are created from these + properties. These pairs can consist of custom + metadata or predefined keys. SeeProject and + instance metadata for more information. This field is a member of `oneof`_ ``_metadata``. min_cpu_platform (str): - Specifies a minimum CPU platform for the VM - instance. Applicable values are the friendly - names of CPU platforms, such as minCpuPlatform: - "Intel Haswell" or minCpuPlatform: "Intel Sandy - Bridge". + Minimum cpu/platform to be used by instances. + The instance may be scheduled on the specified + or newer cpu/platform. Applicable values are the + friendly names of CPU platforms, such + asminCpuPlatform: "Intel Haswell" + orminCpuPlatform: "Intel Sandy Bridge". For more + information, read Specifying a + Minimum CPU Platform. This field is a member of `oneof`_ ``_min_cpu_platform``. - name (str): - The name of the resource, provided by the client when - initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. - - This field is a member of `oneof`_ ``_name``. network_interfaces (MutableSequence[google.cloud.compute_v1beta.types.NetworkInterface]): - An array of network configurations for this - instance. These specify how interfaces are - configured to interact with other network - services, such as connecting to the internet. - Multiple interfaces are supported per instance. + An array of network access configurations for + this interface. network_performance_config (google.cloud.compute_v1beta.types.NetworkPerformanceConfig): + Note that for MachineImage, this is not + supported yet. This field is a member of `oneof`_ ``_network_performance_config``. - params (google.cloud.compute_v1beta.types.InstanceParams): - Input only. [Input Only] Additional params passed with the - request, but not persisted as part of resource payload. - - This field is a member of `oneof`_ ``_params``. partner_metadata (MutableMapping[str, google.cloud.compute_v1beta.types.StructuredEntries]): - Partner Metadata assigned to the instance. A - map from a subdomain (namespace) to entries map. + Partner Metadata assigned to the instance + properties. A map from a subdomain (namespace) + to entries map. post_key_revocation_action_type (str): PostKeyRevocationActionType of the instance. Check the PostKeyRevocationActionType enum for @@ -51972,109 +64818,62 @@ class Instance(proto.Message): This field is a member of `oneof`_ ``_post_key_revocation_action_type``. private_ipv6_google_access (str): - The private IPv6 google access type for the VM. If not - specified, use INHERIT_FROM_SUBNETWORK as default. Check the + The private IPv6 google access type for VMs. If not + specified, use INHERIT_FROM_SUBNETWORK as default. Note that + for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values. This field is a member of `oneof`_ ``_private_ipv6_google_access``. reservation_affinity (google.cloud.compute_v1beta.types.ReservationAffinity): - Specifies the reservations that this instance - can consume from. + Specifies the reservations that instances can + consume from. Note that for MachineImage, this + is not supported yet. This field is a member of `oneof`_ ``_reservation_affinity``. + resource_manager_tags (MutableMapping[str, str]): + Resource manager tags to be bound to the instance. Tag keys + and values have the same definition as resource manager + tags. Keys must be in the format ``tagKeys/{tag_key_id}``, + and values are in the format ``tagValues/456``. The field is + ignored (both PUT & PATCH) when empty. resource_policies (MutableSequence[str]): - Resource policies applied to this instance. - resource_status (google.cloud.compute_v1beta.types.ResourceStatus): - [Output Only] Specifies values set for instance attributes - as compared to the values requested by user in the - corresponding input only field. - - This field is a member of `oneof`_ ``_resource_status``. - satisfies_pzi (bool): - [Output Only] Reserved for future use. - - This field is a member of `oneof`_ ``_satisfies_pzi``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. - - This field is a member of `oneof`_ ``_satisfies_pzs``. + Resource policies (names, not URLs) applied + to instances created from these properties. + Note that for MachineImage, this is not + supported yet. scheduling (google.cloud.compute_v1beta.types.Scheduling): - Sets the scheduling options for this - instance. + Specifies the scheduling options for the + instances that are created from these + properties. This field is a member of `oneof`_ ``_scheduling``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. service_accounts (MutableSequence[google.cloud.compute_v1beta.types.ServiceAccount]): - A list of service accounts, with their - specified scopes, authorized for this instance. - Only one service account per VM instance is - supported. Service accounts generate access - tokens that can be accessed through the metadata - server and used to authenticate applications on - the instance. See Service Accounts for more - information. + A list of service accounts with specified + scopes. Access tokens for these service accounts + are available to the instances that are created + from these properties. Use metadata queries to + obtain the access tokens for these instances. shielded_instance_config (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): + Note that for MachineImage, this is not + supported yet. This field is a member of `oneof`_ ``_shielded_instance_config``. - shielded_instance_integrity_policy (google.cloud.compute_v1beta.types.ShieldedInstanceIntegrityPolicy): - - This field is a member of `oneof`_ ``_shielded_instance_integrity_policy``. shielded_vm_config (google.cloud.compute_v1beta.types.ShieldedVmConfig): - Deprecating, please use shielded_instance_config. + Specifies the Shielded VM options for the + instances that are created from these + properties. This field is a member of `oneof`_ ``_shielded_vm_config``. - shielded_vm_integrity_policy (google.cloud.compute_v1beta.types.ShieldedVmIntegrityPolicy): - Deprecating, please use shielded_instance_integrity_policy. - - This field is a member of `oneof`_ ``_shielded_vm_integrity_policy``. - source_machine_image (str): - Source machine image - - This field is a member of `oneof`_ ``_source_machine_image``. - source_machine_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Source machine image encryption key when - creating an instance from a machine image. - - This field is a member of `oneof`_ ``_source_machine_image_encryption_key``. - start_restricted (bool): - [Output Only] Whether a VM has been restricted for start - because Compute Engine has detected suspicious activity. - - This field is a member of `oneof`_ ``_start_restricted``. - status (str): - [Output Only] The status of the instance. One of the - following values: PROVISIONING, STAGING, RUNNING, STOPPING, - SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more - information about the status of the instance, see Instance - life cycle. Check the Status enum for the list of possible - values. - - This field is a member of `oneof`_ ``_status``. - status_message (str): - [Output Only] An optional, human-readable explanation of the - status. - - This field is a member of `oneof`_ ``_status_message``. tags (google.cloud.compute_v1beta.types.Tags): - Tags to apply to this instance. Tags are used - to identify valid sources or targets for network - firewalls and are specified by the client during - instance creation. The tags can be later - modified by the setTags method. Each tag within - the list must comply with RFC1035. Multiple tags - can be specified via the 'tags.items' field. + A list of tags to apply to the instances that + are created from these properties. The tags + identify valid sources or targets for network + firewalls. The setTags method can modify this + list of tags. Each tag within the list must + comply with RFC1035. This field is a member of `oneof`_ ``_tags``. - zone (str): - [Output Only] URL of the zone where the instance resides. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. - - This field is a member of `oneof`_ ``_zone``. """ class KeyRevocationActionType(proto.Enum): @@ -52120,8 +64919,9 @@ class PostKeyRevocationActionType(proto.Enum): SHUTDOWN = 76412502 class PrivateIpv6GoogleAccess(proto.Enum): - r"""The private IPv6 google access type for the VM. If not specified, - use INHERIT_FROM_SUBNETWORK as default. + r"""The private IPv6 google access type for VMs. If not specified, use + INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this + is not supported yet. Values: UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS (0): @@ -52148,63 +64948,6 @@ class PrivateIpv6GoogleAccess(proto.Enum): ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 288210263 INHERIT_FROM_SUBNETWORK = 530256959 - class Status(proto.Enum): - r"""[Output Only] The status of the instance. One of the following - values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, - SUSPENDED, REPAIRING, and TERMINATED. For more information about the - status of the instance, see Instance life cycle. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - DEPROVISIONING (428935662): - The instance is halted and we are performing - tear down tasks like network deprogramming, - releasing quota, IP, tearing down disks etc. - PENDING (35394935): - For Flex Start provisioning instance is - waiting for available capacity from Dynamic - Workload Scheduler (DWS). - PENDING_STOP (362509770): - The instance is gracefully shutting down. - PROVISIONING (290896621): - Resources are being allocated for the - instance. - REPAIRING (413483285): - The instance is in repair. - RUNNING (121282975): - The instance is running. - STAGING (431072283): - All required resources have been allocated - and the instance is being started. - STOPPED (444276141): - The instance has stopped successfully. - STOPPING (350791796): - The instance is currently stopping (either - being deleted or killed). - SUSPENDED (51223995): - The instance has suspended. - SUSPENDING (514206246): - The instance is suspending. - TERMINATED (250018339): - The instance has stopped (either by explicit - action or underlying failure). - """ - UNDEFINED_STATUS = 0 - DEPROVISIONING = 428935662 - PENDING = 35394935 - PENDING_STOP = 362509770 - PROVISIONING = 290896621 - REPAIRING = 413483285 - RUNNING = 121282975 - STAGING = 431072283 - STOPPED = 444276141 - STOPPING = 350791796 - SUSPENDED = 51223995 - SUSPENDING = 514206246 - TERMINATED = 250018339 - advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( proto.MESSAGE, number=409646002, @@ -52222,21 +64965,6 @@ class Status(proto.Enum): optional=True, message="ConfidentialInstanceConfig", ) - cpu_platform: str = proto.Field( - proto.STRING, - number=410285354, - optional=True, - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - deletion_protection: bool = proto.Field( - proto.BOOL, - number=458014698, - optional=True, - ) description: str = proto.Field( proto.STRING, number=422937596, @@ -52253,72 +64981,21 @@ class Status(proto.Enum): optional=True, message="DisplayDevice", ) - erase_windows_vss_signature: bool = proto.Field( - proto.BOOL, - number=52637562, - optional=True, - ) - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, - optional=True, - ) guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", ) - hostname: str = proto.Field( - proto.STRING, - number=237067315, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - instance_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=64741517, - optional=True, - message="CustomerEncryptionKey", - ) key_revocation_action_type: str = proto.Field( proto.STRING, number=235941474, optional=True, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - label_fingerprint: str = proto.Field( - proto.STRING, - number=178124825, - optional=True, - ) labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - last_start_timestamp: str = proto.Field( - proto.STRING, - number=443830736, - optional=True, - ) - last_stop_timestamp: str = proto.Field( - proto.STRING, - number=412823010, - optional=True, - ) - last_suspended_timestamp: str = proto.Field( - proto.STRING, - number=356275337, - optional=True, - ) machine_type: str = proto.Field( proto.STRING, number=227711026, @@ -52335,11 +65012,6 @@ class Status(proto.Enum): number=242912759, optional=True, ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( proto.MESSAGE, number=52735243, @@ -52351,12 +65023,6 @@ class Status(proto.Enum): optional=True, message="NetworkPerformanceConfig", ) - params: "InstanceParams" = proto.Field( - proto.MESSAGE, - number=78313862, - optional=True, - message="InstanceParams", - ) partner_metadata: MutableMapping[str, "StructuredEntries"] = proto.MapField( proto.STRING, proto.MESSAGE, @@ -52379,37 +65045,21 @@ class Status(proto.Enum): optional=True, message="ReservationAffinity", ) + resource_manager_tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=377671164, + ) resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) - resource_status: "ResourceStatus" = proto.Field( - proto.MESSAGE, - number=249429315, - optional=True, - message="ResourceStatus", - ) - satisfies_pzi: bool = proto.Field( - proto.BOOL, - number=480964257, - optional=True, - ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, - optional=True, - ) scheduling: "Scheduling" = proto.Field( proto.MESSAGE, number=386688404, optional=True, message="Scheduling", ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( proto.MESSAGE, number=277537328, @@ -52421,243 +65071,190 @@ class Status(proto.Enum): optional=True, message="ShieldedInstanceConfig", ) - shielded_instance_integrity_policy: "ShieldedInstanceIntegrityPolicy" = proto.Field( - proto.MESSAGE, - number=163696919, - optional=True, - message="ShieldedInstanceIntegrityPolicy", - ) shielded_vm_config: "ShieldedVmConfig" = proto.Field( proto.MESSAGE, number=477568019, optional=True, message="ShieldedVmConfig", ) - shielded_vm_integrity_policy: "ShieldedVmIntegrityPolicy" = proto.Field( + tags: "Tags" = proto.Field( proto.MESSAGE, - number=140167669, + number=3552281, optional=True, - message="ShieldedVmIntegrityPolicy", + message="Tags", ) - source_machine_image: str = proto.Field( + + +class InstancePropertiesPatch(proto.Message): + r"""Represents the change that you want to make to the instance + properties. + + Attributes: + labels (MutableMapping[str, str]): + The label key-value pairs that you want to + patch onto the instance. + metadata (MutableMapping[str, str]): + The metadata key-value pairs that you want to + patch onto the instance. For more information, + see Project and instance metadata. + """ + + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=21769791, - optional=True, - ) - source_machine_image_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=192839075, - optional=True, - message="CustomerEncryptionKey", - ) - start_restricted: bool = proto.Field( - proto.BOOL, - number=123693144, - optional=True, - ) - status: str = proto.Field( proto.STRING, - number=181260274, - optional=True, + number=500195327, ) - status_message: str = proto.Field( + metadata: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=297428154, - optional=True, - ) - tags: "Tags" = proto.Field( - proto.MESSAGE, - number=3552281, - optional=True, - message="Tags", - ) - zone: str = proto.Field( proto.STRING, - number=3744684, - optional=True, + number=86866735, ) -class InstanceAggregatedList(proto.Message): +class InstanceReference(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InstancesScopedList]): - An object that contains a list of instances - scoped by zone. - kind (str): - [Output Only] Type of resource. Always - compute#instanceAggregatedList for aggregated lists of - Instance resources. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + instance (str): + The URL for a specific instance. + @required + compute.instancegroups.addInstances/removeInstances - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_instance``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "InstancesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="InstancesScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - unreachables: MutableSequence[str] = proto.RepeatedField( + instance: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=18257045, optional=True, - message="Warning", ) -class InstanceConsumptionData(proto.Message): - r""" +class InstanceSettings(proto.Message): + r"""Represents a Instance Settings resource. You can use instance + settings to configure default settings for Compute Engine VM + instances. For example, you can use it to configure default + machine type of Compute Engine VM instances. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - consumption_info (google.cloud.compute_v1beta.types.InstanceConsumptionInfo): - Resources consumed by the instance. + fingerprint (str): + Specifies a fingerprint for instance + settings, which is essentially a hash of the + instance settings resource's contents and used + for optimistic locking. The fingerprint is + initially generated by Compute Engine and + changes after every request to modify or update + the instance settings resource. You must always + provide an up-to-date fingerprint hash in order + to update or change the resource, otherwise the + request will fail with error 412 + conditionNotMet. - This field is a member of `oneof`_ ``_consumption_info``. - instance (str): - Server-defined URL for the instance. + To see the latest fingerprint, make a get() + request to retrieve the resource. + + This field is a member of `oneof`_ ``_fingerprint``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#instance_settings for instance settings. + + This field is a member of `oneof`_ ``_kind``. + metadata (google.cloud.compute_v1beta.types.InstanceSettingsMetadata): + The metadata key/value pairs assigned to all + the instances in the corresponding scope. + + This field is a member of `oneof`_ ``_metadata``. + zone (str): + Output only. [Output Only] URL of the zone where the + resource resides You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. - This field is a member of `oneof`_ ``_instance``. + This field is a member of `oneof`_ ``_zone``. """ - consumption_info: "InstanceConsumptionInfo" = proto.Field( + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + metadata: "InstanceSettingsMetadata" = proto.Field( proto.MESSAGE, - number=146354898, + number=86866735, optional=True, - message="InstanceConsumptionInfo", + message="InstanceSettingsMetadata", ) - instance: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=18257045, + number=3744684, optional=True, ) -class InstanceConsumptionInfo(proto.Message): +class InstanceSettingsMetadata(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - guest_cpus (int): - The number of virtual CPUs that are available - to the instance. - - This field is a member of `oneof`_ ``_guest_cpus``. - local_ssd_gb (int): - The amount of local SSD storage available to - the instance, defined in GiB. - - This field is a member of `oneof`_ ``_local_ssd_gb``. - memory_mb (int): - The amount of physical memory available to - the instance, defined in MiB. - - This field is a member of `oneof`_ ``_memory_mb``. - min_node_cpus (int): - The minimal guaranteed number of virtual CPUs - that are reserved. + items (MutableMapping[str, str]): + A metadata key/value items map. + The total size of all keys and values must be + less than 512KB. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#metadata for metadata. - This field is a member of `oneof`_ ``_min_node_cpus``. + This field is a member of `oneof`_ ``_kind``. """ - guest_cpus: int = proto.Field( - proto.INT32, - number=393356754, - optional=True, - ) - local_ssd_gb: int = proto.Field( - proto.INT32, - number=329237578, - optional=True, - ) - memory_mb: int = proto.Field( - proto.INT32, - number=116001171, - optional=True, + items: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=100526016, ) - min_node_cpus: int = proto.Field( - proto.INT32, - number=317231675, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) -class InstanceGroup(proto.Message): - r"""Represents an Instance Group resource. Instance Groups can be - used to configure a target for load balancing. Instance groups - can either be managed or unmanaged. To create managed instance - groups, use the instanceGroupManager or - regionInstanceGroupManager resource instead. Use zonal unmanaged - instance groups if you need to apply load balancing to groups of - heterogeneous instances or if you need to manage the instances - yourself. You cannot create regional unmanaged instance groups. - For more information, read Instance groups. +class InstanceTemplate(proto.Message): + r"""Represents an Instance Template resource. + + Google Compute Engine has two Instance Template resources: + + - `Global `__ + - `Regional `__ + + You can reuse a global instance template in different regions + whereas you can use a regional instance template in a specified + region only. If you want to reduce cross-region dependency or + achieve data residency, use a regional instance template. + + To create VMs, managed instance groups, and reservations, you can + use either global or regional instance templates. + + For more information, readInstance Templates. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] The creation timestamp for this instance group - in RFC3339 text format. + Output only. [Output Only] The creation timestamp for this + instance template inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -52666,72 +65263,61 @@ class InstanceGroup(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - fingerprint (str): - [Output Only] The fingerprint of the named ports. The system - uses this fingerprint to detect conflicts when multiple - users change the named ports concurrently. - - This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] A unique identifier for this instance group, - generated by the server. + Output only. [Output Only] A unique identifier for this + instance template. The server defines this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroup for instance groups. + Output only. [Output Only] The resource type, which is + alwayscompute#instanceTemplate for instance templates. This field is a member of `oneof`_ ``_kind``. name (str): - The name of the instance group. The name must - be 1-63 characters long, and comply with - RFC1035. + Name of the resource; provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - Optional. Assigns a name to a port number. For example: - {name: "http", port: 80} This allows the system to reference - ports by the assigned name instead of a port number. Named - ports can also contain multiple ports. For example: [{name: - "app1", port: 8080}, {name: "app1", port: 8081}, {name: - "app2", port: 8082}] Named ports apply to all instances in - this instance group. - network (str): - [Output Only] The URL of the network to which all instances - in the instance group belong. If your instance has multiple - network interfaces, then the network and subnetwork fields - only refer to the network and subnet used by your primary - interface (nic0). + properties (google.cloud.compute_v1beta.types.InstanceProperties): + The instance properties for this instance + template. - This field is a member of `oneof`_ ``_network``. + This field is a member of `oneof`_ ``_properties``. region (str): - [Output Only] The URL of the region where the instance group - is located (for regional resources). + Output only. [Output Only] URL of the region where the + instance template resides. Only applicable for regional + resources. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] The URL for this instance group. The server - generates this URL. + Output only. [Output Only] The URL for this instance + template. The server defines this URL. This field is a member of `oneof`_ ``_self_link``. - size (int): - [Output Only] The total number of instances in the instance - group. + source_instance (str): + The source instance used to create the + template. You can provide this as a partial or + full URL to the resource. For example, the + following are valid values: - This field is a member of `oneof`_ ``_size``. - subnetwork (str): - [Output Only] The URL of the subnetwork to which all - instances in the instance group belong. If your instance has - multiple network interfaces, then the network and subnetwork - fields only refer to the network and subnet used by your - primary interface (nic0). - This field is a member of `oneof`_ ``_subnetwork``. - zone (str): - [Output Only] The URL of the zone where the instance group - is located (for zonal resources). + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_source_instance``. + source_instance_params (google.cloud.compute_v1beta.types.SourceInstanceParams): + The source instance params to use to create + this instance template. + + This field is a member of `oneof`_ ``_source_instance_params``. """ creation_timestamp: str = proto.Field( @@ -52744,11 +65330,6 @@ class InstanceGroup(proto.Message): number=422937596, optional=True, ) - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, - optional=True, - ) id: int = proto.Field( proto.UINT64, number=3355, @@ -52764,15 +65345,11 @@ class InstanceGroup(proto.Message): number=3373707, optional=True, ) - named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( + properties: "InstanceProperties" = proto.Field( proto.MESSAGE, - number=427598732, - message="NamedPort", - ) - network: str = proto.Field( - proto.STRING, - number=232872494, + number=147688755, optional=True, + message="InstanceProperties", ) region: str = proto.Field( proto.STRING, @@ -52784,25 +65361,21 @@ class InstanceGroup(proto.Message): number=456214797, optional=True, ) - size: int = proto.Field( - proto.INT32, - number=3530753, - optional=True, - ) - subnetwork: str = proto.Field( + source_instance: str = proto.Field( proto.STRING, - number=307827694, + number=396315705, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + source_instance_params: "SourceInstanceParams" = proto.Field( + proto.MESSAGE, + number=135342156, optional=True, + message="SourceInstanceParams", ) -class InstanceGroupAggregatedList(proto.Message): - r""" +class InstanceTemplateAggregatedList(proto.Message): + r"""Contains a list of InstanceTemplatesScopedList. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -52812,29 +65385,27 @@ class InstanceGroupAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupsScopedList]): - A list of InstanceGroupsScopedList resources. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceTemplatesScopedList]): + A list of InstanceTemplatesScopedList + resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupAggregatedList for aggregated lists of - instance groups. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -52850,11 +65421,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableMapping[str, "InstanceGroupsScopedList"] = proto.MapField( + items: MutableMapping[str, "InstanceTemplatesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, - message="InstanceGroupsScopedList", + message="InstanceTemplatesScopedList", ) kind: str = proto.Field( proto.STRING, @@ -52871,10 +65442,6 @@ def raw_page(self): number=456214797, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -52883,8 +65450,8 @@ def raw_page(self): ) -class InstanceGroupList(proto.Message): - r"""A list of InstanceGroup resources. +class InstanceTemplateList(proto.Message): + r"""A list of instance templates. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -52894,24 +65461,26 @@ class InstanceGroupList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): - A list of InstanceGroup resources. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceTemplate]): + A list of InstanceTemplate resources. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupList for instance group lists. + Output only. [Output Only] The resource type, which is + alwayscompute#instanceTemplatesListResponse for instance + template lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -52922,1374 +65491,961 @@ class InstanceGroupList(proto.Message): @property def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceGroup"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InstanceGroup", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) - - -class InstanceGroupManager(proto.Message): - r"""Represents a Managed Instance Group resource. An instance - group is a collection of VM instances that you can manage as a - single entity. For more information, read Instance groups. For - zonal Managed Instance Group, use the instanceGroupManagers - resource. For regional Managed Instance Group, use the - regionInstanceGroupManagers resource. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - all_instances_config (google.cloud.compute_v1beta.types.InstanceGroupManagerAllInstancesConfig): - Specifies configuration that overrides the - instance template configuration for the group. - - This field is a member of `oneof`_ ``_all_instances_config``. - auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): - The autohealing policy for this managed - instance group. You can specify only one value. - base_instance_name (str): - The base instance name is a prefix that you want to attach - to the names of all VMs in a MIG. The maximum character - length is 58 and the name must comply with RFC1035 format. - When a VM is created in the group, the MIG appends a hyphen - and a random four-character string to the base instance - name. If you want the MIG to assign sequential numbers - instead of a random string, then end the base instance name - with a hyphen followed by one or more hash symbols. The hash - symbols indicate the number of digits. For example, a base - instance name of "vm-###" results in "vm-001" as a VM name. - @pattern - `a-z <([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\[[0-9]{1,10}\])?)>`__ - - This field is a member of `oneof`_ ``_base_instance_name``. - creation_timestamp (str): - [Output Only] The creation timestamp for this managed - instance group in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - current_actions (google.cloud.compute_v1beta.types.InstanceGroupManagerActionsSummary): - [Output Only] The list of instance actions and the number of - instances in this managed instance group that are scheduled - for each of those actions. - - This field is a member of `oneof`_ ``_current_actions``. - description (str): - An optional description of this resource. - - This field is a member of `oneof`_ ``_description``. - distribution_policy (google.cloud.compute_v1beta.types.DistributionPolicy): - Policy specifying the intended distribution - of managed instances across zones in a regional - managed instance group. - - This field is a member of `oneof`_ ``_distribution_policy``. - failover_action (str): - The action to perform in case of zone failure. Only one - value is supported, NO_FAILOVER. The default is NO_FAILOVER. - Check the FailoverAction enum for the list of possible - values. - - This field is a member of `oneof`_ ``_failover_action``. - fingerprint (str): - Fingerprint of this resource. This field may - be used in optimistic locking. It will be - ignored when inserting an InstanceGroupManager. - An up-to-date fingerprint must be provided in - order to update the InstanceGroupManager, - otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - InstanceGroupManager. - - This field is a member of `oneof`_ ``_fingerprint``. - id (int): - [Output Only] A unique identifier for this resource type. - The server generates this identifier. - - This field is a member of `oneof`_ ``_id``. - instance_flexibility_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicy): - Instance flexibility allowing MIG to create - VMs from multiple types of machines. Instance - flexibility configuration on MIG overrides - instance template configuration. - - This field is a member of `oneof`_ ``_instance_flexibility_policy``. - instance_group (str): - [Output Only] The URL of the Instance Group resource. - - This field is a member of `oneof`_ ``_instance_group``. - instance_lifecycle_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceLifecyclePolicy): - The repair policy for this managed instance - group. - - This field is a member of `oneof`_ ``_instance_lifecycle_policy``. - instance_template (str): - The URL of the instance template that is - specified for this managed instance group. The - group uses this template to create all new - instances in the managed instance group. The - templates for existing instances in the group do - not change unless you run recreateInstances, run - applyUpdatesToInstances, or set the group's - updatePolicy.type to PROACTIVE. - - This field is a member of `oneof`_ ``_instance_template``. - kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManager for managed instance groups. - - This field is a member of `oneof`_ ``_kind``. - list_managed_instances_results (str): - Pagination behavior of the - listManagedInstances API method for this managed - instance group. Check the - ListManagedInstancesResults enum for the list of - possible values. - - This field is a member of `oneof`_ ``_list_managed_instances_results``. - multi_mig (str): - URL to the multi-MIG that this Managed - Instance Group belongs to. - - This field is a member of `oneof`_ ``_multi_mig``. - name (str): - The name of the managed instance group. The - name must be 1-63 characters long, and comply - with RFC1035. - - This field is a member of `oneof`_ ``_name``. - named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - [Output Only] Named ports configured on the Instance Groups - complementary to this Instance Group Manager. - params (google.cloud.compute_v1beta.types.InstanceGroupManagerParams): - Input only. Additional params passed with the - request, but not persisted as part of resource - payload. - - This field is a member of `oneof`_ ``_params``. - region (str): - [Output Only] The URL of the region where the managed - instance group resides (for regional resources). - - This field is a member of `oneof`_ ``_region``. - resource_policies (google.cloud.compute_v1beta.types.InstanceGroupManagerResourcePolicies): - Resource policies for this managed instance - group. - - This field is a member of `oneof`_ ``_resource_policies``. - satisfies_pzi (bool): - [Output Only] Reserved for future use. - - This field is a member of `oneof`_ ``_satisfies_pzi``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. - - This field is a member of `oneof`_ ``_satisfies_pzs``. - self_link (str): - [Output Only] The URL for this managed instance group. The - server defines this URL. - - This field is a member of `oneof`_ ``_self_link``. - service_account (str): - The service account to be used as credentials - for all operations performed by the managed - instance group on instances. The service - accounts needs all permissions required to - create and delete instances. By default, the - service account - {projectNumber}@cloudservices.gserviceaccount.com - is used. - - This field is a member of `oneof`_ ``_service_account``. - standby_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerStandbyPolicy): - Standby policy for stopped and suspended - instances. - - This field is a member of `oneof`_ ``_standby_policy``. - stateful_policy (google.cloud.compute_v1beta.types.StatefulPolicy): - Stateful configuration for this Instanced - Group Manager - - This field is a member of `oneof`_ ``_stateful_policy``. - status (google.cloud.compute_v1beta.types.InstanceGroupManagerStatus): - [Output Only] The status of this managed instance group. - - This field is a member of `oneof`_ ``_status``. - target_pools (MutableSequence[str]): - The URLs for all TargetPool resources to - which instances in the instanceGroup field are - added. The target pools automatically apply to - all of the instances in the managed instance - group. - target_size (int): - The target number of running instances for - this managed instance group. You can reduce this - number by using the instanceGroupManager - deleteInstances or abandonInstances methods. - Resizing the group also changes this number. - - This field is a member of `oneof`_ ``_target_size``. - target_size_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerTargetSizePolicy): - The policy that specifies how the MIG creates - its VMs to achieve the target size. - - This field is a member of `oneof`_ ``_target_size_policy``. - target_stopped_size (int): - The target number of stopped instances for - this managed instance group. This number changes - when you: - Stop instance using the - stopInstances method or start instances using - the startInstances method. - Manually change the - targetStoppedSize using the update method. - - This field is a member of `oneof`_ ``_target_stopped_size``. - target_suspended_size (int): - The target number of suspended instances for - this managed instance group. This number changes - when you: - Suspend instance using the - suspendInstances method or resume instances - using the resumeInstances method. - Manually - change the targetSuspendedSize using the update - method. - - This field is a member of `oneof`_ ``_target_suspended_size``. - update_policy (google.cloud.compute_v1beta.types.InstanceGroupManagerUpdatePolicy): - The update policy for this managed instance - group. - - This field is a member of `oneof`_ ``_update_policy``. - versions (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerVersion]): - Specifies the instance templates used by this - managed instance group to create instances. Each - version is defined by an instanceTemplate and a - name. Every version can appear at most once per - instance group. This field overrides the - top-level instanceTemplate field. Read more - about the relationships between these fields. - Exactly one version must leave the targetSize - field unset. That version will be applied to all - remaining instances. For more information, read - about canary updates. - zone (str): - [Output Only] The URL of a zone where the managed instance - group is located (for zonal resources). - - This field is a member of `oneof`_ ``_zone``. - """ - - class FailoverAction(proto.Enum): - r"""The action to perform in case of zone failure. Only one value is - supported, NO_FAILOVER. The default is NO_FAILOVER. - - Values: - UNDEFINED_FAILOVER_ACTION (0): - A value indicating that the enum field is not - set. - NO_FAILOVER (480957872): - No description available. - UNKNOWN (433141802): - No description available. - """ - UNDEFINED_FAILOVER_ACTION = 0 - NO_FAILOVER = 480957872 - UNKNOWN = 433141802 - - class ListManagedInstancesResults(proto.Enum): - r"""Pagination behavior of the listManagedInstances API method - for this managed instance group. - - Values: - UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS (0): - A value indicating that the enum field is not - set. - PAGELESS (32183464): - (Default) Pagination is disabled for the - group's listManagedInstances API method. - maxResults and pageToken query parameters are - ignored and all instances are returned in a - single response. - PAGINATED (40190637): - Pagination is enabled for the group's - listManagedInstances API method. maxResults and - pageToken query parameters are respected. - """ - UNDEFINED_LIST_MANAGED_INSTANCES_RESULTS = 0 - PAGELESS = 32183464 - PAGINATED = 40190637 - - all_instances_config: "InstanceGroupManagerAllInstancesConfig" = proto.Field( - proto.MESSAGE, - number=112596737, - optional=True, - message="InstanceGroupManagerAllInstancesConfig", - ) - auto_healing_policies: MutableSequence[ - "InstanceGroupManagerAutoHealingPolicy" - ] = proto.RepeatedField( - proto.MESSAGE, - number=456799109, - message="InstanceGroupManagerAutoHealingPolicy", - ) - base_instance_name: str = proto.Field( - proto.STRING, - number=389106439, - optional=True, - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - current_actions: "InstanceGroupManagerActionsSummary" = proto.Field( - proto.MESSAGE, - number=164045879, - optional=True, - message="InstanceGroupManagerActionsSummary", - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - distribution_policy: "DistributionPolicy" = proto.Field( - proto.MESSAGE, - number=534558541, - optional=True, - message="DistributionPolicy", - ) - failover_action: str = proto.Field( - proto.STRING, - number=202248739, - optional=True, - ) - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - instance_flexibility_policy: "InstanceGroupManagerInstanceFlexibilityPolicy" = ( - proto.Field( - proto.MESSAGE, - number=26937090, - optional=True, - message="InstanceGroupManagerInstanceFlexibilityPolicy", - ) - ) - instance_group: str = proto.Field( + return self + + id: str = proto.Field( proto.STRING, - number=81095253, + number=3355, optional=True, ) - instance_lifecycle_policy: "InstanceGroupManagerInstanceLifecyclePolicy" = ( - proto.Field( - proto.MESSAGE, - number=447961617, - optional=True, - message="InstanceGroupManagerInstanceLifecyclePolicy", - ) - ) - instance_template: str = proto.Field( - proto.STRING, - number=309248228, - optional=True, + items: MutableSequence["InstanceTemplate"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceTemplate", ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - list_managed_instances_results: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=296047156, + number=79797525, optional=True, ) - multi_mig: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=403990085, + number=456214797, optional=True, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) - named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( + + +class InstanceTemplatesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_templates (MutableSequence[google.cloud.compute_v1beta.types.InstanceTemplate]): + [Output Only] A list of instance templates that are + contained within the specified project and zone. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] An informational warning that replaces the + list of instance templates when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + instance_templates: MutableSequence["InstanceTemplate"] = proto.RepeatedField( proto.MESSAGE, - number=427598732, - message="NamedPort", + number=459889679, + message="InstanceTemplate", ) - params: "InstanceGroupManagerParams" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=78313862, + number=50704284, optional=True, - message="InstanceGroupManagerParams", + message="Warning", ) - region: str = proto.Field( + + +class InstanceWithNamedPorts(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance (str): + Output only. [Output Only] The URL of the instance. + + This field is a member of `oneof`_ ``_instance``. + named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): + Output only. [Output Only] The named ports that belong to + this instance group. + status (str): + Output only. [Output Only] The status of the instance. Check + the Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. + """ + + class Status(proto.Enum): + r"""Output only. [Output Only] The status of the instance. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + DEPROVISIONING (428935662): + The instance is halted and we are performing + tear down tasks like network deprogramming, + releasing quota, IP, tearing down disks etc. + PENDING (35394935): + For Flex Start provisioning instance is + waiting for available capacity from Dynamic + Workload Scheduler (DWS). + PENDING_STOP (362509770): + The instance is gracefully shutting down. + PROVISIONING (290896621): + Resources are being allocated for the + instance. + REPAIRING (413483285): + The instance is in repair. + RUNNING (121282975): + The instance is running. + STAGING (431072283): + All required resources have been allocated + and the instance is being started. + STOPPED (444276141): + The instance has stopped successfully. + STOPPING (350791796): + The instance is currently stopping (either + being deleted or killed). + SUSPENDED (51223995): + The instance has suspended. + SUSPENDING (514206246): + The instance is suspending. + TERMINATED (250018339): + The instance has stopped (either by explicit + action or underlying failure). + """ + UNDEFINED_STATUS = 0 + DEPROVISIONING = 428935662 + PENDING = 35394935 + PENDING_STOP = 362509770 + PROVISIONING = 290896621 + REPAIRING = 413483285 + RUNNING = 121282975 + STAGING = 431072283 + STOPPED = 444276141 + STOPPING = 350791796 + SUSPENDED = 51223995 + SUSPENDING = 514206246 + TERMINATED = 250018339 + + instance: str = proto.Field( proto.STRING, - number=138946292, + number=18257045, optional=True, ) - resource_policies: "InstanceGroupManagerResourcePolicies" = proto.Field( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, - number=22220385, - optional=True, - message="InstanceGroupManagerResourcePolicies", - ) - satisfies_pzi: bool = proto.Field( - proto.BOOL, - number=480964257, - optional=True, + number=427598732, + message="NamedPort", ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, + status: str = proto.Field( + proto.STRING, + number=181260274, optional=True, ) - self_link: str = proto.Field( + + +class InstancesAddResourcePoliciesRequest(proto.Message): + r""" + + Attributes: + resource_policies (MutableSequence[str]): + Resource policies to be added to this + instance. + """ + + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, + number=22220385, ) - service_account: str = proto.Field( + + +class InstancesBulkInsertOperationMetadata(proto.Message): + r""" + + Attributes: + per_location_status (MutableMapping[str, google.cloud.compute_v1beta.types.BulkInsertOperationStatus]): + Status information per location (location + name is key). Example key: zones/us-central1-a + """ + + per_location_status: MutableMapping[ + str, "BulkInsertOperationStatus" + ] = proto.MapField( proto.STRING, - number=199455395, - optional=True, + proto.MESSAGE, + number=167851162, + message="BulkInsertOperationStatus", ) - standby_policy: "InstanceGroupManagerStandbyPolicy" = proto.Field( + + +class InstancesGetEffectiveFirewallsResponse(proto.Message): + r""" + + Attributes: + firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): + [Output Only] Effective firewalls from firewall policies. + firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): + Effective firewalls on the instance. + organization_firewalls (MutableSequence[google.cloud.compute_v1beta.types.InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy]): + Effective firewalls from organization + policies. + """ + + firewall_policys: MutableSequence[ + "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + ] = proto.RepeatedField( proto.MESSAGE, - number=499352324, - optional=True, - message="InstanceGroupManagerStandbyPolicy", + number=410985794, + message="InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", ) - stateful_policy: "StatefulPolicy" = proto.Field( + firewalls: MutableSequence["Firewall"] = proto.RepeatedField( proto.MESSAGE, - number=47538565, - optional=True, - message="StatefulPolicy", + number=272245619, + message="Firewall", ) - status: "InstanceGroupManagerStatus" = proto.Field( + organization_firewalls: MutableSequence[ + "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" + ] = proto.RepeatedField( proto.MESSAGE, - number=181260274, - optional=True, - message="InstanceGroupManagerStatus", + number=466315111, + message="InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", ) - target_pools: MutableSequence[str] = proto.RepeatedField( + + +class InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + display_name (str): + Output only. [Output Only] Deprecated, please use short name + instead. The display name of the firewall policy. + + This field is a member of `oneof`_ ``_display_name``. + name (str): + Output only. [Output Only] The name of the firewall policy. + + This field is a member of `oneof`_ ``_name``. + packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + Output only. [Output Only] The packet mirroring rules that + apply to the instance. + priority (int): + Output only. [Output only] Priority of firewall policy + association. Not applicable for type=HIERARCHY. + + This field is a member of `oneof`_ ``_priority``. + rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + [Output Only] The rules that apply to the instance. Only + rules that target the specific VM instance are returned if + target service accounts or target secure tags are specified + in the rules. + short_name (str): + Output only. [Output Only] The short name of the firewall + policy. + + This field is a member of `oneof`_ ``_short_name``. + type_ (str): + Output only. [Output Only] The type of the firewall policy. + Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, + SYSTEM_GLOBAL, SYSTEM_REGIONAL. Check the Type enum for the + list of possible values. + + This field is a member of `oneof`_ ``_type``. + """ + + class Type(proto.Enum): + r"""Output only. [Output Only] The type of the firewall policy. Can be + one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, + SYSTEM_REGIONAL. + + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + HIERARCHY (69902869): + No description available. + NETWORK (413984270): + No description available. + NETWORK_REGIONAL (190804272): + No description available. + SYSTEM_GLOBAL (60099507): + No description available. + SYSTEM_REGIONAL (161777199): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_TYPE = 0 + HIERARCHY = 69902869 + NETWORK = 413984270 + NETWORK_REGIONAL = 190804272 + SYSTEM_GLOBAL = 60099507 + SYSTEM_REGIONAL = 161777199 + UNSPECIFIED = 526786327 + + display_name: str = proto.Field( proto.STRING, - number=336072617, - ) - target_size: int = proto.Field( - proto.INT32, - number=62880239, + number=4473832, optional=True, ) - target_size_policy: "InstanceGroupManagerTargetSizePolicy" = proto.Field( - proto.MESSAGE, - number=128773506, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, - message="InstanceGroupManagerTargetSizePolicy", ) - target_stopped_size: int = proto.Field( - proto.INT32, - number=2419489, - optional=True, + packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=531644356, + message="FirewallPolicyRule", ) - target_suspended_size: int = proto.Field( + priority: int = proto.Field( proto.INT32, - number=308085843, + number=445151652, optional=True, ) - update_policy: "InstanceGroupManagerUpdatePolicy" = proto.Field( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( proto.MESSAGE, - number=175809896, - optional=True, - message="InstanceGroupManagerUpdatePolicy", + number=108873975, + message="FirewallPolicyRule", ) - versions: MutableSequence["InstanceGroupManagerVersion"] = proto.RepeatedField( - proto.MESSAGE, - number=162430619, - message="InstanceGroupManagerVersion", + short_name: str = proto.Field( + proto.STRING, + number=492051566, + optional=True, ) - zone: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=3744684, + number=3575610, optional=True, ) -class InstanceGroupManagerActionsSummary(proto.Message): - r""" +class InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy(proto.Message): + r"""A pruned SecurityPolicy containing ID and any applicable + firewall rules. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - abandoning (int): - [Output Only] The total number of instances in the managed - instance group that are scheduled to be abandoned. - Abandoning an instance removes it from the managed instance - group without deleting it. - - This field is a member of `oneof`_ ``_abandoning``. - creating (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be created or are - currently being created. If the group fails to create any of - these instances, it tries again until it creates the - instance successfully. If you have disabled creation - retries, this field will not be populated; instead, the - creatingWithoutRetries field will be populated. + id (int): + Output only. The unique identifier for the + security policy. This identifier is defined by + the server. - This field is a member of `oneof`_ ``_creating``. - creating_without_retries (int): - [Output Only] The number of instances that the managed - instance group will attempt to create. The group attempts to - create each instance only once. If the group fails to create - any of these instances, it decreases the group's targetSize - value accordingly. + This field is a member of `oneof`_ ``_id``. + rules (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRule]): + The rules that apply to the network. + """ - This field is a member of `oneof`_ ``_creating_without_retries``. - deleting (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be deleted or are - currently being deleted. + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + rules: MutableSequence["SecurityPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=108873975, + message="SecurityPolicyRule", + ) - This field is a member of `oneof`_ ``_deleting``. - none (int): - [Output Only] The number of instances in the managed - instance group that are running and have no scheduled - actions. - This field is a member of `oneof`_ ``_none``. - recreating (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be recreated or are - currently being being recreated. Recreating an instance - deletes the existing root persistent disk and creates a new - disk from the image that is defined in the instance - template. +class InstancesRemoveResourcePoliciesRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_recreating``. - refreshing (int): - [Output Only] The number of instances in the managed - instance group that are being reconfigured with properties - that do not require a restart or a recreate action. For - example, setting or removing target pools for the instance. + Attributes: + resource_policies (MutableSequence[str]): + Resource policies to be removed from this + instance. + """ - This field is a member of `oneof`_ ``_refreshing``. - restarting (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be restarted or are - currently being restarted. + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, + ) - This field is a member of `oneof`_ ``_restarting``. - resuming (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be resumed or are - currently being resumed. - This field is a member of `oneof`_ ``_resuming``. - starting (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be started or are - currently being started. +class InstancesReportHostAsFaultyRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_starting``. - stopping (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be stopped or are - currently being stopped. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_stopping``. - suspending (int): - [Output Only] The number of instances in the managed - instance group that are scheduled to be suspended or are - currently being suspended. + Attributes: + disruption_schedule (str): + The disruption schedule for the VM. Required + field, only allows IMMEDIATE. Check the + DisruptionSchedule enum for the list of possible + values. - This field is a member of `oneof`_ ``_suspending``. - verifying (int): - [Output Only] The number of instances in the managed - instance group that are being verified. See the - managedInstances[].currentAction property in the - listManagedInstances method documentation. + This field is a member of `oneof`_ ``_disruption_schedule``. + fault_reasons (MutableSequence[google.cloud.compute_v1beta.types.InstancesReportHostAsFaultyRequestFaultReason]): - This field is a member of `oneof`_ ``_verifying``. """ - abandoning: int = proto.Field( - proto.INT32, - number=440023373, - optional=True, - ) - creating: int = proto.Field( - proto.INT32, - number=209809081, - optional=True, - ) - creating_without_retries: int = proto.Field( - proto.INT32, - number=369916745, - optional=True, - ) - deleting: int = proto.Field( - proto.INT32, - number=282846120, - optional=True, - ) - none: int = proto.Field( - proto.INT32, - number=3387192, - optional=True, - ) - recreating: int = proto.Field( - proto.INT32, - number=339057132, - optional=True, - ) - refreshing: int = proto.Field( - proto.INT32, - number=215044903, - optional=True, - ) - restarting: int = proto.Field( - proto.INT32, - number=372312947, - optional=True, - ) - resuming: int = proto.Field( - proto.INT32, - number=201100714, - optional=True, - ) - starting: int = proto.Field( - proto.INT32, - number=243064896, - optional=True, - ) - stopping: int = proto.Field( - proto.INT32, - number=105035892, - optional=True, - ) - suspending: int = proto.Field( - proto.INT32, - number=29113894, + class DisruptionSchedule(proto.Enum): + r"""The disruption schedule for the VM. Required field, only + allows IMMEDIATE. + + Values: + UNDEFINED_DISRUPTION_SCHEDULE (0): + A value indicating that the enum field is not + set. + DISRUPTION_SCHEDULE_UNSPECIFIED (332543835): + Not used. Required as per aip/126. + FUTURE (474513859): + Delay disruption for caller control. Will be + default soon. + IMMEDIATE (152881041): + Default value. Disrupt the VM immediately. + """ + UNDEFINED_DISRUPTION_SCHEDULE = 0 + DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835 + FUTURE = 474513859 + IMMEDIATE = 152881041 + + disruption_schedule: str = proto.Field( + proto.STRING, + number=95871619, optional=True, ) - verifying: int = proto.Field( - proto.INT32, - number=451612873, - optional=True, + fault_reasons: MutableSequence[ + "InstancesReportHostAsFaultyRequestFaultReason" + ] = proto.RepeatedField( + proto.MESSAGE, + number=168056210, + message="InstancesReportHostAsFaultyRequestFaultReason", ) -class InstanceGroupManagerAggregatedList(proto.Message): +class InstancesReportHostAsFaultyRequestFaultReason(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagersScopedList]): - A list of InstanceGroupManagersScopedList - resources. - kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerAggregatedList for an aggregated - list of managed instance groups. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + behavior (str): + Check the Behavior enum for the list of + possible values. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_behavior``. + description (str): - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_description``. """ - @property - def raw_page(self): - return self + class Behavior(proto.Enum): + r""" - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "InstanceGroupManagersScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="InstanceGroupManagersScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + Values: + UNDEFINED_BEHAVIOR (0): + A value indicating that the enum field is not + set. + BEHAVIOR_UNSPECIFIED (85734570): + Public reportable behaviors + PERFORMANCE (135701520): + No description available. + SILENT_DATA_CORRUPTION (111360678): + No description available. + UNRECOVERABLE_GPU_ERROR (363710747): + No description available. + """ + UNDEFINED_BEHAVIOR = 0 + BEHAVIOR_UNSPECIFIED = 85734570 + PERFORMANCE = 135701520 + SILENT_DATA_CORRUPTION = 111360678 + UNRECOVERABLE_GPU_ERROR = 363710747 + + behavior: str = proto.Field( proto.STRING, - number=79797525, + number=437170770, optional=True, ) - self_link: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=456214797, + number=422937596, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, + + +class InstancesResumeRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): + Array of disks associated with this instance + that are protected with acustomer-supplied + encryption key. + + In order to resume the instance, the disk url + and its corresponding key must be provided. + + If the disk is not protected with a + customer-supplied encryption key it should not + be specified. + instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): + Decrypts data associated with an instance + that is protected with acustomer-supplied + encryption key. + + If the instance you are starting is protected + with a customer-supplied encryption key, the + correct key must be provided otherwise the + instance resume will not succeed. + + This field is a member of `oneof`_ ``_instance_encryption_key``. + """ + + disks: MutableSequence["CustomerEncryptionKeyProtectedDisk"] = proto.RepeatedField( + proto.MESSAGE, + number=95594102, + message="CustomerEncryptionKeyProtectedDisk", ) - warning: "Warning" = proto.Field( + instance_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, - number=50704284, + number=64741517, optional=True, - message="Warning", + message="CustomerEncryptionKey", ) -class InstanceGroupManagerAllInstancesConfig(proto.Message): +class InstancesScopedList(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - properties (google.cloud.compute_v1beta.types.InstancePropertiesPatch): - Properties to set on all instances in the - group. You can add or modify properties using - the instanceGroupManagers.patch or - regionInstanceGroupManagers.patch. After setting - allInstancesConfig on the group, you must update - the group's instances to apply the - configuration. To apply the configuration, set - the group's updatePolicy.type field to use - proactive updates or use the - applyUpdatesToInstances method. + instances (MutableSequence[google.cloud.compute_v1beta.types.Instance]): + [Output Only] A list of instances contained in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of instances when the list is empty. - This field is a member of `oneof`_ ``_properties``. + This field is a member of `oneof`_ ``_warning``. """ - properties: "InstancePropertiesPatch" = proto.Field( + instances: MutableSequence["Instance"] = proto.RepeatedField( proto.MESSAGE, - number=147688755, + number=29097598, + message="Instance", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, - message="InstancePropertiesPatch", + message="Warning", ) -class InstanceGroupManagerAutoHealingPolicy(proto.Message): +class InstancesSetLabelsRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - health_check (str): - The URL for the health check that signals - autohealing. + label_fingerprint (str): + Fingerprint of the previous set of labels for + this resource, used to prevent conflicts. + Provide the latest fingerprint value when making + a request to add or change labels. - This field is a member of `oneof`_ ``_health_check``. - initial_delay_sec (int): - The initial delay is the number of seconds - that a new VM takes to initialize and run its - startup script. During a VM's initial delay - period, the MIG ignores unsuccessful health - checks because the VM might be in the startup - process. This prevents the MIG from prematurely - recreating a VM. If the health check receives a - healthy response during the initial delay, it - indicates that the startup process is complete - and the VM is ready. The value of initial delay - must be between 0 and 3600 seconds. The default - value is 0. + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): - This field is a member of `oneof`_ ``_initial_delay_sec``. """ - health_check: str = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, - number=308876645, + number=178124825, optional=True, ) - initial_delay_sec: int = proto.Field( - proto.INT32, - number=263207002, - optional=True, + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, ) -class InstanceGroupManagerInstanceFlexibilityPolicy(proto.Message): +class InstancesSetMachineResourcesRequest(proto.Message): r""" - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Attributes: - instance_selections (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection]): - Named instance selections configuring - properties that the group will use when creating - new VMs. - provisioning_model_mix (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix): - Provisioning model configuration used by this - managed instance group to create instances. - - This field is a member of `oneof`_ ``_provisioning_model_mix``. + guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): + A list of the type and count of accelerator + cards attached to the instance. """ - instance_selections: MutableMapping[ - str, "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection" - ] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=22954577, - message="InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection", - ) - provisioning_model_mix: "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix" = proto.Field( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, - number=272686452, - optional=True, - message="InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", + number=463595119, + message="AcceleratorConfig", ) -class InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection(proto.Message): +class InstancesSetMachineTypeRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - machine_types (MutableSequence[str]): - Full machine-type names, e.g. - "n1-standard-16". - rank (int): - Preference of this instance selection. Lower - number means higher preference. MIG will first - try to create a VM based on the machine-type - with lowest rank and fallback to next rank based - on availability. Machine types and instance - selections with the same rank have the same - preference. + machine_type (str): + Full or partial URL of the machine type + resource. See Machine Types for a full list of + machine types. For + example:zones/us-central1-f/machineTypes/n1-standard-1 - This field is a member of `oneof`_ ``_rank``. + This field is a member of `oneof`_ ``_machine_type``. """ - machine_types: MutableSequence[str] = proto.RepeatedField( + machine_type: str = proto.Field( proto.STRING, - number=79720065, - ) - rank: int = proto.Field( - proto.INT32, - number=3492908, + number=227711026, optional=True, ) -class InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix(proto.Message): +class InstancesSetMinCpuPlatformRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - standard_capacity_base (int): - The base capacity that will always use Standard VMs to avoid - risk of more preemption than the minimum capacity user - needs. MIG will create only Standard VMs until it reaches - standard_capacity_base and only then will start using - standard_capacity_percent_above_base to mix Spot with - Standard VMs. - - This field is a member of `oneof`_ ``_standard_capacity_base``. - standard_capacity_percent_above_base (int): - The percentage of target capacity that should use Standard - VM. The remaining percentage will use Spot VMs. The - percentage applies only to the capacity above - standard_capacity_base. + min_cpu_platform (str): + Minimum cpu/platform this instance should be + started at. - This field is a member of `oneof`_ ``_standard_capacity_percent_above_base``. + This field is a member of `oneof`_ ``_min_cpu_platform``. """ - standard_capacity_base: int = proto.Field( - proto.INT32, - number=388067636, - optional=True, - ) - standard_capacity_percent_above_base: int = proto.Field( - proto.INT32, - number=401038224, + min_cpu_platform: str = proto.Field( + proto.STRING, + number=242912759, optional=True, ) -class InstanceGroupManagerInstanceLifecyclePolicy(proto.Message): +class InstancesSetNameRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - default_action_on_failure (str): - The action that a MIG performs on a failed VM. If the value - of the onFailedHealthCheck field is ``DEFAULT_ACTION``, then - the same action also applies to the VMs on which your - application fails a health check. Valid values are - REPAIR - (default): MIG automatically repairs a failed VM by - recreating it. For more information, see About repairing VMs - in a MIG. - DO_NOTHING: MIG does not repair a failed VM. - Check the DefaultActionOnFailure enum for the list of - possible values. - - This field is a member of `oneof`_ ``_default_action_on_failure``. - force_update_on_repair (str): - A bit indicating whether to forcefully apply - the group's latest configuration when repairing - a VM. Valid options are: - NO (default): If - configuration updates are available, they are - not forcefully applied during repair. Instead, - configuration updates are applied according to - the group's update policy. - YES: If - configuration updates are available, they are - applied during repair. Check the - ForceUpdateOnRepair enum for the list of - possible values. - - This field is a member of `oneof`_ ``_force_update_on_repair``. - on_failed_health_check (str): - The action that a MIG performs on an unhealthy VM. A VM is - marked as unhealthy when the application running on that VM - fails a health check. Valid values are: - DEFAULT_ACTION - (default): MIG uses the same action configured for - instanceLifecyclePolicy.defaultActionOnFailure field. - - REPAIR: MIG automatically repairs an unhealthy VM by - recreating it. - DO_NOTHING: MIG doesn't repair an unhealthy - VM. For more information, see About repairing VMs in a MIG. - Check the OnFailedHealthCheck enum for the list of possible - values. + current_name (str): + The current name of this resource, used to + prevent conflicts. Provide the latest name when + making a request to change name. - This field is a member of `oneof`_ ``_on_failed_health_check``. - on_repair (google.cloud.compute_v1beta.types.InstanceGroupManagerInstanceLifecyclePolicyOnRepair): - Configuration for VM repairs in the MIG. + This field is a member of `oneof`_ ``_current_name``. + name (str): + The name to be applied to the instance. Needs + to be RFC 1035 compliant. - This field is a member of `oneof`_ ``_on_repair``. + This field is a member of `oneof`_ ``_name``. """ - class DefaultActionOnFailure(proto.Enum): - r"""The action that a MIG performs on a failed VM. If the value of the - onFailedHealthCheck field is ``DEFAULT_ACTION``, then the same - action also applies to the VMs on which your application fails a - health check. Valid values are - REPAIR (default): MIG automatically - repairs a failed VM by recreating it. For more information, see - About repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a - failed VM. Additional supported values which may be not listed in - the enum directly due to technical reasons: DO_NOTHING REPAIR - - Values: - UNDEFINED_DEFAULT_ACTION_ON_FAILURE (0): - A value indicating that the enum field is not - set. - DELETE (402225579): - MIG deletes a failed or an unhealthy VM. - Deleting the VM decreases the target size of the - MIG. - DO_NOTHING (451307513): - No description available. - REPAIR (266277773): - No description available. - """ - UNDEFINED_DEFAULT_ACTION_ON_FAILURE = 0 - DELETE = 402225579 - DO_NOTHING = 451307513 - REPAIR = 266277773 - - class ForceUpdateOnRepair(proto.Enum): - r"""A bit indicating whether to forcefully apply the group's - latest configuration when repairing a VM. Valid options are: - - NO (default): If configuration updates are available, they are - not forcefully applied during repair. Instead, configuration - updates are applied according to the group's update policy. - - YES: If configuration updates are available, they are applied - during repair. - - Values: - UNDEFINED_FORCE_UPDATE_ON_REPAIR (0): - A value indicating that the enum field is not - set. - NO (2497): - No description available. - YES (87751): - No description available. - """ - UNDEFINED_FORCE_UPDATE_ON_REPAIR = 0 - NO = 2497 - YES = 87751 - - class OnFailedHealthCheck(proto.Enum): - r"""The action that a MIG performs on an unhealthy VM. A VM is marked as - unhealthy when the application running on that VM fails a health - check. Valid values are: - DEFAULT_ACTION (default): MIG uses the - same action configured for - instanceLifecyclePolicy.defaultActionOnFailure field. - REPAIR: MIG - automatically repairs an unhealthy VM by recreating it. - - DO_NOTHING: MIG doesn't repair an unhealthy VM. For more - information, see About repairing VMs in a MIG. Additional supported - values which may be not listed in the enum directly due to technical - reasons: DO_NOTHING REPAIR - - Values: - UNDEFINED_ON_FAILED_HEALTH_CHECK (0): - A value indicating that the enum field is not - set. - DEFAULT_ACTION (463967764): - (Default) MIG uses the same action configured - for - instanceLifecyclePolicy.defaultActionOnFailure - field. - """ - UNDEFINED_ON_FAILED_HEALTH_CHECK = 0 - DEFAULT_ACTION = 463967764 - - default_action_on_failure: str = proto.Field( - proto.STRING, - number=61383253, - optional=True, - ) - force_update_on_repair: str = proto.Field( + current_name: str = proto.Field( proto.STRING, - number=356302027, + number=394983825, optional=True, ) - on_failed_health_check: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=39807943, - optional=True, - ) - on_repair: "InstanceGroupManagerInstanceLifecyclePolicyOnRepair" = proto.Field( - proto.MESSAGE, - number=371820013, + number=3373707, optional=True, - message="InstanceGroupManagerInstanceLifecyclePolicyOnRepair", ) -class InstanceGroupManagerInstanceLifecyclePolicyOnRepair(proto.Message): - r"""Configuration for VM repairs in the MIG. +class InstancesSetSecurityPolicyRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - allow_changing_zone (str): - Specifies whether the MIG can change a VM's - zone during a repair. Check the - AllowChangingZone enum for the list of possible - values. + network_interfaces (MutableSequence[str]): + The network interfaces that the security + policy will be applied to. Network interfaces + use the nicN naming format. You can only set a + security policy for network interfaces with an + access config. + security_policy (str): + A full or partial URL to a security policy to + add to this instance. If this field is set to an + empty string it will remove the associated + security policy. - This field is a member of `oneof`_ ``_allow_changing_zone``. + This field is a member of `oneof`_ ``_security_policy``. """ - class AllowChangingZone(proto.Enum): - r"""Specifies whether the MIG can change a VM's zone during a - repair. - - Values: - UNDEFINED_ALLOW_CHANGING_ZONE (0): - A value indicating that the enum field is not - set. - NO (2497): - [Default] MIG cannot change a VM's zone during a repair. - YES (87751): - MIG can select a different zone for the VM - during a repair. - """ - UNDEFINED_ALLOW_CHANGING_ZONE = 0 - NO = 2497 - YES = 87751 - - allow_changing_zone: str = proto.Field( + network_interfaces: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=426055112, + number=52735243, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, optional=True, ) -class InstanceGroupManagerList(proto.Message): - r"""[Output Only] A list of managed instance groups. +class InstancesSetServiceAccountRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): - A list of InstanceGroupManager resources. - kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerList for a list of managed - instance groups. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + email (str): + Email address of the service account. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_email``. + scopes (MutableSequence[str]): + The list of scopes to be made available for + this service account. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InstanceGroupManager", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + email: str = proto.Field( proto.STRING, - number=79797525, + number=96619420, optional=True, ) - self_link: str = proto.Field( + scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=165973151, ) -class InstanceGroupManagerParams(proto.Message): - r"""Input only additional params for instance group manager - creation. +class InstancesStartWithEncryptionKeyRequest(proto.Message): + r""" + + Attributes: + disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): + Array of disks associated with this instance + that are protected with acustomer-supplied + encryption key. + + In order to start the instance, the disk url and + its corresponding key must be provided. - Attributes: - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to bind to the managed - instance group. The tags are key-value pairs. - Keys must be in the format tagKeys/123 and - values in the format tagValues/456. For more - information, see Manage tags for resources. + If the disk is not protected with a + customer-supplied encryption key it should not + be specified. """ - resource_manager_tags: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=377671164, + disks: MutableSequence["CustomerEncryptionKeyProtectedDisk"] = proto.RepeatedField( + proto.MESSAGE, + number=95594102, + message="CustomerEncryptionKeyProtectedDisk", ) -class InstanceGroupManagerResizeRequest(proto.Message): - r"""InstanceGroupManagerResizeRequest represents a request to - create a number of VMs: either immediately or by queuing the - request for the specified time. This resize request is nested - under InstanceGroupManager and the VMs created by this request - are added to the owning InstanceGroupManager. +class InstantSnapshot(proto.Message): + r"""Represents a InstantSnapshot resource. + + You can use instant snapshots to create disk rollback points + quickly.. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - count (int): - This field is deprecated, please use resize_by instead. The - count of instances to create as part of this resize request. + architecture (str): + Output only. [Output Only] The architecture of the instant + snapshot. Valid values are ARM64 or X86_64. Check the + Architecture enum for the list of possible values. - This field is a member of `oneof`_ ``_count``. + This field is a member of `oneof`_ ``_architecture``. creation_timestamp (str): - [Output Only] The creation timestamp for this resize request - in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): An optional description of this resource. + Provide this property when you create the + resource. This field is a member of `oneof`_ ``_description``. + disk_size_gb (int): + Output only. [Output Only] Size of the source disk, + specified in GB. + + This field is a member of `oneof`_ ``_disk_size_gb``. id (int): - [Output Only] A unique identifier for this resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - The names of instances to be created by this resize request. - The number of names specified determines the number of - instances to create. The group's target size will be - increased by this number. This field cannot be used together - with 'resize_by'. kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerResizeRequest for resize - requests. + Output only. [Output Only] Type of the resource. + Alwayscompute#instantSnapshot for InstantSnapshot resources. This field is a member of `oneof`_ ``_kind``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this InstantSnapshot, which is essentially a + hash of the labels set used for optimistic + locking. The fingerprint is initially generated + by Compute Engine and changes after every + request to modify or update labels. You must + always provide an up-to-date fingerprint hash in + order to update or change labels, otherwise the + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a InstantSnapshot. + + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels to apply to this InstantSnapshot. + These can be later modified by the setLabels + method. Label values may be empty. name (str): - The name of this resize request. The name - must be 1-63 characters long, and comply with - RFC1035. + Name of the resource; provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] The URL of a region where the resize request - is located. Populated only for regional resize requests. + Output only. [Output Only] URL of the region where the + instant snapshot resides. You must specify this field as + part of the HTTP request URL. It is not settable as a field + in the request body. This field is a member of `oneof`_ ``_region``. - requested_run_duration (google.cloud.compute_v1beta.types.Duration): - Requested run duration for instances that - will be created by this request. At the end of - the run duration instance will be deleted. + resource_status (google.cloud.compute_v1beta.types.InstantSnapshotResourceStatus): + Output only. [Output Only] Status information for the + instant snapshot resource. - This field is a member of `oneof`_ ``_requested_run_duration``. - resize_by (int): - The number of instances to be created by this - resize request. The group's target size will be - increased by this number. This field cannot be - used together with 'instances'. + This field is a member of `oneof`_ ``_resource_status``. + satisfies_pzi (bool): + Output only. Reserved for future use. - This field is a member of `oneof`_ ``_resize_by``. + This field is a member of `oneof`_ ``_satisfies_pzi``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. + + This field is a member of `oneof`_ ``_satisfies_pzs``. self_link (str): - [Output Only] The URL for this resize request. The server - defines this URL. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource's resource id. This field is a member of `oneof`_ ``_self_link_with_id``. - state (str): - [Output only] Current state of the request. Check the State - enum for the list of possible values. + source_disk (str): + URL of the source disk used to create this + instant snapshot. Note that the source disk must + be in the same zone/region as the instant + snapshot to be created. This can be a full or + valid partial URL. For example, the following + are valid values: - This field is a member of `oneof`_ ``_state``. - status (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequestStatus): - [Output only] Status of the request. + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk + + - + projects/project/zones/zone/disks/disk + + - + projects/project/regions/region/disks/disk + + - + zones/zone/disks/disk + + - + regions/region/disks/disk + + This field is a member of `oneof`_ ``_source_disk``. + source_disk_id (str): + Output only. [Output Only] The ID value of the disk used to + create this InstantSnapshot. This value may be used to + determine whether the InstantSnapshot was taken from the + current or a previous instance of a given disk name. + + This field is a member of `oneof`_ ``_source_disk_id``. + status (str): + Output only. [Output Only] The status of the + instantSnapshot. This can beCREATING, DELETING, FAILED, + orREADY. Check the Status enum for the list of possible + values. This field is a member of `oneof`_ ``_status``. zone (str): - [Output Only] The URL of a zone where the resize request is - located. Populated only for zonal resize requests. + Output only. [Output Only] URL of the zone where the instant + snapshot resides. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_zone``. """ - class State(proto.Enum): - r"""[Output only] Current state of the request. + class Architecture(proto.Enum): + r"""Output only. [Output Only] The architecture of the instant snapshot. + Valid values are ARM64 or X86_64. Values: - UNDEFINED_STATE (0): + UNDEFINED_ARCHITECTURE (0): + A value indicating that the enum field is not + set. + ARCHITECTURE_UNSPECIFIED (394750507): + Default value indicating Architecture is not + set. + ARM64 (62547450): + Machines with architecture ARM64 + X86_64 (425300551): + Machines with architecture X86_64 + """ + UNDEFINED_ARCHITECTURE = 0 + ARCHITECTURE_UNSPECIFIED = 394750507 + ARM64 = 62547450 + X86_64 = 425300551 + + class Status(proto.Enum): + r"""Output only. [Output Only] The status of the instantSnapshot. This + can beCREATING, DELETING, FAILED, orREADY. + + Values: + UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - ACCEPTED (246714279): - The request was created successfully and was - accepted for provisioning when the capacity - becomes available. - CANCELLED (41957681): - The request is cancelled. CREATING (455564985): - Resize request is being created and may still - fail creation. + InstantSnapshot creation is in progress. + DELETING (528602024): + InstantSnapshot is currently being deleted. FAILED (455706685): - The request failed before or during - provisioning. If the request fails during - provisioning, any VMs that were created during - provisioning are rolled back and removed from - the MIG. - PROVISIONING (290896621): - The value is deprecated. ResizeRequests would - stay in the ACCEPTED state during provisioning - attempts. The target resource(s) are being - provisioned. - STATE_UNSPECIFIED (470755401): - Default value. This value should never be - returned. - SUCCEEDED (511103553): - The request succeeded. + InstantSnapshot creation failed. + READY (77848963): + InstantSnapshot has been created + successfully. + UNAVAILABLE (413756464): + InstantSnapshot is currently unavailable and + cannot be used for Disk restoration """ - UNDEFINED_STATE = 0 - ACCEPTED = 246714279 - CANCELLED = 41957681 + UNDEFINED_STATUS = 0 CREATING = 455564985 + DELETING = 528602024 FAILED = 455706685 - PROVISIONING = 290896621 - STATE_UNSPECIFIED = 470755401 - SUCCEEDED = 511103553 + READY = 77848963 + UNAVAILABLE = 413756464 - count: int = proto.Field( - proto.INT32, - number=94851343, + architecture: str = proto.Field( + proto.STRING, + number=302803283, optional=True, ) creation_timestamp: str = proto.Field( @@ -54302,21 +66458,31 @@ class State(proto.Enum): number=422937596, optional=True, ) + disk_size_gb: int = proto.Field( + proto.INT64, + number=316263735, + optional=True, + ) id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=29097598, - message="PerInstanceConfig", - ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, + ) name: str = proto.Field( proto.STRING, number=3373707, @@ -54327,15 +66493,20 @@ class State(proto.Enum): number=138946292, optional=True, ) - requested_run_duration: "Duration" = proto.Field( + resource_status: "InstantSnapshotResourceStatus" = proto.Field( proto.MESSAGE, - number=232146425, + number=249429315, optional=True, - message="Duration", + message="InstantSnapshotResourceStatus", ) - resize_by: int = proto.Field( - proto.INT32, - number=533735362, + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=480964257, + optional=True, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, optional=True, ) self_link: str = proto.Field( @@ -54348,16 +66519,20 @@ class State(proto.Enum): number=44520962, optional=True, ) - state: str = proto.Field( + source_disk: str = proto.Field( proto.STRING, - number=109757585, + number=451753793, optional=True, ) - status: "InstanceGroupManagerResizeRequestStatus" = proto.Field( - proto.MESSAGE, + source_disk_id: str = proto.Field( + proto.STRING, + number=454190809, + optional=True, + ) + status: str = proto.Field( + proto.STRING, number=181260274, optional=True, - message="InstanceGroupManagerResizeRequestStatus", ) zone: str = proto.Field( proto.STRING, @@ -54366,101 +66541,42 @@ class State(proto.Enum): ) -class InstanceGroupManagerResizeRequestStatus(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - error (google.cloud.compute_v1beta.types.Error): - [Output only] Fatal errors encountered during the queueing - or provisioning phases of the ResizeRequest that caused the - transition to the FAILED state. Contrary to the last_attempt - errors, this field is final and errors are never removed - from here, as the ResizeRequest is not going to retry. - - This field is a member of `oneof`_ ``_error``. - last_attempt (google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequestStatusLastAttempt): - [Output only] Information about the last attempt to fulfill - the request. The value is temporary since the ResizeRequest - can retry, as long as it's still active and the last attempt - value can either be cleared or replaced with a different - error. Since ResizeRequest retries infrequently, the value - may be stale and no longer show an active problem. The value - is cleared when ResizeRequest transitions to the final state - (becomes inactive). If the final state is FAILED the error - describing it will be storred in the "error" field only. - - This field is a member of `oneof`_ ``_last_attempt``. - """ - - error: "Error" = proto.Field( - proto.MESSAGE, - number=96784904, - optional=True, - message="Error", - ) - last_attempt: "InstanceGroupManagerResizeRequestStatusLastAttempt" = proto.Field( - proto.MESSAGE, - number=434771492, - optional=True, - message="InstanceGroupManagerResizeRequestStatusLastAttempt", - ) - - -class InstanceGroupManagerResizeRequestStatusLastAttempt(proto.Message): +class InstantSnapshotAggregatedList(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Attributes: - error (google.cloud.compute_v1beta.types.Error): - Errors that prevented the ResizeRequest to be - fulfilled. - - This field is a member of `oneof`_ ``_error``. - """ - - error: "Error" = proto.Field( - proto.MESSAGE, - number=96784904, - optional=True, - message="Error", - ) - - -class InstanceGroupManagerResizeRequestsListResponse(proto.Message): - r"""[Output Only] A list of resize requests. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - Attributes: id (str): [Output Only] Unique identifier for the resource; defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): - A list of resize request resources. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InstantSnapshotsScopedList]): + A list of InstantSnapshotsScopedList + resources. kind (str): - [Output Only] Type of the resource. Always - compute#instanceGroupManagerResizeRequestList for a list of - resize requests. + Output only. [Output Only] Type of resource. + Alwayscompute#instantSnapshotAggregatedList for aggregated + lists of instantSnapshots. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -54476,10 +66592,11 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["InstanceGroupManagerResizeRequest"] = proto.RepeatedField( + items: MutableMapping[str, "InstantSnapshotsScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, number=100526016, - message="InstanceGroupManagerResizeRequest", + message="InstantSnapshotsScopedList", ) kind: str = proto.Field( proto.STRING, @@ -54496,6 +66613,10 @@ def raw_page(self): number=456214797, optional=True, ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -54504,2537 +66625,2168 @@ def raw_page(self): ) -class InstanceGroupManagerResourcePolicies(proto.Message): - r""" +class InstantSnapshotList(proto.Message): + r"""Contains a list of InstantSnapshot resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - workload_policy (str): - The URL of the workload policy that is - specified for this managed instance group. It - can be a full or partial URL. For example, the - following are all valid URLs to a workload - policy: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy - - This field is a member of `oneof`_ ``_workload_policy``. - """ - - workload_policy: str = proto.Field( - proto.STRING, - number=114721530, - optional=True, - ) - + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. -class InstanceGroupManagerStandbyPolicy(proto.Message): - r""" + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstantSnapshot]): + A list of InstantSnapshot resources. + kind (str): + Output only. Type of resource. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - Attributes: - initial_delay_sec (int): - Specifies the number of seconds that the MIG - should wait to suspend or stop a VM after that - VM was created. The initial delay gives the - initialization script the time to prepare your - VM for a quick scale out. The value of initial - delay must be between 0 and 3600 seconds. The - default value is 0. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_initial_delay_sec``. - mode (str): - Defines how a MIG resumes or starts VMs from a standby pool - when the group scales out. The default mode is ``MANUAL``. - Check the Mode enum for the list of possible values. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_mode``. + This field is a member of `oneof`_ ``_warning``. """ - class Mode(proto.Enum): - r"""Defines how a MIG resumes or starts VMs from a standby pool when the - group scales out. The default mode is ``MANUAL``. - - Values: - UNDEFINED_MODE (0): - A value indicating that the enum field is not - set. - MANUAL (119397318): - MIG does not automatically resume or start - VMs in the standby pool when the group scales - out. - SCALE_OUT_POOL (635394): - MIG automatically resumes or starts VMs in - the standby pool when the group scales out, and - replenishes the standby pool afterwards. - """ - UNDEFINED_MODE = 0 - MANUAL = 119397318 - SCALE_OUT_POOL = 635394 + @property + def raw_page(self): + return self - initial_delay_sec: int = proto.Field( - proto.INT32, - number=263207002, - optional=True, - ) - mode: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=3357091, + number=3355, optional=True, ) - - -class InstanceGroupManagerStatus(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - all_instances_config (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusAllInstancesConfig): - [Output only] Status of all-instances configuration on the - group. - - This field is a member of `oneof`_ ``_all_instances_config``. - autoscaler (str): - [Output Only] The URL of the Autoscaler that targets this - instance group manager. - - This field is a member of `oneof`_ ``_autoscaler``. - bulk_instance_operation (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusBulkInstanceOperation): - [Output Only] The status of bulk instance operation. - - This field is a member of `oneof`_ ``_bulk_instance_operation``. - is_stable (bool): - [Output Only] A bit indicating whether the managed instance - group is in a stable state. A stable state means that: none - of the instances in the managed instance group is currently - undergoing any type of change (for example, creation, - restart, or deletion); no future changes are scheduled for - instances in the managed instance group; and the managed - instance group itself is not being modified. - - This field is a member of `oneof`_ ``_is_stable``. - stateful (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusStateful): - [Output Only] Stateful status of the given Instance Group - Manager. - - This field is a member of `oneof`_ ``_stateful``. - version_target (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusVersionTarget): - [Output Only] A status of consistency of Instances' versions - with their target version specified by version field on - Instance Group Manager. - - This field is a member of `oneof`_ ``_version_target``. - """ - - all_instances_config: "InstanceGroupManagerStatusAllInstancesConfig" = proto.Field( + items: MutableSequence["InstantSnapshot"] = proto.RepeatedField( proto.MESSAGE, - number=112596737, - optional=True, - message="InstanceGroupManagerStatusAllInstancesConfig", + number=100526016, + message="InstantSnapshot", ) - autoscaler: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=517258967, - optional=True, - ) - bulk_instance_operation: "InstanceGroupManagerStatusBulkInstanceOperation" = ( - proto.Field( - proto.MESSAGE, - number=501667466, - optional=True, - message="InstanceGroupManagerStatusBulkInstanceOperation", - ) - ) - is_stable: bool = proto.Field( - proto.BOOL, - number=108410864, - optional=True, - ) - stateful: "InstanceGroupManagerStatusStateful" = proto.Field( - proto.MESSAGE, - number=244462412, - optional=True, - message="InstanceGroupManagerStatusStateful", - ) - version_target: "InstanceGroupManagerStatusVersionTarget" = proto.Field( - proto.MESSAGE, - number=289386200, + number=3292052, optional=True, - message="InstanceGroupManagerStatusVersionTarget", ) - - -class InstanceGroupManagerStatusAllInstancesConfig(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - current_revision (str): - [Output Only] Current all-instances configuration revision. - This value is in RFC3339 text format. - - This field is a member of `oneof`_ ``_current_revision``. - effective (bool): - [Output Only] A bit indicating whether this configuration - has been applied to all managed instances in the group. - - This field is a member of `oneof`_ ``_effective``. - """ - - current_revision: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=38355937, - optional=True, - ) - effective: bool = proto.Field( - proto.BOOL, - number=141961639, + number=79797525, optional=True, - ) - - -class InstanceGroupManagerStatusBulkInstanceOperation(proto.Message): - r"""Bulk instance operation is the creation of VMs in a MIG when - the targetSizePolicy.mode is set to BULK. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - in_progress (bool): - [Output Only] Informs whether bulk instance operation is in - progress. - - This field is a member of `oneof`_ ``_in_progress``. - last_progress_check (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck): - [Output Only] Information from the last progress check of - bulk instance operation. - - This field is a member of `oneof`_ ``_last_progress_check``. - """ - - in_progress: bool = proto.Field( - proto.BOOL, - number=320200711, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, ) - last_progress_check: "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=208638271, + number=50704284, optional=True, - message="InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", + message="Warning", ) -class InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck(proto.Message): +class InstantSnapshotResourceStatus(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - error (google.cloud.compute_v1beta.types.Error): - [Output Only] Errors encountered during bulk instance - operation. - - This field is a member of `oneof`_ ``_error``. - timestamp (str): - [Output Only] Timestamp of the last progress check of bulk - instance operation. Timestamp is in RFC3339 text format. + storage_size_bytes (int): + [Output Only] The storage size of this instant snapshot. - This field is a member of `oneof`_ ``_timestamp``. + This field is a member of `oneof`_ ``_storage_size_bytes``. """ - error: "Error" = proto.Field( - proto.MESSAGE, - number=96784904, - optional=True, - message="Error", - ) - timestamp: str = proto.Field( - proto.STRING, - number=55126294, + storage_size_bytes: int = proto.Field( + proto.INT64, + number=387548913, optional=True, ) -class InstanceGroupManagerStatusStateful(proto.Message): +class InstantSnapshotsScopedList(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - has_stateful_config (bool): - [Output Only] A bit indicating whether the managed instance - group has stateful configuration, that is, if you have - configured any items in a stateful policy or in per-instance - configs. The group might report that it has no stateful - configuration even when there is still some preserved state - on a managed instance, for example, if you have deleted all - PICs but not yet applied those deletions. - - This field is a member of `oneof`_ ``_has_stateful_config``. - is_stateful (bool): - [Output Only] A bit indicating whether the managed instance - group has stateful configuration, that is, if you have - configured any items in a stateful policy or in per-instance - configs. The group might report that it has no stateful - configuration even when there is still some preserved state - on a managed instance, for example, if you have deleted all - PICs but not yet applied those deletions. This field is - deprecated in favor of has_stateful_config. - - This field is a member of `oneof`_ ``_is_stateful``. - per_instance_configs (google.cloud.compute_v1beta.types.InstanceGroupManagerStatusStatefulPerInstanceConfigs): - [Output Only] Status of per-instance configurations on the - instances. + instant_snapshots (MutableSequence[google.cloud.compute_v1beta.types.InstantSnapshot]): + [Output Only] A list of instantSnapshots contained in this + scope. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning which replaces the list + of instantSnapshots when the list is empty. - This field is a member of `oneof`_ ``_per_instance_configs``. + This field is a member of `oneof`_ ``_warning``. """ - has_stateful_config: bool = proto.Field( - proto.BOOL, - number=110474224, - optional=True, + instant_snapshots: MutableSequence["InstantSnapshot"] = proto.RepeatedField( + proto.MESSAGE, + number=329637457, + message="InstantSnapshot", ) - is_stateful: bool = proto.Field( - proto.BOOL, - number=46302913, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, - ) - per_instance_configs: "InstanceGroupManagerStatusStatefulPerInstanceConfigs" = ( - proto.Field( - proto.MESSAGE, - number=526265001, - optional=True, - message="InstanceGroupManagerStatusStatefulPerInstanceConfigs", - ) + message="Warning", ) -class InstanceGroupManagerStatusStatefulPerInstanceConfigs(proto.Message): - r""" +class Int64RangeMatch(proto.Message): + r"""HttpRouteRuleMatch criteria for field values that must stay + within the specified integer range. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - all_effective (bool): - A bit indicating if all of the group's - per-instance configurations (listed in the - output of a listPerInstanceConfigs API call) - have status EFFECTIVE or there are no - per-instance-configs. + range_end (int): + The end of the range (exclusive) in signed + long integer format. - This field is a member of `oneof`_ ``_all_effective``. + This field is a member of `oneof`_ ``_range_end``. + range_start (int): + The start of the range (inclusive) in signed + long integer format. + + This field is a member of `oneof`_ ``_range_start``. """ - all_effective: bool = proto.Field( - proto.BOOL, - number=516540553, + range_end: int = proto.Field( + proto.INT64, + number=322439897, + optional=True, + ) + range_start: int = proto.Field( + proto.INT64, + number=103333600, optional=True, ) -class InstanceGroupManagerStatusVersionTarget(proto.Message): - r""" +class Interconnect(proto.Message): + r"""Represents an Interconnect resource. + + An Interconnect resource is a dedicated connection between the + Google Cloud network and your on-premises network. For more + information, read the Dedicated Interconnect Overview. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - is_reached (bool): - [Output Only] A bit indicating whether version target has - been reached in this managed instance group, i.e. all - instances are in their target version. Instances' target - version are specified by version field on Instance Group - Manager. - - This field is a member of `oneof`_ ``_is_reached``. - """ + aai_enabled (bool): + Enable or disable the application awareness + feature on this Cloud Interconnect. - is_reached: bool = proto.Field( - proto.BOOL, - number=433209149, - optional=True, - ) + This field is a member of `oneof`_ ``_aai_enabled``. + admin_enabled (bool): + Administrative status of the interconnect. + When this is set to true, the Interconnect is + functional and can carry traffic. When set to + false, no packets can be carried over the + interconnect and no BGP routes are exchanged + over it. By default, the status is set to true. + This field is a member of `oneof`_ ``_admin_enabled``. + application_aware_interconnect (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnect): + Configuration information for application + awareness on this Cloud Interconnect. -class InstanceGroupManagerTargetSizePolicy(proto.Message): - r""" + This field is a member of `oneof`_ ``_application_aware_interconnect``. + available_features (MutableSequence[str]): + [Output only] List of features available for this + Interconnect connection, which can take one of the following + values: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - mode (str): - The mode of target size policy based on which - the MIG creates its VMs individually or all at - once. Check the Mode enum for the list of - possible values. + - IF_MACSEC: If present, then the Interconnect connection is + provisioned on MACsec capable hardware ports. If not present, then the + Interconnect connection is provisioned on non-MACsec capable ports. Any + attempt to enable MACsec will fail. + - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is + provisioned exclusively for Cross-Site Networking. Any attempt to configure + VLAN attachments will fail. If not present, then the Interconnect + connection is not provisioned for Cross-Site Networking. Any attempt to use + it for Cross-Site Networking will fail. - This field is a member of `oneof`_ ``_mode``. - """ + Check the AvailableFeatures enum for the list of possible + values. + circuit_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectCircuitInfo]): + Output only. [Output Only] A list of CircuitInfo objects, + that describe the individual circuits in this LAG. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - class Mode(proto.Enum): - r"""The mode of target size policy based on which the MIG creates - its VMs individually or all at once. + This field is a member of `oneof`_ ``_creation_timestamp``. + customer_name (str): + Customer name, to put in the Letter of + Authorization as the party authorized to request + a crossconnect. - Values: - UNDEFINED_MODE (0): - A value indicating that the enum field is not - set. - BULK (2050322): - The mode in which the MIG creates VMs all at - once. In this mode, if the MIG is unable to - create even one VM, the MIG waits until all VMs - can be created at the same time. - INDIVIDUAL (438800025): - The mode in which the MIG creates VMs - individually. In this mode, if the MIG is unable - to create a VM, the MIG will continue to create - the other VMs in the group. This is the default - mode. - UNSPECIFIED_MODE (53715403): - If mode is unspecified, MIG will behave as in the default - ``INDIVIDUAL`` mode. - """ - UNDEFINED_MODE = 0 - BULK = 2050322 - INDIVIDUAL = 438800025 - UNSPECIFIED_MODE = 53715403 + This field is a member of `oneof`_ ``_customer_name``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - mode: str = proto.Field( - proto.STRING, - number=3357091, - optional=True, - ) + This field is a member of `oneof`_ ``_description``. + expected_outages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectOutageNotification]): + Output only. [Output Only] A list of outages expected for + this Interconnect. + google_ip_address (str): + Output only. [Output Only] IP address configured on the + Google side of the Interconnect link. This can be used only + for ping tests. + This field is a member of `oneof`_ ``_google_ip_address``. + google_reference_id (str): + Output only. [Output Only] Google reference ID to be used + when raising support tickets with Google or otherwise to + debug backend connectivity issues. -class InstanceGroupManagerUpdatePolicy(proto.Message): - r""" + This field is a member of `oneof`_ ``_google_reference_id``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_id``. + interconnect_attachments (MutableSequence[str]): + Output only. [Output Only] A list of the URLs of all + InterconnectAttachments configured to use this Interconnect. + interconnect_groups (MutableSequence[str]): + Output only. [Output Only] URLs of InterconnectGroups that + include this Interconnect. Order is arbitrary and items are + unique. + interconnect_type (str): + Type of interconnect, which can take one of the following + values: - Attributes: - instance_redistribution_type (str): - The instance redistribution policy for - regional managed instance groups. Valid values - are: - PROACTIVE (default): The group attempts - to maintain an even distribution of VM instances - across zones in the region. - NONE: For - non-autoscaled groups, proactive redistribution - is disabled. Check the - InstanceRedistributionType enum for the list of - possible values. + :: - This field is a member of `oneof`_ ``_instance_redistribution_type``. - max_surge (google.cloud.compute_v1beta.types.FixedOrPercent): - The maximum number of instances that can be - created above the specified targetSize during - the update process. This value can be either a - fixed number or, if the group has 10 or more - instances, a percentage. If you set a - percentage, the number of instances is rounded - if necessary. The default value for maxSurge is - a fixed value equal to the number of zones in - which the managed instance group operates. At - least one of either maxSurge or maxUnavailable - must be greater than 0. Learn more about - maxSurge. + - PARTNER: A partner-managed interconnection shared between customers + though a partner. + - DEDICATED: A dedicated physical interconnection with the + customer. - This field is a member of `oneof`_ ``_max_surge``. - max_unavailable (google.cloud.compute_v1beta.types.FixedOrPercent): - The maximum number of instances that can be - unavailable during the update process. An - instance is considered available if all of the - following conditions are satisfied: - The - instance's status is RUNNING. - If there is a - health check on the instance group, the - instance's health check status must be HEALTHY - at least once. If there is no health check on - the group, then the instance only needs to have - a status of RUNNING to be considered available. - This value can be either a fixed number or, if - the group has 10 or more instances, a - percentage. If you set a percentage, the number - of instances is rounded if necessary. The - default value for maxUnavailable is a fixed - value equal to the number of zones in which the - managed instance group operates. At least one of - either maxSurge or maxUnavailable must be - greater than 0. Learn more about maxUnavailable. + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Check the InterconnectType enum for the list of + possible values. - This field is a member of `oneof`_ ``_max_unavailable``. - min_ready_sec (int): - Minimum number of seconds to wait for after a newly created - instance becomes available. This value must be from range - [0, 3600]. + This field is a member of `oneof`_ ``_interconnect_type``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#interconnect for interconnects. - This field is a member of `oneof`_ ``_min_ready_sec``. - minimal_action (str): - Minimal action to be taken on an instance. - Use this option to minimize disruption as much - as possible or to apply a more disruptive action - than is necessary. - To limit disruption as much - as possible, set the minimal action to REFRESH. - If your update requires a more disruptive - action, Compute Engine performs the necessary - action to execute the update. - To apply a more - disruptive action than is strictly necessary, - set the minimal action to RESTART or REPLACE. - For example, Compute Engine does not need to - restart a VM to change its metadata. But if your - application reads instance metadata only when a - VM is restarted, you can set the minimal action - to RESTART in order to pick up metadata changes. - Check the MinimalAction enum for the list of - possible values. + This field is a member of `oneof`_ ``_kind``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this Interconnect, which is essentially a hash + of the labels set used for optimistic locking. + The fingerprint is initially generated by + Compute Engine and changes after every request + to modify or update labels. You must always + provide an up-to-date fingerprint hash in order + to update or change labels, otherwise the + request will fail with error412 conditionNotMet. - This field is a member of `oneof`_ ``_minimal_action``. - most_disruptive_allowed_action (str): - Most disruptive action that is allowed to be - taken on an instance. You can specify either - NONE to forbid any actions, REFRESH to avoid - restarting the VM and to limit disruption as - much as possible. RESTART to allow actions that - can be applied without instance replacing or - REPLACE to allow all possible actions. If the - Updater determines that the minimal update - action needed is more disruptive than most - disruptive allowed action you specify it will - not perform the update at all. Check the - MostDisruptiveAllowedAction enum for the list of - possible values. + To see the latest fingerprint, make a get() + request to retrieve an Interconnect. - This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. - replacement_method (str): - What action should be used to replace instances. See - minimal_action.REPLACE Check the ReplacementMethod enum for - the list of possible values. + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels for this resource. These can only be + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. + Label values may be empty. + link_type (str): + Type of link requested, which can take one of the following + values: - This field is a member of `oneof`_ ``_replacement_method``. - type_ (str): - The type of update process. You can specify - either PROACTIVE so that the MIG automatically - updates VMs to the latest configurations or - OPPORTUNISTIC so that you can select the VMs - that you want to update. Check the Type enum for - the list of possible values. + :: - This field is a member of `oneof`_ ``_type``. - """ + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. - class InstanceRedistributionType(proto.Enum): - r"""The instance redistribution policy for regional managed - instance groups. Valid values are: - PROACTIVE (default): The - group attempts to maintain an even distribution of VM instances - across zones in the region. - NONE: For non-autoscaled groups, - proactive redistribution is disabled. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + Note that this field indicates the speed of each of the + links in the bundle, not the speed of the entire bundle. + Check the LinkType enum for the list of possible values. - NONE - PROACTIVE + This field is a member of `oneof`_ ``_link_type``. + location (str): + URL of the InterconnectLocation object that + represents where this connection is to be + provisioned. - Values: - UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_INSTANCE_REDISTRIBUTION_TYPE = 0 + This field is a member of `oneof`_ ``_location``. + macsec (google.cloud.compute_v1beta.types.InterconnectMacsec): + Configuration that enables Media Access + Control security (MACsec) on the Cloud + Interconnect connection between Google and your + on-premises router. - class MinimalAction(proto.Enum): - r"""Minimal action to be taken on an instance. Use this option to - minimize disruption as much as possible or to apply a more - disruptive action than is necessary. - To limit disruption as - much as possible, set the minimal action to REFRESH. If your - update requires a more disruptive action, Compute Engine - performs the necessary action to execute the update. - To apply - a more disruptive action than is strictly necessary, set the - minimal action to RESTART or REPLACE. For example, Compute - Engine does not need to restart a VM to change its metadata. But - if your application reads instance metadata only when a VM is - restarted, you can set the minimal action to RESTART in order to - pick up metadata changes. Additional supported values which may - be not listed in the enum directly due to technical reasons: + This field is a member of `oneof`_ ``_macsec``. + macsec_enabled (bool): + Enable or disable MACsec on this Interconnect + connection. MACsec enablement fails if the + MACsec object is not specified. - NONE - REFRESH - REPLACE - RESTART + This field is a member of `oneof`_ ``_macsec_enabled``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - Values: - UNDEFINED_MINIMAL_ACTION (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_MINIMAL_ACTION = 0 + This field is a member of `oneof`_ ``_name``. + noc_contact_email (str): + Email address to contact the customer NOC for + operations and maintenance notifications + regarding this Interconnect. If specified, this + will be used for notifications in addition to + all other forms described, such as Cloud + Monitoring logs alerting and Cloud + Notifications. This field is required for users + who sign up for Cloud Interconnect using + workforce identity federation. - class MostDisruptiveAllowedAction(proto.Enum): - r"""Most disruptive action that is allowed to be taken on an - instance. You can specify either NONE to forbid any actions, - REFRESH to avoid restarting the VM and to limit disruption as - much as possible. RESTART to allow actions that can be applied - without instance replacing or REPLACE to allow all possible - actions. If the Updater determines that the minimal update - action needed is more disruptive than most disruptive allowed - action you specify it will not perform the update at all. - Additional supported values which may be not listed in the enum - directly due to technical reasons: + This field is a member of `oneof`_ ``_noc_contact_email``. + operational_status (str): + Output only. [Output Only] The current status of this + Interconnect's functionality, which can take one of the + following values: - NONE - REFRESH - REPLACE - RESTART + :: - Values: - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 + - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to + use. Attachments may be provisioned on this Interconnect. - class ReplacementMethod(proto.Enum): - r"""What action should be used to replace instances. See - minimal_action.REPLACE + - OS_UNPROVISIONED: An Interconnect that has not completed + turnup. No attachments may be provisioned on this + Interconnect. + - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing + internal maintenance. No attachments may be provisioned or + updated on this Interconnect. Check the OperationalStatus + enum for the list of possible values. - Values: - UNDEFINED_REPLACEMENT_METHOD (0): - A value indicating that the enum field is not - set. - RECREATE (522644719): - Instances will be recreated (with the same - name) - SUBSTITUTE (280924314): - Default option: instances will be deleted and - created (with a new name) - """ - UNDEFINED_REPLACEMENT_METHOD = 0 - RECREATE = 522644719 - SUBSTITUTE = 280924314 + This field is a member of `oneof`_ ``_operational_status``. + params (google.cloud.compute_v1beta.types.InterconnectParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. - class Type(proto.Enum): - r"""The type of update process. You can specify either PROACTIVE - so that the MIG automatically updates VMs to the latest - configurations or OPPORTUNISTIC so that you can select the VMs - that you want to update. Additional supported values which may - be not listed in the enum directly due to technical reasons: + This field is a member of `oneof`_ ``_params``. + peer_ip_address (str): + Output only. [Output Only] IP address configured on the + customer side of the Interconnect link. The customer should + configure this IP address during turnup when prompted by + Google NOC. This can be used only for ping tests. - PROACTIVE + This field is a member of `oneof`_ ``_peer_ip_address``. + provisioned_link_count (int): + Output only. [Output Only] Number of links actually + provisioned in this interconnect. - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - OPPORTUNISTIC (429530089): - MIG will apply new configurations to existing - VMs only when you selectively target specific or - all VMs to be updated. - """ - UNDEFINED_TYPE = 0 - OPPORTUNISTIC = 429530089 + This field is a member of `oneof`_ ``_provisioned_link_count``. + remote_location (str): + Indicates that this is a Cross-Cloud + Interconnect. This field specifies the location + outside of Google's network that the + interconnect is connected to. - instance_redistribution_type: str = proto.Field( - proto.STRING, - number=292630424, - optional=True, - ) - max_surge: "FixedOrPercent" = proto.Field( - proto.MESSAGE, - number=302572691, - optional=True, - message="FixedOrPercent", - ) - max_unavailable: "FixedOrPercent" = proto.Field( - proto.MESSAGE, - number=404940277, - optional=True, - message="FixedOrPercent", - ) - min_ready_sec: int = proto.Field( - proto.INT32, - number=372481544, - optional=True, - ) - minimal_action: str = proto.Field( - proto.STRING, - number=270567060, - optional=True, - ) - most_disruptive_allowed_action: str = proto.Field( - proto.STRING, - number=66103053, - optional=True, - ) - replacement_method: str = proto.Field( - proto.STRING, - number=505931694, - optional=True, - ) - type_: str = proto.Field( - proto.STRING, - number=3575610, - optional=True, - ) + This field is a member of `oneof`_ ``_remote_location``. + requested_features (MutableSequence[str]): + Optional. This parameter can be provided only with + Interconnect INSERT. It isn't valid for Interconnect PATCH. + List of features requested for this Interconnect connection, + which can take one of the following values: + :: -class InstanceGroupManagerVersion(proto.Message): - r""" + - IF_MACSEC: If specified, then the connection is created on MACsec + capable hardware ports. If not specified, non-MACsec capable ports will + also be considered. + - IF_CROSS_SITE_NETWORK: If specified, then the connection is created + exclusively for Cross-Site Networking. The connection can not be used for + Cross-Site Networking unless this feature is specified. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Check the RequestedFeatures enum for the list of possible + values. + requested_link_count (int): + Target number of physical links in the link + bundle, as requested by the customer. - Attributes: - instance_template (str): - The URL of the instance template that is specified for this - managed instance group. The group uses this template to - create new instances in the managed instance group until the - ``targetSize`` for this version is reached. The templates - for existing instances in the group do not change unless you - run recreateInstances, run applyUpdatesToInstances, or set - the group's updatePolicy.type to PROACTIVE; in those cases, - existing instances are updated until the ``targetSize`` for - this version is reached. + This field is a member of `oneof`_ ``_requested_link_count``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. - This field is a member of `oneof`_ ``_instance_template``. - name (str): - Name of the version. Unique among all - versions in the scope of this managed instance - group. + This field is a member of `oneof`_ ``_satisfies_pzs``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. - This field is a member of `oneof`_ ``_name``. - target_size (google.cloud.compute_v1beta.types.FixedOrPercent): - Specifies the intended number of instances to be created - from the instanceTemplate. The final number of instances - created from the template will be equal to: - If expressed - as a fixed number, the minimum of either targetSize.fixed or - instanceGroupManager.targetSize is used. - if expressed as a - percent, the targetSize would be (targetSize.percent/100 \* - InstanceGroupManager.targetSize) If there is a remainder, - the number is rounded. If unset, this version will update - any remaining instances not updated by another version. Read - Starting a canary update for more information. + This field is a member of `oneof`_ ``_self_link``. + state (str): + Output only. [Output Only] The current state of Interconnect + functionality, which can take one of the following values: - This field is a member of `oneof`_ ``_target_size``. - """ + :: - instance_template: str = proto.Field( - proto.STRING, - number=309248228, - optional=True, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - target_size: "FixedOrPercent" = proto.Field( - proto.MESSAGE, - number=62880239, - optional=True, - message="FixedOrPercent", - ) + - ACTIVE: The Interconnect is valid, turned up and ready to use. + Attachments may be provisioned on this Interconnect. + - UNPROVISIONED: The Interconnect has not completed turnup. No + attachments may be provisioned on this Interconnect. + - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. + No attachments may be provisioned or updated on this + Interconnect. + Check the State enum for the list of possible values. -class InstanceGroupManagersAbandonInstancesRequest(proto.Message): - r""" + This field is a member of `oneof`_ ``_state``. + subzone (str): + Specific subzone in the InterconnectLocation + that represents where this connection is to be + provisioned. Check the Subzone enum for the list + of possible values. - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to abandon. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. + This field is a member of `oneof`_ ``_subzone``. + wire_groups (MutableSequence[str]): + Output only. [Output Only] A list of the URLs of all + CrossSiteNetwork WireGroups configured to use this + Interconnect. The Interconnect cannot be deleted if this + list is non-empty. """ - instances: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=29097598, - ) + class AvailableFeatures(proto.Enum): + r"""Additional supported values which may be not listed in the enum + directly due to technical reasons: IF_CROSS_SITE_NETWORK + IF_L2_FORWARDING IF_MACSEC + Values: + UNDEFINED_AVAILABLE_FEATURES (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_AVAILABLE_FEATURES = 0 -class InstanceGroupManagersApplyUpdatesRequest(proto.Message): - r"""InstanceGroupManagers.applyUpdatesToInstances + class InterconnectType(proto.Enum): + r"""Type of interconnect, which can take one of the following values: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - all_instances (bool): - Flag to update all instances instead of - specified list of “instances”. If the flag is - set to true then the instances may not be - specified in the request. + - PARTNER: A partner-managed interconnection shared between customers + though a partner. + - DEDICATED: A dedicated physical interconnection with the + customer. - This field is a member of `oneof`_ ``_all_instances``. - instances (MutableSequence[str]): - The list of URLs of one or more instances for which you want - to apply updates. Each URL can be a full URL or a partial - URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - minimal_action (str): - The minimal action that you want to perform - on each instance during the update: - REPLACE: - At minimum, delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - minimum action is NONE. If your update requires - a more disruptive action than you set with this - flag, the necessary action is performed to - execute the update. Check the MinimalAction enum - for the list of possible values. + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. - This field is a member of `oneof`_ ``_minimal_action``. - most_disruptive_allowed_action (str): - The most disruptive action that you want to - perform on each instance during the update: - - REPLACE: Delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - most disruptive allowed action is REPLACE. If - your update requires a more disruptive action - than you set with this flag, the update request - will fail. Check the MostDisruptiveAllowedAction - enum for the list of possible values. + Values: + UNDEFINED_INTERCONNECT_TYPE (0): + A value indicating that the enum field is not + set. + DEDICATED (258411983): + A dedicated physical interconnection with the + customer. + IT_PRIVATE (335677007): + [Deprecated] A private, physical interconnection with the + customer. + PARTNER (461924520): + A partner-managed interconnection shared + between customers via partner. + """ + UNDEFINED_INTERCONNECT_TYPE = 0 + DEDICATED = 258411983 + IT_PRIVATE = 335677007 + PARTNER = 461924520 - This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. - """ + class LinkType(proto.Enum): + r"""Type of link requested, which can take one of the following values: - class MinimalAction(proto.Enum): - r"""The minimal action that you want to perform on each instance - during the update: - REPLACE: At minimum, delete the instance - and create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. - By default, the minimum action is NONE. If your update requires - a more disruptive action than you set with this flag, the - necessary action is performed to execute the update. Additional - supported values which may be not listed in the enum directly - due to technical reasons: + :: - NONE - REFRESH - REPLACE - RESTART + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. + + Note that this field indicates the speed of each of the links in the + bundle, not the speed of the entire bundle. Values: - UNDEFINED_MINIMAL_ACTION (0): + UNDEFINED_LINK_TYPE (0): A value indicating that the enum field is not set. + LINK_TYPE_ETHERNET_100G_LR (337672551): + 100G Ethernet, LR Optics. + LINK_TYPE_ETHERNET_10G_LR (236739749): + 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; + LINK_TYPE_ETHERNET_400G_LR4 (127023690): + 400G Ethernet, LR4 Optics. """ - UNDEFINED_MINIMAL_ACTION = 0 + UNDEFINED_LINK_TYPE = 0 + LINK_TYPE_ETHERNET_100G_LR = 337672551 + LINK_TYPE_ETHERNET_10G_LR = 236739749 + LINK_TYPE_ETHERNET_400G_LR4 = 127023690 - class MostDisruptiveAllowedAction(proto.Enum): - r"""The most disruptive action that you want to perform on each - instance during the update: - REPLACE: Delete the instance and - create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. - By default, the most disruptive allowed action is REPLACE. If - your update requires a more disruptive action than you set with - this flag, the update request will fail. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + class OperationalStatus(proto.Enum): + r"""Output only. [Output Only] The current status of this Interconnect's + functionality, which can take one of the following values: - NONE - REFRESH - REPLACE - RESTART + :: + + - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to + use. Attachments may be provisioned on this Interconnect. + + - OS_UNPROVISIONED: An Interconnect that has not completed turnup. + No attachments may be provisioned on this Interconnect. + - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal + maintenance. No attachments may be provisioned or updated on this + Interconnect. Values: - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): + UNDEFINED_OPERATIONAL_STATUS (0): A value indicating that the enum field is not set. + OS_ACTIVE (55721409): + The interconnect is valid, turned up, and + ready to use. Attachments may be provisioned on + this interconnect. + OS_UNPROVISIONED (239771840): + The interconnect has not completed turnup. No + attachments may be provisioned on this + interconnect. """ - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 - - all_instances: bool = proto.Field( - proto.BOOL, - number=403676512, - optional=True, - ) - instances: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=29097598, - ) - minimal_action: str = proto.Field( - proto.STRING, - number=270567060, - optional=True, - ) - most_disruptive_allowed_action: str = proto.Field( - proto.STRING, - number=66103053, - optional=True, - ) - + UNDEFINED_OPERATIONAL_STATUS = 0 + OS_ACTIVE = 55721409 + OS_UNPROVISIONED = 239771840 -class InstanceGroupManagersCreateInstancesRequest(proto.Message): - r"""InstanceGroupManagers.createInstances + class RequestedFeatures(proto.Enum): + r"""Additional supported values which may be not listed in the enum + directly due to technical reasons: IF_CROSS_SITE_NETWORK + IF_L2_FORWARDING IF_MACSEC - Attributes: - instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - [Required] List of specifications of per-instance configs. - """ + Values: + UNDEFINED_REQUESTED_FEATURES (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_REQUESTED_FEATURES = 0 - instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=29097598, - message="PerInstanceConfig", - ) + class State(proto.Enum): + r"""Output only. [Output Only] The current state of Interconnect + functionality, which can take one of the following values: + :: -class InstanceGroupManagersDeleteInstancesRequest(proto.Message): - r""" + - ACTIVE: The Interconnect is valid, turned up and ready to use. + Attachments may be provisioned on this Interconnect. + - UNPROVISIONED: The Interconnect has not completed turnup. No + attachments may be provisioned on this Interconnect. + - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. + No attachments may be provisioned or updated on this + Interconnect. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + The interconnect is valid, turned up, and + ready to use. Attachments may be provisioned on + this interconnect. + UNPROVISIONED (517333979): + The interconnect has not completed turnup. No + attachments may be provisioned on this + interconnect. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + UNPROVISIONED = 517333979 - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to delete. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. Queued instances do - not have URL and can be deleted only by name. One cannot - specify both URLs and names in a single request. - skip_instances_on_validation_error (bool): - Specifies whether the request should proceed despite the - inclusion of instances that are not members of the group or - that are already in the process of being deleted or - abandoned. If this field is set to ``false`` and such an - instance is specified in the request, the operation fails. - The operation always fails if the request contains a - malformed instance URL or a reference to an instance that - exists in a zone or region other than the group's zone or - region. + class Subzone(proto.Enum): + r"""Specific subzone in the InterconnectLocation that represents + where this connection is to be provisioned. - This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. - """ + Values: + UNDEFINED_SUBZONE (0): + A value indicating that the enum field is not + set. + SUBZONE_A (291575438): + Subzone A. + SUBZONE_B (291575439): + Subzone B. + """ + UNDEFINED_SUBZONE = 0 + SUBZONE_A = 291575438 + SUBZONE_B = 291575439 - instances: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=29097598, + aai_enabled: bool = proto.Field( + proto.BOOL, + number=388780363, + optional=True, ) - skip_instances_on_validation_error: bool = proto.Field( + admin_enabled: bool = proto.Field( proto.BOOL, - number=40631073, + number=445675089, optional=True, ) - - -class InstanceGroupManagersDeletePerInstanceConfigsReq(proto.Message): - r"""InstanceGroupManagers.deletePerInstanceConfigs - - Attributes: - names (MutableSequence[str]): - The list of instance names for which we want - to delete per-instance configs on this managed - instance group. - """ - - names: MutableSequence[str] = proto.RepeatedField( + application_aware_interconnect: "InterconnectApplicationAwareInterconnect" = ( + proto.Field( + proto.MESSAGE, + number=429095966, + optional=True, + message="InterconnectApplicationAwareInterconnect", + ) + ) + available_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=104585032, + number=496344307, ) - - -class InstanceGroupManagersListErrorsResponse(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceManagedByIgmError]): - [Output Only] The list of errors of the managed instance - group. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - """ - - @property - def raw_page(self): - return self - - items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( + circuit_infos: MutableSequence["InterconnectCircuitInfo"] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="InstanceManagedByIgmError", + number=164839855, + message="InterconnectCircuitInfo", ) - next_page_token: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=79797525, + number=30525366, optional=True, ) - - -class InstanceGroupManagersListManagedInstancesResponse(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - managed_instances (MutableSequence[google.cloud.compute_v1beta.types.ManagedInstance]): - [Output Only] The list of instances in the managed instance - group. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - """ - - @property - def raw_page(self): - return self - - managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( - proto.MESSAGE, - number=336219614, - message="ManagedInstance", + customer_name: str = proto.Field( + proto.STRING, + number=3665484, + optional=True, ) - next_page_token: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=79797525, + number=422937596, optional=True, ) - - -class InstanceGroupManagersListPerInstanceConfigsResp(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - items (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - [Output Only] The list of PerInstanceConfig. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - - This field is a member of `oneof`_ ``_warning``. - """ - - @property - def raw_page(self): - return self - - items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + expected_outages: MutableSequence[ + "InterconnectOutageNotification" + ] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="PerInstanceConfig", + number=264484123, + message="InterconnectOutageNotification", ) - next_page_token: str = proto.Field( + google_ip_address: str = proto.Field( proto.STRING, - number=79797525, + number=443105954, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + google_reference_id: str = proto.Field( + proto.STRING, + number=534944469, optional=True, - message="Warning", ) - - -class InstanceGroupManagersPatchPerInstanceConfigsReq(proto.Message): - r"""InstanceGroupManagers.patchPerInstanceConfigs - - Attributes: - per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - The list of per-instance configurations to - insert or patch on this managed instance group. - """ - - per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=526265001, - message="PerInstanceConfig", + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - - -class InstanceGroupManagersRecreateInstancesRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to recreate. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - instances: MutableSequence[str] = proto.RepeatedField( + interconnect_attachments: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=29097598, + number=425388415, ) - - -class InstanceGroupManagersResizeAdvancedRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - no_creation_retries (bool): - If this flag is true, the managed instance - group attempts to create all instances initiated - by this resize request only once. If there is an - error during creation, the managed instance - group does not retry create this instance, and - we will decrease the targetSize of the request - instead. If the flag is false, the group - attempts to recreate each instance continuously - until it succeeds. This flag matters only in the - first attempt of creation of an instance. After - an instance is successfully created while this - flag is enabled, the instance behaves the same - way as all the other instances created with a - regular resize request. In particular, if a - running instance dies unexpectedly at a later - time and needs to be recreated, this mode does - not affect the recreation behavior in that - scenario. This flag is applicable only to the - current resize request. It does not influence - other resize requests in any way. You can see - which instances is being creating in which mode - by calling the get or listManagedInstances API. - - This field is a member of `oneof`_ ``_no_creation_retries``. - target_size (int): - The number of running instances that the - managed instance group should maintain at any - given time. The group automatically adds or - removes instances to maintain the number of - instances specified by this parameter. - - This field is a member of `oneof`_ ``_target_size``. - """ - - no_creation_retries: bool = proto.Field( - proto.BOOL, - number=39329444, + interconnect_groups: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=237049509, + ) + interconnect_type: str = proto.Field( + proto.STRING, + number=515165259, optional=True, ) - target_size: int = proto.Field( - proto.INT32, - number=62880239, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - - -class InstanceGroupManagersResumeInstancesRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to resume. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - instances: MutableSequence[str] = proto.RepeatedField( + label_fingerprint: str = proto.Field( proto.STRING, - number=29097598, + number=178124825, + optional=True, ) - - -class InstanceGroupManagersScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_group_managers (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): - [Output Only] The list of managed instance groups that are - contained in the specified project and zone. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] The warning that replaces the list of managed - instance groups when the list is empty. - - This field is a member of `oneof`_ ``_warning``. - """ - - instance_group_managers: MutableSequence[ - "InstanceGroupManager" - ] = proto.RepeatedField( - proto.MESSAGE, - number=214072592, - message="InstanceGroupManager", + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + link_type: str = proto.Field( + proto.STRING, + number=523207775, optional=True, - message="Warning", ) - - -class InstanceGroupManagersSetAutoHealingRequest(proto.Message): - r""" - - Attributes: - auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): - - """ - - auto_healing_policies: MutableSequence[ - "InstanceGroupManagerAutoHealingPolicy" - ] = proto.RepeatedField( + location: str = proto.Field( + proto.STRING, + number=290430901, + optional=True, + ) + macsec: "InterconnectMacsec" = proto.Field( proto.MESSAGE, - number=456799109, - message="InstanceGroupManagerAutoHealingPolicy", + number=528867490, + optional=True, + message="InterconnectMacsec", + ) + macsec_enabled: bool = proto.Field( + proto.BOOL, + number=194203812, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, ) - - -class InstanceGroupManagersSetInstanceTemplateRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_template (str): - The URL of the instance template that is - specified for this managed instance group. The - group uses this template to create all new - instances in the managed instance group. The - templates for existing instances in the group do - not change unless you run recreateInstances, run - applyUpdatesToInstances, or set the group's - updatePolicy.type to PROACTIVE. - - This field is a member of `oneof`_ ``_instance_template``. - """ - - instance_template: str = proto.Field( + noc_contact_email: str = proto.Field( proto.STRING, - number=309248228, + number=14072832, optional=True, ) - - -class InstanceGroupManagersSetTargetPoolsRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - fingerprint (str): - The fingerprint of the target pools - information. Use this optional property to - prevent conflicts when multiple users change the - target pools settings concurrently. Obtain the - fingerprint with the instanceGroupManagers.get - method. Then, include the fingerprint in your - request to ensure that you do not overwrite - changes that were applied from another - concurrent request. - - This field is a member of `oneof`_ ``_fingerprint``. - target_pools (MutableSequence[str]): - The list of target pool URLs that instances - in this managed instance group belong to. The - managed instance group applies these target - pools to all of the instances in the group. - Existing instances and new instances in the - group all receive these target pool settings. - """ - - fingerprint: str = proto.Field( + operational_status: str = proto.Field( proto.STRING, - number=234678500, + number=201070847, optional=True, ) - target_pools: MutableSequence[str] = proto.RepeatedField( + params: "InterconnectParams" = proto.Field( + proto.MESSAGE, + number=78313862, + optional=True, + message="InterconnectParams", + ) + peer_ip_address: str = proto.Field( proto.STRING, - number=336072617, + number=207735769, + optional=True, ) - - -class InstanceGroupManagersStartInstancesRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to start. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - instances: MutableSequence[str] = proto.RepeatedField( + provisioned_link_count: int = proto.Field( + proto.INT32, + number=410888565, + optional=True, + ) + remote_location: str = proto.Field( proto.STRING, - number=29097598, + number=324388750, + optional=True, ) - - -class InstanceGroupManagersStopInstancesRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - force_stop (bool): - If this flag is set to true, the Instance - Group Manager will proceed to stop the - instances, skipping initialization on them. - - This field is a member of `oneof`_ ``_force_stop``. - instances (MutableSequence[str]): - The URLs of one or more instances to stop. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - force_stop: bool = proto.Field( + requested_features: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=461240814, + ) + requested_link_count: int = proto.Field( + proto.INT32, + number=45051387, + optional=True, + ) + satisfies_pzs: bool = proto.Field( proto.BOOL, - number=134762710, + number=480964267, optional=True, ) - instances: MutableSequence[str] = proto.RepeatedField( + self_link: str = proto.Field( proto.STRING, - number=29097598, + number=456214797, + optional=True, ) - - -class InstanceGroupManagersSuspendInstancesRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - force_suspend (bool): - If this flag is set to true, the Instance - Group Manager will proceed to suspend the - instances, skipping initialization on them. - - This field is a member of `oneof`_ ``_force_suspend``. - instances (MutableSequence[str]): - The URLs of one or more instances to suspend. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - force_suspend: bool = proto.Field( - proto.BOOL, - number=27637480, + state: str = proto.Field( + proto.STRING, + number=109757585, optional=True, ) - instances: MutableSequence[str] = proto.RepeatedField( + subzone: str = proto.Field( proto.STRING, - number=29097598, + number=280084972, + optional=True, ) - - -class InstanceGroupManagersUpdatePerInstanceConfigsReq(proto.Message): - r"""InstanceGroupManagers.updatePerInstanceConfigs - - Attributes: - per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - The list of per-instance configurations to - insert or patch on this managed instance group. - """ - - per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=526265001, - message="PerInstanceConfig", + wire_groups: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=40662734, ) -class InstanceGroupsAddInstancesRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[google.cloud.compute_v1beta.types.InstanceReference]): - The list of instances to add to the instance - group. - """ - - instances: MutableSequence["InstanceReference"] = proto.RepeatedField( - proto.MESSAGE, - number=29097598, - message="InstanceReference", - ) - +class InterconnectApplicationAwareInterconnect(proto.Message): + r"""Configuration information for application awareness on this + Cloud Interconnect. -class InstanceGroupsListInstances(proto.Message): - r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceWithNamedPorts]): - A list of InstanceWithNamedPorts resources. - kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupsListInstances for the list of - instances in the specified instance group. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + bandwidth_percentage_policy (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy): - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_bandwidth_percentage_policy``. + profile_description (str): + Description for the application awareness + profile on this Cloud Interconnect. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_profile_description``. + shape_average_percentages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentage]): + Optional field to specify a list of shape + average percentages to be applied in conjunction + with StrictPriorityPolicy or + BandwidthPercentagePolicy. + strict_priority_policy (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectStrictPriorityPolicy): - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_strict_priority_policy``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( + bandwidth_percentage_policy: "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" = proto.Field( proto.MESSAGE, - number=100526016, - message="InstanceWithNamedPorts", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + number=187018857, optional=True, + message="InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy", ) - next_page_token: str = proto.Field( + profile_description: str = proto.Field( proto.STRING, - number=79797525, + number=262813286, optional=True, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + shape_average_percentages: MutableSequence[ + "InterconnectApplicationAwareInterconnectBandwidthPercentage" + ] = proto.RepeatedField( + proto.MESSAGE, + number=259857497, + message="InterconnectApplicationAwareInterconnectBandwidthPercentage", ) - warning: "Warning" = proto.Field( + strict_priority_policy: "InterconnectApplicationAwareInterconnectStrictPriorityPolicy" = proto.Field( proto.MESSAGE, - number=50704284, + number=145083063, optional=True, - message="Warning", + message="InterconnectApplicationAwareInterconnectStrictPriorityPolicy", ) -class InstanceGroupsListInstancesRequest(proto.Message): - r""" +class InterconnectApplicationAwareInterconnectBandwidthPercentage(proto.Message): + r"""Specify bandwidth percentages [1-100] for various traffic classes in + BandwidthPercentagePolicy. The sum of all percentages must equal + 100. All traffic classes must have a percentage value specified. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_state (str): - A filter for the state of the instances in - the instance group. Valid options are ALL or - RUNNING. If you do not specify this parameter - the list includes all instances regardless of - their state. Check the InstanceState enum for + percentage (int): + Bandwidth percentage for a specific traffic + class. + + This field is a member of `oneof`_ ``_percentage``. + traffic_class (str): + TrafficClass whose bandwidth percentage is + being specified. Check the TrafficClass enum for the list of possible values. - This field is a member of `oneof`_ ``_instance_state``. + This field is a member of `oneof`_ ``_traffic_class``. """ - class InstanceState(proto.Enum): - r"""A filter for the state of the instances in the instance - group. Valid options are ALL or RUNNING. If you do not specify - this parameter the list includes all instances regardless of - their state. + class TrafficClass(proto.Enum): + r"""TrafficClass whose bandwidth percentage is being specified. Values: - UNDEFINED_INSTANCE_STATE (0): + UNDEFINED_TRAFFIC_CLASS (0): A value indicating that the enum field is not set. - ALL (64897): - Includes all instances in the generated list - regardless of their state. - RUNNING (121282975): - Includes instances in the generated list only - if they have a RUNNING state. + TC1 (82850): + Traffic Class 1, corresponding to DSCP ranges + (0-7) 000xxx. + TC2 (82851): + Traffic Class 2, corresponding to DSCP ranges + (8-15) 001xxx. + TC3 (82852): + Traffic Class 3, corresponding to DSCP ranges + (16-23) 010xxx. + TC4 (82853): + Traffic Class 4, corresponding to DSCP ranges + (24-31) 011xxx. + TC5 (82854): + Traffic Class 5, corresponding to DSCP ranges + (32-47) 10xxxx. + TC6 (82855): + Traffic Class 6, corresponding to DSCP ranges + (48-63) 11xxxx. """ - UNDEFINED_INSTANCE_STATE = 0 - ALL = 64897 - RUNNING = 121282975 + UNDEFINED_TRAFFIC_CLASS = 0 + TC1 = 82850 + TC2 = 82851 + TC3 = 82852 + TC4 = 82853 + TC5 = 82854 + TC6 = 82855 - instance_state: str = proto.Field( + percentage: int = proto.Field( + proto.UINT32, + number=151909018, + optional=True, + ) + traffic_class: str = proto.Field( proto.STRING, - number=92223591, + number=198180022, optional=True, ) -class InstanceGroupsRemoveInstancesRequest(proto.Message): +class InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy(proto.Message): r""" Attributes: - instances (MutableSequence[google.cloud.compute_v1beta.types.InstanceReference]): - The list of instances to remove from the - instance group. + bandwidth_percentages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentage]): + Specify bandwidth percentages for various + traffic classes for queuing type Bandwidth + Percent. """ - instances: MutableSequence["InstanceReference"] = proto.RepeatedField( + bandwidth_percentages: MutableSequence[ + "InterconnectApplicationAwareInterconnectBandwidthPercentage" + ] = proto.RepeatedField( proto.MESSAGE, - number=29097598, - message="InstanceReference", + number=233373323, + message="InterconnectApplicationAwareInterconnectBandwidthPercentage", ) -class InstanceGroupsScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_groups (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): - [Output Only] The list of instance groups that are contained - in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] An informational warning that replaces the - list of instance groups when the list is empty. +class InterconnectApplicationAwareInterconnectStrictPriorityPolicy(proto.Message): + r"""Specify configuration for StrictPriorityPolicy.""" - This field is a member of `oneof`_ ``_warning``. - """ - instance_groups: MutableSequence["InstanceGroup"] = proto.RepeatedField( - proto.MESSAGE, - number=366469310, - message="InstanceGroup", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) +class InterconnectAttachment(proto.Message): + r"""Represents an Interconnect Attachment (VLAN) resource. + You can use Interconnect attachments (VLANS) to connect your + Virtual Private Cloud networks to your on-premises networks + through an Interconnect. For more information, read + Creating VLAN Attachments. -class InstanceGroupsSetNamedPortsRequest(proto.Message): - r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fingerprint (str): - The fingerprint of the named ports - information for this instance group. Use this - optional property to prevent conflicts when - multiple users change the named ports settings - concurrently. Obtain the fingerprint with the - instanceGroups.get method. Then, include the - fingerprint in your request to ensure that you - do not overwrite changes that were applied from - another concurrent request. A request with an - incorrect fingerprint will fail with error 412 - conditionNotMet. - - This field is a member of `oneof`_ ``_fingerprint``. - named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - The list of named ports to set for this - instance group. - """ - - fingerprint: str = proto.Field( - proto.STRING, - number=234678500, - optional=True, - ) - named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( - proto.MESSAGE, - number=427598732, - message="NamedPort", - ) + admin_enabled (bool): + Determines whether this Attachment will carry packets. Not + present for PARTNER_PROVIDER. + This field is a member of `oneof`_ ``_admin_enabled``. + attachment_group (str): + Output only. [Output Only] URL of the AttachmentGroup that + includes this Attachment. -class InstanceList(proto.Message): - r"""Contains a list of instances. + This field is a member of `oneof`_ ``_attachment_group``. + bandwidth (str): + Provisioned bandwidth capacity for the interconnect + attachment. For attachments of type DEDICATED, the user can + set the bandwidth. For attachments of type PARTNER, the + Google Partner that is operating the interconnect must set + the bandwidth. Output only for PARTNER type, mutable for + PARTNER_PROVIDER and DEDICATED, and can take one of the + following values: + + :: + + - BPS_50M: 50 Mbit/s + - BPS_100M: 100 Mbit/s + - BPS_200M: 200 Mbit/s + - BPS_300M: 300 Mbit/s + - BPS_400M: 400 Mbit/s + - BPS_500M: 500 Mbit/s + - BPS_1G: 1 Gbit/s + - BPS_2G: 2 Gbit/s + - BPS_5G: 5 Gbit/s + - BPS_10G: 10 Gbit/s + - BPS_20G: 20 Gbit/s + - BPS_50G: 50 Gbit/s + - BPS_100G: 100 Gbit/s + + Check the Bandwidth enum for the list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_bandwidth``. + candidate_cloud_router_ip_address (str): + Single IPv4 address + prefix length to be configured on the + cloud router interface for this interconnect attachment. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + :: - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Instance]): - A list of Instance resources. - kind (str): - [Output Only] Type of resource. Always compute#instanceList - for lists of Instance resources. + - Both candidate_cloud_router_ip_address and + candidate_customer_router_ip_address fields must be set or both must be + unset. + - Prefix length of both candidate_cloud_router_ip_address and + candidate_customer_router_ip_address must be the same. + - Max prefix length is 31. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_candidate_cloud_router_ip_address``. + candidate_cloud_router_ipv6_address (str): + Single IPv6 address + prefix length to be configured on the + cloud router interface for this interconnect attachment. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + :: - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + - Both candidate_cloud_router_ipv6_address and + candidate_customer_router_ipv6_address fields must be set or both must be + unset. + - Prefix length of both candidate_cloud_router_ipv6_address and + candidate_customer_router_ipv6_address must be the same. + - Max prefix length is 126. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_candidate_cloud_router_ipv6_address``. + candidate_customer_router_ip_address (str): + Single IPv4 address + prefix length to be + configured on the customer router interface for + this interconnect attachment. - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_candidate_customer_router_ip_address``. + candidate_customer_router_ipv6_address (str): + Single IPv6 address + prefix length to be + configured on the customer router interface for + this interconnect attachment. - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Instance"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Instance", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + This field is a member of `oneof`_ ``_candidate_customer_router_ipv6_address``. + candidate_ipv6_subnets (MutableSequence[str]): + This field is not available. + candidate_subnets (MutableSequence[str]): + Input only. Up to 16 candidate prefixes that + can be used to restrict the allocation of + cloudRouterIpAddress and customerRouterIpAddress + for this attachment. All prefixes must be within + link-local address space (169.254.0.0/16) and + must be /29 or shorter (/28, /27, etc). Google + will attempt to select an unused /29 from the + supplied candidate prefix(es). The request will + fail if all possible /29s are in use on Google's + edge. If not supplied, Google will randomly + select an unused /29 from all of link-local + space. + cloud_router_ip_address (str): + Output only. [Output Only] IPv4 address + prefix length to + be configured on Cloud Router Interface for this + interconnect attachment. + This field is a member of `oneof`_ ``_cloud_router_ip_address``. + cloud_router_ipv6_address (str): + Output only. [Output Only] IPv6 address + prefix length to + be configured on Cloud Router Interface for this + interconnect attachment. -class InstanceListReferrers(proto.Message): - r"""Contains a list of instance referrers. + This field is a member of `oneof`_ ``_cloud_router_ipv6_address``. + cloud_router_ipv6_interface_id (str): + This field is not available. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_cloud_router_ipv6_interface_id``. + configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): + Output only. [Output Only] Constraints for this attachment, + if any. The attachment does not work if these constraints + are not met. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + This field is a member of `oneof`_ ``_configuration_constraints``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Reference]): - A list of Reference resources. - kind (str): - [Output Only] Type of resource. Always - compute#instanceListReferrers for lists of Instance - referrers. + This field is a member of `oneof`_ ``_creation_timestamp``. + customer_router_ip_address (str): + Output only. [Output Only] IPv4 address + prefix length to + be configured on the customer router subinterface for this + interconnect attachment. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_customer_router_ip_address``. + customer_router_ipv6_address (str): + Output only. [Output Only] IPv6 address + prefix length to + be configured on the customer router subinterface for this + interconnect attachment. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_customer_router_ipv6_address``. + customer_router_ipv6_interface_id (str): + This field is not available. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_customer_router_ipv6_interface_id``. + dataplane_version (int): + Output only. [Output Only] Dataplane version for this + InterconnectAttachment. This field is only present for + Dataplane version 2 and higher. Absence of this field in the + API output indicates that the Dataplane is version 1. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_dataplane_version``. + description (str): + An optional description of this resource. - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_description``. + edge_availability_domain (str): + Input only. Desired availability domain for the attachment. + Only available for type PARTNER, at creation time, and can + take one of the following values: - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Reference"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Reference", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) + :: + - AVAILABILITY_DOMAIN_ANY + - AVAILABILITY_DOMAIN_1 + - AVAILABILITY_DOMAIN_2 -class InstanceManagedByIgmError(proto.Message): - r""" + For improved reliability, customers should configure a pair + of attachments, one per availability domain. The selected + availability domain will be provided to the Partner via the + pairing key, so that the provisioned circuit will lie in the + specified domain. If not specified, the value will default + to AVAILABILITY_DOMAIN_ANY. Check the EdgeAvailabilityDomain + enum for the list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_edge_availability_domain``. + encryption (str): + Indicates the user-supplied encryption option of this VLAN + attachment (interconnectAttachment). Can only be specified + at attachment creation for PARTNER or DEDICATED attachments. + Possible values are: - Attributes: - error (google.cloud.compute_v1beta.types.InstanceManagedByIgmErrorManagedInstanceError): - [Output Only] Contents of the error. + :: - This field is a member of `oneof`_ ``_error``. - instance_action_details (google.cloud.compute_v1beta.types.InstanceManagedByIgmErrorInstanceActionDetails): - [Output Only] Details of the instance action that triggered - this error. May be null, if the error was not caused by an - action on an instance. This field is optional. + - NONE - This is the default value, which means that the + VLAN attachment carries unencrypted traffic. VMs are able to send + traffic to, or receive traffic from, such a VLAN attachment. + - IPSEC - The VLAN attachment carries only encrypted + traffic that is encrypted by an IPsec device, such as an HA VPN gateway or + third-party IPsec VPN. VMs cannot directly send traffic to, or receive + traffic from, such a VLAN attachment. To use *HA VPN over Cloud + Interconnect*, the VLAN attachment must be created with this + option. - This field is a member of `oneof`_ ``_instance_action_details``. - timestamp (str): - [Output Only] The time that this error occurred. This value - is in RFC3339 text format. + Check the Encryption enum for the list of possible values. - This field is a member of `oneof`_ ``_timestamp``. - """ + This field is a member of `oneof`_ ``_encryption``. + google_reference_id (str): + Output only. [Output Only] Google reference ID, to be used + when raising support tickets with Google or otherwise to + debug backend connectivity issues. [Deprecated] This field + is not used. - error: "InstanceManagedByIgmErrorManagedInstanceError" = proto.Field( - proto.MESSAGE, - number=96784904, - optional=True, - message="InstanceManagedByIgmErrorManagedInstanceError", - ) - instance_action_details: "InstanceManagedByIgmErrorInstanceActionDetails" = ( - proto.Field( - proto.MESSAGE, - number=292224547, - optional=True, - message="InstanceManagedByIgmErrorInstanceActionDetails", - ) - ) - timestamp: str = proto.Field( - proto.STRING, - number=55126294, - optional=True, - ) + This field is a member of `oneof`_ ``_google_reference_id``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + This field is a member of `oneof`_ ``_id``. + interconnect (str): + URL of the underlying Interconnect object + that this attachment's traffic will traverse + through. -class InstanceManagedByIgmErrorInstanceActionDetails(proto.Message): - r""" + This field is a member of `oneof`_ ``_interconnect``. + ipsec_internal_addresses (MutableSequence[str]): + A list of URLs of addresses that have been + reserved for the VLAN attachment. Used only for + the VLAN attachment that has the encryption + option as IPSEC. The addresses must be regional + internal IP address ranges. When creating an HA + VPN gateway over the VLAN attachment, if the + attachment is configured to use a regional + internal IP address, then the VPN gateway's IP + address is allocated from the IP address range + specified here. For example, if the HA VPN + gateway's interface 0 is paired to this VLAN + attachment, then a regional internal IP address + for the VPN gateway interface 0 will be + allocated from the IP address specified for this + VLAN attachment. + If this field is not specified when creating the + VLAN attachment, then later on when creating an + HA VPN gateway on this VLAN attachment, the HA + VPN gateway's IP address is allocated from the + regional external IP address pool. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#interconnectAttachment for interconnect + attachments. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + l2_forwarding (google.cloud.compute_v1beta.types.InterconnectAttachmentL2Forwarding): + L2 Interconnect Attachment related config. This field is + required if the type is L2_DEDICATED. - Attributes: - action (str): - [Output Only] Action that managed instance group was - executing on the instance when the error occurred. Possible - values: Check the Action enum for the list of possible - values. + The configuration specifies how VLAN tags (like dot1q, qinq, + or dot1ad) within L2 packets are mapped to the destination + appliances IP addresses. The packet is then encapsulated + with the appliance IP address and sent to the edge + appliance. - This field is a member of `oneof`_ ``_action``. - instance (str): - [Output Only] The URL of the instance. The URL can be set - even if the instance has not yet been created. + This field is a member of `oneof`_ ``_l2_forwarding``. + label_fingerprint (str): + A fingerprint for the labels being applied to + this InterconnectAttachment, which is + essentially a hash of the labels set used for + optimistic locking. The fingerprint is initially + generated by Compute Engine and changes after + every request to modify or update labels. You + must always provide an up-to-date fingerprint + hash in order to update or change labels, + otherwise the request will fail with error412 + conditionNotMet. - This field is a member of `oneof`_ ``_instance``. - version (google.cloud.compute_v1beta.types.ManagedInstanceVersion): - [Output Only] Version this instance was created from, or was - being created from, but the creation failed. Corresponds to - one of the versions that were set on the Instance Group - Manager resource at the time this instance was being - created. + To see the latest fingerprint, make a get() + request to retrieve an InterconnectAttachment. - This field is a member of `oneof`_ ``_version``. - """ + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + Labels for this resource. These can only be + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. + Label values may be empty. + mtu (int): + Maximum Transmission Unit (MTU), in bytes, of + packets passing through this interconnect + attachment. Valid values are 1440, 1460, 1500, + and 8896. If not specified, the value will + default to 1440. - class Action(proto.Enum): - r"""[Output Only] Action that managed instance group was executing on - the instance when the error occurred. Possible values: + This field is a member of `oneof`_ ``_mtu``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - Values: - UNDEFINED_ACTION (0): - A value indicating that the enum field is not - set. - ABANDONING (388244813): - The managed instance group is abandoning this - instance. The instance will be removed from the - instance group and from any target pools that - are associated with this group. - CREATING (455564985): - The managed instance group is creating this - instance. If the group fails to create this - instance, it will try again until it is - successful. - CREATING_WITHOUT_RETRIES (428843785): - The managed instance group is attempting to - create this instance only once. If the group - fails to create this instance, it does not try - again and the group's targetSize value is - decreased. - DELETING (528602024): - The managed instance group is permanently - deleting this instance. - NONE (2402104): - The managed instance group has not scheduled - any actions for this instance. - RECREATING (287278572): - The managed instance group is recreating this - instance. - REFRESHING (163266343): - The managed instance group is applying - configuration changes to the instance without - stopping it. For example, the group can update - the target pool list for an instance without - stopping that instance. - RESTARTING (320534387): - The managed instance group is restarting this - instance. - RESUMING (446856618): - The managed instance group is resuming this - instance. - STARTING (488820800): - The managed instance group is starting this - instance. - STOPPING (350791796): - The managed instance group is stopping this - instance. - SUSPENDING (514206246): - The managed instance group is suspending this - instance. - VERIFYING (16982185): - The managed instance group is verifying this - already created instance. Verification happens - every time the instance is (re)created or - restarted and consists of: 1. Waiting until - health check specified as part of this managed - instance group's autohealing policy reports - HEALTHY. Note: Applies only if autohealing - policy has a health check specified 2. Waiting - for addition verification steps performed as - post-instance creation (subject to future - extensions). - """ - UNDEFINED_ACTION = 0 - ABANDONING = 388244813 - CREATING = 455564985 - CREATING_WITHOUT_RETRIES = 428843785 - DELETING = 528602024 - NONE = 2402104 - RECREATING = 287278572 - REFRESHING = 163266343 - RESTARTING = 320534387 - RESUMING = 446856618 - STARTING = 488820800 - STOPPING = 350791796 - SUSPENDING = 514206246 - VERIFYING = 16982185 + This field is a member of `oneof`_ ``_name``. + operational_status (str): + Output only. [Output Only] The current status of whether or + not this interconnect attachment is functional, which can + take one of the following values: - action: str = proto.Field( - proto.STRING, - number=187661878, - optional=True, - ) - instance: str = proto.Field( - proto.STRING, - number=18257045, - optional=True, - ) - version: "ManagedInstanceVersion" = proto.Field( - proto.MESSAGE, - number=351608024, - optional=True, - message="ManagedInstanceVersion", - ) + :: + - OS_ACTIVE: The attachment has been turned up and is ready to + use. + - OS_UNPROVISIONED: The attachment is not ready to use yet, + because turnup is not complete. -class InstanceManagedByIgmErrorManagedInstanceError(proto.Message): - r""" + Check the OperationalStatus enum for the list of possible + values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_operational_status``. + pairing_key (str): + [Output only for type PARTNER. Input only for + PARTNER_PROVIDER. Not present for DEDICATED]. The opaque + identifier of a PARTNER attachment used to initiate + provisioning with a selected partner. Of the form + "XXXXX/region/domain". - Attributes: - code (str): - [Output Only] Error code. + This field is a member of `oneof`_ ``_pairing_key``. + params (google.cloud.compute_v1beta.types.InterconnectAttachmentParams): + Input only. [Input Only] Additional params passed with the + request, but not persisted as part of resource payload. - This field is a member of `oneof`_ ``_code``. - message (str): - [Output Only] Error message. + This field is a member of `oneof`_ ``_params``. + partner_asn (int): + Optional BGP ASN for the router supplied by a Layer 3 + Partner if they configured BGP on behalf of the customer. + Output only for PARTNER type, input only for + PARTNER_PROVIDER, not available for DEDICATED. - This field is a member of `oneof`_ ``_message``. - """ + This field is a member of `oneof`_ ``_partner_asn``. + partner_metadata (google.cloud.compute_v1beta.types.InterconnectAttachmentPartnerMetadata): + Informational metadata about Partner attachments from + Partners to display to customers. Output only for PARTNER + type, mutable for PARTNER_PROVIDER, not available for + DEDICATED. - code: str = proto.Field( - proto.STRING, - number=3059181, - optional=True, - ) - message: str = proto.Field( - proto.STRING, - number=418054151, - optional=True, - ) + This field is a member of `oneof`_ ``_partner_metadata``. + private_interconnect_info (google.cloud.compute_v1beta.types.InterconnectAttachmentPrivateInfo): + Output only. [Output Only] Information specific to an + InterconnectAttachment. This property is populated if the + interconnect that this is attached to is of type DEDICATED. + This field is a member of `oneof`_ ``_private_interconnect_info``. + region (str): + Output only. [Output Only] URL of the region where the + regional interconnect attachment resides. You must specify + this field as part of the HTTP request URL. It is not + settable as a field in the request body. -class InstanceMoveRequest(proto.Message): - r""" + This field is a member of `oneof`_ ``_region``. + remote_service (str): + Output only. [Output Only] If the attachment is on a + Cross-Cloud Interconnect connection, this field contains the + interconnect's remote location service provider. Example + values: "Amazon Web Services" "Microsoft Azure". - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + The field is set only for attachments on Cross-Cloud + Interconnect connections. Its value is copied from the + InterconnectRemoteLocation remoteService field. - Attributes: - destination_zone (str): - The URL of the destination zone to move the - instance. This can be a full or partial URL. For - example, the following are all valid URLs to a - zone: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - - projects/project/zones/zone - zones/zone + This field is a member of `oneof`_ ``_remote_service``. + router (str): + URL of the Cloud Router to be used for + dynamic routing. This router must be in the same + region as this InterconnectAttachment. The + InterconnectAttachment will automatically + connect the Interconnect to the network & region + within which the Cloud Router is configured. - This field is a member of `oneof`_ ``_destination_zone``. - target_instance (str): - The URL of the target instance to move. This - can be a full or partial URL. For example, the - following are all valid URLs to an instance: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance - - zones/zone/instances/instance + This field is a member of `oneof`_ ``_router``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. - This field is a member of `oneof`_ ``_target_instance``. - """ + This field is a member of `oneof`_ ``_satisfies_pzs``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. - destination_zone: str = proto.Field( - proto.STRING, - number=131854653, - optional=True, - ) - target_instance: str = proto.Field( - proto.STRING, - number=289769347, - optional=True, - ) + This field is a member of `oneof`_ ``_self_link``. + stack_type (str): + The stack type for this interconnect attachment to identify + whether the IPv6 feature is enabled or not. If not + specified, IPV4_ONLY will be used. + This field can be both set at interconnect attachments + creation and update interconnect attachment operations. + Check the StackType enum for the list of possible values. -class InstanceParams(proto.Message): - r"""Additional instance params. + This field is a member of `oneof`_ ``_stack_type``. + state (str): + Output only. [Output Only] The current state of this + attachment's functionality. Enum values ACTIVE and + UNPROVISIONED are shared by DEDICATED/PRIVATE, PARTNER, and + PARTNER_PROVIDER interconnect attachments, while enum values + PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and + PENDING_CUSTOMER are used for only PARTNER and + PARTNER_PROVIDER interconnect attachments. This state can + take one of the following values: + + :: + + - ACTIVE: The attachment has been turned up and is ready to use. + - UNPROVISIONED: The attachment is not ready to use yet, because turnup + is not complete. + - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet + been configured on the Partner side. + - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of + provisioning after a PARTNER_PROVIDER attachment was created that + references it. + - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER + attachment that is waiting for a customer to activate it. + - DEFUNCT: + The attachment was deleted externally and is no longer functional. This + could be because the associated Interconnect was removed, or because the + other side of a Partner attachment was deleted. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Check the State enum for the list of possible values. - Attributes: - request_valid_for_duration (google.cloud.compute_v1beta.types.Duration): - Relative deadline for waiting for capacity. - Relevant only for Instances.Insert API. + This field is a member of `oneof`_ ``_state``. + subnet_length (int): + Input only. Length of the IPv4 subnet mask. + Allowed values: - This field is a member of `oneof`_ ``_request_valid_for_duration``. - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to be bound to the instance. Tag keys - and values have the same definition as resource manager - tags. Keys must be in the format ``tagKeys/{tag_key_id}``, - and values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. - """ - request_valid_for_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=116247389, - optional=True, - message="Duration", - ) - resource_manager_tags: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=377671164, - ) + - 29 (default) + - 30 + The default value is 29, except for Cross-Cloud + Interconnect connections that use an + InterconnectRemoteLocation with a + constraints.subnetLengthRange.min equal to 30. + For example, connections that use an Azure + remote location fall into this category. In + these cases, the default value is 30, and + requesting 29 returns an error. -class InstanceProperties(proto.Message): - r""" + Where both 29 and 30 are allowed, 29 is + preferred, because it gives Google Cloud Support + more debugging visibility. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_subnet_length``. + type_ (str): + The type of interconnect attachment this is, which can take + one of the following values: - Attributes: - advanced_machine_features (google.cloud.compute_v1beta.types.AdvancedMachineFeatures): - Controls for advanced machine-related - behavior features. Note that for MachineImage, - this is not supported yet. + :: - This field is a member of `oneof`_ ``_advanced_machine_features``. - can_ip_forward (bool): - Enables instances created based on these - properties to send packets with source IP - addresses other than their own and receive - packets with destination IP addresses other than - their own. If these instances will be used as an - IP gateway or it will be set as the next-hop in - a Route resource, specify true. If unsure, leave - this set to false. See the Enable IP forwarding - documentation for more information. + - DEDICATED: an attachment to a Dedicated Interconnect. + - PARTNER: an attachment to a Partner Interconnect, created by the + customer. + - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by + the partner. - This field is a member of `oneof`_ ``_can_ip_forward``. - confidential_instance_config (google.cloud.compute_v1beta.types.ConfidentialInstanceConfig): - Specifies the Confidential Instance options. - Note that for MachineImage, this is not - supported yet. + - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. + Check the Type enum for the list of possible values. - This field is a member of `oneof`_ ``_confidential_instance_config``. - description (str): - An optional text description for the - instances that are created from these - properties. + This field is a member of `oneof`_ ``_type``. + vlan_tag8021q (int): + The IEEE 802.1Q VLAN tag for this attachment, + in the range 2-4093. Only specified at creation + time. + + This field is a member of `oneof`_ ``_vlan_tag8021q``. + """ + + class Bandwidth(proto.Enum): + r"""Provisioned bandwidth capacity for the interconnect attachment. For + attachments of type DEDICATED, the user can set the bandwidth. For + attachments of type PARTNER, the Google Partner that is operating + the interconnect must set the bandwidth. Output only for PARTNER + type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one + of the following values: + + :: + + - BPS_50M: 50 Mbit/s + - BPS_100M: 100 Mbit/s + - BPS_200M: 200 Mbit/s + - BPS_300M: 300 Mbit/s + - BPS_400M: 400 Mbit/s + - BPS_500M: 500 Mbit/s + - BPS_1G: 1 Gbit/s + - BPS_2G: 2 Gbit/s + - BPS_5G: 5 Gbit/s + - BPS_10G: 10 Gbit/s + - BPS_20G: 20 Gbit/s + - BPS_50G: 50 Gbit/s + - BPS_100G: 100 Gbit/s + + Values: + UNDEFINED_BANDWIDTH (0): + A value indicating that the enum field is not + set. + BPS_100G (49547952): + 100 Gbit/s + BPS_100M (49547958): + 100 Mbit/s + BPS_10G (278693006): + 10 Gbit/s + BPS_1G (355358448): + 1 Gbit/s + BPS_200M (49577749): + 200 Mbit/s + BPS_20G (278693967): + 20 Gbit/s + BPS_2G (355358479): + 2 Gbit/s + BPS_300M (49607540): + 300 Mbit/s + BPS_400G (49637325): + 400 Gbit/s + BPS_400M (49637331): + 400 Mbit/s + BPS_500M (49667122): + 500 Mbit/s + BPS_50G (278696850): + 50 Gbit/s + BPS_50M (278696856): + 50 Mbit/s + BPS_5G (355358572): + 5 Gbit/s + """ + UNDEFINED_BANDWIDTH = 0 + BPS_100G = 49547952 + BPS_100M = 49547958 + BPS_10G = 278693006 + BPS_1G = 355358448 + BPS_200M = 49577749 + BPS_20G = 278693967 + BPS_2G = 355358479 + BPS_300M = 49607540 + BPS_400G = 49637325 + BPS_400M = 49637331 + BPS_500M = 49667122 + BPS_50G = 278696850 + BPS_50M = 278696856 + BPS_5G = 355358572 - This field is a member of `oneof`_ ``_description``. - disks (MutableSequence[google.cloud.compute_v1beta.types.AttachedDisk]): - An array of disks that are associated with - the instances that are created from these - properties. - display_device (google.cloud.compute_v1beta.types.DisplayDevice): - Display Device properties to enable support - for remote display products like: Teradici, VNC - and TeamViewer Note that for MachineImage, this - is not supported yet. + class EdgeAvailabilityDomain(proto.Enum): + r"""Input only. Desired availability domain for the attachment. Only + available for type PARTNER, at creation time, and can take one of + the following values: - This field is a member of `oneof`_ ``_display_device``. - guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): - A list of guest accelerator cards' type and - count to use for instances created from these - properties. - key_revocation_action_type (str): - KeyRevocationActionType of the instance. - Supported options are "STOP" and "NONE". The - default value is "NONE" if it is not specified. - Check the KeyRevocationActionType enum for the - list of possible values. + :: - This field is a member of `oneof`_ ``_key_revocation_action_type``. - labels (MutableMapping[str, str]): - Labels to apply to instances that are created - from these properties. - machine_type (str): - The machine type to use for instances that are created from - these properties. This field only accepts a machine type - name, for example ``n2-standard-4``. If you use the machine - type full or partial URL, for example - ``projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4``, - the request will result in an ``INTERNAL_ERROR``. + - AVAILABILITY_DOMAIN_ANY + - AVAILABILITY_DOMAIN_1 + - AVAILABILITY_DOMAIN_2 - This field is a member of `oneof`_ ``_machine_type``. - metadata (google.cloud.compute_v1beta.types.Metadata): - The metadata key/value pairs to assign to - instances that are created from these - properties. These pairs can consist of custom - metadata or predefined keys. See Project and - instance metadata for more information. + For improved reliability, customers should configure a pair of + attachments, one per availability domain. The selected availability + domain will be provided to the Partner via the pairing key, so that + the provisioned circuit will lie in the specified domain. If not + specified, the value will default to AVAILABILITY_DOMAIN_ANY. - This field is a member of `oneof`_ ``_metadata``. - min_cpu_platform (str): - Minimum cpu/platform to be used by instances. - The instance may be scheduled on the specified - or newer cpu/platform. Applicable values are the - friendly names of CPU platforms, such as - minCpuPlatform: "Intel Haswell" or - minCpuPlatform: "Intel Sandy Bridge". For more - information, read Specifying a Minimum CPU - Platform. + Values: + UNDEFINED_EDGE_AVAILABILITY_DOMAIN (0): + A value indicating that the enum field is not + set. + AVAILABILITY_DOMAIN_1 (349552090): + No description available. + AVAILABILITY_DOMAIN_2 (349552091): + No description available. + AVAILABILITY_DOMAIN_ANY (375256373): + No description available. + """ + UNDEFINED_EDGE_AVAILABILITY_DOMAIN = 0 + AVAILABILITY_DOMAIN_1 = 349552090 + AVAILABILITY_DOMAIN_2 = 349552091 + AVAILABILITY_DOMAIN_ANY = 375256373 - This field is a member of `oneof`_ ``_min_cpu_platform``. - network_interfaces (MutableSequence[google.cloud.compute_v1beta.types.NetworkInterface]): - An array of network access configurations for - this interface. - network_performance_config (google.cloud.compute_v1beta.types.NetworkPerformanceConfig): - Note that for MachineImage, this is not - supported yet. + class Encryption(proto.Enum): + r"""Indicates the user-supplied encryption option of this VLAN + attachment (interconnectAttachment). Can only be specified at + attachment creation for PARTNER or DEDICATED attachments. Possible + values are: - This field is a member of `oneof`_ ``_network_performance_config``. - partner_metadata (MutableMapping[str, google.cloud.compute_v1beta.types.StructuredEntries]): - Partner Metadata assigned to the instance - properties. A map from a subdomain (namespace) - to entries map. - post_key_revocation_action_type (str): - PostKeyRevocationActionType of the instance. - Check the PostKeyRevocationActionType enum for - the list of possible values. + :: - This field is a member of `oneof`_ ``_post_key_revocation_action_type``. - private_ipv6_google_access (str): - The private IPv6 google access type for VMs. If not - specified, use INHERIT_FROM_SUBNETWORK as default. Note that - for MachineImage, this is not supported yet. Check the - PrivateIpv6GoogleAccess enum for the list of possible - values. + - NONE - This is the default value, which means that the + VLAN attachment carries unencrypted traffic. VMs are able to send + traffic to, or receive traffic from, such a VLAN attachment. + - IPSEC - The VLAN attachment carries only encrypted + traffic that is encrypted by an IPsec device, such as an HA VPN gateway or + third-party IPsec VPN. VMs cannot directly send traffic to, or receive + traffic from, such a VLAN attachment. To use *HA VPN over Cloud + Interconnect*, the VLAN attachment must be created with this + option. - This field is a member of `oneof`_ ``_private_ipv6_google_access``. - reservation_affinity (google.cloud.compute_v1beta.types.ReservationAffinity): - Specifies the reservations that instances can - consume from. Note that for MachineImage, this - is not supported yet. + Values: + UNDEFINED_ENCRYPTION (0): + A value indicating that the enum field is not + set. + IPSEC (69882282): + The interconnect attachment will carry only + encrypted traffic that is encrypted by an IPsec + device such as HA VPN gateway; VMs cannot + directly send traffic to or receive traffic from + such an interconnect attachment. To use HA VPN + over Cloud Interconnect, the interconnect + attachment must be created with this option. + NONE (2402104): + This is the default value, which means the + Interconnect Attachment will carry unencrypted + traffic. VMs will be able to send traffic to or + receive traffic from such interconnect + attachment. + """ + UNDEFINED_ENCRYPTION = 0 + IPSEC = 69882282 + NONE = 2402104 - This field is a member of `oneof`_ ``_reservation_affinity``. - resource_manager_tags (MutableMapping[str, str]): - Resource manager tags to be bound to the instance. Tag keys - and values have the same definition as resource manager - tags. Keys must be in the format ``tagKeys/{tag_key_id}``, - and values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. - resource_policies (MutableSequence[str]): - Resource policies (names, not URLs) applied - to instances created from these properties. Note - that for MachineImage, this is not supported - yet. - scheduling (google.cloud.compute_v1beta.types.Scheduling): - Specifies the scheduling options for the - instances that are created from these - properties. + class OperationalStatus(proto.Enum): + r"""Output only. [Output Only] The current status of whether or not this + interconnect attachment is functional, which can take one of the + following values: - This field is a member of `oneof`_ ``_scheduling``. - service_accounts (MutableSequence[google.cloud.compute_v1beta.types.ServiceAccount]): - A list of service accounts with specified - scopes. Access tokens for these service accounts - are available to the instances that are created - from these properties. Use metadata queries to - obtain the access tokens for these instances. - shielded_instance_config (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): - Note that for MachineImage, this is not - supported yet. + :: - This field is a member of `oneof`_ ``_shielded_instance_config``. - shielded_vm_config (google.cloud.compute_v1beta.types.ShieldedVmConfig): - Specifies the Shielded VM options for the - instances that are created from these - properties. + - OS_ACTIVE: The attachment has been turned up and is ready to + use. + - OS_UNPROVISIONED: The attachment is not ready to use yet, + because turnup is not complete. - This field is a member of `oneof`_ ``_shielded_vm_config``. - tags (google.cloud.compute_v1beta.types.Tags): - A list of tags to apply to the instances that - are created from these properties. The tags - identify valid sources or targets for network - firewalls. The setTags method can modify this - list of tags. Each tag within the list must - comply with RFC1035. + Values: + UNDEFINED_OPERATIONAL_STATUS (0): + A value indicating that the enum field is not + set. + OS_ACTIVE (55721409): + Indicates that attachment has been turned up + and is ready to use. + OS_UNPROVISIONED (239771840): + Indicates that attachment is not ready to use + yet, because turnup is not complete. + """ + UNDEFINED_OPERATIONAL_STATUS = 0 + OS_ACTIVE = 55721409 + OS_UNPROVISIONED = 239771840 - This field is a member of `oneof`_ ``_tags``. - """ + class StackType(proto.Enum): + r"""The stack type for this interconnect attachment to identify whether + the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will + be used. - class KeyRevocationActionType(proto.Enum): - r"""KeyRevocationActionType of the instance. Supported options - are "STOP" and "NONE". The default value is "NONE" if it is not - specified. + This field can be both set at interconnect attachments creation and + update interconnect attachment operations. Values: - UNDEFINED_KEY_REVOCATION_ACTION_TYPE (0): + UNDEFINED_STACK_TYPE (0): A value indicating that the enum field is not set. - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED (467110106): - Default value. This value is unused. - NONE (2402104): - Indicates user chose no operation. - STOP (2555906): - Indicates user chose to opt for VM shutdown - on key revocation. + IPV4_IPV6 (22197249): + The interconnect attachment can have both + IPv4 and IPv6 addresses. + IPV4_ONLY (22373798): + The interconnect attachment will only be + assigned IPv4 addresses. """ - UNDEFINED_KEY_REVOCATION_ACTION_TYPE = 0 - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 467110106 - NONE = 2402104 - STOP = 2555906 + UNDEFINED_STACK_TYPE = 0 + IPV4_IPV6 = 22197249 + IPV4_ONLY = 22373798 - class PostKeyRevocationActionType(proto.Enum): - r"""PostKeyRevocationActionType of the instance. + class State(proto.Enum): + r"""Output only. [Output Only] The current state of this attachment's + functionality. Enum values ACTIVE and UNPROVISIONED are shared by + DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER interconnect + attachments, while enum values PENDING_PARTNER, + PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only + PARTNER and PARTNER_PROVIDER interconnect attachments. This state + can take one of the following values: + + :: + + - ACTIVE: The attachment has been turned up and is ready to use. + - UNPROVISIONED: The attachment is not ready to use yet, because turnup + is not complete. + - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet + been configured on the Partner side. + - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of + provisioning after a PARTNER_PROVIDER attachment was created that + references it. + - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER + attachment that is waiting for a customer to activate it. + - DEFUNCT: + The attachment was deleted externally and is no longer functional. This + could be because the associated Interconnect was removed, or because the + other side of a Partner attachment was deleted. Values: - UNDEFINED_POST_KEY_REVOCATION_ACTION_TYPE (0): + UNDEFINED_STATE (0): A value indicating that the enum field is not set. - NOOP (2402146): - Indicates user chose no operation. - POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED (228738393): - Default value. This value is unused. - SHUTDOWN (76412502): - Indicates user chose to opt for VM shutdown - on key revocation. + ACTIVE (314733318): + Indicates that attachment has been turned up + and is ready to use. + DEFUNCT (115891759): + The attachment was deleted externally and is + no longer functional. This could be because the + associated Interconnect was wiped out, or + because the other side of a Partner attachment + was deleted. + PARTNER_REQUEST_RECEIVED (513587304): + A PARTNER attachment is in the process of provisioning after + a PARTNER_PROVIDER attachment was created that references + it. + PENDING_CUSTOMER (167494054): + PARTNER or PARTNER_PROVIDER attachment that is waiting for + the customer to activate. + PENDING_PARTNER (387890656): + A newly created PARTNER attachment that has + not yet been configured on the Partner side. + STATE_UNSPECIFIED (470755401): + No description available. + UNPROVISIONED (517333979): + Indicates that attachment is not ready to use + yet, because turnup is not complete. """ - UNDEFINED_POST_KEY_REVOCATION_ACTION_TYPE = 0 - NOOP = 2402146 - POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 228738393 - SHUTDOWN = 76412502 + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + DEFUNCT = 115891759 + PARTNER_REQUEST_RECEIVED = 513587304 + PENDING_CUSTOMER = 167494054 + PENDING_PARTNER = 387890656 + STATE_UNSPECIFIED = 470755401 + UNPROVISIONED = 517333979 - class PrivateIpv6GoogleAccess(proto.Enum): - r"""The private IPv6 google access type for VMs. If not specified, use - INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this - is not supported yet. + class Type(proto.Enum): + r"""The type of interconnect attachment this is, which can take one of + the following values: + + :: + + - DEDICATED: an attachment to a Dedicated Interconnect. + - PARTNER: an attachment to a Partner Interconnect, created by the + customer. + - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by + the partner. + + - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. Values: - UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS (0): + UNDEFINED_TYPE (0): A value indicating that the enum field is not set. - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE (427975994): - Bidirectional private IPv6 access to/from - Google services. If specified, the subnetwork - who is attached to the instance's default - network interface will be assigned an internal - IPv6 prefix if it doesn't have before. - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE (288210263): - Outbound private IPv6 access from VMs in this - subnet to Google services. If specified, the - subnetwork who is attached to the instance's - default network interface will be assigned an - internal IPv6 prefix if it doesn't have before. - INHERIT_FROM_SUBNETWORK (530256959): - Each network interface inherits - PrivateIpv6GoogleAccess from its subnetwork. + DEDICATED (258411983): + Attachment to a dedicated interconnect. + L2_DEDICATED (336595510): + Attachment to a dedicated interconnect, + forwarding L2 packets. + PARTNER (461924520): + Attachment to a partner interconnect, created + by the customer. + PARTNER_PROVIDER (483261352): + Attachment to a partner interconnect, created + by the partner. """ - UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS = 0 - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 427975994 - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 288210263 - INHERIT_FROM_SUBNETWORK = 530256959 + UNDEFINED_TYPE = 0 + DEDICATED = 258411983 + L2_DEDICATED = 336595510 + PARTNER = 461924520 + PARTNER_PROVIDER = 483261352 - advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( - proto.MESSAGE, - number=409646002, + admin_enabled: bool = proto.Field( + proto.BOOL, + number=445675089, optional=True, - message="AdvancedMachineFeatures", ) - can_ip_forward: bool = proto.Field( - proto.BOOL, - number=467731324, + attachment_group: str = proto.Field( + proto.STRING, + number=63442019, optional=True, ) - confidential_instance_config: "ConfidentialInstanceConfig" = proto.Field( - proto.MESSAGE, - number=490637685, + bandwidth: str = proto.Field( + proto.STRING, + number=181715121, optional=True, - message="ConfidentialInstanceConfig", ) - description: str = proto.Field( + candidate_cloud_router_ip_address: str = proto.Field( proto.STRING, - number=422937596, + number=311379276, optional=True, ) - disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( - proto.MESSAGE, - number=95594102, - message="AttachedDisk", + candidate_cloud_router_ipv6_address: str = proto.Field( + proto.STRING, + number=417499660, + optional=True, ) - display_device: "DisplayDevice" = proto.Field( - proto.MESSAGE, - number=258933875, + candidate_customer_router_ip_address: str = proto.Field( + proto.STRING, + number=339113389, optional=True, - message="DisplayDevice", ) - guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=463595119, - message="AcceleratorConfig", + candidate_customer_router_ipv6_address: str = proto.Field( + proto.STRING, + number=226436653, + optional=True, ) - key_revocation_action_type: str = proto.Field( + candidate_ipv6_subnets: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=235941474, + number=70682522, + ) + candidate_subnets: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=237842938, + ) + cloud_router_ip_address: str = proto.Field( + proto.STRING, + number=287392776, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( + cloud_router_ipv6_address: str = proto.Field( proto.STRING, + number=451922376, + optional=True, + ) + cloud_router_ipv6_interface_id: str = proto.Field( proto.STRING, - number=500195327, + number=521282701, + optional=True, ) - machine_type: str = proto.Field( + configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = ( + proto.Field( + proto.MESSAGE, + number=179681389, + optional=True, + message="InterconnectAttachmentConfigurationConstraints", + ) + ) + creation_timestamp: str = proto.Field( proto.STRING, - number=227711026, + number=30525366, optional=True, ) - metadata: "Metadata" = proto.Field( - proto.MESSAGE, - number=86866735, + customer_router_ip_address: str = proto.Field( + proto.STRING, + number=332475761, optional=True, - message="Metadata", ) - min_cpu_platform: str = proto.Field( + customer_router_ipv6_address: str = proto.Field( proto.STRING, - number=242912759, + number=290127089, optional=True, ) - network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( - proto.MESSAGE, - number=52735243, - message="NetworkInterface", + customer_router_ipv6_interface_id: str = proto.Field( + proto.STRING, + number=380994308, + optional=True, ) - network_performance_config: "NetworkPerformanceConfig" = proto.Field( - proto.MESSAGE, - number=398330850, + dataplane_version: int = proto.Field( + proto.INT32, + number=34920075, optional=True, - message="NetworkPerformanceConfig", ) - partner_metadata: MutableMapping[str, "StructuredEntries"] = proto.MapField( + description: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=65908934, - message="StructuredEntries", + number=422937596, + optional=True, ) - post_key_revocation_action_type: str = proto.Field( + edge_availability_domain: str = proto.Field( proto.STRING, - number=292972897, + number=71289510, optional=True, ) - private_ipv6_google_access: str = proto.Field( + encryption: str = proto.Field( proto.STRING, - number=48277006, + number=97980291, optional=True, ) - reservation_affinity: "ReservationAffinity" = proto.Field( + google_reference_id: str = proto.Field( + proto.STRING, + number=534944469, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + interconnect: str = proto.Field( + proto.STRING, + number=224601230, + optional=True, + ) + ipsec_internal_addresses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=407648565, + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + l2_forwarding: "InterconnectAttachmentL2Forwarding" = proto.Field( proto.MESSAGE, - number=157850683, + number=84784022, optional=True, - message="ReservationAffinity", + message="InterconnectAttachmentL2Forwarding", ) - resource_manager_tags: MutableMapping[str, str] = proto.MapField( + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, - number=377671164, + number=500195327, ) - resource_policies: MutableSequence[str] = proto.RepeatedField( + mtu: int = proto.Field( + proto.INT32, + number=108462, + optional=True, + ) + name: str = proto.Field( proto.STRING, - number=22220385, + number=3373707, + optional=True, ) - scheduling: "Scheduling" = proto.Field( + operational_status: str = proto.Field( + proto.STRING, + number=201070847, + optional=True, + ) + pairing_key: str = proto.Field( + proto.STRING, + number=439695464, + optional=True, + ) + params: "InterconnectAttachmentParams" = proto.Field( proto.MESSAGE, - number=386688404, + number=78313862, optional=True, - message="Scheduling", + message="InterconnectAttachmentParams", ) - service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( + partner_asn: int = proto.Field( + proto.INT64, + number=438166149, + optional=True, + ) + partner_metadata: "InterconnectAttachmentPartnerMetadata" = proto.Field( proto.MESSAGE, - number=277537328, - message="ServiceAccount", + number=65908934, + optional=True, + message="InterconnectAttachmentPartnerMetadata", ) - shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( + private_interconnect_info: "InterconnectAttachmentPrivateInfo" = proto.Field( proto.MESSAGE, - number=12862901, + number=237270531, + optional=True, + message="InterconnectAttachmentPrivateInfo", + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) + remote_service: str = proto.Field( + proto.STRING, + number=391954364, + optional=True, + ) + router: str = proto.Field( + proto.STRING, + number=148608841, optional=True, - message="ShieldedInstanceConfig", ) - shielded_vm_config: "ShieldedVmConfig" = proto.Field( - proto.MESSAGE, - number=477568019, + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, optional=True, - message="ShieldedVmConfig", ) - tags: "Tags" = proto.Field( - proto.MESSAGE, - number=3552281, + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, - message="Tags", ) - - -class InstancePropertiesPatch(proto.Message): - r"""Represents the change that you want to make to the instance - properties. - - Attributes: - labels (MutableMapping[str, str]): - The label key-value pairs that you want to - patch onto the instance. - metadata (MutableMapping[str, str]): - The metadata key-value pairs that you want to - patch onto the instance. For more information, - see Project and instance metadata. - """ - - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, + stack_type: str = proto.Field( proto.STRING, - number=500195327, + number=425908881, + optional=True, ) - metadata: MutableMapping[str, str] = proto.MapField( - proto.STRING, + state: str = proto.Field( proto.STRING, - number=86866735, + number=109757585, + optional=True, ) - - -class InstanceReference(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance (str): - The URL for a specific instance. @required - compute.instancegroups.addInstances/removeInstances - - This field is a member of `oneof`_ ``_instance``. - """ - - instance: str = proto.Field( + subnet_length: int = proto.Field( + proto.INT32, + number=279831048, + optional=True, + ) + type_: str = proto.Field( proto.STRING, - number=18257045, + number=3575610, + optional=True, + ) + vlan_tag8021q: int = proto.Field( + proto.INT32, + number=119927836, optional=True, ) -class InstanceSettings(proto.Message): - r"""Represents a Instance Settings resource. You can use instance - settings to configure default settings for Compute Engine VM - instances. For example, you can use it to configure default - machine type of Compute Engine VM instances. - +class InterconnectAttachmentAggregatedList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fingerprint (str): - Specifies a fingerprint for instance - settings, which is essentially a hash of the - instance settings resource's contents and used - for optimistic locking. The fingerprint is - initially generated by Compute Engine and - changes after every request to modify or update - the instance settings resource. You must always - provide an up-to-date fingerprint hash in order - to update or change the resource, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve the resource. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_fingerprint``. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentsScopedList]): + A list of InterconnectAttachmentsScopedList + resources. kind (str): - [Output Only] Type of the resource. Always - compute#instance_settings for instance settings. + Output only. [Output Only] Type of resource. + Alwayscompute#interconnectAttachmentAggregatedList for + aggregated lists of interconnect attachments. This field is a member of `oneof`_ ``_kind``. - metadata (google.cloud.compute_v1beta.types.InstanceSettingsMetadata): - The metadata key/value pairs assigned to all - the instances in the corresponding scope. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_metadata``. - zone (str): - [Output Only] URL of the zone where the resource resides You - must specify this field as part of the HTTP request URL. It - is not settable as a field in the request body. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - fingerprint: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=234678500, + number=3355, optional=True, ) + items: MutableMapping[str, "InterconnectAttachmentsScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="InterconnectAttachmentsScopedList", + ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - metadata: "InstanceSettingsMetadata" = proto.Field( - proto.MESSAGE, - number=86866735, + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, optional=True, - message="InstanceSettingsMetadata", ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class InstanceSettingsMetadata(proto.Message): +class InterconnectAttachmentConfigurationConstraints(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - items (MutableMapping[str, str]): - A metadata key/value items map. The total - size of all keys and values must be less than - 512KB. - kind (str): - [Output Only] Type of the resource. Always compute#metadata - for metadata. + bgp_md5 (str): + Output only. [Output Only] Whether the attachment's BGP + session requires/allows/disallows BGP MD5 authentication. + This can take one of the following values: MD5_OPTIONAL, + MD5_REQUIRED, MD5_UNSUPPORTED. + + For example, a Cross-Cloud Interconnect connection to a + remote cloud provider that requires BGP MD5 authentication + has the interconnectRemoteLocation + attachment_configuration_constraints.bgp_md5 field set to + MD5_REQUIRED, and that property is propagated to the + attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an + error is returned if MD5 is requested. Check the BgpMd5 enum + for the list of possible values. - This field is a member of `oneof`_ ``_kind``. + This field is a member of `oneof`_ ``_bgp_md5``. + bgp_peer_asn_ranges (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange]): + Output only. [Output Only] List of ASN ranges that the + remote location is known to support. Formatted as an array + of inclusive ranges {min: min-value, max: max-value}. For + example, [{min: 123, max: 123}, {min: 64512, max: 65534}] + allows the peer ASN to be 123 or anything in the range + 64512-65534. + + This field is only advisory. Although the API accepts other + ranges, these are the ranges that we recommend. """ - items: MutableMapping[str, str] = proto.MapField( - proto.STRING, + class BgpMd5(proto.Enum): + r"""Output only. [Output Only] Whether the attachment's BGP session + requires/allows/disallows BGP MD5 authentication. This can take one + of the following values: MD5_OPTIONAL, MD5_REQUIRED, + MD5_UNSUPPORTED. + + For example, a Cross-Cloud Interconnect connection to a remote cloud + provider that requires BGP MD5 authentication has the + interconnectRemoteLocation + attachment_configuration_constraints.bgp_md5 field set to + MD5_REQUIRED, and that property is propagated to the attachment. + Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if + MD5 is requested. + + Values: + UNDEFINED_BGP_MD5 (0): + A value indicating that the enum field is not + set. + MD5_OPTIONAL (532156673): + MD5_OPTIONAL: BGP MD5 authentication is supported and can + optionally be configured. + MD5_REQUIRED (218034496): + MD5_REQUIRED: BGP MD5 authentication must be configured. + MD5_UNSUPPORTED (86962388): + MD5_UNSUPPORTED: BGP MD5 authentication must not be + configured + """ + UNDEFINED_BGP_MD5 = 0 + MD5_OPTIONAL = 532156673 + MD5_REQUIRED = 218034496 + MD5_UNSUPPORTED = 86962388 + + bgp_md5: str = proto.Field( proto.STRING, - number=100526016, + number=373093386, + optional=True, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + bgp_peer_asn_ranges: MutableSequence[ + "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" + ] = proto.RepeatedField( + proto.MESSAGE, + number=475946370, + message="InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", + ) + + +class InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + max_ (int): + + This field is a member of `oneof`_ ``_max``. + min_ (int): + + This field is a member of `oneof`_ ``_min``. + """ + + max_: int = proto.Field( + proto.UINT32, + number=107876, + optional=True, + ) + min_: int = proto.Field( + proto.UINT32, + number=108114, optional=True, ) -class InstanceTemplate(proto.Message): - r"""Represents an Instance Template resource. Google Compute Engine has - two Instance Template resources: \* - `Global `__ \* - `Regional `__ - You can reuse a global instance template in different regions - whereas you can use a regional instance template in a specified - region only. If you want to reduce cross-region dependency or - achieve data residency, use a regional instance template. To create - VMs, managed instance groups, and reservations, you can use either - global or regional instance templates. For more information, read - Instance Templates. +class InterconnectAttachmentGroup(proto.Message): + r"""An interconnect attachment group resource allows customers to + create, analyze, and expand highly available deployments. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + attachments (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentGroupAttachment]): + Attachments in the AttachmentGroup. Keys are + arbitrary user-specified strings. Users are + encouraged, but not required, to use their + preferred format for resource links as keys. + Note that there are add-members and + remove-members methods in gcloud. The size of + this map is limited by an "Attachments per + group" quota. + configured (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): + + This field is a member of `oneof`_ ``_configured``. creation_timestamp (str): - [Output Only] The creation timestamp for this instance - template in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -57043,20 +68795,43 @@ class InstanceTemplate(proto.Message): resource. This field is a member of `oneof`_ ``_description``. + etag (str): + Opaque system-generated token that uniquely + identifies the configuration. If provided when + patching a configuration in update mode, the + provided token must match the current token or + the update is rejected. This provides a reliable + means of doing read-modify-write (optimistic + locking) as described byAIP 154. + + This field is a member of `oneof`_ ``_etag``. id (int): - [Output Only] A unique identifier for this instance - template. The server defines this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. + intent (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupIntent): + + This field is a member of `oneof`_ ``_intent``. + interconnect_group (str): + The URL of an InterconnectGroup that groups + these Attachments' Interconnects. Customers do + not need to set this unless directed by Google + Support. + + This field is a member of `oneof`_ ``_interconnect_group``. kind (str): - [Output Only] The resource type, which is always - compute#instanceTemplate for instance templates. + Output only. [Output Only] Type of the resource. Always + compute#interconnectAttachmentGroup. This field is a member of `oneof`_ ``_kind``. + logical_structure (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructure): + + This field is a member of `oneof`_ ``_logical_structure``. name (str): - Name of the resource; provided by the client when the + Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -57064,38 +68839,27 @@ class InstanceTemplate(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - properties (google.cloud.compute_v1beta.types.InstanceProperties): - The instance properties for this instance - template. - - This field is a member of `oneof`_ ``_properties``. - region (str): - [Output Only] URL of the region where the instance template - resides. Only applicable for regional resources. - - This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] The URL for this instance template. The server - defines this URL. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. - source_instance (str): - The source instance used to create the - template. You can provide this as a partial or - full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance - - This field is a member of `oneof`_ ``_source_instance``. - source_instance_params (google.cloud.compute_v1beta.types.SourceInstanceParams): - The source instance params to use to create - this instance template. - - This field is a member of `oneof`_ ``_source_instance_params``. """ + attachments: MutableMapping[ + str, "InterconnectAttachmentGroupAttachment" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=334744496, + message="InterconnectAttachmentGroupAttachment", + ) + configured: "InterconnectAttachmentGroupConfigured" = proto.Field( + proto.MESSAGE, + number=295631422, + optional=True, + message="InterconnectAttachmentGroupConfigured", + ) creation_timestamp: str = proto.Field( proto.STRING, number=30525366, @@ -57106,1576 +68870,1734 @@ class InstanceTemplate(proto.Message): number=422937596, optional=True, ) + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) + intent: "InterconnectAttachmentGroupIntent" = proto.Field( + proto.MESSAGE, + number=426849948, + optional=True, + message="InterconnectAttachmentGroupIntent", + ) + interconnect_group: str = proto.Field( + proto.STRING, + number=388651918, + optional=True, + ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) + logical_structure: "InterconnectAttachmentGroupLogicalStructure" = proto.Field( + proto.MESSAGE, + number=142412989, + optional=True, + message="InterconnectAttachmentGroupLogicalStructure", + ) name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - properties: "InstanceProperties" = proto.Field( - proto.MESSAGE, - number=147688755, + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + + +class InterconnectAttachmentGroupAttachment(proto.Message): + r"""An Attachment in this AttachmentGroup. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + attachment (str): + + This field is a member of `oneof`_ ``_attachment``. + """ + + attachment: str = proto.Field( + proto.STRING, + number=183982371, + optional=True, + ) + + +class InterconnectAttachmentGroupConfigured(proto.Message): + r"""[Output Only] The redundancy this group is configured to support. + The way a user queries what SLA their Attachment gets is by looking + at this field of the Attachment's AttachmentGroup. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + availability_sla (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfiguredAvailabilitySLA): + + This field is a member of `oneof`_ ``_availability_sla``. + """ + + availability_sla: "InterconnectAttachmentGroupConfiguredAvailabilitySLA" = ( + proto.Field( + proto.MESSAGE, + number=472702020, + optional=True, + message="InterconnectAttachmentGroupConfiguredAvailabilitySLA", + ) + ) + + +class InterconnectAttachmentGroupConfiguredAvailabilitySLA(proto.Message): + r"""[Output Only] Which SLA this group is configured to support, and why + this group does or does not meet that SLA's requirements. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + effective_sla (str): + Check the EffectiveSla enum for the list of + possible values. + + This field is a member of `oneof`_ ``_effective_sla``. + intended_sla_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers]): + + """ + + class EffectiveSla(proto.Enum): + r""" + + Values: + UNDEFINED_EFFECTIVE_SLA (0): + A value indicating that the enum field is not + set. + EFFECTIVE_SLA_UNSPECIFIED (491000744): + No description available. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + """ + UNDEFINED_EFFECTIVE_SLA = 0 + EFFECTIVE_SLA_UNSPECIFIED = 491000744 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + + effective_sla: str = proto.Field( + proto.STRING, + number=144173712, + optional=True, + ) + intended_sla_blockers: MutableSequence[ + "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers" + ] = proto.RepeatedField( + proto.MESSAGE, + number=448370308, + message="InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers", + ) + + +class InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers( + proto.Message +): + r"""[Output Only] Reasons why configuration.availabilitySLA.sla differs + from intent.availabilitySLA. This list is empty if and only if those + are the same. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + attachments (MutableSequence[str]): + Output only. [Output Only] URLs of any particular + Attachments to explain this blocker in more detail. + blocker_type (str): + Check the BlockerType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_blocker_type``. + documentation_link (str): + Output only. [Output Only] The url of Google Cloud public + documentation explaining this requirement. This is set for + every type of requirement. + + This field is a member of `oneof`_ ``_documentation_link``. + explanation (str): + Output only. [Output Only] A human-readable explanation of + this requirement and why it's not met. This is set for every + type of requirement. + + This field is a member of `oneof`_ ``_explanation``. + metros (MutableSequence[str]): + Output only. [Output Only] Metros used to explain this + blocker in more detail. These are three-letter lowercase + strings like "iad". This will be set for some blockers (like + NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does not apply to + others. + regions (MutableSequence[str]): + Output only. [Output Only] Regions used to explain this + blocker in more detail. These are region names formatted + like "us-central1". This will be set for some blockers (like + INCOMPATIBLE_REGIONS) but does not apply to others. + zones (MutableSequence[str]): + Output only. [Output Only] Zones used to explain this + blocker in more detail. Format is "zone1" and/or "zone2". + This will be set for some blockers (like MISSING_ZONE) but + does not apply to others. + """ + + class BlockerType(proto.Enum): + r""" + + Values: + UNDEFINED_BLOCKER_TYPE (0): + A value indicating that the enum field is not + set. + BLOCKER_TYPE_UNSPECIFIED (429793623): + No description available. + INCOMPATIBLE_METROS (290410432): + No description available. + INCOMPATIBLE_REGIONS (6195033): + No description available. + MISSING_GLOBAL_ROUTING (165913635): + No description available. + NO_ATTACHMENTS (456535570): + No description available. + NO_ATTACHMENTS_IN_METRO_AND_ZONE (51684135): + No description available. + OTHER (75532016): + No description available. + """ + UNDEFINED_BLOCKER_TYPE = 0 + BLOCKER_TYPE_UNSPECIFIED = 429793623 + INCOMPATIBLE_METROS = 290410432 + INCOMPATIBLE_REGIONS = 6195033 + MISSING_GLOBAL_ROUTING = 165913635 + NO_ATTACHMENTS = 456535570 + NO_ATTACHMENTS_IN_METRO_AND_ZONE = 51684135 + OTHER = 75532016 + + attachments: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=334744496, + ) + blocker_type: str = proto.Field( + proto.STRING, + number=381194847, + optional=True, + ) + documentation_link: str = proto.Field( + proto.STRING, + number=93465183, optional=True, - message="InstanceProperties", ) - region: str = proto.Field( + explanation: str = proto.Field( proto.STRING, - number=138946292, + number=504745497, optional=True, ) - self_link: str = proto.Field( + metros: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, + number=533067386, ) - source_instance: str = proto.Field( + regions: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=396315705, - optional=True, + number=12367871, ) - source_instance_params: "SourceInstanceParams" = proto.Field( - proto.MESSAGE, - number=135342156, - optional=True, - message="SourceInstanceParams", + zones: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=116085319, ) -class InstanceTemplateAggregatedList(proto.Message): - r"""Contains a list of InstanceTemplatesScopedList. +class InterconnectAttachmentGroupIntent(proto.Message): + r"""The user's intent for this AttachmentGroup. This is the only + required field besides the name that must be specified on group + creation. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InstanceTemplatesScopedList]): - A list of InstanceTemplatesScopedList - resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + availability_sla (str): + Check the AvailabilitySla enum for the list + of possible values. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_availability_sla``. """ - @property - def raw_page(self): - return self + class AvailabilitySla(proto.Enum): + r""" - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "InstanceTemplatesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="InstanceTemplatesScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( + Values: + UNDEFINED_AVAILABILITY_SLA (0): + A value indicating that the enum field is not + set. + AVAILABILITY_SLA_UNSPECIFIED (11186044): + No description available. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + """ + UNDEFINED_AVAILABILITY_SLA = 0 + AVAILABILITY_SLA_UNSPECIFIED = 11186044 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + + availability_sla: str = proto.Field( proto.STRING, - number=456214797, + number=472702020, optional=True, ) - warning: "Warning" = proto.Field( + + +class InterconnectAttachmentGroupLogicalStructure(proto.Message): + r"""[Output Only] An analysis of the logical layout of Attachments in + this group. Every Attachment in the group is shown once in this + structure. + + Attributes: + regions (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegion]): + + """ + + regions: MutableSequence[ + "InterconnectAttachmentGroupLogicalStructureRegion" + ] = proto.RepeatedField( proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=12367871, + message="InterconnectAttachmentGroupLogicalStructureRegion", ) -class InstanceTemplateList(proto.Message): - r"""A list of instance templates. +class InterconnectAttachmentGroupLogicalStructureRegion(proto.Message): + r"""[Output Only] The regions Attachments in this group are in. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceTemplate]): - A list of InstanceTemplate resources. - kind (str): - [Output Only] The resource type, which is always - compute#instanceTemplatesListResponse for instance template - lists. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetro]): - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + region (str): + Output only. [Output Only] The name of a region, like + "us-central1". - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_region``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceTemplate"] = proto.RepeatedField( + metros: MutableSequence[ + "InterconnectAttachmentGroupLogicalStructureRegionMetro" + ] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="InstanceTemplate", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, + number=533067386, + message="InterconnectAttachmentGroupLogicalStructureRegionMetro", ) - self_link: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=138946292, optional=True, - message="Warning", ) -class InstanceTemplatesScopedList(proto.Message): - r""" +class InterconnectAttachmentGroupLogicalStructureRegionMetro(proto.Message): + r"""[Output Only] The metros of Attachments in this group in this + region. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_templates (MutableSequence[google.cloud.compute_v1beta.types.InstanceTemplate]): - [Output Only] A list of instance templates that are - contained within the specified project and zone. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] An informational warning that replaces the - list of instance templates when the list is empty. + facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetroFacility]): - This field is a member of `oneof`_ ``_warning``. + metro (str): + Output only. [Output Only] The name of the metro, as a + three-letter lowercase string like "iad". This is the first + component of the location of an Interconnect. + + This field is a member of `oneof`_ ``_metro``. """ - instance_templates: MutableSequence["InstanceTemplate"] = proto.RepeatedField( + facilities: MutableSequence[ + "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility" + ] = proto.RepeatedField( proto.MESSAGE, - number=459889679, - message="InstanceTemplate", + number=536683137, + message="InterconnectAttachmentGroupLogicalStructureRegionMetroFacility", ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + metro: str = proto.Field( + proto.STRING, + number=103787801, optional=True, - message="Warning", ) -class InstanceWithNamedPorts(proto.Message): - r""" +class InterconnectAttachmentGroupLogicalStructureRegionMetroFacility(proto.Message): + r"""[Output Only] The facilities used for this group's Attachments' + Interconnects. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - [Output Only] The URL of the instance. + facility (str): + Output only. [Output Only] The name of a facility, like + "iad-1234". - This field is a member of `oneof`_ ``_instance``. - named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - [Output Only] The named ports that belong to this instance - group. - status (str): - [Output Only] The status of the instance. Check the Status - enum for the list of possible values. + This field is a member of `oneof`_ ``_facility``. + zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone]): - This field is a member of `oneof`_ ``_status``. """ - class Status(proto.Enum): - r"""[Output Only] The status of the instance. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - DEPROVISIONING (428935662): - The instance is halted and we are performing - tear down tasks like network deprogramming, - releasing quota, IP, tearing down disks etc. - PENDING (35394935): - For Flex Start provisioning instance is - waiting for available capacity from Dynamic - Workload Scheduler (DWS). - PENDING_STOP (362509770): - The instance is gracefully shutting down. - PROVISIONING (290896621): - Resources are being allocated for the - instance. - REPAIRING (413483285): - The instance is in repair. - RUNNING (121282975): - The instance is running. - STAGING (431072283): - All required resources have been allocated - and the instance is being started. - STOPPED (444276141): - The instance has stopped successfully. - STOPPING (350791796): - The instance is currently stopping (either - being deleted or killed). - SUSPENDED (51223995): - The instance has suspended. - SUSPENDING (514206246): - The instance is suspending. - TERMINATED (250018339): - The instance has stopped (either by explicit - action or underlying failure). - """ - UNDEFINED_STATUS = 0 - DEPROVISIONING = 428935662 - PENDING = 35394935 - PENDING_STOP = 362509770 - PROVISIONING = 290896621 - REPAIRING = 413483285 - RUNNING = 121282975 - STAGING = 431072283 - STOPPED = 444276141 - STOPPING = 350791796 - SUSPENDED = 51223995 - SUSPENDING = 514206246 - TERMINATED = 250018339 - - instance: str = proto.Field( + facility: str = proto.Field( proto.STRING, - number=18257045, + number=501116579, optional=True, ) - named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( + zones: MutableSequence[ + "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone" + ] = proto.RepeatedField( proto.MESSAGE, - number=427598732, - message="NamedPort", - ) - status: str = proto.Field( - proto.STRING, - number=181260274, - optional=True, + number=116085319, + message="InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone", ) -class InstancesAddResourcePoliciesRequest(proto.Message): - r""" +class InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone(proto.Message): + r"""[Output Only] The zones that Attachments in this group are present + in, in the given facilities. This is inherited from their + Interconnects. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - resource_policies (MutableSequence[str]): - Resource policies to be added to this - instance. + attachments (MutableSequence[str]): + Output only. [Output Only] URLs of Attachments in the given + zone, to the given region, on Interconnects in the given + facility and metro. Every Attachment in the AG has such an + entry. + zone (str): + Output only. [Output Only] The name of a zone, either + "zone1" or "zone2". + + This field is a member of `oneof`_ ``_zone``. """ - resource_policies: MutableSequence[str] = proto.RepeatedField( + attachments: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=22220385, + number=334744496, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + optional=True, ) -class InstancesBulkInsertOperationMetadata(proto.Message): - r""" +class InterconnectAttachmentGroupsGetOperationalStatusResponse(proto.Message): + r"""Response for the + InterconnectAttachmentGroupsGetOperationalStatusResponse. - Attributes: - per_location_status (MutableMapping[str, google.cloud.compute_v1beta.types.BulkInsertOperationStatus]): - Status information per location (location - name is key). Example key: zones/us-central1-a - """ - per_location_status: MutableMapping[ - str, "BulkInsertOperationStatus" - ] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=167851162, - message="BulkInsertOperationStatus", - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + etag (str): -class InstancesGetEffectiveFirewallsResponse(proto.Message): - r""" + This field is a member of `oneof`_ ``_etag``. + result (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupsOperationalStatus): - Attributes: - firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): - [Output Only] Effective firewalls from firewall policies. - firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): - Effective firewalls on the instance. - organization_firewalls (MutableSequence[google.cloud.compute_v1beta.types.InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy]): - Effective firewalls from organization - policies. + This field is a member of `oneof`_ ``_result``. """ - firewall_policys: MutableSequence[ - "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - ] = proto.RepeatedField( - proto.MESSAGE, - number=410985794, - message="InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - ) - firewalls: MutableSequence["Firewall"] = proto.RepeatedField( - proto.MESSAGE, - number=272245619, - message="Firewall", + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, ) - organization_firewalls: MutableSequence[ - "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - ] = proto.RepeatedField( + result: "InterconnectAttachmentGroupsOperationalStatus" = proto.Field( proto.MESSAGE, - number=466315111, - message="InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", + number=139315229, + optional=True, + message="InterconnectAttachmentGroupsOperationalStatus", ) -class InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy(proto.Message): +class InterconnectAttachmentGroupsListResponse(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - display_name (str): - [Output Only] Deprecated, please use short name instead. The - display name of the firewall policy. + etag (str): - This field is a member of `oneof`_ ``_display_name``. - name (str): - [Output Only] The name of the firewall policy. + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_name``. - packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - [Output Only] The packet mirroring rules that apply to the - instance. - priority (int): - [Output only] Priority of firewall policy association. Not - applicable for type=HIERARCHY. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroup]): + A list of InterconnectAttachmentGroup + resources. + kind (str): - This field is a member of `oneof`_ ``_priority``. - rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - [Output Only] The rules that apply to the instance. Only - rules that target the specific VM instance are returned if - target service accounts or target secure tags are specified - in the rules. - short_name (str): - [Output Only] The short name of the firewall policy. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_short_name``. - type_ (str): - [Output Only] The type of the firewall policy. Can be one of - HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, - SYSTEM_REGIONAL. Check the Type enum for the list of - possible values. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_type``. - """ + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - class Type(proto.Enum): - r"""[Output Only] The type of the firewall policy. Can be one of - HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, - SYSTEM_REGIONAL. + This field is a member of `oneof`_ ``_warning``. + """ - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - HIERARCHY (69902869): - No description available. - NETWORK (413984270): - No description available. - NETWORK_REGIONAL (190804272): - No description available. - SYSTEM_GLOBAL (60099507): - No description available. - SYSTEM_REGIONAL (161777199): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_TYPE = 0 - HIERARCHY = 69902869 - NETWORK = 413984270 - NETWORK_REGIONAL = 190804272 - SYSTEM_GLOBAL = 60099507 - SYSTEM_REGIONAL = 161777199 - UNSPECIFIED = 526786327 + @property + def raw_page(self): + return self - display_name: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=4473832, + number=3123477, optional=True, ) - name: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=3373707, + number=3355, optional=True, ) - packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + items: MutableSequence["InterconnectAttachmentGroup"] = proto.RepeatedField( proto.MESSAGE, - number=531644356, - message="FirewallPolicyRule", + number=100526016, + message="InterconnectAttachmentGroup", ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( - proto.MESSAGE, - number=108873975, - message="FirewallPolicyRule", - ) - short_name: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=492051566, + number=79797525, optional=True, ) - type_: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3575610, + number=456214797, optional=True, ) - - -class InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy(proto.Message): - r"""A pruned SecurityPolicy containing ID and any applicable - firewall rules. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - id (int): - The unique identifier for the security - policy. This identifier is defined by the - server. - - This field is a member of `oneof`_ ``_id``. - rules (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRule]): - The rules that apply to the network. - """ - - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, ) - rules: MutableSequence["SecurityPolicyRule"] = proto.RepeatedField( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=108873975, - message="SecurityPolicyRule", + number=50704284, + optional=True, + message="Warning", ) -class InstancesRemoveResourcePoliciesRequest(proto.Message): +class InterconnectAttachmentGroupsOperationalStatus(proto.Message): r""" - Attributes: - resource_policies (MutableSequence[str]): - Resource policies to be removed from this - instance. - """ - - resource_policies: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=22220385, - ) + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + attachment_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus]): -class InstancesReportHostAsFaultyRequest(proto.Message): - r""" + configured (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_configured``. + group_status (str): + Output only. Summarizes the status of the + group. Check the GroupStatus enum for the list + of possible values. - Attributes: - disruption_schedule (str): - The disruption schedule for the VM. Required - field, only allows IMMEDIATE. Check the - DisruptionSchedule enum for the list of possible - values. + This field is a member of `oneof`_ ``_group_status``. + intent (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupIntent): - This field is a member of `oneof`_ ``_disruption_schedule``. - fault_reasons (MutableSequence[google.cloud.compute_v1beta.types.InstancesReportHostAsFaultyRequestFaultReason]): + This field is a member of `oneof`_ ``_intent``. + operational (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): + Output only. The operational state of the + group, including only active Attachments. + This field is a member of `oneof`_ ``_operational``. """ - class DisruptionSchedule(proto.Enum): - r"""The disruption schedule for the VM. Required field, only - allows IMMEDIATE. + class GroupStatus(proto.Enum): + r"""Output only. Summarizes the status of the group. Values: - UNDEFINED_DISRUPTION_SCHEDULE (0): + UNDEFINED_GROUP_STATUS (0): A value indicating that the enum field is not set. - DISRUPTION_SCHEDULE_UNSPECIFIED (332543835): - Not used. Required as per aip/126. - FUTURE (474513859): - Delay disruption for caller control. Will be - default soon. - IMMEDIATE (152881041): - Default value. Disrupt the VM immediately. + DEGRADED (396890926): + No description available. + FULLY_DOWN (255514647): + No description available. + FULLY_UP (504176464): + No description available. + UNSPECIFIED (526786327): + No description available. """ - UNDEFINED_DISRUPTION_SCHEDULE = 0 - DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835 - FUTURE = 474513859 - IMMEDIATE = 152881041 + UNDEFINED_GROUP_STATUS = 0 + DEGRADED = 396890926 + FULLY_DOWN = 255514647 + FULLY_UP = 504176464 + UNSPECIFIED = 526786327 - disruption_schedule: str = proto.Field( + attachment_statuses: MutableSequence[ + "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus" + ] = proto.RepeatedField( + proto.MESSAGE, + number=491132860, + message="InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", + ) + configured: "InterconnectAttachmentGroupConfigured" = proto.Field( + proto.MESSAGE, + number=295631422, + optional=True, + message="InterconnectAttachmentGroupConfigured", + ) + group_status: str = proto.Field( proto.STRING, - number=95871619, + number=338778546, optional=True, ) - fault_reasons: MutableSequence[ - "InstancesReportHostAsFaultyRequestFaultReason" - ] = proto.RepeatedField( + intent: "InterconnectAttachmentGroupIntent" = proto.Field( proto.MESSAGE, - number=168056210, - message="InstancesReportHostAsFaultyRequestFaultReason", + number=426849948, + optional=True, + message="InterconnectAttachmentGroupIntent", + ) + operational: "InterconnectAttachmentGroupConfigured" = proto.Field( + proto.MESSAGE, + number=129704914, + optional=True, + message="InterconnectAttachmentGroupConfigured", ) -class InstancesReportHostAsFaultyRequestFaultReason(proto.Message): - r""" +class InterconnectAttachmentGroupsOperationalStatusAttachmentStatus(proto.Message): + r"""The status of one Attachment in the group. List order is + arbitrary. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - behavior (str): - Check the Behavior enum for the list of - possible values. + admin_enabled (bool): + Output only. Whether this Attachment is + enabled. This becomes false when the customer + drains their Attachment. - This field is a member of `oneof`_ ``_behavior``. - description (str): + This field is a member of `oneof`_ ``_admin_enabled``. + attachment (str): + Output only. The URL of the Attachment being + described. - This field is a member of `oneof`_ ``_description``. + This field is a member of `oneof`_ ``_attachment``. + is_active (str): + Output only. Whether this Attachment is participating in the + redundant configuration. This will be ACTIVE if and only if + the status below is CONNECTION_UP. Any INACTIVE Attachments + are excluded from the analysis that generates + operational.availabilitySLA. Check the IsActive enum for the + list of possible values. + + This field is a member of `oneof`_ ``_is_active``. + status (str): + Output only. Whether this Attachment is + active, and if so, whether BGP is up. Check the + Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. """ - class Behavior(proto.Enum): - r""" + class IsActive(proto.Enum): + r"""Output only. Whether this Attachment is participating in the + redundant configuration. This will be ACTIVE if and only if the + status below is CONNECTION_UP. Any INACTIVE Attachments are excluded + from the analysis that generates operational.availabilitySLA. Values: - UNDEFINED_BEHAVIOR (0): + UNDEFINED_IS_ACTIVE (0): A value indicating that the enum field is not set. - BEHAVIOR_UNSPECIFIED (85734570): - Public reportable behaviors - PERFORMANCE (135701520): + ACTIVE (314733318): No description available. - SILENT_DATA_CORRUPTION (111360678): + INACTIVE (270421099): No description available. - UNRECOVERABLE_GPU_ERROR (363710747): + UNSPECIFIED (526786327): No description available. """ - UNDEFINED_BEHAVIOR = 0 - BEHAVIOR_UNSPECIFIED = 85734570 - PERFORMANCE = 135701520 - SILENT_DATA_CORRUPTION = 111360678 - UNRECOVERABLE_GPU_ERROR = 363710747 + UNDEFINED_IS_ACTIVE = 0 + ACTIVE = 314733318 + INACTIVE = 270421099 + UNSPECIFIED = 526786327 - behavior: str = proto.Field( + class Status(proto.Enum): + r"""Output only. Whether this Attachment is active, and if so, + whether BGP is up. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + ATTACHMENT_STATUS_UNKNOWN (472477561): + No description available. + CONNECTION_DISABLED (432687805): + No description available. + CONNECTION_DOWN (267552099): + No description available. + CONNECTION_UP (455585692): + No description available. + DEFUNCT (115891759): + No description available. + IPSEC_CONFIGURATION_NEEDED_STATUS (455203582): + No description available. + IPSEC_READY_TO_RESUME_FLOW_STATUS (384830596): + No description available. + IPV4_DOWN_IPV6_UP (277490992): + No description available. + IPV4_UP_IPV6_DOWN (316051248): + No description available. + PARTNER_REQUEST_RECEIVED (513587304): + No description available. + PENDING_CUSTOMER (167494054): + No description available. + PENDING_PARTNER (387890656): + No description available. + PROVISIONED (355751956): + No description available. + ROUTER_CONFIGURATION_BROKEN (150505108): + No description available. + UNPROVISIONED (517333979): + No description available. + """ + UNDEFINED_STATUS = 0 + ATTACHMENT_STATUS_UNKNOWN = 472477561 + CONNECTION_DISABLED = 432687805 + CONNECTION_DOWN = 267552099 + CONNECTION_UP = 455585692 + DEFUNCT = 115891759 + IPSEC_CONFIGURATION_NEEDED_STATUS = 455203582 + IPSEC_READY_TO_RESUME_FLOW_STATUS = 384830596 + IPV4_DOWN_IPV6_UP = 277490992 + IPV4_UP_IPV6_DOWN = 316051248 + PARTNER_REQUEST_RECEIVED = 513587304 + PENDING_CUSTOMER = 167494054 + PENDING_PARTNER = 387890656 + PROVISIONED = 355751956 + ROUTER_CONFIGURATION_BROKEN = 150505108 + UNPROVISIONED = 517333979 + + admin_enabled: bool = proto.Field( + proto.BOOL, + number=445675089, + optional=True, + ) + attachment: str = proto.Field( proto.STRING, - number=437170770, + number=183982371, optional=True, ) - description: str = proto.Field( + is_active: str = proto.Field( proto.STRING, - number=422937596, + number=114830267, + optional=True, + ) + status: str = proto.Field( + proto.STRING, + number=181260274, optional=True, ) -class InstancesResumeRequest(proto.Message): - r""" +class InterconnectAttachmentL2Forwarding(proto.Message): + r"""L2 Interconnect Attachment related configuration. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): - Array of disks associated with this instance - that are protected with a customer-supplied - encryption key. In order to resume the instance, - the disk url and its corresponding key must be - provided. If the disk is not protected with a - customer-supplied encryption key it should not - be specified. - instance_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Decrypts data associated with an instance - that is protected with a customer-supplied - encryption key. If the instance you are starting - is protected with a customer-supplied encryption - key, the correct key must be provided otherwise - the instance resume will not succeed. + appliance_mappings (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingApplianceMapping]): + Optional. A map of VLAN tags to appliances + and optional inner mapping rules. If VLANs are + not explicitly mapped to any appliance, the + defaultApplianceIpAddress is used. - This field is a member of `oneof`_ ``_instance_encryption_key``. - """ + Each VLAN tag can be a single number or a range + of numbers in the range of 1 to 4094, e.g., "1" + or "4001-4094". Non-empty and non-overlapping + VLAN tag ranges are enforced, and violating + operations will be rejected. - disks: MutableSequence["CustomerEncryptionKeyProtectedDisk"] = proto.RepeatedField( - proto.MESSAGE, - number=95594102, - message="CustomerEncryptionKeyProtectedDisk", - ) - instance_encryption_key: "CustomerEncryptionKey" = proto.Field( - proto.MESSAGE, - number=64741517, - optional=True, - message="CustomerEncryptionKey", - ) + The VLAN tags in the Ethernet header must use an + ethertype value of 0x88A8 or 0x8100. + default_appliance_ip_address (str): + Optional. A single IPv4 or IPv6 address used + as the default destination IP when there is no + VLAN mapping result found. + Unset field (null-value) indicates the unmatched + packet should be dropped. -class InstancesScopedList(proto.Message): - r""" + This field is a member of `oneof`_ ``_default_appliance_ip_address``. + geneve_header (google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingGeneveHeader): + Optional. It represents the structure of a + Geneve (Generic Network Virtualization + Encapsulation) header, as defined in RFC8926. It + encapsulates packets from various protocols + (e.g., Ethernet, IPv4, IPv6) for use in network + virtualization environments. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_geneve_header``. + network (str): + Required. Resource URL of the network to + which this attachment belongs. - Attributes: - instances (MutableSequence[google.cloud.compute_v1beta.types.Instance]): - [Output Only] A list of instances contained in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of instances when the list is empty. + This field is a member of `oneof`_ ``_network``. + tunnel_endpoint_ip_address (str): + Required. A single IPv4 or IPv6 address. This + address will be used as the source IP address + for packets sent to the appliances, and must be + used as the destination IP address for packets + that should be sent out through this attachment. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_tunnel_endpoint_ip_address``. """ - instances: MutableSequence["Instance"] = proto.RepeatedField( + appliance_mappings: MutableMapping[ + str, "InterconnectAttachmentL2ForwardingApplianceMapping" + ] = proto.MapField( + proto.STRING, proto.MESSAGE, - number=29097598, - message="Instance", + number=374529975, + message="InterconnectAttachmentL2ForwardingApplianceMapping", ) - warning: "Warning" = proto.Field( + default_appliance_ip_address: str = proto.Field( + proto.STRING, + number=536490476, + optional=True, + ) + geneve_header: "InterconnectAttachmentL2ForwardingGeneveHeader" = proto.Field( proto.MESSAGE, - number=50704284, + number=118688424, + optional=True, + message="InterconnectAttachmentL2ForwardingGeneveHeader", + ) + network: str = proto.Field( + proto.STRING, + number=232872494, + optional=True, + ) + tunnel_endpoint_ip_address: str = proto.Field( + proto.STRING, + number=468740975, optional=True, - message="Warning", ) -class InstancesSetLabelsRequest(proto.Message): - r""" +class InterconnectAttachmentL2ForwardingApplianceMapping(proto.Message): + r"""Two-level VLAN-to-Appliance mapping rule. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - label_fingerprint (str): - Fingerprint of the previous set of labels for - this resource, used to prevent conflicts. - Provide the latest fingerprint value when making - a request to add or change labels. + appliance_ip_address (str): + Optional. A single IPv4 or IPv6 address used + as the destination IP address for ingress + packets that match on a VLAN tag, but do not + match a more specific inner VLAN tag. - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): + Unset field (null-value) indicates both VLAN + tags are required to be mapped. Otherwise, + defaultApplianceIpAddress is used. + + This field is a member of `oneof`_ ``_appliance_ip_address``. + inner_vlan_to_appliance_mappings (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping]): + Optional. Used to match against the inner + VLAN when the packet contains two VLAN tags. + A list of mapping rules from inner VLAN tags to + IP addresses. If the inner VLAN is not + explicitly mapped to an IP address range, the + applianceIpAddress is used. + name (str): + Optional. The name of this appliance mapping + rule. + + This field is a member of `oneof`_ ``_name``. """ - label_fingerprint: str = proto.Field( + appliance_ip_address: str = proto.Field( proto.STRING, - number=178124825, + number=57985710, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, + inner_vlan_to_appliance_mappings: MutableSequence[ + "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping" + ] = proto.RepeatedField( + proto.MESSAGE, + number=97387944, + message="InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", + ) + name: str = proto.Field( proto.STRING, - number=500195327, + number=3373707, + optional=True, ) -class InstancesSetMachineResourcesRequest(proto.Message): - r""" +class InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping( + proto.Message +): + r"""The inner VLAN-to-Appliance mapping. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - guest_accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): - A list of the type and count of accelerator - cards attached to the instance. + inner_appliance_ip_address (str): + Required in this object. A single IPv4 or + IPv6 address used as the destination IP address + for ingress packets that match on both VLAN + tags. + + This field is a member of `oneof`_ ``_inner_appliance_ip_address``. + inner_vlan_tags (MutableSequence[str]): + Required in this object. Used to match the inner VLAN tag on + the packet. Each entry can be a single number or a range of + numbers in the range of 1 to 4094, e.g., ["1", "4001-4094"] + is valid. Non-empty and Non-overlapping VLAN tag ranges are + enforced, and violating operations will be rejected. + + The inner VLAN tags must have an ethertype value of 0x8100. """ - guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=463595119, - message="AcceleratorConfig", + inner_appliance_ip_address: str = proto.Field( + proto.STRING, + number=350619895, + optional=True, + ) + inner_vlan_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=431186636, ) -class InstancesSetMachineTypeRequest(proto.Message): - r""" +class InterconnectAttachmentL2ForwardingGeneveHeader(proto.Message): + r"""GeneveHeader related configurations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - machine_type (str): - Full or partial URL of the machine type - resource. See Machine Types for a full list of - machine types. For example: - zones/us-central1-f/machineTypes/n1-standard-1 + vni (int): + Optional. VNI is a 24-bit unique virtual + network identifier, from 0 to 16,777,215. - This field is a member of `oneof`_ ``_machine_type``. + This field is a member of `oneof`_ ``_vni``. """ - machine_type: str = proto.Field( - proto.STRING, - number=227711026, + vni: int = proto.Field( + proto.UINT32, + number=116913, optional=True, ) -class InstancesSetMinCpuPlatformRequest(proto.Message): - r""" +class InterconnectAttachmentList(proto.Message): + r"""Response to the list request, and contains a list of + interconnect attachments. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - min_cpu_platform (str): - Minimum cpu/platform this instance should be - started at. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_min_cpu_platform``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachment]): + A list of InterconnectAttachment resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#interconnectAttachmentList for lists of + interconnect attachments. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - min_cpu_platform: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=242912759, + number=3355, optional=True, ) + items: MutableSequence["InterconnectAttachment"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InterconnectAttachment", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class InstancesSetNameRequest(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class InterconnectAttachmentParams(proto.Message): + r"""Additional interconnect attachment parameters. Attributes: - current_name (str): - The current name of this resource, used to - prevent conflicts. Provide the latest name when - making a request to change name. - - This field is a member of `oneof`_ ``_current_name``. - name (str): - The name to be applied to the instance. Needs - to be RFC 1035 compliant. + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: - This field is a member of `oneof`_ ``_name``. + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. """ - current_name: str = proto.Field( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=394983825, - optional=True, - ) - name: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=377671164, ) -class InstancesSetSecurityPolicyRequest(proto.Message): - r""" +class InterconnectAttachmentPartnerMetadata(proto.Message): + r"""Informational metadata about Partner attachments from Partners to + display to customers. These fields are propagated from + PARTNER_PROVIDER attachments to their corresponding PARTNER + attachments. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_interfaces (MutableSequence[str]): - The network interfaces that the security - policy will be applied to. Network interfaces - use the nicN naming format. You can only set a - security policy for network interfaces with an - access config. - security_policy (str): - A full or partial URL to a security policy to - add to this instance. If this field is set to an - empty string it will remove the associated - security policy. + interconnect_name (str): + Plain text name of the Interconnect this + attachment is connected to, as displayed in the + Partner's portal. For instance "Chicago 1". This + value may be validated to match approved Partner + values. - This field is a member of `oneof`_ ``_security_policy``. + This field is a member of `oneof`_ ``_interconnect_name``. + partner_name (str): + Plain text name of the Partner providing this + attachment. This value may be validated to match + approved Partner values. + + This field is a member of `oneof`_ ``_partner_name``. + portal_url (str): + URL of the Partner's portal for this + Attachment. Partners may customise this to be a + deep link to the specific resource on the + Partner portal. This value may be validated to + match approved Partner values. + + This field is a member of `oneof`_ ``_portal_url``. """ - network_interfaces: MutableSequence[str] = proto.RepeatedField( + interconnect_name: str = proto.Field( proto.STRING, - number=52735243, + number=514963356, + optional=True, ) - security_policy: str = proto.Field( + partner_name: str = proto.Field( + proto.STRING, + number=161747874, + optional=True, + ) + portal_url: str = proto.Field( proto.STRING, - number=171082513, + number=269182748, optional=True, ) -class InstancesSetServiceAccountRequest(proto.Message): - r""" +class InterconnectAttachmentPrivateInfo(proto.Message): + r"""Information for an interconnect attachment when this belongs + to an interconnect of type DEDICATED. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - email (str): - Email address of the service account. + tag8021q (int): + [Output Only] 802.1q encapsulation tag to be used for + traffic between Google and the customer, going to and from + this network and region. - This field is a member of `oneof`_ ``_email``. - scopes (MutableSequence[str]): - The list of scopes to be made available for - this service account. + This field is a member of `oneof`_ ``_tag8021q``. """ - email: str = proto.Field( - proto.STRING, - number=96619420, + tag8021q: int = proto.Field( + proto.UINT32, + number=271820992, optional=True, ) - scopes: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=165973151, - ) -class InstancesStartWithEncryptionKeyRequest(proto.Message): +class InterconnectAttachmentsScopedList(proto.Message): r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - disks (MutableSequence[google.cloud.compute_v1beta.types.CustomerEncryptionKeyProtectedDisk]): - Array of disks associated with this instance - that are protected with a customer-supplied - encryption key. In order to start the instance, - the disk url and its corresponding key must be - provided. If the disk is not protected with a - customer-supplied encryption key it should not - be specified. + interconnect_attachments (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachment]): + A list of interconnect attachments contained + in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of addresses when the list is empty. + + This field is a member of `oneof`_ ``_warning``. """ - disks: MutableSequence["CustomerEncryptionKeyProtectedDisk"] = proto.RepeatedField( + interconnect_attachments: MutableSequence[ + "InterconnectAttachment" + ] = proto.RepeatedField( proto.MESSAGE, - number=95594102, - message="CustomerEncryptionKeyProtectedDisk", + number=425388415, + message="InterconnectAttachment", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class InstantSnapshot(proto.Message): - r"""Represents a InstantSnapshot resource. You can use instant - snapshots to create disk rollback points quickly.. +class InterconnectCircuitInfo(proto.Message): + r"""Describes a single physical circuit between the Customer and + Google. CircuitInfo objects are created by Google, so all fields + are output only. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - architecture (str): - [Output Only] The architecture of the instant snapshot. - Valid values are ARM64 or X86_64. Check the Architecture - enum for the list of possible values. - - This field is a member of `oneof`_ ``_architecture``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - disk_size_gb (int): - [Output Only] Size of the source disk, specified in GB. - - This field is a member of `oneof`_ ``_disk_size_gb``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#instantSnapshot for InstantSnapshot resources. - - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this InstantSnapshot, which is essentially a - hash of the labels set used for optimistic - locking. The fingerprint is initially generated - by Compute Engine and changes after every - request to modify or update labels. You must - always provide an up-to-date fingerprint hash in - order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - InstantSnapshot. + customer_demarc_id (str): + Customer-side demarc ID for this circuit. - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels to apply to this InstantSnapshot. - These can be later modified by the setLabels - method. Label values may be empty. - name (str): - Name of the resource; provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + This field is a member of `oneof`_ ``_customer_demarc_id``. + google_circuit_id (str): + Google-assigned unique ID for this circuit. + Assigned at circuit turn-up. - This field is a member of `oneof`_ ``_name``. - region (str): - [Output Only] URL of the region where the instant snapshot - resides. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + This field is a member of `oneof`_ ``_google_circuit_id``. + google_demarc_id (str): + Google-side demarc ID for this circuit. + Assigned at circuit turn-up and provided by + Google to the customer in the LOA. - This field is a member of `oneof`_ ``_region``. - resource_status (google.cloud.compute_v1beta.types.InstantSnapshotResourceStatus): - [Output Only] Status information for the instant snapshot - resource. + This field is a member of `oneof`_ ``_google_demarc_id``. + """ - This field is a member of `oneof`_ ``_resource_status``. - satisfies_pzi (bool): - Output only. Reserved for future use. + customer_demarc_id: str = proto.Field( + proto.STRING, + number=28771859, + optional=True, + ) + google_circuit_id: str = proto.Field( + proto.STRING, + number=262014711, + optional=True, + ) + google_demarc_id: str = proto.Field( + proto.STRING, + number=448196270, + optional=True, + ) - This field is a member of `oneof`_ ``_satisfies_pzi``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. - This field is a member of `oneof`_ ``_satisfies_pzs``. - self_link (str): - [Output Only] Server-defined URL for the resource. +class InterconnectDiagnostics(proto.Message): + r"""Diagnostics information about the Interconnect connection, + which contains detailed and current technical information about + Google's side of the connection. - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource's - resource id. - This field is a member of `oneof`_ ``_self_link_with_id``. - source_disk (str): - URL of the source disk used to create this - instant snapshot. Note that the source disk must - be in the same zone/region as the instant - snapshot to be created. This can be a full or - valid partial URL. For example, the following - are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_source_disk``. - source_disk_id (str): - [Output Only] The ID value of the disk used to create this - InstantSnapshot. This value may be used to determine whether - the InstantSnapshot was taken from the current or a previous - instance of a given disk name. + Attributes: + arp_caches (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsARPEntry]): + A list of InterconnectDiagnostics.ARPEntry + objects, describing individual neighbors + currently seen by the Google router in the ARP + cache for the Interconnect. + This will be empty when the Interconnect is not + bundled. + bundle_aggregation_type (str): + The aggregation type of the bundle interface. + Check the BundleAggregationType enum for the + list of possible values. - This field is a member of `oneof`_ ``_source_disk_id``. - status (str): - [Output Only] The status of the instantSnapshot. This can be - CREATING, DELETING, FAILED, or READY. Check the Status enum - for the list of possible values. + This field is a member of `oneof`_ ``_bundle_aggregation_type``. + bundle_operational_status (str): + The operational status of the bundle + interface. Check the BundleOperationalStatus + enum for the list of possible values. - This field is a member of `oneof`_ ``_status``. - zone (str): - [Output Only] URL of the zone where the instant snapshot - resides. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + This field is a member of `oneof`_ ``_bundle_operational_status``. + links (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkStatus]): + A list of InterconnectDiagnostics.LinkStatus + objects, describing the status for each link on + the Interconnect. + mac_address (str): + The MAC address of the Interconnect's bundle + interface. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_mac_address``. """ - class Architecture(proto.Enum): - r"""[Output Only] The architecture of the instant snapshot. Valid values - are ARM64 or X86_64. + class BundleAggregationType(proto.Enum): + r"""The aggregation type of the bundle interface. Values: - UNDEFINED_ARCHITECTURE (0): + UNDEFINED_BUNDLE_AGGREGATION_TYPE (0): A value indicating that the enum field is not set. - ARCHITECTURE_UNSPECIFIED (394750507): - Default value indicating Architecture is not - set. - ARM64 (62547450): - Machines with architecture ARM64 - X86_64 (425300551): - Machines with architecture X86_64 + BUNDLE_AGGREGATION_TYPE_LACP (27758925): + LACP is enabled. + BUNDLE_AGGREGATION_TYPE_STATIC (50678873): + LACP is disabled. """ - UNDEFINED_ARCHITECTURE = 0 - ARCHITECTURE_UNSPECIFIED = 394750507 - ARM64 = 62547450 - X86_64 = 425300551 + UNDEFINED_BUNDLE_AGGREGATION_TYPE = 0 + BUNDLE_AGGREGATION_TYPE_LACP = 27758925 + BUNDLE_AGGREGATION_TYPE_STATIC = 50678873 - class Status(proto.Enum): - r"""[Output Only] The status of the instantSnapshot. This can be - CREATING, DELETING, FAILED, or READY. + class BundleOperationalStatus(proto.Enum): + r"""The operational status of the bundle interface. Values: - UNDEFINED_STATUS (0): + UNDEFINED_BUNDLE_OPERATIONAL_STATUS (0): A value indicating that the enum field is not set. - CREATING (455564985): - InstantSnapshot creation is in progress. - DELETING (528602024): - InstantSnapshot is currently being deleted. - FAILED (455706685): - InstantSnapshot creation failed. - READY (77848963): - InstantSnapshot has been created - successfully. - UNAVAILABLE (413756464): - InstantSnapshot is currently unavailable and - cannot be used for Disk restoration + BUNDLE_OPERATIONAL_STATUS_DOWN (453842693): + If bundleAggregationType is LACP: LACP is not + established and/or all links in the bundle have + DOWN operational status. If + bundleAggregationType is STATIC: one or more + links in the bundle has DOWN operational status. + BUNDLE_OPERATIONAL_STATUS_UP (161366462): + If bundleAggregationType is LACP: LACP is + established and at least one link in the bundle + has UP operational status. If + bundleAggregationType is STATIC: all links in + the bundle (typically just one) have UP + operational status. """ - UNDEFINED_STATUS = 0 - CREATING = 455564985 - DELETING = 528602024 - FAILED = 455706685 - READY = 77848963 - UNAVAILABLE = 413756464 + UNDEFINED_BUNDLE_OPERATIONAL_STATUS = 0 + BUNDLE_OPERATIONAL_STATUS_DOWN = 453842693 + BUNDLE_OPERATIONAL_STATUS_UP = 161366462 - architecture: str = proto.Field( - proto.STRING, - number=302803283, - optional=True, - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - disk_size_gb: int = proto.Field( - proto.INT64, - number=316263735, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - label_fingerprint: str = proto.Field( - proto.STRING, - number=178124825, - optional=True, - ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, + arp_caches: MutableSequence[ + "InterconnectDiagnosticsARPEntry" + ] = proto.RepeatedField( + proto.MESSAGE, + number=414591761, + message="InterconnectDiagnosticsARPEntry", ) - name: str = proto.Field( + bundle_aggregation_type: str = proto.Field( proto.STRING, - number=3373707, + number=434939028, optional=True, ) - region: str = proto.Field( + bundle_operational_status: str = proto.Field( proto.STRING, - number=138946292, + number=106433500, optional=True, ) - resource_status: "InstantSnapshotResourceStatus" = proto.Field( + links: MutableSequence["InterconnectDiagnosticsLinkStatus"] = proto.RepeatedField( proto.MESSAGE, - number=249429315, - optional=True, - message="InstantSnapshotResourceStatus", - ) - satisfies_pzi: bool = proto.Field( - proto.BOOL, - number=480964257, - optional=True, - ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, - optional=True, + number=102977465, + message="InterconnectDiagnosticsLinkStatus", ) - self_link: str = proto.Field( + mac_address: str = proto.Field( proto.STRING, - number=456214797, + number=332540164, optional=True, ) - self_link_with_id: str = proto.Field( + + +class InterconnectDiagnosticsARPEntry(proto.Message): + r"""Describing the ARP neighbor entries seen on this link + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + ip_address (str): + The IP address of this ARP neighbor. + + This field is a member of `oneof`_ ``_ip_address``. + mac_address (str): + The MAC address of this ARP neighbor. + + This field is a member of `oneof`_ ``_mac_address``. + """ + + ip_address: str = proto.Field( proto.STRING, - number=44520962, + number=406272220, optional=True, ) - source_disk: str = proto.Field( + mac_address: str = proto.Field( proto.STRING, - number=451753793, + number=332540164, optional=True, ) - source_disk_id: str = proto.Field( + + +class InterconnectDiagnosticsLinkLACPStatus(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + google_system_id (str): + System ID of the port on Google's side of the + LACP exchange. + + This field is a member of `oneof`_ ``_google_system_id``. + neighbor_system_id (str): + System ID of the port on the neighbor's side + of the LACP exchange. + + This field is a member of `oneof`_ ``_neighbor_system_id``. + state (str): + The state of a LACP link, which can take one + of the following values: + + - ACTIVE: The link is configured and active + within the bundle. + - DETACHED: The link is not configured within + the bundle. This means that the rest of the + object should be empty. Check the State enum + for the list of possible values. + + This field is a member of `oneof`_ ``_state``. + """ + + class State(proto.Enum): + r"""The state of a LACP link, which can take one of the following + values: + + - ACTIVE: The link is configured and active within the + bundle. + - DETACHED: The link is not configured within the bundle. + This means that the rest of the object should be empty. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + The link is configured and active within the + bundle. + DETACHED (216562546): + The link is not configured within the bundle, + this means the rest of the object should be + empty. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + DETACHED = 216562546 + + google_system_id: str = proto.Field( proto.STRING, - number=454190809, + number=91210405, optional=True, ) - status: str = proto.Field( + neighbor_system_id: str = proto.Field( proto.STRING, - number=181260274, + number=343821342, optional=True, ) - zone: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=3744684, + number=109757585, optional=True, ) -class InstantSnapshotAggregatedList(proto.Message): +class InterconnectDiagnosticsLinkOpticalPower(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + state (str): + The status of the current value when compared to the warning + and alarm levels for the receiving or transmitting + transceiver. Possible states include: - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InstantSnapshotsScopedList]): - A list of InstantSnapshotsScopedList - resources. - kind (str): - [Output Only] Type of resource. Always - compute#instantSnapshotAggregatedList for aggregated lists - of instantSnapshots. + :: - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + - OK: The value has not crossed a warning threshold. + - LOW_WARNING: The value has crossed below the low + warning threshold. + - HIGH_WARNING: The value has + crossed above the high warning threshold. + - LOW_ALARM: The value has crossed below the low alarm + threshold. + - HIGH_ALARM: The value has crossed above the high alarm + threshold. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + Check the State enum for the list of possible values. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_state``. + value (float): + Value of the current receiving or + transmitting optical power, read in dBm. Take a + known good optical value, give it a 10% margin + and trigger warnings relative to that value. In + general, a -7dBm warning and a -11dBm alarm are + good optical value estimates for most links. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_value``. """ - @property - def raw_page(self): - return self + class State(proto.Enum): + r"""The status of the current value when compared to the warning and + alarm levels for the receiving or transmitting transceiver. Possible + states include: - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "InstantSnapshotsScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="InstantSnapshotsScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( + :: + + - OK: The value has not crossed a warning threshold. + - LOW_WARNING: The value has crossed below the low + warning threshold. + - HIGH_WARNING: The value has + crossed above the high warning threshold. + - LOW_ALARM: The value has crossed below the low alarm + threshold. + - HIGH_ALARM: The value has crossed above the high alarm + threshold. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + HIGH_ALARM (305363284): + The value has crossed above the high alarm + threshold. + HIGH_WARNING (220984799): + The value of the current optical power has + crossed above the high warning threshold. + LOW_ALARM (316659046): + The value of the current optical power has + crossed below the low alarm threshold. + LOW_WARNING (338793841): + The value of the current optical power has + crossed below the low warning threshold. + OK (2524): + The value of the current optical power has + not crossed a warning threshold. + """ + UNDEFINED_STATE = 0 + HIGH_ALARM = 305363284 + HIGH_WARNING = 220984799 + LOW_ALARM = 316659046 + LOW_WARNING = 338793841 + OK = 2524 + + state: str = proto.Field( proto.STRING, - number=456214797, + number=109757585, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + value: float = proto.Field( + proto.FLOAT, + number=111972721, optional=True, - message="Warning", ) -class InstantSnapshotList(proto.Message): - r"""Contains a list of InstantSnapshot resources. +class InterconnectDiagnosticsLinkStatus(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + arp_caches (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsARPEntry]): + A list of InterconnectDiagnostics.ARPEntry + objects, describing the ARP neighbor entries + seen on this link. This will be empty if the + link is bundled + circuit_id (str): + The unique ID for this link assigned during + turn up by Google. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstantSnapshot]): - A list of InstantSnapshot resources. - kind (str): - Type of resource. + This field is a member of `oneof`_ ``_circuit_id``. + google_demarc (str): + The Demarc address assigned by Google and + provided in the LoA. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_google_demarc``. + lacp_status (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkLACPStatus): - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_lacp_status``. + macsec (google.cloud.compute_v1beta.types.InterconnectDiagnosticsMacsecStatus): + Describes the status of MACsec encryption on + this link. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_macsec``. + operational_status (str): + The operational status of the link. + Check the OperationalStatus enum for the list of + possible values. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_operational_status``. + receiving_optical_power (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkOpticalPower): + An InterconnectDiagnostics.LinkOpticalPower + object, describing the current value and status + of the received light level. + + This field is a member of `oneof`_ ``_receiving_optical_power``. + transmitting_optical_power (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkOpticalPower): + An InterconnectDiagnostics.LinkOpticalPower + object, describing the current value and status + of the transmitted light level. + + This field is a member of `oneof`_ ``_transmitting_optical_power``. """ - @property - def raw_page(self): - return self + class OperationalStatus(proto.Enum): + r"""The operational status of the link. - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstantSnapshot"] = proto.RepeatedField( + Values: + UNDEFINED_OPERATIONAL_STATUS (0): + A value indicating that the enum field is not + set. + LINK_OPERATIONAL_STATUS_DOWN (281653885): + The interface is unable to communicate with + the remote end. + LINK_OPERATIONAL_STATUS_UP (305879862): + The interface has low level communication + with the remote end. + """ + UNDEFINED_OPERATIONAL_STATUS = 0 + LINK_OPERATIONAL_STATUS_DOWN = 281653885 + LINK_OPERATIONAL_STATUS_UP = 305879862 + + arp_caches: MutableSequence[ + "InterconnectDiagnosticsARPEntry" + ] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="InstantSnapshot", + number=414591761, + message="InterconnectDiagnosticsARPEntry", ) - kind: str = proto.Field( + circuit_id: str = proto.Field( proto.STRING, - number=3292052, + number=225180977, optional=True, ) - next_page_token: str = proto.Field( + google_demarc: str = proto.Field( proto.STRING, - number=79797525, + number=51084, optional=True, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + lacp_status: "InterconnectDiagnosticsLinkLACPStatus" = proto.Field( + proto.MESSAGE, + number=361210415, optional=True, + message="InterconnectDiagnosticsLinkLACPStatus", ) - warning: "Warning" = proto.Field( + macsec: "InterconnectDiagnosticsMacsecStatus" = proto.Field( proto.MESSAGE, - number=50704284, + number=528867490, optional=True, - message="Warning", + message="InterconnectDiagnosticsMacsecStatus", ) - - -class InstantSnapshotResourceStatus(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - storage_size_bytes (int): - [Output Only] The storage size of this instant snapshot. - - This field is a member of `oneof`_ ``_storage_size_bytes``. - """ - - storage_size_bytes: int = proto.Field( - proto.INT64, - number=387548913, + operational_status: str = proto.Field( + proto.STRING, + number=201070847, optional=True, ) - - -class InstantSnapshotsScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instant_snapshots (MutableSequence[google.cloud.compute_v1beta.types.InstantSnapshot]): - [Output Only] A list of instantSnapshots contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning which replaces the list - of instantSnapshots when the list is empty. - - This field is a member of `oneof`_ ``_warning``. - """ - - instant_snapshots: MutableSequence["InstantSnapshot"] = proto.RepeatedField( + receiving_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( proto.MESSAGE, - number=329637457, - message="InstantSnapshot", + number=244717279, + optional=True, + message="InterconnectDiagnosticsLinkOpticalPower", ) - warning: "Warning" = proto.Field( + transmitting_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( proto.MESSAGE, - number=50704284, + number=459431197, optional=True, - message="Warning", + message="InterconnectDiagnosticsLinkOpticalPower", ) -class Int64RangeMatch(proto.Message): - r"""HttpRouteRuleMatch criteria for field values that must stay - within the specified integer range. - +class InterconnectDiagnosticsMacsecStatus(proto.Message): + r"""Describes the status of MACsec encryption on the link. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - range_end (int): - The end of the range (exclusive) in signed - long integer format. + ckn (str): + Indicates the Connectivity Association Key + Name (CKN) currently being used if MACsec is + operational. - This field is a member of `oneof`_ ``_range_end``. - range_start (int): - The start of the range (inclusive) in signed - long integer format. + This field is a member of `oneof`_ ``_ckn``. + operational (bool): + Indicates whether or not MACsec is + operational on this link. - This field is a member of `oneof`_ ``_range_start``. + This field is a member of `oneof`_ ``_operational``. """ - range_end: int = proto.Field( - proto.INT64, - number=322439897, + ckn: str = proto.Field( + proto.STRING, + number=98566, optional=True, ) - range_start: int = proto.Field( - proto.INT64, - number=103333600, + operational: bool = proto.Field( + proto.BOOL, + number=129704914, optional=True, ) -class Interconnect(proto.Message): - r"""Represents an Interconnect resource. An Interconnect resource - is a dedicated connection between the Google Cloud network and - your on-premises network. For more information, read the - Dedicated Interconnect Overview. +class InterconnectGroup(proto.Message): + r"""An interconnect group resource allows customers to create, + analyze, and expand their redundant connections. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - aai_enabled (bool): - Enable or disable the application awareness - feature on this Cloud Interconnect. - - This field is a member of `oneof`_ ``_aai_enabled``. - admin_enabled (bool): - Administrative status of the interconnect. - When this is set to true, the Interconnect is - functional and can carry traffic. When set to - false, no packets can be carried over the - interconnect and no BGP routes are exchanged - over it. By default, the status is set to true. - - This field is a member of `oneof`_ ``_admin_enabled``. - application_aware_interconnect (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnect): - Configuration information for application - awareness on this Cloud Interconnect. + configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): - This field is a member of `oneof`_ ``_application_aware_interconnect``. - available_features (MutableSequence[str]): - [Output only] List of features available for this - Interconnect connection, which can take one of the following - values: - IF_MACSEC If present then the Interconnect - connection is provisioned on MACsec capable hardware ports. - If not present then the Interconnect connection is - provisioned on non-MACsec capable ports and MACsec isn't - supported and enabling MACsec fails. Check the - AvailableFeatures enum for the list of possible values. - circuit_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectCircuitInfo]): - [Output Only] A list of CircuitInfo objects, that describe - the individual circuits in this LAG. + This field is a member of `oneof`_ ``_configured``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. - customer_name (str): - Customer name, to put in the Letter of - Authorization as the party authorized to request - a crossconnect. - - This field is a member of `oneof`_ ``_customer_name``. description (str): An optional description of this resource. Provide this property when you create the resource. This field is a member of `oneof`_ ``_description``. - expected_outages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectOutageNotification]): - [Output Only] A list of outages expected for this - Interconnect. - google_ip_address (str): - [Output Only] IP address configured on the Google side of - the Interconnect link. This can be used only for ping tests. - - This field is a member of `oneof`_ ``_google_ip_address``. - google_reference_id (str): - [Output Only] Google reference ID to be used when raising - support tickets with Google or otherwise to debug backend - connectivity issues. + etag (str): + Opaque system-generated token that uniquely + identifies the configuration. If provided when + patching a configuration in update mode, the + provided token must match the current token or + the update is rejected. This provides a reliable + means of doing read-modify-write (optimistic + locking) as described by AIP 154. - This field is a member of `oneof`_ ``_google_reference_id``. + This field is a member of `oneof`_ ``_etag``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. - interconnect_attachments (MutableSequence[str]): - [Output Only] A list of the URLs of all - InterconnectAttachments configured to use this Interconnect. - interconnect_groups (MutableSequence[str]): - [Output Only] URLs of InterconnectGroups that include this - Interconnect. Order is arbitrary and items are unique. - interconnect_type (str): - Type of interconnect, which can take one of the following - values: - PARTNER: A partner-managed interconnection shared - between customers though a partner. - DEDICATED: A dedicated - physical interconnection with the customer. Note that a - value IT_PRIVATE has been deprecated in favor of DEDICATED. - Check the InterconnectType enum for the list of possible - values. + intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): - This field is a member of `oneof`_ ``_interconnect_type``. + This field is a member of `oneof`_ ``_intent``. + interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectGroupInterconnect]): + Interconnects in the InterconnectGroup. Keys + are arbitrary user-specified strings. Users are + encouraged, but not required, to use their + preferred format for resource links as keys. + Note that there are add-members and + remove-members methods in gcloud. The size of + this map is limited by an "Interconnects per + group" quota. kind (str): - [Output Only] Type of the resource. Always - compute#interconnect for interconnects. + Output only. [Output Only] Type of the resource. Always + compute#InterconnectGroup This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this Interconnect, which is essentially a hash - of the labels set used for optimistic locking. - The fingerprint is initially generated by - Compute Engine and changes after every request - to modify or update labels. You must always - provide an up-to-date fingerprint hash in order - to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - Interconnect. - - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. - Label values may be empty. - link_type (str): - Type of link requested, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR - optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR - optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with - LR4 optics. Note that this field indicates the speed of each - of the links in the bundle, not the speed of the entire - bundle. Check the LinkType enum for the list of possible - values. - - This field is a member of `oneof`_ ``_link_type``. - location (str): - URL of the InterconnectLocation object that - represents where this connection is to be - provisioned. - - This field is a member of `oneof`_ ``_location``. - macsec (google.cloud.compute_v1beta.types.InterconnectMacsec): - Configuration that enables Media Access - Control security (MACsec) on the Cloud - Interconnect connection between Google and your - on-premises router. - - This field is a member of `oneof`_ ``_macsec``. - macsec_enabled (bool): - Enable or disable MACsec on this Interconnect - connection. MACsec enablement fails if the - MACsec object is not specified. - - This field is a member of `oneof`_ ``_macsec_enabled``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -58683,300 +70605,35 @@ class Interconnect(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - noc_contact_email (str): - Email address to contact the customer NOC for - operations and maintenance notifications - regarding this Interconnect. If specified, this - will be used for notifications in addition to - all other forms described, such as Cloud - Monitoring logs alerting and Cloud - Notifications. This field is required for users - who sign up for Cloud Interconnect using - workforce identity federation. - - This field is a member of `oneof`_ ``_noc_contact_email``. - operational_status (str): - [Output Only] The current status of this Interconnect's - functionality, which can take one of the following values: - - OS_ACTIVE: A valid Interconnect, which is turned up and is - ready to use. Attachments may be provisioned on this - Interconnect. - OS_UNPROVISIONED: An Interconnect that has - not completed turnup. No attachments may be provisioned on - this Interconnect. - OS_UNDER_MAINTENANCE: An Interconnect - that is undergoing internal maintenance. No attachments may - be provisioned or updated on this Interconnect. Check the - OperationalStatus enum for the list of possible values. - - This field is a member of `oneof`_ ``_operational_status``. - peer_ip_address (str): - [Output Only] IP address configured on the customer side of - the Interconnect link. The customer should configure this IP - address during turnup when prompted by Google NOC. This can - be used only for ping tests. - - This field is a member of `oneof`_ ``_peer_ip_address``. - provisioned_link_count (int): - [Output Only] Number of links actually provisioned in this - interconnect. - - This field is a member of `oneof`_ ``_provisioned_link_count``. - remote_location (str): - Indicates that this is a Cross-Cloud - Interconnect. This field specifies the location - outside of Google's network that the - interconnect is connected to. - - This field is a member of `oneof`_ ``_remote_location``. - requested_features (MutableSequence[str]): - Optional. List of features requested for this Interconnect - connection, which can take one of the following values: - - IF_MACSEC If specified then the connection is created on - MACsec capable hardware ports. If not specified, the default - value is false, which allocates non-MACsec capable ports - first if available. This parameter can be provided only with - Interconnect INSERT. It isn't valid for Interconnect PATCH. - Check the RequestedFeatures enum for the list of possible - values. - requested_link_count (int): - Target number of physical links in the link - bundle, as requested by the customer. - - This field is a member of `oneof`_ ``_requested_link_count``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. + physical_structure (google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructure): - This field is a member of `oneof`_ ``_satisfies_pzs``. + This field is a member of `oneof`_ ``_physical_structure``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. - state (str): - [Output Only] The current state of Interconnect - functionality, which can take one of the following values: - - ACTIVE: The Interconnect is valid, turned up and ready to - use. Attachments may be provisioned on this Interconnect. - - UNPROVISIONED: The Interconnect has not completed turnup. No - attachments may be provisioned on this Interconnect. - - UNDER_MAINTENANCE: The Interconnect is undergoing internal - maintenance. No attachments may be provisioned or updated on - this Interconnect. Check the State enum for the list of - possible values. - - This field is a member of `oneof`_ ``_state``. - subzone (str): - Specific subzone in the InterconnectLocation - that represents where this connection is to be - provisioned. Check the Subzone enum for the list - of possible values. - - This field is a member of `oneof`_ ``_subzone``. - wire_groups (MutableSequence[str]): - [Output Only] A list of the URLs of all CrossSiteNetwork - WireGroups configured to use this Interconnect. The - Interconnect cannot be deleted if this list is non-empty. - """ - - class AvailableFeatures(proto.Enum): - r"""Additional supported values which may be not listed in the enum - directly due to technical reasons: IF_CROSS_SITE_NETWORK IF_MACSEC - - Values: - UNDEFINED_AVAILABLE_FEATURES (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_AVAILABLE_FEATURES = 0 - - class InterconnectType(proto.Enum): - r"""Type of interconnect, which can take one of the following values: - - PARTNER: A partner-managed interconnection shared between customers - though a partner. - DEDICATED: A dedicated physical interconnection - with the customer. Note that a value IT_PRIVATE has been deprecated - in favor of DEDICATED. - - Values: - UNDEFINED_INTERCONNECT_TYPE (0): - A value indicating that the enum field is not - set. - DEDICATED (258411983): - A dedicated physical interconnection with the - customer. - IT_PRIVATE (335677007): - [Deprecated] A private, physical interconnection with the - customer. - PARTNER (461924520): - A partner-managed interconnection shared - between customers via partner. - """ - UNDEFINED_INTERCONNECT_TYPE = 0 - DEDICATED = 258411983 - IT_PRIVATE = 335677007 - PARTNER = 461924520 - - class LinkType(proto.Enum): - r"""Type of link requested, which can take one of the following values: - - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note - that this field indicates the speed of each of the links in the - bundle, not the speed of the entire bundle. - - Values: - UNDEFINED_LINK_TYPE (0): - A value indicating that the enum field is not - set. - LINK_TYPE_ETHERNET_100G_LR (337672551): - 100G Ethernet, LR Optics. - LINK_TYPE_ETHERNET_10G_LR (236739749): - 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; - LINK_TYPE_ETHERNET_400G_LR4 (127023690): - 400G Ethernet, LR4 Optics. - """ - UNDEFINED_LINK_TYPE = 0 - LINK_TYPE_ETHERNET_100G_LR = 337672551 - LINK_TYPE_ETHERNET_10G_LR = 236739749 - LINK_TYPE_ETHERNET_400G_LR4 = 127023690 - - class OperationalStatus(proto.Enum): - r"""[Output Only] The current status of this Interconnect's - functionality, which can take one of the following values: - - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to - use. Attachments may be provisioned on this Interconnect. - - OS_UNPROVISIONED: An Interconnect that has not completed turnup. No - attachments may be provisioned on this Interconnect. - - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal - maintenance. No attachments may be provisioned or updated on this - Interconnect. - - Values: - UNDEFINED_OPERATIONAL_STATUS (0): - A value indicating that the enum field is not - set. - OS_ACTIVE (55721409): - The interconnect is valid, turned up, and - ready to use. Attachments may be provisioned on - this interconnect. - OS_UNPROVISIONED (239771840): - The interconnect has not completed turnup. No - attachments may be provisioned on this - interconnect. - """ - UNDEFINED_OPERATIONAL_STATUS = 0 - OS_ACTIVE = 55721409 - OS_UNPROVISIONED = 239771840 - - class RequestedFeatures(proto.Enum): - r"""Additional supported values which may be not listed in the enum - directly due to technical reasons: IF_CROSS_SITE_NETWORK IF_MACSEC - - Values: - UNDEFINED_REQUESTED_FEATURES (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_REQUESTED_FEATURES = 0 - - class State(proto.Enum): - r"""[Output Only] The current state of Interconnect functionality, which - can take one of the following values: - ACTIVE: The Interconnect is - valid, turned up and ready to use. Attachments may be provisioned on - this Interconnect. - UNPROVISIONED: The Interconnect has not - completed turnup. No attachments may be provisioned on this - Interconnect. - UNDER_MAINTENANCE: The Interconnect is undergoing - internal maintenance. No attachments may be provisioned or updated - on this Interconnect. - - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - The interconnect is valid, turned up, and - ready to use. Attachments may be provisioned on - this interconnect. - UNPROVISIONED (517333979): - The interconnect has not completed turnup. No - attachments may be provisioned on this - interconnect. - """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - UNPROVISIONED = 517333979 - - class Subzone(proto.Enum): - r"""Specific subzone in the InterconnectLocation that represents - where this connection is to be provisioned. - - Values: - UNDEFINED_SUBZONE (0): - A value indicating that the enum field is not - set. - SUBZONE_A (291575438): - Subzone A. - SUBZONE_B (291575439): - Subzone B. - """ - UNDEFINED_SUBZONE = 0 - SUBZONE_A = 291575438 - SUBZONE_B = 291575439 + """ - aai_enabled: bool = proto.Field( - proto.BOOL, - number=388780363, - optional=True, - ) - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, - optional=True, - ) - application_aware_interconnect: "InterconnectApplicationAwareInterconnect" = ( - proto.Field( - proto.MESSAGE, - number=429095966, - optional=True, - message="InterconnectApplicationAwareInterconnect", - ) - ) - available_features: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=496344307, - ) - circuit_infos: MutableSequence["InterconnectCircuitInfo"] = proto.RepeatedField( + configured: "InterconnectGroupConfigured" = proto.Field( proto.MESSAGE, - number=164839855, - message="InterconnectCircuitInfo", + number=295631422, + optional=True, + message="InterconnectGroupConfigured", ) creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - customer_name: str = proto.Field( - proto.STRING, - number=3665484, - optional=True, - ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - expected_outages: MutableSequence[ - "InterconnectOutageNotification" - ] = proto.RepeatedField( - proto.MESSAGE, - number=264484123, - message="InterconnectOutageNotification", - ) - google_ip_address: str = proto.Field( - proto.STRING, - number=443105954, - optional=True, - ) - google_reference_id: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=534944469, + number=3123477, optional=True, ) id: int = proto.Field( @@ -58984,1130 +70641,1023 @@ class Subzone(proto.Enum): number=3355, optional=True, ) - interconnect_attachments: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=425388415, - ) - interconnect_groups: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=237049509, + intent: "InterconnectGroupIntent" = proto.Field( + proto.MESSAGE, + number=426849948, + optional=True, + message="InterconnectGroupIntent", ) - interconnect_type: str = proto.Field( + interconnects: MutableMapping[ + str, "InterconnectGroupInterconnect" + ] = proto.MapField( proto.STRING, - number=515165259, - optional=True, + proto.MESSAGE, + number=520187301, + message="InterconnectGroupInterconnect", ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=178124825, + number=3373707, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, - ) - link_type: str = proto.Field( - proto.STRING, - number=523207775, + physical_structure: "InterconnectGroupPhysicalStructure" = proto.Field( + proto.MESSAGE, + number=195307531, optional=True, + message="InterconnectGroupPhysicalStructure", ) - location: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=290430901, + number=456214797, optional=True, ) - macsec: "InterconnectMacsec" = proto.Field( + + +class InterconnectGroupConfigured(proto.Message): + r"""[Output Only] The status of the group as configured. This has the + same structure as the operational field reported by the + OperationalStatus method, but does not take into account the + operational status of each resource. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + topology_capability (google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapability): + + This field is a member of `oneof`_ ``_topology_capability``. + """ + + topology_capability: "InterconnectGroupConfiguredTopologyCapability" = proto.Field( proto.MESSAGE, - number=528867490, - optional=True, - message="InterconnectMacsec", - ) - macsec_enabled: bool = proto.Field( - proto.BOOL, - number=194203812, - optional=True, - ) - name: str = proto.Field( - proto.STRING, - number=3373707, + number=144190696, optional=True, + message="InterconnectGroupConfiguredTopologyCapability", ) - noc_contact_email: str = proto.Field( - proto.STRING, - number=14072832, - optional=True, + + +class InterconnectGroupConfiguredTopologyCapability(proto.Message): + r"""[Output Only] How reliable this topology is configured to be, and + why this group does or does not meet the requirements for the + intended capability. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + intended_capability_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers]): + + supported_sla (str): + Check the SupportedSla enum for the list of + possible values. + + This field is a member of `oneof`_ ``_supported_sla``. + """ + + class SupportedSla(proto.Enum): + r""" + + Values: + UNDEFINED_SUPPORTED_SLA (0): + A value indicating that the enum field is not + set. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_SUPPORTED_SLA = 0 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + UNSPECIFIED = 526786327 + + intended_capability_blockers: MutableSequence[ + "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" + ] = proto.RepeatedField( + proto.MESSAGE, + number=531644140, + message="InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", ) - operational_status: str = proto.Field( + supported_sla: str = proto.Field( proto.STRING, - number=201070847, + number=59292183, optional=True, ) - peer_ip_address: str = proto.Field( + + +class InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers( + proto.Message +): + r"""[Output Only] Reasons why configuration.topologyCapability.sla + differs from intent.topologyCapability. This list is empty if and + only if those are the same. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + blocker_type (str): + Check the BlockerType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_blocker_type``. + documentation_link (str): + Output only. [Output Only] The url of Google Cloud public + documentation explaining this requirement. This is set for + every type of requirement. + + This field is a member of `oneof`_ ``_documentation_link``. + explanation (str): + Output only. [Output Only] A human-readable explanation of + this requirement and why it's not met. This is set for every + type of requirement. + + This field is a member of `oneof`_ ``_explanation``. + facilities (MutableSequence[str]): + Output only. [Output Only] Facilities used to explain this + blocker in more detail. Like + physicalStructure.metros.facilities.facility, this is a + numeric string like "5467". + interconnects (MutableSequence[str]): + Output only. [Output Only] Interconnects used to explain + this blocker in more detail. + metros (MutableSequence[str]): + Output only. [Output Only] Metros used to explain this + blocker in more detail. These are three-letter lowercase + strings like "iad". A blocker like INCOMPATIBLE_METROS will + specify the problematic metros in this field. + zones (MutableSequence[str]): + Output only. [Output Only] Zones used to explain this + blocker in more detail. Zone names are "zone1" and/or + "zone2". + """ + + class BlockerType(proto.Enum): + r""" + + Values: + UNDEFINED_BLOCKER_TYPE (0): + A value indicating that the enum field is not + set. + INCOMPATIBLE_METROS (290410432): + No description available. + NOT_AVAILABLE (140722205): + No description available. + NO_INTERCONNECTS (523549575): + No description available. + NO_INTERCONNECTS_IN_METRO_AND_ZONE (440966492): + No description available. + OTHER (75532016): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_BLOCKER_TYPE = 0 + INCOMPATIBLE_METROS = 290410432 + NOT_AVAILABLE = 140722205 + NO_INTERCONNECTS = 523549575 + NO_INTERCONNECTS_IN_METRO_AND_ZONE = 440966492 + OTHER = 75532016 + UNSPECIFIED = 526786327 + + blocker_type: str = proto.Field( proto.STRING, - number=207735769, - optional=True, - ) - provisioned_link_count: int = proto.Field( - proto.INT32, - number=410888565, + number=381194847, optional=True, ) - remote_location: str = proto.Field( + documentation_link: str = proto.Field( proto.STRING, - number=324388750, + number=93465183, optional=True, ) - requested_features: MutableSequence[str] = proto.RepeatedField( + explanation: str = proto.Field( proto.STRING, - number=461240814, - ) - requested_link_count: int = proto.Field( - proto.INT32, - number=45051387, - optional=True, - ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, + number=504745497, optional=True, ) - self_link: str = proto.Field( + facilities: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, + number=536683137, ) - state: str = proto.Field( + interconnects: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=109757585, - optional=True, + number=520187301, ) - subzone: str = proto.Field( + metros: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=280084972, - optional=True, + number=533067386, ) - wire_groups: MutableSequence[str] = proto.RepeatedField( + zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=40662734, + number=116085319, ) -class InterconnectApplicationAwareInterconnect(proto.Message): - r"""Configuration information for application awareness on this - Cloud Interconnect. +class InterconnectGroupIntent(proto.Message): + r"""The user's intent for this group. This is the only required + field besides the name that must be specified on group creation. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bandwidth_percentage_policy (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy): + topology_capability (str): + Check the TopologyCapability enum for the + list of possible values. - This field is a member of `oneof`_ ``_bandwidth_percentage_policy``. - profile_description (str): - Description for the application awareness - profile on this Cloud Interconnect. + This field is a member of `oneof`_ ``_topology_capability``. + """ - This field is a member of `oneof`_ ``_profile_description``. - shape_average_percentages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentage]): - Optional field to specify a list of shape - average percentages to be applied in conjunction - with StrictPriorityPolicy or - BandwidthPercentagePolicy. - strict_priority_policy (google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectStrictPriorityPolicy): + class TopologyCapability(proto.Enum): + r""" - This field is a member of `oneof`_ ``_strict_priority_policy``. - """ + Values: + UNDEFINED_TOPOLOGY_CAPABILITY (0): + A value indicating that the enum field is not + set. + NO_SLA (161460618): + No description available. + PRODUCTION_CRITICAL (470416485): + No description available. + PRODUCTION_NON_CRITICAL (117399223): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_TOPOLOGY_CAPABILITY = 0 + NO_SLA = 161460618 + PRODUCTION_CRITICAL = 470416485 + PRODUCTION_NON_CRITICAL = 117399223 + UNSPECIFIED = 526786327 - bandwidth_percentage_policy: "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" = proto.Field( - proto.MESSAGE, - number=187018857, - optional=True, - message="InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy", - ) - profile_description: str = proto.Field( + topology_capability: str = proto.Field( proto.STRING, - number=262813286, - optional=True, - ) - shape_average_percentages: MutableSequence[ - "InterconnectApplicationAwareInterconnectBandwidthPercentage" - ] = proto.RepeatedField( - proto.MESSAGE, - number=259857497, - message="InterconnectApplicationAwareInterconnectBandwidthPercentage", - ) - strict_priority_policy: "InterconnectApplicationAwareInterconnectStrictPriorityPolicy" = proto.Field( - proto.MESSAGE, - number=145083063, + number=144190696, optional=True, - message="InterconnectApplicationAwareInterconnectStrictPriorityPolicy", ) -class InterconnectApplicationAwareInterconnectBandwidthPercentage(proto.Message): - r"""Specify bandwidth percentages [1-100] for various traffic classes in - BandwidthPercentagePolicy. The sum of all percentages must equal - 100. All traffic classes must have a percentage value specified. - +class InterconnectGroupInterconnect(proto.Message): + r"""An Interconnect in this InterconnectGroup. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - percentage (int): - Bandwidth percentage for a specific traffic - class. - - This field is a member of `oneof`_ ``_percentage``. - traffic_class (str): - TrafficClass whose bandwidth percentage is - being specified. Check the TrafficClass enum for - the list of possible values. + interconnect (str): + The URL of an Interconnect in this group. All + Interconnects in the group are unique. - This field is a member of `oneof`_ ``_traffic_class``. + This field is a member of `oneof`_ ``_interconnect``. """ - class TrafficClass(proto.Enum): - r"""TrafficClass whose bandwidth percentage is being specified. - - Values: - UNDEFINED_TRAFFIC_CLASS (0): - A value indicating that the enum field is not - set. - TC1 (82850): - Traffic Class 1, corresponding to DSCP ranges - (0-7) 000xxx. - TC2 (82851): - Traffic Class 2, corresponding to DSCP ranges - (8-15) 001xxx. - TC3 (82852): - Traffic Class 3, corresponding to DSCP ranges - (16-23) 010xxx. - TC4 (82853): - Traffic Class 4, corresponding to DSCP ranges - (24-31) 011xxx. - TC5 (82854): - Traffic Class 5, corresponding to DSCP ranges - (32-47) 10xxxx. - TC6 (82855): - Traffic Class 6, corresponding to DSCP ranges - (48-63) 11xxxx. - """ - UNDEFINED_TRAFFIC_CLASS = 0 - TC1 = 82850 - TC2 = 82851 - TC3 = 82852 - TC4 = 82853 - TC5 = 82854 - TC6 = 82855 - - percentage: int = proto.Field( - proto.UINT32, - number=151909018, - optional=True, - ) - traffic_class: str = proto.Field( + interconnect: str = proto.Field( proto.STRING, - number=198180022, + number=224601230, optional=True, ) -class InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy(proto.Message): - r""" +class InterconnectGroupPhysicalStructure(proto.Message): + r"""[Output Only] An analysis of the physical layout of Interconnects in + this group. Every Interconnect in the group is shown once in this + structure. Attributes: - bandwidth_percentages (MutableSequence[google.cloud.compute_v1beta.types.InterconnectApplicationAwareInterconnectBandwidthPercentage]): - Specify bandwidth percentages for various - traffic classes for queuing type Bandwidth - Percent. + metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetros]): + """ - bandwidth_percentages: MutableSequence[ - "InterconnectApplicationAwareInterconnectBandwidthPercentage" + metros: MutableSequence[ + "InterconnectGroupPhysicalStructureMetros" ] = proto.RepeatedField( proto.MESSAGE, - number=233373323, - message="InterconnectApplicationAwareInterconnectBandwidthPercentage", + number=533067386, + message="InterconnectGroupPhysicalStructureMetros", ) -class InterconnectApplicationAwareInterconnectStrictPriorityPolicy(proto.Message): - r"""Specify configuration for StrictPriorityPolicy.""" +class InterconnectGroupPhysicalStructureMetros(proto.Message): + r"""[Output Only] The metros Interconnects in this group are in. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: + facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilities]): -class InterconnectAttachment(proto.Message): - r"""Represents an Interconnect Attachment (VLAN) resource. You - can use Interconnect attachments (VLANS) to connect your Virtual - Private Cloud networks to your on-premises networks through an - Interconnect. For more information, read Creating VLAN - Attachments. + metro (str): + Output only. [Output Only] The name of the metro, as a + three-letter lowercase string like "iad". This is the first + component of the location of Interconnects underneath this. + + This field is a member of `oneof`_ ``_metro``. + """ + + facilities: MutableSequence[ + "InterconnectGroupPhysicalStructureMetrosFacilities" + ] = proto.RepeatedField( + proto.MESSAGE, + number=536683137, + message="InterconnectGroupPhysicalStructureMetrosFacilities", + ) + metro: str = proto.Field( + proto.STRING, + number=103787801, + optional=True, + ) + + +class InterconnectGroupPhysicalStructureMetrosFacilities(proto.Message): + r"""[Output Only] The facilities Interconnects in this metro are present + in. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - admin_enabled (bool): - Determines whether this Attachment will carry packets. Not - present for PARTNER_PROVIDER. - - This field is a member of `oneof`_ ``_admin_enabled``. - attachment_group (str): - [Output Only] URL of the AttachmentGroup that includes this - Attachment. + facility (str): + Output only. [Output Only] The ID of this facility, as a + numeric string like "5467". This is the third component of + the location of Interconnects in this facility. - This field is a member of `oneof`_ ``_attachment_group``. - bandwidth (str): - Provisioned bandwidth capacity for the interconnect - attachment. For attachments of type DEDICATED, the user can - set the bandwidth. For attachments of type PARTNER, the - Google Partner that is operating the interconnect must set - the bandwidth. Output only for PARTNER type, mutable for - PARTNER_PROVIDER and DEDICATED, and can take one of the - following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 - Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 - Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 - Gbit/s - BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s - BPS_100G: - 100 Gbit/s Check the Bandwidth enum for the list of possible - values. + This field is a member of `oneof`_ ``_facility``. + zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilitiesZones]): - This field is a member of `oneof`_ ``_bandwidth``. - candidate_cloud_router_ip_address (str): - Single IPv4 address + prefix length to be configured on the - cloud router interface for this interconnect attachment. - - Both candidate_cloud_router_ip_address and - candidate_customer_router_ip_address fields must be set or - both must be unset. - Prefix length of both - candidate_cloud_router_ip_address and - candidate_customer_router_ip_address must be the same. - Max - prefix length is 31. + """ - This field is a member of `oneof`_ ``_candidate_cloud_router_ip_address``. - candidate_cloud_router_ipv6_address (str): - Single IPv6 address + prefix length to be configured on the - cloud router interface for this interconnect attachment. - - Both candidate_cloud_router_ipv6_address and - candidate_customer_router_ipv6_address fields must be set or - both must be unset. - Prefix length of both - candidate_cloud_router_ipv6_address and - candidate_customer_router_ipv6_address must be the same. - - Max prefix length is 126. + facility: str = proto.Field( + proto.STRING, + number=501116579, + optional=True, + ) + zones: MutableSequence[ + "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" + ] = proto.RepeatedField( + proto.MESSAGE, + number=116085319, + message="InterconnectGroupPhysicalStructureMetrosFacilitiesZones", + ) - This field is a member of `oneof`_ ``_candidate_cloud_router_ipv6_address``. - candidate_customer_router_ip_address (str): - Single IPv4 address + prefix length to be - configured on the customer router interface for - this interconnect attachment. - This field is a member of `oneof`_ ``_candidate_customer_router_ip_address``. - candidate_customer_router_ipv6_address (str): - Single IPv6 address + prefix length to be - configured on the customer router interface for - this interconnect attachment. +class InterconnectGroupPhysicalStructureMetrosFacilitiesZones(proto.Message): + r"""[Output Only] The zones that Interconnects in this facility are + present in. - This field is a member of `oneof`_ ``_candidate_customer_router_ipv6_address``. - candidate_ipv6_subnets (MutableSequence[str]): - This field is not available. - candidate_subnets (MutableSequence[str]): - Input only. Up to 16 candidate prefixes that - can be used to restrict the allocation of - cloudRouterIpAddress and customerRouterIpAddress - for this attachment. All prefixes must be within - link-local address space (169.254.0.0/16) and - must be /29 or shorter (/28, /27, etc). Google - will attempt to select an unused /29 from the - supplied candidate prefix(es). The request will - fail if all possible /29s are in use on Google's - edge. If not supplied, Google will randomly - select an unused /29 from all of link-local - space. - cloud_router_ip_address (str): - [Output Only] IPv4 address + prefix length to be configured - on Cloud Router Interface for this interconnect attachment. - This field is a member of `oneof`_ ``_cloud_router_ip_address``. - cloud_router_ipv6_address (str): - [Output Only] IPv6 address + prefix length to be configured - on Cloud Router Interface for this interconnect attachment. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_cloud_router_ipv6_address``. - cloud_router_ipv6_interface_id (str): - This field is not available. + Attributes: + interconnects (MutableSequence[str]): + Output only. [Output Only] URLs of Interconnects in this + redundancy group in the given metro, facility, and zone. + zone (str): + Output only. [Output Only] The name of the zone, either + "zone1" or "zone2". This is the second component of the + location of Interconnects in this facility. - This field is a member of `oneof`_ ``_cloud_router_ipv6_interface_id``. - configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): - [Output Only] Constraints for this attachment, if any. The - attachment does not work if these constraints are not met. + This field is a member of `oneof`_ ``_zone``. + """ - This field is a member of `oneof`_ ``_configuration_constraints``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + interconnects: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=520187301, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + optional=True, + ) - This field is a member of `oneof`_ ``_creation_timestamp``. - customer_router_ip_address (str): - [Output Only] IPv4 address + prefix length to be configured - on the customer router subinterface for this interconnect - attachment. - This field is a member of `oneof`_ ``_customer_router_ip_address``. - customer_router_ipv6_address (str): - [Output Only] IPv6 address + prefix length to be configured - on the customer router subinterface for this interconnect - attachment. +class InterconnectGroupsCreateMembers(proto.Message): + r""" - This field is a member of `oneof`_ ``_customer_router_ipv6_address``. - customer_router_ipv6_interface_id (str): - This field is not available. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_customer_router_ipv6_interface_id``. - dataplane_version (int): - [Output Only] Dataplane version for this - InterconnectAttachment. This field is only present for - Dataplane version 2 and higher. Absence of this field in the - API output indicates that the Dataplane is version 1. + Attributes: + intent_mismatch_behavior (str): + How to behave when + configured.topologyCapability.supportedSLA would + not equal intent.topologyCapability after this + call. Check the IntentMismatchBehavior enum for + the list of possible values. - This field is a member of `oneof`_ ``_dataplane_version``. - description (str): - An optional description of this resource. + This field is a member of `oneof`_ ``_intent_mismatch_behavior``. + interconnects (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput]): - This field is a member of `oneof`_ ``_description``. - edge_availability_domain (str): - Input only. Desired availability domain for the attachment. - Only available for type PARTNER, at creation time, and can - take one of the following values: - AVAILABILITY_DOMAIN_ANY - - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved - reliability, customers should configure a pair of - attachments, one per availability domain. The selected - availability domain will be provided to the Partner via the - pairing key, so that the provisioned circuit will lie in the - specified domain. If not specified, the value will default - to AVAILABILITY_DOMAIN_ANY. Check the EdgeAvailabilityDomain - enum for the list of possible values. + template_interconnect (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput): + Parameters for the Interconnects to create. - This field is a member of `oneof`_ ``_edge_availability_domain``. - encryption (str): - Indicates the user-supplied encryption option of this VLAN - attachment (interconnectAttachment). Can only be specified - at attachment creation for PARTNER or DEDICATED attachments. - Possible values are: - NONE - This is the default value, - which means that the VLAN attachment carries unencrypted - traffic. VMs are able to send traffic to, or receive traffic - from, such a VLAN attachment. - IPSEC - The VLAN attachment - carries only encrypted traffic that is encrypted by an IPsec - device, such as an HA VPN gateway or third-party IPsec VPN. - VMs cannot directly send traffic to, or receive traffic - from, such a VLAN attachment. To use *HA VPN over Cloud - Interconnect*, the VLAN attachment must be created with this - option. Check the Encryption enum for the list of possible - values. + This field is a member of `oneof`_ ``_template_interconnect``. + """ - This field is a member of `oneof`_ ``_encryption``. - google_reference_id (str): - [Output Only] Google reference ID, to be used when raising - support tickets with Google or otherwise to debug backend - connectivity issues. [Deprecated] This field is not used. + class IntentMismatchBehavior(proto.Enum): + r"""How to behave when configured.topologyCapability.supportedSLA + would not equal intent.topologyCapability after this call. - This field is a member of `oneof`_ ``_google_reference_id``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Values: + UNDEFINED_INTENT_MISMATCH_BEHAVIOR (0): + A value indicating that the enum field is not + set. + CREATE (385389820): + No description available. + REJECT (266102687): + No description available. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_INTENT_MISMATCH_BEHAVIOR = 0 + CREATE = 385389820 + REJECT = 266102687 + UNSPECIFIED = 526786327 - This field is a member of `oneof`_ ``_id``. - interconnect (str): - URL of the underlying Interconnect object - that this attachment's traffic will traverse - through. + intent_mismatch_behavior: str = proto.Field( + proto.STRING, + number=164408000, + optional=True, + ) + interconnects: MutableSequence[ + "InterconnectGroupsCreateMembersInterconnectInput" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520187301, + message="InterconnectGroupsCreateMembersInterconnectInput", + ) + template_interconnect: "InterconnectGroupsCreateMembersInterconnectInput" = ( + proto.Field( + proto.MESSAGE, + number=224745523, + optional=True, + message="InterconnectGroupsCreateMembersInterconnectInput", + ) + ) - This field is a member of `oneof`_ ``_interconnect``. - ipsec_internal_addresses (MutableSequence[str]): - A list of URLs of addresses that have been - reserved for the VLAN attachment. Used only for - the VLAN attachment that has the encryption - option as IPSEC. The addresses must be regional - internal IP address ranges. When creating an HA - VPN gateway over the VLAN attachment, if the - attachment is configured to use a regional - internal IP address, then the VPN gateway's IP - address is allocated from the IP address range - specified here. For example, if the HA VPN - gateway's interface 0 is paired to this VLAN - attachment, then a regional internal IP address - for the VPN gateway interface 0 will be - allocated from the IP address specified for this - VLAN attachment. If this field is not specified - when creating the VLAN attachment, then later on - when creating an HA VPN gateway on this VLAN - attachment, the HA VPN gateway's IP address is - allocated from the regional external IP address - pool. - kind (str): - [Output Only] Type of the resource. Always - compute#interconnectAttachment for interconnect attachments. - This field is a member of `oneof`_ ``_kind``. - label_fingerprint (str): - A fingerprint for the labels being applied to - this InterconnectAttachment, which is - essentially a hash of the labels set used for - optimistic locking. The fingerprint is initially - generated by Compute Engine and changes after - every request to modify or update labels. You - must always provide an up-to-date fingerprint - hash in order to update or change labels, - otherwise the request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve an - InterconnectAttachment. +class InterconnectGroupsCreateMembersInterconnectInput(proto.Message): + r"""LINT.IfChange - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. - Label values may be empty. - mtu (int): - Maximum Transmission Unit (MTU), in bytes, of - packets passing through this interconnect - attachment. Valid values are 1440, 1460, 1500, - and 8896. If not specified, the value will - default to 1440. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_mtu``. - name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + Attributes: + admin_enabled (bool): + Administrative status of the interconnect. + When this is set to true, the Interconnect is + functional and can carry traffic. When set to + false, no packets can be carried over the + interconnect and no BGP routes are exchanged + over it. By default, the status is set to true. - This field is a member of `oneof`_ ``_name``. - operational_status (str): - [Output Only] The current status of whether or not this - interconnect attachment is functional, which can take one of - the following values: - OS_ACTIVE: The attachment has been - turned up and is ready to use. - OS_UNPROVISIONED: The - attachment is not ready to use yet, because turnup is not - complete. Check the OperationalStatus enum for the list of - possible values. + This field is a member of `oneof`_ ``_admin_enabled``. + customer_name (str): + Customer name, to put in the Letter of + Authorization as the party authorized to request + a crossconnect. - This field is a member of `oneof`_ ``_operational_status``. - pairing_key (str): - [Output only for type PARTNER. Input only for - PARTNER_PROVIDER. Not present for DEDICATED]. The opaque - identifier of a PARTNER attachment used to initiate - provisioning with a selected partner. Of the form - "XXXXX/region/domain". + This field is a member of `oneof`_ ``_customer_name``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - This field is a member of `oneof`_ ``_pairing_key``. - partner_asn (int): - Optional BGP ASN for the router supplied by a Layer 3 - Partner if they configured BGP on behalf of the customer. - Output only for PARTNER type, input only for - PARTNER_PROVIDER, not available for DEDICATED. + This field is a member of `oneof`_ ``_description``. + facility (str): + A zone-free location to use for all + Interconnects created in this call, like + "iad-1234". - This field is a member of `oneof`_ ``_partner_asn``. - partner_metadata (google.cloud.compute_v1beta.types.InterconnectAttachmentPartnerMetadata): - Informational metadata about Partner attachments from - Partners to display to customers. Output only for PARTNER - type, mutable for PARTNER_PROVIDER, not available for - DEDICATED. + This field is a member of `oneof`_ ``_facility``. + interconnect_type (str): + Type of interconnect, which can take one of the following + values: - This field is a member of `oneof`_ ``_partner_metadata``. - private_interconnect_info (google.cloud.compute_v1beta.types.InterconnectAttachmentPrivateInfo): - [Output Only] Information specific to an - InterconnectAttachment. This property is populated if the - interconnect that this is attached to is of type DEDICATED. + :: - This field is a member of `oneof`_ ``_private_interconnect_info``. - region (str): - [Output Only] URL of the region where the regional - interconnect attachment resides. You must specify this field - as part of the HTTP request URL. It is not settable as a - field in the request body. + - PARTNER: A partner-managed interconnection shared between + customers though a partner. + - DEDICATED: A dedicated physical + interconnection with the customer. - This field is a member of `oneof`_ ``_region``. - remote_service (str): - [Output Only] If the attachment is on a Cross-Cloud - Interconnect connection, this field contains the - interconnect's remote location service provider. Example - values: "Amazon Web Services" "Microsoft Azure". The field - is set only for attachments on Cross-Cloud Interconnect - connections. Its value is copied from the - InterconnectRemoteLocation remoteService field. + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Check the InterconnectType enum for the list of + possible values. - This field is a member of `oneof`_ ``_remote_service``. - router (str): - URL of the Cloud Router to be used for - dynamic routing. This router must be in the same - region as this InterconnectAttachment. The - InterconnectAttachment will automatically - connect the Interconnect to the network & region - within which the Cloud Router is configured. + This field is a member of `oneof`_ ``_interconnect_type``. + link_type (str): + Type of link requested, which can take one of the following + values: - This field is a member of `oneof`_ ``_router``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. + :: - This field is a member of `oneof`_ ``_satisfies_pzs``. - self_link (str): - [Output Only] Server-defined URL for the resource. + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 + optics. - This field is a member of `oneof`_ ``_self_link``. - stack_type (str): - The stack type for this interconnect attachment to identify - whether the IPv6 feature is enabled or not. If not - specified, IPV4_ONLY will be used. This field can be both - set at interconnect attachments creation and update - interconnect attachment operations. Check the StackType enum - for the list of possible values. + Note that this field indicates the speed of each of the + links in the bundle, not the speed of the entire bundle. + Check the LinkType enum for the list of possible values. - This field is a member of `oneof`_ ``_stack_type``. - state (str): - [Output Only] The current state of this attachment's - functionality. Enum values ACTIVE and UNPROVISIONED are - shared by DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER - interconnect attachments, while enum values PENDING_PARTNER, - PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for - only PARTNER and PARTNER_PROVIDER interconnect attachments. - This state can take one of the following values: - ACTIVE: - The attachment has been turned up and is ready to use. - - UNPROVISIONED: The attachment is not ready to use yet, - because turnup is not complete. - PENDING_PARTNER: A - newly-created PARTNER attachment that has not yet been - configured on the Partner side. - PARTNER_REQUEST_RECEIVED: - A PARTNER attachment is in the process of provisioning after - a PARTNER_PROVIDER attachment was created that references - it. - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER - attachment that is waiting for a customer to activate it. - - DEFUNCT: The attachment was deleted externally and is no - longer functional. This could be because the associated - Interconnect was removed, or because the other side of a - Partner attachment was deleted. Check the State enum for the - list of possible values. + This field is a member of `oneof`_ ``_link_type``. + name (str): + Name of the Interconnects to be created. This must be + specified on the template and/or on each individual + interconnect. The name, if not empty, must be 1-63 + characters long, and comply with RFC1035. Specifically, any + nonempty name must be 1-63 characters long and match the + regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which + means the first character must be a lowercase letter, and + all following characters must be a dash, lowercase letter, + or digit, except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_state``. - subnet_length (int): - Input only. Length of the IPv4 subnet mask. - Allowed values: - 29 (default) - 30 The default - value is 29, except for Cross-Cloud Interconnect - connections that use an - InterconnectRemoteLocation with a - constraints.subnetLengthRange.min equal to 30. - For example, connections that use an Azure - remote location fall into this category. In - these cases, the default value is 30, and - requesting 29 returns an error. Where both 29 - and 30 are allowed, 29 is preferred, because it - gives Google Cloud Support more debugging - visibility. + This field is a member of `oneof`_ ``_name``. + noc_contact_email (str): + Email address to contact the customer NOC for + operations and maintenance notifications + regarding this Interconnect. If specified, this + will be used for notifications in addition to + all other forms described, such as Cloud + Monitoring logs alerting and Cloud + Notifications. This field is required for users + who sign up for Cloud Interconnect using + workforce identity federation. - This field is a member of `oneof`_ ``_subnet_length``. - type_ (str): - The type of interconnect attachment this is, which can take - one of the following values: - DEDICATED: an attachment to a - Dedicated Interconnect. - PARTNER: an attachment to a - Partner Interconnect, created by the customer. - - PARTNER_PROVIDER: an attachment to a Partner Interconnect, - created by the partner. Check the Type enum for the list of - possible values. + This field is a member of `oneof`_ ``_noc_contact_email``. + remote_location (str): + Indicates that this is a Cross-Cloud + Interconnect. This field specifies the location + outside of Google's network that the + interconnect is connected to. - This field is a member of `oneof`_ ``_type``. - vlan_tag8021q (int): - The IEEE 802.1Q VLAN tag for this attachment, - in the range 2-4093. Only specified at creation - time. + This field is a member of `oneof`_ ``_remote_location``. + requested_features (MutableSequence[str]): + Optional. List of features requested for this Interconnect + connection, which can take one of the following values: - This field is a member of `oneof`_ ``_vlan_tag8021q``. - """ + :: - class Bandwidth(proto.Enum): - r"""Provisioned bandwidth capacity for the interconnect attachment. For - attachments of type DEDICATED, the user can set the bandwidth. For - attachments of type PARTNER, the Google Partner that is operating - the interconnect must set the bandwidth. Output only for PARTNER - type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one - of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 Gbit/s - - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - - BPS_50G: 50 Gbit/s - BPS_100G: 100 Gbit/s + - IF_MACSEC: If specified, then the connection is created on MACsec + capable hardware ports. If not specified, non-MACsec capable ports will + also be considered. + - IF_CROSS_SITE_NETWORK: If specified, then the connection is created + exclusively for Cross-Site Networking. The connection can not be used for + Cross-Site Networking unless this feature is specified. - Values: - UNDEFINED_BANDWIDTH (0): - A value indicating that the enum field is not - set. - BPS_100G (49547952): - 100 Gbit/s - BPS_100M (49547958): - 100 Mbit/s - BPS_10G (278693006): - 10 Gbit/s - BPS_1G (355358448): - 1 Gbit/s - BPS_200M (49577749): - 200 Mbit/s - BPS_20G (278693967): - 20 Gbit/s - BPS_2G (355358479): - 2 Gbit/s - BPS_300M (49607540): - 300 Mbit/s - BPS_400M (49637331): - 400 Mbit/s - BPS_500M (49667122): - 500 Mbit/s - BPS_50G (278696850): - 50 Gbit/s - BPS_50M (278696856): - 50 Mbit/s - BPS_5G (355358572): - 5 Gbit/s - """ - UNDEFINED_BANDWIDTH = 0 - BPS_100G = 49547952 - BPS_100M = 49547958 - BPS_10G = 278693006 - BPS_1G = 355358448 - BPS_200M = 49577749 - BPS_20G = 278693967 - BPS_2G = 355358479 - BPS_300M = 49607540 - BPS_400M = 49637331 - BPS_500M = 49667122 - BPS_50G = 278696850 - BPS_50M = 278696856 - BPS_5G = 355358572 + Check the RequestedFeatures enum for the list of possible + values. + requested_link_count (int): + Target number of physical links in the link + bundle, as requested by the customer. - class EdgeAvailabilityDomain(proto.Enum): - r"""Input only. Desired availability domain for the attachment. Only - available for type PARTNER, at creation time, and can take one of - the following values: - AVAILABILITY_DOMAIN_ANY - - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved - reliability, customers should configure a pair of attachments, one - per availability domain. The selected availability domain will be - provided to the Partner via the pairing key, so that the provisioned - circuit will lie in the specified domain. If not specified, the - value will default to AVAILABILITY_DOMAIN_ANY. + This field is a member of `oneof`_ ``_requested_link_count``. + """ - Values: - UNDEFINED_EDGE_AVAILABILITY_DOMAIN (0): - A value indicating that the enum field is not - set. - AVAILABILITY_DOMAIN_1 (349552090): - No description available. - AVAILABILITY_DOMAIN_2 (349552091): - No description available. - AVAILABILITY_DOMAIN_ANY (375256373): - No description available. - """ - UNDEFINED_EDGE_AVAILABILITY_DOMAIN = 0 - AVAILABILITY_DOMAIN_1 = 349552090 - AVAILABILITY_DOMAIN_2 = 349552091 - AVAILABILITY_DOMAIN_ANY = 375256373 + class InterconnectType(proto.Enum): + r"""Type of interconnect, which can take one of the following values: - class Encryption(proto.Enum): - r"""Indicates the user-supplied encryption option of this VLAN - attachment (interconnectAttachment). Can only be specified at - attachment creation for PARTNER or DEDICATED attachments. Possible - values are: - NONE - This is the default value, which means that the - VLAN attachment carries unencrypted traffic. VMs are able to send - traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - - The VLAN attachment carries only encrypted traffic that is - encrypted by an IPsec device, such as an HA VPN gateway or - third-party IPsec VPN. VMs cannot directly send traffic to, or - receive traffic from, such a VLAN attachment. To use *HA VPN over - Cloud Interconnect*, the VLAN attachment must be created with this - option. + :: - Values: - UNDEFINED_ENCRYPTION (0): - A value indicating that the enum field is not - set. - IPSEC (69882282): - The interconnect attachment will carry only - encrypted traffic that is encrypted by an IPsec - device such as HA VPN gateway; VMs cannot - directly send traffic to or receive traffic from - such an interconnect attachment. To use HA VPN - over Cloud Interconnect, the interconnect - attachment must be created with this option. - NONE (2402104): - This is the default value, which means the - Interconnect Attachment will carry unencrypted - traffic. VMs will be able to send traffic to or - receive traffic from such interconnect - attachment. - """ - UNDEFINED_ENCRYPTION = 0 - IPSEC = 69882282 - NONE = 2402104 + - PARTNER: A partner-managed interconnection shared between + customers though a partner. + - DEDICATED: A dedicated physical + interconnection with the customer. - class OperationalStatus(proto.Enum): - r"""[Output Only] The current status of whether or not this interconnect - attachment is functional, which can take one of the following - values: - OS_ACTIVE: The attachment has been turned up and is ready - to use. - OS_UNPROVISIONED: The attachment is not ready to use yet, - because turnup is not complete. + Note that a value IT_PRIVATE has been deprecated in favor of + DEDICATED. Values: - UNDEFINED_OPERATIONAL_STATUS (0): + UNDEFINED_INTERCONNECT_TYPE (0): A value indicating that the enum field is not set. - OS_ACTIVE (55721409): - Indicates that attachment has been turned up - and is ready to use. - OS_UNPROVISIONED (239771840): - Indicates that attachment is not ready to use - yet, because turnup is not complete. + DEDICATED (258411983): + A dedicated physical interconnection with the + customer. + IT_PRIVATE (335677007): + [Deprecated] A private, physical interconnection with the + customer. + PARTNER (461924520): + A partner-managed interconnection shared + between customers via partner. """ - UNDEFINED_OPERATIONAL_STATUS = 0 - OS_ACTIVE = 55721409 - OS_UNPROVISIONED = 239771840 + UNDEFINED_INTERCONNECT_TYPE = 0 + DEDICATED = 258411983 + IT_PRIVATE = 335677007 + PARTNER = 461924520 - class StackType(proto.Enum): - r"""The stack type for this interconnect attachment to identify whether - the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will - be used. This field can be both set at interconnect attachments - creation and update interconnect attachment operations. + class LinkType(proto.Enum): + r"""Type of link requested, which can take one of the following values: - Values: - UNDEFINED_STACK_TYPE (0): - A value indicating that the enum field is not - set. - IPV4_IPV6 (22197249): - The interconnect attachment can have both - IPv4 and IPv6 addresses. - IPV4_ONLY (22373798): - The interconnect attachment will only be - assigned IPv4 addresses. - """ - UNDEFINED_STACK_TYPE = 0 - IPV4_IPV6 = 22197249 - IPV4_ONLY = 22373798 + :: - class State(proto.Enum): - r"""[Output Only] The current state of this attachment's functionality. - Enum values ACTIVE and UNPROVISIONED are shared by - DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER interconnect - attachments, while enum values PENDING_PARTNER, - PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only - PARTNER and PARTNER_PROVIDER interconnect attachments. This state - can take one of the following values: - ACTIVE: The attachment has - been turned up and is ready to use. - UNPROVISIONED: The attachment - is not ready to use yet, because turnup is not complete. - - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet - been configured on the Partner side. - PARTNER_REQUEST_RECEIVED: A - PARTNER attachment is in the process of provisioning after a - PARTNER_PROVIDER attachment was created that references it. - - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER attachment that is - waiting for a customer to activate it. - DEFUNCT: The attachment was - deleted externally and is no longer functional. This could be - because the associated Interconnect was removed, or because the - other side of a Partner attachment was deleted. + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 + optics. + + Note that this field indicates the speed of each of the links in the + bundle, not the speed of the entire bundle. Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - Indicates that attachment has been turned up - and is ready to use. - DEFUNCT (115891759): - The attachment was deleted externally and is - no longer functional. This could be because the - associated Interconnect was wiped out, or - because the other side of a Partner attachment - was deleted. - PARTNER_REQUEST_RECEIVED (513587304): - A PARTNER attachment is in the process of provisioning after - a PARTNER_PROVIDER attachment was created that references - it. - PENDING_CUSTOMER (167494054): - PARTNER or PARTNER_PROVIDER attachment that is waiting for - the customer to activate. - PENDING_PARTNER (387890656): - A newly created PARTNER attachment that has - not yet been configured on the Partner side. - STATE_UNSPECIFIED (470755401): - No description available. - UNPROVISIONED (517333979): - Indicates that attachment is not ready to use - yet, because turnup is not complete. + UNDEFINED_LINK_TYPE (0): + A value indicating that the enum field is not + set. + LINK_TYPE_ETHERNET_100G_LR (337672551): + 100G Ethernet, LR Optics. + LINK_TYPE_ETHERNET_10G_LR (236739749): + 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; + LINK_TYPE_ETHERNET_400G_LR4 (127023690): + 400G Ethernet, LR4 Optics. """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - DEFUNCT = 115891759 - PARTNER_REQUEST_RECEIVED = 513587304 - PENDING_CUSTOMER = 167494054 - PENDING_PARTNER = 387890656 - STATE_UNSPECIFIED = 470755401 - UNPROVISIONED = 517333979 + UNDEFINED_LINK_TYPE = 0 + LINK_TYPE_ETHERNET_100G_LR = 337672551 + LINK_TYPE_ETHERNET_10G_LR = 236739749 + LINK_TYPE_ETHERNET_400G_LR4 = 127023690 - class Type(proto.Enum): - r"""The type of interconnect attachment this is, which can take one of - the following values: - DEDICATED: an attachment to a Dedicated - Interconnect. - PARTNER: an attachment to a Partner Interconnect, - created by the customer. - PARTNER_PROVIDER: an attachment to a - Partner Interconnect, created by the partner. + class RequestedFeatures(proto.Enum): + r""" Values: - UNDEFINED_TYPE (0): + UNDEFINED_REQUESTED_FEATURES (0): A value indicating that the enum field is not set. - DEDICATED (258411983): - Attachment to a dedicated interconnect. - PARTNER (461924520): - Attachment to a partner interconnect, created - by the customer. - PARTNER_PROVIDER (483261352): - Attachment to a partner interconnect, created - by the partner. + IF_CROSS_SITE_NETWORK (469111095): + Cross-Site Networking + IF_L2_FORWARDING (125563860): + L2 Interconnect Attachment Forwarding + IF_MACSEC (396279300): + Media Access Control security (MACsec) """ - UNDEFINED_TYPE = 0 - DEDICATED = 258411983 - PARTNER = 461924520 - PARTNER_PROVIDER = 483261352 + UNDEFINED_REQUESTED_FEATURES = 0 + IF_CROSS_SITE_NETWORK = 469111095 + IF_L2_FORWARDING = 125563860 + IF_MACSEC = 396279300 admin_enabled: bool = proto.Field( proto.BOOL, number=445675089, optional=True, ) - attachment_group: str = proto.Field( - proto.STRING, - number=63442019, - optional=True, - ) - bandwidth: str = proto.Field( - proto.STRING, - number=181715121, - optional=True, - ) - candidate_cloud_router_ip_address: str = proto.Field( - proto.STRING, - number=311379276, - optional=True, - ) - candidate_cloud_router_ipv6_address: str = proto.Field( - proto.STRING, - number=417499660, - optional=True, - ) - candidate_customer_router_ip_address: str = proto.Field( + customer_name: str = proto.Field( proto.STRING, - number=339113389, + number=3665484, optional=True, ) - candidate_customer_router_ipv6_address: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=226436653, + number=422937596, optional=True, ) - candidate_ipv6_subnets: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=70682522, - ) - candidate_subnets: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=237842938, - ) - cloud_router_ip_address: str = proto.Field( + facility: str = proto.Field( proto.STRING, - number=287392776, + number=501116579, optional=True, ) - cloud_router_ipv6_address: str = proto.Field( + interconnect_type: str = proto.Field( proto.STRING, - number=451922376, + number=515165259, optional=True, ) - cloud_router_ipv6_interface_id: str = proto.Field( + link_type: str = proto.Field( proto.STRING, - number=521282701, + number=523207775, optional=True, ) - configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = ( - proto.Field( - proto.MESSAGE, - number=179681389, - optional=True, - message="InterconnectAttachmentConfigurationConstraints", - ) - ) - creation_timestamp: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=30525366, + number=3373707, optional=True, ) - customer_router_ip_address: str = proto.Field( + noc_contact_email: str = proto.Field( proto.STRING, - number=332475761, + number=14072832, optional=True, ) - customer_router_ipv6_address: str = proto.Field( + remote_location: str = proto.Field( proto.STRING, - number=290127089, + number=324388750, optional=True, ) - customer_router_ipv6_interface_id: str = proto.Field( + requested_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=380994308, - optional=True, + number=461240814, ) - dataplane_version: int = proto.Field( + requested_link_count: int = proto.Field( proto.INT32, - number=34920075, + number=45051387, optional=True, ) - description: str = proto.Field( - proto.STRING, - number=422937596, + + +class InterconnectGroupsCreateMembersRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + request (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembers): + + This field is a member of `oneof`_ ``_request``. + """ + + request: "InterconnectGroupsCreateMembers" = proto.Field( + proto.MESSAGE, + number=21951119, optional=True, + message="InterconnectGroupsCreateMembers", ) - edge_availability_domain: str = proto.Field( + + +class InterconnectGroupsGetOperationalStatusResponse(proto.Message): + r"""Response for the + InterconnectGroupsGetOperationalStatusResponse. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + result (google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatus): + + This field is a member of `oneof`_ ``_result``. + """ + + etag: str = proto.Field( proto.STRING, - number=71289510, + number=3123477, optional=True, ) - encryption: str = proto.Field( - proto.STRING, - number=97980291, + result: "InterconnectGroupsOperationalStatus" = proto.Field( + proto.MESSAGE, + number=139315229, optional=True, + message="InterconnectGroupsOperationalStatus", ) - google_reference_id: str = proto.Field( + + +class InterconnectGroupsListResponse(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroup]): + A list of InterconnectGroup resources. + kind (str): + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + [Output Only] Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=534944469, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, + number=3123477, optional=True, ) - interconnect: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=224601230, + number=3355, optional=True, ) - ipsec_internal_addresses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=407648565, + items: MutableSequence["InterconnectGroup"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InterconnectGroup", ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint: str = proto.Field( - proto.STRING, - number=178124825, - optional=True, - ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, - ) - mtu: int = proto.Field( - proto.INT32, - number=108462, - optional=True, - ) - name: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=3373707, + number=79797525, optional=True, ) - operational_status: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=201070847, + number=456214797, optional=True, ) - pairing_key: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=439695464, - optional=True, - ) - partner_asn: int = proto.Field( - proto.INT64, - number=438166149, - optional=True, + number=243372063, ) - partner_metadata: "InterconnectAttachmentPartnerMetadata" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=65908934, + number=50704284, optional=True, - message="InterconnectAttachmentPartnerMetadata", + message="Warning", ) - private_interconnect_info: "InterconnectAttachmentPrivateInfo" = proto.Field( + + +class InterconnectGroupsOperationalStatus(proto.Message): + r"""Request to get the status of the interconnect group with + extra detail. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + Output only. The configuration analysis, as + returned by Get. + + This field is a member of `oneof`_ ``_configured``. + group_status (str): + Output only. Summarizes the status of the + group. Check the GroupStatus enum for the list + of possible values. + + This field is a member of `oneof`_ ``_group_status``. + intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): + Output only. The intent of the resource, as + returned by Get. + + This field is a member of `oneof`_ ``_intent``. + interconnect_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatusInterconnectStatus]): + + operational (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + Output only. The operational state of the + group, including only active Interconnects. + + This field is a member of `oneof`_ ``_operational``. + """ + + class GroupStatus(proto.Enum): + r"""Output only. Summarizes the status of the group. + + Values: + UNDEFINED_GROUP_STATUS (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + No description available. + FULLY_DOWN (255514647): + No description available. + FULLY_UP (504176464): + No description available. + GROUPS_STATUS_UNSPECIFIED (261932693): + No description available. + """ + UNDEFINED_GROUP_STATUS = 0 + DEGRADED = 396890926 + FULLY_DOWN = 255514647 + FULLY_UP = 504176464 + GROUPS_STATUS_UNSPECIFIED = 261932693 + + configured: "InterconnectGroupConfigured" = proto.Field( proto.MESSAGE, - number=237270531, + number=295631422, optional=True, - message="InterconnectAttachmentPrivateInfo", + message="InterconnectGroupConfigured", ) - region: str = proto.Field( + group_status: str = proto.Field( proto.STRING, - number=138946292, + number=338778546, optional=True, ) - remote_service: str = proto.Field( - proto.STRING, - number=391954364, + intent: "InterconnectGroupIntent" = proto.Field( + proto.MESSAGE, + number=426849948, optional=True, + message="InterconnectGroupIntent", ) - router: str = proto.Field( - proto.STRING, - number=148608841, - optional=True, + interconnect_statuses: MutableSequence[ + "InterconnectGroupsOperationalStatusInterconnectStatus" + ] = proto.RepeatedField( + proto.MESSAGE, + number=446756017, + message="InterconnectGroupsOperationalStatusInterconnectStatus", ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, + operational: "InterconnectGroupConfigured" = proto.Field( + proto.MESSAGE, + number=129704914, optional=True, + message="InterconnectGroupConfigured", ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + + +class InterconnectGroupsOperationalStatusInterconnectStatus(proto.Message): + r"""The status of one Interconnect in the group. The order is + arbitrary. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + admin_enabled (bool): + Output only. Whether the Interconnect is + enabled. + + This field is a member of `oneof`_ ``_admin_enabled``. + diagnostics (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + Output only. The diagnostics of the + Interconnect, as returned by the existing + get-diagnostics method. + + This field is a member of `oneof`_ ``_diagnostics``. + interconnect (str): + Output only. The URL of the Interconnect + being described. + + This field is a member of `oneof`_ ``_interconnect``. + is_active (str): + Output only. Whether this interconnect is + participating in the redundant configuration. + Check the IsActive enum for the list of possible + values. + + This field is a member of `oneof`_ ``_is_active``. + """ + + class IsActive(proto.Enum): + r"""Output only. Whether this interconnect is participating in + the redundant configuration. + + Values: + UNDEFINED_IS_ACTIVE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + No description available. + INACTIVE (270421099): + No description available. + IS_ACTIVE_UNSPECIFIED (274948243): + No description available. + """ + UNDEFINED_IS_ACTIVE = 0 + ACTIVE = 314733318 + INACTIVE = 270421099 + IS_ACTIVE_UNSPECIFIED = 274948243 + + admin_enabled: bool = proto.Field( + proto.BOOL, + number=445675089, optional=True, ) - stack_type: str = proto.Field( - proto.STRING, - number=425908881, + diagnostics: "InterconnectDiagnostics" = proto.Field( + proto.MESSAGE, + number=333355436, optional=True, + message="InterconnectDiagnostics", ) - state: str = proto.Field( + interconnect: str = proto.Field( proto.STRING, - number=109757585, - optional=True, - ) - subnet_length: int = proto.Field( - proto.INT32, - number=279831048, + number=224601230, optional=True, ) - type_: str = proto.Field( + is_active: str = proto.Field( proto.STRING, - number=3575610, - optional=True, - ) - vlan_tag8021q: int = proto.Field( - proto.INT32, - number=119927836, + number=114830267, optional=True, ) -class InterconnectAttachmentAggregatedList(proto.Message): - r""" +class InterconnectList(proto.Message): + r"""Response to the list request, and contains a list of + interconnects. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -60117,30 +71667,27 @@ class InterconnectAttachmentAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentsScopedList]): - A list of InterconnectAttachmentsScopedList - resources. + items (MutableSequence[google.cloud.compute_v1beta.types.Interconnect]): + A list of Interconnect resources. kind (str): - [Output Only] Type of resource. Always - compute#interconnectAttachmentAggregatedList for aggregated - lists of interconnect attachments. + Output only. [Output Only] Type of resource. + Alwayscompute#interconnectList for lists of interconnects. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -60156,11 +71703,10 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableMapping[str, "InterconnectAttachmentsScopedList"] = proto.MapField( - proto.STRING, + items: MutableSequence["Interconnect"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InterconnectAttachmentsScopedList", + message="Interconnect", ) kind: str = proto.Field( proto.STRING, @@ -60171,232 +71717,338 @@ def raw_page(self): proto.STRING, number=79797525, optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", - ) - - -class InterconnectAttachmentConfigurationConstraints(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - bgp_md5 (str): - [Output Only] Whether the attachment's BGP session - requires/allows/disallows BGP MD5 authentication. This can - take one of the following values: MD5_OPTIONAL, - MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud - Interconnect connection to a remote cloud provider that - requires BGP MD5 authentication has the - interconnectRemoteLocation - attachment_configuration_constraints.bgp_md5 field set to - MD5_REQUIRED, and that property is propagated to the - attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an - error is returned if MD5 is requested. Check the BgpMd5 enum - for the list of possible values. - - This field is a member of `oneof`_ ``_bgp_md5``. - bgp_peer_asn_ranges (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange]): - [Output Only] List of ASN ranges that the remote location is - known to support. Formatted as an array of inclusive ranges - {min: min-value, max: max-value}. For example, [{min: 123, - max: 123}, {min: 64512, max: 65534}] allows the peer ASN to - be 123 or anything in the range 64512-65534. This field is - only advisory. Although the API accepts other ranges, these - are the ranges that we recommend. - """ - - class BgpMd5(proto.Enum): - r"""[Output Only] Whether the attachment's BGP session - requires/allows/disallows BGP MD5 authentication. This can take one - of the following values: MD5_OPTIONAL, MD5_REQUIRED, - MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection - to a remote cloud provider that requires BGP MD5 authentication has - the interconnectRemoteLocation - attachment_configuration_constraints.bgp_md5 field set to - MD5_REQUIRED, and that property is propagated to the attachment. - Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if - MD5 is requested. - - Values: - UNDEFINED_BGP_MD5 (0): - A value indicating that the enum field is not - set. - MD5_OPTIONAL (532156673): - MD5_OPTIONAL: BGP MD5 authentication is supported and can - optionally be configured. - MD5_REQUIRED (218034496): - MD5_REQUIRED: BGP MD5 authentication must be configured. - MD5_UNSUPPORTED (86962388): - MD5_UNSUPPORTED: BGP MD5 authentication must not be - configured - """ - UNDEFINED_BGP_MD5 = 0 - MD5_OPTIONAL = 532156673 - MD5_REQUIRED = 218034496 - MD5_UNSUPPORTED = 86962388 - - bgp_md5: str = proto.Field( + ) + self_link: str = proto.Field( proto.STRING, - number=373093386, + number=456214797, optional=True, ) - bgp_peer_asn_ranges: MutableSequence[ - "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" - ] = proto.RepeatedField( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=475946370, - message="InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", + number=50704284, + optional=True, + message="Warning", ) -class InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange(proto.Message): - r""" +class InterconnectLocation(proto.Message): + r"""Represents an Interconnect Attachment (VLAN) Location + resource. + You can use this resource to find location details about an + Interconnect attachment (VLAN). For more information about + interconnect attachments, read Creating VLAN Attachments. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - max_ (int): + address (str): + Output only. [Output Only] The postal address of the Point + of Presence, each line in the address is separated by a + newline character. - This field is a member of `oneof`_ ``_max``. - min_ (int): + This field is a member of `oneof`_ ``_address``. + availability_zone (str): + [Output Only] Availability zone for this + InterconnectLocation. Within a metropolitan area (metro), + maintenance will not be simultaneously scheduled in more + than one availability zone. Example: "zone1" or "zone2". - This field is a member of `oneof`_ ``_min``. - """ + This field is a member of `oneof`_ ``_availability_zone``. + available_features (MutableSequence[str]): + [Output only] List of features available at this + InterconnectLocation, which can take one of the following + values: - max_: int = proto.Field( - proto.UINT32, - number=107876, - optional=True, - ) - min_: int = proto.Field( - proto.UINT32, - number=108114, - optional=True, - ) + :: + - IF_MACSEC + - IF_CROSS_SITE_NETWORK -class InterconnectAttachmentGroup(proto.Message): - r"""An interconnect attachment group resource allows customers to - create, analyze, and expand highly available deployments. + Check the AvailableFeatures enum for the list of possible + values. + available_link_types (MutableSequence[str]): + [Output only] List of link types available at this + InterconnectLocation, which can take one of the following + values: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + - LINK_TYPE_ETHERNET_10G_LR + - LINK_TYPE_ETHERNET_100G_LR + - LINK_TYPE_ETHERNET_400G_LR4 - Attributes: - attachments (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectAttachmentGroupAttachment]): - Attachments in the AttachmentGroup. Keys are - arbitrary user-specified strings. Users are - encouraged, but not required, to use their - preferred format for resource links as keys. - Note that there are add-members and - remove-members methods in gcloud. The size of - this map is limited by an "Attachments per - group" quota. - configured (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): + Check the AvailableLinkTypes enum for the list of possible + values. + city (str): + [Output Only] Metropolitan area designator that indicates + which city an interconnect is located. For example: + "Chicago, IL", "Amsterdam, Netherlands". - This field is a member of `oneof`_ ``_configured``. + This field is a member of `oneof`_ ``_city``. + continent (str): + [Output Only] Continent for this location, which can take + one of the following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA + + Check the Continent enum for the list of possible values. + + This field is a member of `oneof`_ ``_continent``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. + cross_site_interconnect_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationCrossSiteInterconnectInfo]): + [Output Only] A list of + InterconnectLocation.CrossSiteInterconnectInfo objects, that + describe where Cross-Site Interconnect wires may connect to + from this location and associated connection parameters. + Cross-Site Interconnect isn't allowed to locations which are + not listed. description (str): - An optional description of this resource. - Provide this property when you create the + Output only. [Output Only] An optional description of the resource. This field is a member of `oneof`_ ``_description``. - etag (str): - Opaque system-generated token that uniquely - identifies the configuration. If provided when - patching a configuration in update mode, the - provided token must match the current token or - the update is rejected. This provides a reliable - means of doing read-modify-write (optimistic - locking) as described by AIP 154. + facility_provider (str): + Output only. [Output Only] The name of the provider for this + facility (e.g., EQUINIX). - This field is a member of `oneof`_ ``_etag``. + This field is a member of `oneof`_ ``_facility_provider``. + facility_provider_facility_id (str): + Output only. [Output Only] A provider-assigned Identifier + for this facility (e.g., Ashburn-DC1). + + This field is a member of `oneof`_ ``_facility_provider_facility_id``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - intent (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupIntent): - - This field is a member of `oneof`_ ``_intent``. - interconnect_group (str): - The URL of an InterconnectGroup that groups - these Attachments' Interconnects. Customers do - not need to set this unless directed by Google - Support. - - This field is a member of `oneof`_ ``_interconnect_group``. kind (str): - [Output Only] Type of the resource. Always - compute#interconnectAttachmentGroup. + Output only. [Output Only] Type of the resource. + Alwayscompute#interconnectLocation for interconnect + locations. This field is a member of `oneof`_ ``_kind``. - logical_structure (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructure): - - This field is a member of `oneof`_ ``_logical_structure``. name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + Output only. [Output Only] Name of the resource. This field is a member of `oneof`_ ``_name``. + peeringdb_facility_id (str): + Output only. [Output Only] The peeringdb identifier for this + facility (corresponding with a netfac type in peeringdb). + + This field is a member of `oneof`_ ``_peeringdb_facility_id``. + region_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationRegionInfo]): + Output only. [Output Only] A list of + InterconnectLocation.RegionInfo objects, that describe + parameters pertaining to the relation between this + InterconnectLocation and various Google Cloud regions. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. + single_region_production_critical_peer_locations (MutableSequence[str]): + Output only. [Output Only] URLs of the other locations that + can pair up with this location to support Single-Region + 99.99% SLA. E.g. iad-zone1-1 and iad-zone2-5467 are + Single-Region 99.99% peer locations of each other. + status (str): + [Output Only] The status of this InterconnectLocation, which + can take one of the following values: + + :: + + - CLOSED: The InterconnectLocation is closed and is unavailable for + provisioning new Interconnects. + - AVAILABLE: The InterconnectLocation is available for provisioning new + Interconnects. + + Check the Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. + supports_pzs (bool): + Output only. [Output Only] Reserved for future use. + + This field is a member of `oneof`_ ``_supports_pzs``. """ - attachments: MutableMapping[ - str, "InterconnectAttachmentGroupAttachment" - ] = proto.MapField( + class AvailableFeatures(proto.Enum): + r""" + + Values: + UNDEFINED_AVAILABLE_FEATURES (0): + A value indicating that the enum field is not + set. + IF_CROSS_SITE_NETWORK (469111095): + Cross-Site Networking + IF_L2_FORWARDING (125563860): + L2 Interconnect Attachment Forwarding + IF_MACSEC (396279300): + Media Access Control security (MACsec) + """ + UNDEFINED_AVAILABLE_FEATURES = 0 + IF_CROSS_SITE_NETWORK = 469111095 + IF_L2_FORWARDING = 125563860 + IF_MACSEC = 396279300 + + class AvailableLinkTypes(proto.Enum): + r""" + + Values: + UNDEFINED_AVAILABLE_LINK_TYPES (0): + A value indicating that the enum field is not + set. + LINK_TYPE_ETHERNET_100G_LR (337672551): + 100G Ethernet, LR Optics. + LINK_TYPE_ETHERNET_10G_LR (236739749): + 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; + LINK_TYPE_ETHERNET_400G_LR4 (127023690): + 400G Ethernet, LR4 Optics. + """ + UNDEFINED_AVAILABLE_LINK_TYPES = 0 + LINK_TYPE_ETHERNET_100G_LR = 337672551 + LINK_TYPE_ETHERNET_10G_LR = 236739749 + LINK_TYPE_ETHERNET_400G_LR4 = 127023690 + + class Continent(proto.Enum): + r"""[Output Only] Continent for this location, which can take one of the + following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA + + Values: + UNDEFINED_CONTINENT (0): + A value indicating that the enum field is not + set. + AFRICA (317443706): + No description available. + ASIA_PAC (119782269): + No description available. + C_AFRICA (71993846): + No description available. + C_ASIA_PAC (465668089): + No description available. + C_EUROPE (200369438): + No description available. + C_NORTH_AMERICA (275697048): + No description available. + C_SOUTH_AMERICA (397149792): + No description available. + EUROPE (445819298): + No description available. + NORTH_AMERICA (448015508): + No description available. + SOUTH_AMERICA (32597340): + No description available. + """ + UNDEFINED_CONTINENT = 0 + AFRICA = 317443706 + ASIA_PAC = 119782269 + C_AFRICA = 71993846 + C_ASIA_PAC = 465668089 + C_EUROPE = 200369438 + C_NORTH_AMERICA = 275697048 + C_SOUTH_AMERICA = 397149792 + EUROPE = 445819298 + NORTH_AMERICA = 448015508 + SOUTH_AMERICA = 32597340 + + class Status(proto.Enum): + r"""[Output Only] The status of this InterconnectLocation, which can + take one of the following values: + + :: + + - CLOSED: The InterconnectLocation is closed and is unavailable for + provisioning new Interconnects. + - AVAILABLE: The InterconnectLocation is available for provisioning new + Interconnects. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + AVAILABLE (442079913): + The InterconnectLocation is available for + provisioning new Interconnects. + CLOSED (380163436): + The InterconnectLocation is closed for + provisioning new Interconnects. + """ + UNDEFINED_STATUS = 0 + AVAILABLE = 442079913 + CLOSED = 380163436 + + address: str = proto.Field( proto.STRING, - proto.MESSAGE, - number=334744496, - message="InterconnectAttachmentGroupAttachment", + number=462920692, + optional=True, ) - configured: "InterconnectAttachmentGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, + availability_zone: str = proto.Field( + proto.STRING, + number=158459920, + optional=True, + ) + available_features: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=496344307, + ) + available_link_types: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=509504298, + ) + city: str = proto.Field( + proto.STRING, + number=3053931, + optional=True, + ) + continent: str = proto.Field( + proto.STRING, + number=133442996, optional=True, - message="InterconnectAttachmentGroupConfigured", ) creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) + cross_site_interconnect_infos: MutableSequence[ + "InterconnectLocationCrossSiteInterconnectInfo" + ] = proto.RepeatedField( + proto.MESSAGE, + number=248573837, + message="InterconnectLocationCrossSiteInterconnectInfo", + ) description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - etag: str = proto.Field( + facility_provider: str = proto.Field( proto.STRING, - number=3123477, + number=533303309, + optional=True, + ) + facility_provider_facility_id: str = proto.Field( + proto.STRING, + number=87269125, optional=True, ) id: int = proto.Field( @@ -60404,1496 +72056,1584 @@ class InterconnectAttachmentGroup(proto.Message): number=3355, optional=True, ) - intent: "InterconnectAttachmentGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, - message="InterconnectAttachmentGroupIntent", ) - interconnect_group: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=388651918, + number=3373707, optional=True, ) - kind: str = proto.Field( + peeringdb_facility_id: str = proto.Field( proto.STRING, - number=3292052, + number=536567094, optional=True, ) - logical_structure: "InterconnectAttachmentGroupLogicalStructure" = proto.Field( + region_infos: MutableSequence[ + "InterconnectLocationRegionInfo" + ] = proto.RepeatedField( proto.MESSAGE, - number=142412989, - optional=True, - message="InterconnectAttachmentGroupLogicalStructure", + number=312194170, + message="InterconnectLocationRegionInfo", ) - name: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3373707, + number=456214797, optional=True, ) - self_link: str = proto.Field( + single_region_production_critical_peer_locations: MutableSequence[ + str + ] = proto.RepeatedField( proto.STRING, - number=456214797, + number=439537103, + ) + status: str = proto.Field( + proto.STRING, + number=181260274, + optional=True, + ) + supports_pzs: bool = proto.Field( + proto.BOOL, + number=83983214, optional=True, ) -class InterconnectAttachmentGroupAttachment(proto.Message): - r"""An Attachment in this AttachmentGroup. +class InterconnectLocationCrossSiteInterconnectInfo(proto.Message): + r"""Information about Cross-Site Interconnect wires which may be + created between the containing location and another remote + location. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - attachment (str): + city (str): + Output only. The remote location for + Cross-Site Interconnect wires. This specifies an + InterconnectLocation city (metropolitan area + designator), which itself may match multiple + InterconnectLocations. - This field is a member of `oneof`_ ``_attachment``. + This field is a member of `oneof`_ ``_city``. """ - attachment: str = proto.Field( + city: str = proto.Field( proto.STRING, - number=183982371, + number=3053931, optional=True, ) -class InterconnectAttachmentGroupConfigured(proto.Message): - r"""[Output Only] The redundancy this group is configured to support. - The way a user queries what SLA their Attachment gets is by looking - at this field of the Attachment's AttachmentGroup. +class InterconnectLocationList(proto.Message): + r"""Response to the list request, and contains a list of + interconnect locations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - availability_sla (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfiguredAvailabilitySLA): - - This field is a member of `oneof`_ ``_availability_sla``. - """ - - availability_sla: "InterconnectAttachmentGroupConfiguredAvailabilitySLA" = ( - proto.Field( - proto.MESSAGE, - number=472702020, - optional=True, - message="InterconnectAttachmentGroupConfiguredAvailabilitySLA", - ) - ) - - -class InterconnectAttachmentGroupConfiguredAvailabilitySLA(proto.Message): - r"""[Output Only] Which SLA this group is configured to support, and why - this group does or does not meet that SLA's requirements. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocation]): + A list of InterconnectLocation resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#interconnectLocationList for lists of + interconnect locations. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - Attributes: - effective_sla (str): - Check the EffectiveSla enum for the list of - possible values. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_effective_sla``. - intended_sla_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers]): + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_warning``. """ - class EffectiveSla(proto.Enum): - r""" - - Values: - UNDEFINED_EFFECTIVE_SLA (0): - A value indicating that the enum field is not - set. - EFFECTIVE_SLA_UNSPECIFIED (491000744): - No description available. - NO_SLA (161460618): - No description available. - PRODUCTION_CRITICAL (470416485): - No description available. - PRODUCTION_NON_CRITICAL (117399223): - No description available. - """ - UNDEFINED_EFFECTIVE_SLA = 0 - EFFECTIVE_SLA_UNSPECIFIED = 491000744 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 + @property + def raw_page(self): + return self - effective_sla: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=144173712, + number=3355, optional=True, ) - intended_sla_blockers: MutableSequence[ - "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers" - ] = proto.RepeatedField( + items: MutableSequence["InterconnectLocation"] = proto.RepeatedField( proto.MESSAGE, - number=448370308, - message="InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers", - ) - - -class InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers( - proto.Message -): - r"""[Output Only] Reasons why configuration.availabilitySLA.sla differs - from intent.availabilitySLA. This list is empty if and only if those - are the same. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - attachments (MutableSequence[str]): - [Output Only] URLs of any particular Attachments to explain - this blocker in more detail. - blocker_type (str): - Check the BlockerType enum for the list of - possible values. - - This field is a member of `oneof`_ ``_blocker_type``. - documentation_link (str): - [Output Only] The url of Google Cloud public documentation - explaining this requirement. This is set for every type of - requirement. - - This field is a member of `oneof`_ ``_documentation_link``. - explanation (str): - [Output Only] A human-readable explanation of this - requirement and why it's not met. This is set for every type - of requirement. - - This field is a member of `oneof`_ ``_explanation``. - metros (MutableSequence[str]): - [Output Only] Metros used to explain this blocker in more - detail. These are three-letter lowercase strings like "iad". - This will be set for some blockers (like - NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does not apply to - others. - regions (MutableSequence[str]): - [Output Only] Regions used to explain this blocker in more - detail. These are region names formatted like "us-central1". - This will be set for some blockers (like - INCOMPATIBLE_REGIONS) but does not apply to others. - zones (MutableSequence[str]): - [Output Only] Zones used to explain this blocker in more - detail. Format is "zone1" and/or "zone2". This will be set - for some blockers (like MISSING_ZONE) but does not apply to - others. - """ - - class BlockerType(proto.Enum): - r""" - - Values: - UNDEFINED_BLOCKER_TYPE (0): - A value indicating that the enum field is not - set. - BLOCKER_TYPE_UNSPECIFIED (429793623): - No description available. - INCOMPATIBLE_METROS (290410432): - No description available. - INCOMPATIBLE_REGIONS (6195033): - No description available. - MISSING_GLOBAL_ROUTING (165913635): - No description available. - NO_ATTACHMENTS (456535570): - No description available. - NO_ATTACHMENTS_IN_METRO_AND_ZONE (51684135): - No description available. - OTHER (75532016): - No description available. - """ - UNDEFINED_BLOCKER_TYPE = 0 - BLOCKER_TYPE_UNSPECIFIED = 429793623 - INCOMPATIBLE_METROS = 290410432 - INCOMPATIBLE_REGIONS = 6195033 - MISSING_GLOBAL_ROUTING = 165913635 - NO_ATTACHMENTS = 456535570 - NO_ATTACHMENTS_IN_METRO_AND_ZONE = 51684135 - OTHER = 75532016 - - attachments: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=334744496, + number=100526016, + message="InterconnectLocation", ) - blocker_type: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=381194847, + number=3292052, optional=True, ) - documentation_link: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=93465183, + number=79797525, optional=True, ) - explanation: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=504745497, + number=456214797, optional=True, ) - metros: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=533067386, - ) - regions: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=12367871, - ) - zones: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=116085319, + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class InterconnectAttachmentGroupIntent(proto.Message): - r"""The user's intent for this AttachmentGroup. This is the only - required field besides the name that must be specified on group - creation. +class InterconnectLocationRegionInfo(proto.Message): + r"""Information about any potential InterconnectAttachments + between an Interconnect at a specific InterconnectLocation, and + a specific Cloud Region. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - availability_sla (str): - Check the AvailabilitySla enum for the list - of possible values. + expected_rtt_ms (int): + Output only. Expected round-trip time in + milliseconds, from this InterconnectLocation to + a VM in this region. - This field is a member of `oneof`_ ``_availability_sla``. + This field is a member of `oneof`_ ``_expected_rtt_ms``. + l2_forwarding_enabled (bool): + Output only. Identifies whether L2 + Interconnect Attachments can be created in this + region for interconnects that are in this + location. + + This field is a member of `oneof`_ ``_l2_forwarding_enabled``. + location_presence (str): + Output only. Identifies the network presence + of this location. Check the LocationPresence + enum for the list of possible values. + + This field is a member of `oneof`_ ``_location_presence``. + region (str): + Output only. URL for the region of this + location. + + This field is a member of `oneof`_ ``_region``. """ - class AvailabilitySla(proto.Enum): - r""" + class LocationPresence(proto.Enum): + r"""Output only. Identifies the network presence of this + location. Values: - UNDEFINED_AVAILABILITY_SLA (0): + UNDEFINED_LOCATION_PRESENCE (0): A value indicating that the enum field is not set. - AVAILABILITY_SLA_UNSPECIFIED (11186044): - No description available. - NO_SLA (161460618): - No description available. - PRODUCTION_CRITICAL (470416485): - No description available. - PRODUCTION_NON_CRITICAL (117399223): - No description available. + GLOBAL (494663587): + This region is not in any common network + presence with this InterconnectLocation. + LOCAL_REGION (403535464): + This region shares the same regional network + presence as this InterconnectLocation. + LP_GLOBAL (429584062): + [Deprecated] This region is not in any common network + presence with this InterconnectLocation. + LP_LOCAL_REGION (488598851): + [Deprecated] This region shares the same regional network + presence as this InterconnectLocation. """ - UNDEFINED_AVAILABILITY_SLA = 0 - AVAILABILITY_SLA_UNSPECIFIED = 11186044 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 + UNDEFINED_LOCATION_PRESENCE = 0 + GLOBAL = 494663587 + LOCAL_REGION = 403535464 + LP_GLOBAL = 429584062 + LP_LOCAL_REGION = 488598851 - availability_sla: str = proto.Field( + expected_rtt_ms: int = proto.Field( + proto.INT64, + number=422543866, + optional=True, + ) + l2_forwarding_enabled: bool = proto.Field( + proto.BOOL, + number=241364888, + optional=True, + ) + location_presence: str = proto.Field( proto.STRING, - number=472702020, + number=101517893, + optional=True, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, optional=True, ) -class InterconnectAttachmentGroupLogicalStructure(proto.Message): - r"""[Output Only] An analysis of the logical layout of Attachments in - this group. Every Attachment in the group is shown once in this - structure. +class InterconnectMacsec(proto.Message): + r"""Configuration information for enabling Media Access Control + security (MACsec) on this Cloud Interconnect connection between + Google and your on-premises router. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - regions (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegion]): + fail_open (bool): + If set to true, the Interconnect connection + is configured with ashould-secure MACsec + security policy, that allows the Google router + to fallback to cleartext traffic if the MKA + session cannot be established. By default, the + Interconnect connection is configured with + amust-secure security policy that drops all + traffic if the MKA session cannot be established + with your router. + This field is a member of `oneof`_ ``_fail_open``. + pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecPreSharedKey]): + Required. A keychain placeholder describing a + set of named key objects along with their start + times. A MACsec CKN/CAK is generated for each + key in the key chain. Google router + automatically picks the key with the most recent + startTime when establishing or re-establishing a + MACsec secure link. """ - regions: MutableSequence[ - "InterconnectAttachmentGroupLogicalStructureRegion" + fail_open: bool = proto.Field( + proto.BOOL, + number=532597451, + optional=True, + ) + pre_shared_keys: MutableSequence[ + "InterconnectMacsecPreSharedKey" ] = proto.RepeatedField( proto.MESSAGE, - number=12367871, - message="InterconnectAttachmentGroupLogicalStructureRegion", + number=420308466, + message="InterconnectMacsecPreSharedKey", ) -class InterconnectAttachmentGroupLogicalStructureRegion(proto.Message): - r"""[Output Only] The regions Attachments in this group are in. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class InterconnectMacsecConfig(proto.Message): + r"""MACsec configuration information for the Interconnect + connection. Contains the generated Connectivity Association Key + Name (CKN) and the key (CAK) for this Interconnect connection. Attributes: - metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetro]): - - region (str): - [Output Only] The name of a region, like "us-central1". - - This field is a member of `oneof`_ ``_region``. + pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecConfigPreSharedKey]): + A keychain placeholder describing a set of + named key objects along with their start times. + A MACsec CKN/CAK is generated for each key in + the key chain. Google router automatically picks + the key with the most recent startTime when + establishing or re-establishing a MACsec secure + link. """ - metros: MutableSequence[ - "InterconnectAttachmentGroupLogicalStructureRegionMetro" + pre_shared_keys: MutableSequence[ + "InterconnectMacsecConfigPreSharedKey" ] = proto.RepeatedField( proto.MESSAGE, - number=533067386, - message="InterconnectAttachmentGroupLogicalStructureRegionMetro", - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - optional=True, + number=420308466, + message="InterconnectMacsecConfigPreSharedKey", ) -class InterconnectAttachmentGroupLogicalStructureRegionMetro(proto.Message): - r"""[Output Only] The metros of Attachments in this group in this - region. +class InterconnectMacsecConfigPreSharedKey(proto.Message): + r"""Describes a pre-shared key used to setup MACsec in static + connectivity association key (CAK) mode. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetroFacility]): + cak (str): + An auto-generated Connectivity Association + Key (CAK) for this key. - metro (str): - [Output Only] The name of the metro, as a three-letter - lowercase string like "iad". This is the first component of - the location of an Interconnect. + This field is a member of `oneof`_ ``_cak``. + ckn (str): + An auto-generated Connectivity Association + Key Name (CKN) for this key. - This field is a member of `oneof`_ ``_metro``. + This field is a member of `oneof`_ ``_ckn``. + name (str): + User provided name for this pre-shared key. + + This field is a member of `oneof`_ ``_name``. + start_time (str): + User provided timestamp on or after which + this key is valid. + + This field is a member of `oneof`_ ``_start_time``. """ - facilities: MutableSequence[ - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility" - ] = proto.RepeatedField( - proto.MESSAGE, - number=536683137, - message="InterconnectAttachmentGroupLogicalStructureRegionMetroFacility", + cak: str = proto.Field( + proto.STRING, + number=98253, + optional=True, ) - metro: str = proto.Field( + ckn: str = proto.Field( proto.STRING, - number=103787801, + number=98566, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, optional=True, ) -class InterconnectAttachmentGroupLogicalStructureRegionMetroFacility(proto.Message): - r"""[Output Only] The facilities used for this group's Attachments' - Interconnects. +class InterconnectMacsecPreSharedKey(proto.Message): + r"""Describes a pre-shared key used to setup MACsec in static + connectivity association key (CAK) mode. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - facility (str): - [Output Only] The name of a facility, like "iad-1234". + name (str): + Required. A name for this pre-shared key. The name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_facility``. - zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone]): + This field is a member of `oneof`_ ``_name``. + start_time (str): + A RFC3339 timestamp on or after which the key + is valid. startTime can be in the future. If the + keychain has a single key, startTime can be + omitted. If the keychain has multiple keys, + startTime is mandatory for each key. The start + times of keys must be in increasing order. The + start times of two consecutive keys must be at + least 6 hours apart. + This field is a member of `oneof`_ ``_start_time``. """ - facility: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=501116579, + number=3373707, optional=True, ) - zones: MutableSequence[ - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone" - ] = proto.RepeatedField( - proto.MESSAGE, - number=116085319, - message="InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone", + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, ) -class InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone(proto.Message): - r"""[Output Only] The zones that Attachments in this group are present - in, in the given facilities. This is inherited from their - Interconnects. - +class InterconnectOutageNotification(proto.Message): + r"""Description of a planned outage on this Interconnect. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - attachments (MutableSequence[str]): - [Output Only] URLs of Attachments in the given zone, to the - given region, on Interconnects in the given facility and - metro. Every Attachment in the AG has such an entry. - zone (str): - [Output Only] The name of a zone, either "zone1" or "zone2". + affected_circuits (MutableSequence[str]): + If issue_type is IT_PARTIAL_OUTAGE, a list of the + Google-side circuit IDs that will be affected. + description (str): + A description about the purpose of the + outage. - This field is a member of `oneof`_ ``_zone``. - """ + This field is a member of `oneof`_ ``_description``. + end_time (int): + Scheduled end time for the outage + (milliseconds since Unix epoch). - attachments: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=334744496, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - optional=True, - ) + This field is a member of `oneof`_ ``_end_time``. + issue_type (str): + Form this outage is expected to take, which can take one of + the following values: + :: -class InterconnectAttachmentGroupsGetOperationalStatusResponse(proto.Message): - r"""Response for the - InterconnectAttachmentGroupsGetOperationalStatusResponse. + - OUTAGE: The Interconnect may be completely out of service for + some or all of the specified window. + - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole + should remain up, but with reduced bandwidth. + Note that the versions of this enum prefixed with "IT\_" + have been deprecated in favor of the unprefixed values. + Check the IssueType enum for the list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_issue_type``. + name (str): + Unique identifier for this outage + notification. - Attributes: - etag (str): + This field is a member of `oneof`_ ``_name``. + source (str): + The party that generated this notification, which can take + the following value: - This field is a member of `oneof`_ ``_etag``. - result (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupsOperationalStatus): + :: - This field is a member of `oneof`_ ``_result``. + - GOOGLE: this notification as generated by Google. + + Note that the value of NSRC_GOOGLE has been deprecated in + favor of GOOGLE. Check the Source enum for the list of + possible values. + + This field is a member of `oneof`_ ``_source``. + start_time (int): + Scheduled start time for the outage + (milliseconds since Unix epoch). + + This field is a member of `oneof`_ ``_start_time``. + state (str): + State of this notification, which can take one of the + following values: + + :: + + - ACTIVE: This outage notification is active. The event could be in + the past, present, or future. See start_time and end_time for + scheduling. + - CANCELLED: The outage associated with this notification was cancelled + before the outage was due to start. + - COMPLETED: The outage associated with this notification is complete. + + Note that the versions of this enum prefixed with "NS\_" + have been deprecated in favor of the unprefixed values. + Check the State enum for the list of possible values. + + This field is a member of `oneof`_ ``_state``. """ - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - result: "InterconnectAttachmentGroupsOperationalStatus" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectAttachmentGroupsOperationalStatus", - ) + class IssueType(proto.Enum): + r"""Form this outage is expected to take, which can take one of the + following values: + :: -class InterconnectAttachmentGroupsListResponse(proto.Message): - r""" + - OUTAGE: The Interconnect may be completely out of service for + some or all of the specified window. + - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole + should remain up, but with reduced bandwidth. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Note that the versions of this enum prefixed with "IT\_" have been + deprecated in favor of the unprefixed values. - Attributes: - etag (str): + Values: + UNDEFINED_ISSUE_TYPE (0): + A value indicating that the enum field is not + set. + IT_OUTAGE (175779973): + [Deprecated] The Interconnect may be completely out of + service for some or all of the specified window. + IT_PARTIAL_OUTAGE (92103971): + [Deprecated] Some circuits comprising the Interconnect will + be out of service during the expected window. The + interconnect as a whole should remain up, albeit with + reduced bandwidth. + OUTAGE (195285745): + The Interconnect may be completely out of + service for some or all of the specified window. + PARTIAL_OUTAGE (147053455): + Some circuits comprising the Interconnect + will be out of service during the expected + window. The interconnect as a whole should + remain up, albeit with reduced bandwidth. + """ + UNDEFINED_ISSUE_TYPE = 0 + IT_OUTAGE = 175779973 + IT_PARTIAL_OUTAGE = 92103971 + OUTAGE = 195285745 + PARTIAL_OUTAGE = 147053455 - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + class Source(proto.Enum): + r"""The party that generated this notification, which can take the + following value: - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroup]): - A list of InterconnectAttachmentGroup - resources. - kind (str): + :: - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + - GOOGLE: this notification as generated by Google. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + Note that the value of NSRC_GOOGLE has been deprecated in favor of + GOOGLE. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Values: + UNDEFINED_SOURCE (0): + A value indicating that the enum field is not + set. + GOOGLE (497439289): + This notification was generated by Google. + NSRC_GOOGLE (510574562): + [Deprecated] This notification was generated by Google. + """ + UNDEFINED_SOURCE = 0 + GOOGLE = 497439289 + NSRC_GOOGLE = 510574562 - This field is a member of `oneof`_ ``_warning``. - """ + class State(proto.Enum): + r"""State of this notification, which can take one of the following + values: - @property - def raw_page(self): - return self + :: - etag: str = proto.Field( + - ACTIVE: This outage notification is active. The event could be in + the past, present, or future. See start_time and end_time for + scheduling. + - CANCELLED: The outage associated with this notification was cancelled + before the outage was due to start. + - COMPLETED: The outage associated with this notification is complete. + + Note that the versions of this enum prefixed with "NS\_" have been + deprecated in favor of the unprefixed values. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + This outage notification is active. The event could be in + the future, present, or past. See start_time and end_time + for scheduling. + CANCELLED (41957681): + The outage associated with this notification + was cancelled before the outage was due to + start. + COMPLETED (309921323): + The outage associated with this notification + is complete. + NS_ACTIVE (252563136): + [Deprecated] This outage notification is active. The event + could be in the future, present, or past. See start_time and + end_time for scheduling. + NS_CANCELED (506579411): + [Deprecated] The outage associated with this notification + was canceled before the outage was due to start. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + CANCELLED = 41957681 + COMPLETED = 309921323 + NS_ACTIVE = 252563136 + NS_CANCELED = 506579411 + + affected_circuits: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3123477, + number=177717013, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, optional=True, ) - id: str = proto.Field( + end_time: int = proto.Field( + proto.INT64, + number=114938801, + optional=True, + ) + issue_type: str = proto.Field( proto.STRING, - number=3355, + number=369639136, optional=True, ) - items: MutableSequence["InterconnectAttachmentGroup"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InterconnectAttachmentGroup", + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, ) - kind: str = proto.Field( + source: str = proto.Field( proto.STRING, - number=3292052, + number=177235995, optional=True, ) - next_page_token: str = proto.Field( + start_time: int = proto.Field( + proto.INT64, + number=37467274, + optional=True, + ) + state: str = proto.Field( proto.STRING, - number=79797525, + number=109757585, optional=True, ) - self_link: str = proto.Field( + + +class InterconnectParams(proto.Message): + r"""Additional interconnect parameters. + + Attributes: + resource_manager_tags (MutableMapping[str, str]): + Tag keys/values directly bound to this resource. Tag keys + and values have the same definition as resource manager + tags. The field is allowed for INSERT only. The keys/values + to set on the resource should be specified in either ID { : + } or Namespaced format { : }. For example the following are + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. + """ + + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=456214797, - optional=True, - ) - unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=377671164, ) -class InterconnectAttachmentGroupsOperationalStatus(proto.Message): - r""" +class InterconnectRemoteLocation(proto.Message): + r"""Represents a Cross-Cloud Interconnect Remote Location + resource. + You can use this resource to find remote location details about + an Interconnect attachment (VLAN). + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - attachment_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachmentGroupsOperationalStatusAttachmentStatus]): + address (str): + Output only. [Output Only] The postal address of the Point + of Presence, each line in the address is separated by a + newline character. - configured (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): + This field is a member of `oneof`_ ``_address``. + attachment_configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): + Output only. [Output Only] Subset of fields from + InterconnectAttachment's \|configurationConstraints\| field + that apply to all attachments for this remote location. - This field is a member of `oneof`_ ``_configured``. - group_status (str): - Summarizes the status of the group. - Check the GroupStatus enum for the list of - possible values. + This field is a member of `oneof`_ ``_attachment_configuration_constraints``. + city (str): + Output only. [Output Only] Metropolitan area designator that + indicates which city an interconnect is located. For + example: "Chicago, IL", "Amsterdam, Netherlands". - This field is a member of `oneof`_ ``_group_status``. - intent (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupIntent): + This field is a member of `oneof`_ ``_city``. + constraints (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraints): + Output only. [Output Only] Constraints on the parameters for + creating Cross-Cloud Interconnect and associated + InterconnectAttachments. - This field is a member of `oneof`_ ``_intent``. - operational (google.cloud.compute_v1beta.types.InterconnectAttachmentGroupConfigured): - The operational state of the group, including - only active Attachments. + This field is a member of `oneof`_ ``_constraints``. + continent (str): + Output only. [Output Only] Continent for this location, + which can take one of the following values: - This field is a member of `oneof`_ ``_operational``. - """ + :: - class GroupStatus(proto.Enum): - r"""Summarizes the status of the group. + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA - Values: - UNDEFINED_GROUP_STATUS (0): - A value indicating that the enum field is not - set. - DEGRADED (396890926): - No description available. - FULLY_DOWN (255514647): - No description available. - FULLY_UP (504176464): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_GROUP_STATUS = 0 - DEGRADED = 396890926 - FULLY_DOWN = 255514647 - FULLY_UP = 504176464 - UNSPECIFIED = 526786327 + Check the Continent enum for the list of possible values. - attachment_statuses: MutableSequence[ - "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus" - ] = proto.RepeatedField( - proto.MESSAGE, - number=491132860, - message="InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", - ) - configured: "InterconnectAttachmentGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, - optional=True, - message="InterconnectAttachmentGroupConfigured", - ) - group_status: str = proto.Field( - proto.STRING, - number=338778546, - optional=True, - ) - intent: "InterconnectAttachmentGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, - optional=True, - message="InterconnectAttachmentGroupIntent", - ) - operational: "InterconnectAttachmentGroupConfigured" = proto.Field( - proto.MESSAGE, - number=129704914, - optional=True, - message="InterconnectAttachmentGroupConfigured", - ) + This field is a member of `oneof`_ ``_continent``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + Output only. [Output Only] An optional description of the + resource. -class InterconnectAttachmentGroupsOperationalStatusAttachmentStatus(proto.Message): - r"""The status of one Attachment in the group. List order is - arbitrary. + This field is a member of `oneof`_ ``_description``. + facility_provider (str): + Output only. [Output Only] The name of the provider for this + facility (e.g., EQUINIX). + This field is a member of `oneof`_ ``_facility_provider``. + facility_provider_facility_id (str): + Output only. [Output Only] A provider-assigned Identifier + for this facility (e.g., Ashburn-DC1). - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_facility_provider_facility_id``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. - Attributes: - admin_enabled (bool): - Whether this Attachment is enabled. This - becomes false when the customer drains their - Attachment. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#interconnectRemoteLocation for interconnect + remote locations. - This field is a member of `oneof`_ ``_admin_enabled``. - attachment (str): - The URL of the Attachment being described. + This field is a member of `oneof`_ ``_kind``. + lacp (str): + Output only. [Output Only] Link Aggregation Control Protocol + (LACP) constraints, which can take one of the following + values: LACP_SUPPORTED, LACP_UNSUPPORTED Check the Lacp enum + for the list of possible values. - This field is a member of `oneof`_ ``_attachment``. - is_active (str): - Whether this Attachment is participating in the redundant - configuration. This will be ACTIVE if and only if the status - below is CONNECTION_UP. Any INACTIVE Attachments are - excluded from the analysis that generates - operational.availabilitySLA. Check the IsActive enum for the - list of possible values. + This field is a member of `oneof`_ ``_lacp``. + max_lag_size100_gbps (int): + Output only. [Output Only] The maximum number of 100 Gbps + ports supported in a link aggregation group (LAG). When + linkType is 100 Gbps, requestedLinkCount cannot exceed + max_lag_size_100_gbps. - This field is a member of `oneof`_ ``_is_active``. + This field is a member of `oneof`_ ``_max_lag_size100_gbps``. + max_lag_size10_gbps (int): + Output only. [Output Only] The maximum number of 10 Gbps + ports supported in a link aggregation group (LAG). When + linkType is 10 Gbps, requestedLinkCount cannot exceed + max_lag_size_10_gbps. + + This field is a member of `oneof`_ ``_max_lag_size10_gbps``. + max_lag_size400_gbps (int): + Output only. [Output Only] The maximum number of 400 Gbps + ports supported in a link aggregation group (LAG). When + linkType is 400 Gbps, requestedLinkCount cannot exceed + max_lag_size_400_gbps. + + This field is a member of `oneof`_ ``_max_lag_size400_gbps``. + name (str): + Output only. [Output Only] Name of the resource. + + This field is a member of `oneof`_ ``_name``. + peeringdb_facility_id (str): + Output only. [Output Only] The peeringdb identifier for this + facility (corresponding with a netfac type in peeringdb). + + This field is a member of `oneof`_ ``_peeringdb_facility_id``. + permitted_connections (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocationPermittedConnections]): + Output only. [Output Only] Permitted connections. + remote_service (str): + Output only. [Output Only] Indicates the service provider + present at the remote location. Example values: "Amazon Web + Services", "Microsoft Azure". + + This field is a member of `oneof`_ ``_remote_service``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. + + This field is a member of `oneof`_ ``_self_link``. status (str): - Whether this Attachment is active, and if so, - whether BGP is up. Check the Status enum for the - list of possible values. + Output only. [Output Only] The status of this + InterconnectRemoteLocation, which can take one of the + following values: + + :: + + - CLOSED: The InterconnectRemoteLocation is closed and is unavailable + for provisioning new Cross-Cloud Interconnects. + - AVAILABLE: The + InterconnectRemoteLocation is available for provisioning new + Cross-Cloud Interconnects. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. """ - class IsActive(proto.Enum): - r"""Whether this Attachment is participating in the redundant - configuration. This will be ACTIVE if and only if the status below - is CONNECTION_UP. Any INACTIVE Attachments are excluded from the - analysis that generates operational.availabilitySLA. + class Continent(proto.Enum): + r"""Output only. [Output Only] Continent for this location, which can + take one of the following values: + + :: + + - AFRICA + - ASIA_PAC + - EUROPE + - NORTH_AMERICA + - SOUTH_AMERICA Values: - UNDEFINED_IS_ACTIVE (0): + UNDEFINED_CONTINENT (0): A value indicating that the enum field is not set. - ACTIVE (314733318): + AFRICA (317443706): No description available. - INACTIVE (270421099): + ASIA_PAC (119782269): No description available. - UNSPECIFIED (526786327): + EUROPE (445819298): + No description available. + NORTH_AMERICA (448015508): + No description available. + SOUTH_AMERICA (32597340): No description available. """ - UNDEFINED_IS_ACTIVE = 0 - ACTIVE = 314733318 - INACTIVE = 270421099 - UNSPECIFIED = 526786327 + UNDEFINED_CONTINENT = 0 + AFRICA = 317443706 + ASIA_PAC = 119782269 + EUROPE = 445819298 + NORTH_AMERICA = 448015508 + SOUTH_AMERICA = 32597340 + + class Lacp(proto.Enum): + r"""Output only. [Output Only] Link Aggregation Control Protocol (LACP) + constraints, which can take one of the following values: + LACP_SUPPORTED, LACP_UNSUPPORTED + + Values: + UNDEFINED_LACP (0): + A value indicating that the enum field is not + set. + LACP_SUPPORTED (339576113): + LACP_SUPPORTED: LACP is supported, and enabled by default on + the Cross-Cloud Interconnect. + LACP_UNSUPPORTED (203930104): + LACP_UNSUPPORTED: LACP is not supported and is not be + enabled on this port. GetDiagnostics shows + bundleAggregationType as "static". GCP does not support LAGs + without LACP, so requestedLinkCount must be 1. + """ + UNDEFINED_LACP = 0 + LACP_SUPPORTED = 339576113 + LACP_UNSUPPORTED = 203930104 class Status(proto.Enum): - r"""Whether this Attachment is active, and if so, whether BGP is - up. + r"""Output only. [Output Only] The status of this + InterconnectRemoteLocation, which can take one of the following + values: + + :: + + - CLOSED: The InterconnectRemoteLocation is closed and is unavailable + for provisioning new Cross-Cloud Interconnects. + - AVAILABLE: The + InterconnectRemoteLocation is available for provisioning new + Cross-Cloud Interconnects. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - ATTACHMENT_STATUS_UNKNOWN (472477561): - No description available. - CONNECTION_DISABLED (432687805): - No description available. - CONNECTION_DOWN (267552099): - No description available. - CONNECTION_UP (455585692): - No description available. - DEFUNCT (115891759): - No description available. - IPSEC_CONFIGURATION_NEEDED_STATUS (455203582): - No description available. - IPSEC_READY_TO_RESUME_FLOW_STATUS (384830596): - No description available. - IPV4_DOWN_IPV6_UP (277490992): - No description available. - IPV4_UP_IPV6_DOWN (316051248): - No description available. - PARTNER_REQUEST_RECEIVED (513587304): - No description available. - PENDING_CUSTOMER (167494054): - No description available. - PENDING_PARTNER (387890656): - No description available. - PROVISIONED (355751956): - No description available. - ROUTER_CONFIGURATION_BROKEN (150505108): - No description available. - UNPROVISIONED (517333979): - No description available. + AVAILABLE (442079913): + The InterconnectRemoteLocation is available + for provisioning new Cross-Cloud Interconnects. + CLOSED (380163436): + The InterconnectRemoteLocation is closed for + provisioning new Cross-Cloud Interconnects. """ UNDEFINED_STATUS = 0 - ATTACHMENT_STATUS_UNKNOWN = 472477561 - CONNECTION_DISABLED = 432687805 - CONNECTION_DOWN = 267552099 - CONNECTION_UP = 455585692 - DEFUNCT = 115891759 - IPSEC_CONFIGURATION_NEEDED_STATUS = 455203582 - IPSEC_READY_TO_RESUME_FLOW_STATUS = 384830596 - IPV4_DOWN_IPV6_UP = 277490992 - IPV4_UP_IPV6_DOWN = 316051248 - PARTNER_REQUEST_RECEIVED = 513587304 - PENDING_CUSTOMER = 167494054 - PENDING_PARTNER = 387890656 - PROVISIONED = 355751956 - ROUTER_CONFIGURATION_BROKEN = 150505108 - UNPROVISIONED = 517333979 + AVAILABLE = 442079913 + CLOSED = 380163436 - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, + address: str = proto.Field( + proto.STRING, + number=462920692, optional=True, ) - attachment: str = proto.Field( - proto.STRING, - number=183982371, + attachment_configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = proto.Field( + proto.MESSAGE, + number=326825041, optional=True, + message="InterconnectAttachmentConfigurationConstraints", ) - is_active: str = proto.Field( + city: str = proto.Field( proto.STRING, - number=114830267, + number=3053931, optional=True, ) - status: str = proto.Field( - proto.STRING, - number=181260274, + constraints: "InterconnectRemoteLocationConstraints" = proto.Field( + proto.MESSAGE, + number=3909174, optional=True, + message="InterconnectRemoteLocationConstraints", ) - - -class InterconnectAttachmentList(proto.Message): - r"""Response to the list request, and contains a list of - interconnect attachments. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachment]): - A list of InterconnectAttachment resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectAttachmentList for lists of interconnect - attachments. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - - This field is a member of `oneof`_ ``_warning``. - """ - - @property - def raw_page(self): - return self - - id: str = proto.Field( + continent: str = proto.Field( proto.STRING, - number=3355, + number=133442996, optional=True, ) - items: MutableSequence["InterconnectAttachment"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InterconnectAttachment", + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, ) - kind: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=3292052, + number=422937596, optional=True, ) - next_page_token: str = proto.Field( + facility_provider: str = proto.Field( proto.STRING, - number=79797525, + number=533303309, optional=True, ) - self_link: str = proto.Field( + facility_provider_facility_id: str = proto.Field( proto.STRING, - number=456214797, + number=87269125, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, - message="Warning", ) - - -class InterconnectAttachmentPartnerMetadata(proto.Message): - r"""Informational metadata about Partner attachments from Partners to - display to customers. These fields are propagated from - PARTNER_PROVIDER attachments to their corresponding PARTNER - attachments. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - interconnect_name (str): - Plain text name of the Interconnect this - attachment is connected to, as displayed in the - Partner's portal. For instance "Chicago 1". This - value may be validated to match approved Partner - values. - - This field is a member of `oneof`_ ``_interconnect_name``. - partner_name (str): - Plain text name of the Partner providing this - attachment. This value may be validated to match - approved Partner values. - - This field is a member of `oneof`_ ``_partner_name``. - portal_url (str): - URL of the Partner's portal for this - Attachment. Partners may customise this to be a - deep link to the specific resource on the - Partner portal. This value may be validated to - match approved Partner values. - - This field is a member of `oneof`_ ``_portal_url``. - """ - - interconnect_name: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=514963356, + number=3292052, optional=True, ) - partner_name: str = proto.Field( + lacp: str = proto.Field( proto.STRING, - number=161747874, + number=3313826, optional=True, ) - portal_url: str = proto.Field( + max_lag_size100_gbps: int = proto.Field( + proto.INT32, + number=245219253, + optional=True, + ) + max_lag_size10_gbps: int = proto.Field( + proto.INT32, + number=294007573, + optional=True, + ) + max_lag_size400_gbps: int = proto.Field( + proto.INT32, + number=104941138, + optional=True, + ) + name: str = proto.Field( proto.STRING, - number=269182748, + number=3373707, optional=True, ) - - -class InterconnectAttachmentPrivateInfo(proto.Message): - r"""Information for an interconnect attachment when this belongs - to an interconnect of type DEDICATED. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - tag8021q (int): - [Output Only] 802.1q encapsulation tag to be used for - traffic between Google and the customer, going to and from - this network and region. - - This field is a member of `oneof`_ ``_tag8021q``. - """ - - tag8021q: int = proto.Field( - proto.UINT32, - number=271820992, + peeringdb_facility_id: str = proto.Field( + proto.STRING, + number=536567094, optional=True, ) - - -class InterconnectAttachmentsScopedList(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - interconnect_attachments (MutableSequence[google.cloud.compute_v1beta.types.InterconnectAttachment]): - A list of interconnect attachments contained - in this scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of addresses when the list is empty. - - This field is a member of `oneof`_ ``_warning``. - """ - - interconnect_attachments: MutableSequence[ - "InterconnectAttachment" + permitted_connections: MutableSequence[ + "InterconnectRemoteLocationPermittedConnections" ] = proto.RepeatedField( proto.MESSAGE, - number=425388415, - message="InterconnectAttachment", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=442063278, + message="InterconnectRemoteLocationPermittedConnections", ) - - -class InterconnectCircuitInfo(proto.Message): - r"""Describes a single physical circuit between the Customer and - Google. CircuitInfo objects are created by Google, so all fields - are output only. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - customer_demarc_id (str): - Customer-side demarc ID for this circuit. - - This field is a member of `oneof`_ ``_customer_demarc_id``. - google_circuit_id (str): - Google-assigned unique ID for this circuit. - Assigned at circuit turn-up. - - This field is a member of `oneof`_ ``_google_circuit_id``. - google_demarc_id (str): - Google-side demarc ID for this circuit. - Assigned at circuit turn-up and provided by - Google to the customer in the LOA. - - This field is a member of `oneof`_ ``_google_demarc_id``. - """ - - customer_demarc_id: str = proto.Field( + remote_service: str = proto.Field( proto.STRING, - number=28771859, + number=391954364, optional=True, ) - google_circuit_id: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=262014711, + number=456214797, optional=True, ) - google_demarc_id: str = proto.Field( + status: str = proto.Field( proto.STRING, - number=448196270, + number=181260274, optional=True, ) -class InterconnectDiagnostics(proto.Message): - r"""Diagnostics information about the Interconnect connection, - which contains detailed and current technical information about - Google's side of the connection. - +class InterconnectRemoteLocationConstraints(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - arp_caches (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsARPEntry]): - A list of InterconnectDiagnostics.ARPEntry - objects, describing individual neighbors - currently seen by the Google router in the ARP - cache for the Interconnect. This will be empty - when the Interconnect is not bundled. - bundle_aggregation_type (str): - The aggregation type of the bundle interface. - Check the BundleAggregationType enum for the - list of possible values. + port_pair_remote_location (str): + Output only. [Output Only] Port pair remote location + constraints, which can take one of the following values: + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + PORT_PAIR_MATCHING_REMOTE_LOCATION. + + Google Cloud API refers only to individual ports, but the UI + uses this field when ordering a pair of ports, to prevent + users from accidentally ordering something that is + incompatible with their cloud provider. Specifically, when + ordering a redundant pair of Cross-Cloud Interconnect ports, + and one of them uses a remote location with + portPairMatchingRemoteLocation set to matching, the UI + requires that both ports use the same remote location. Check + the PortPairRemoteLocation enum for the list of possible + values. - This field is a member of `oneof`_ ``_bundle_aggregation_type``. - bundle_operational_status (str): - The operational status of the bundle - interface. Check the BundleOperationalStatus - enum for the list of possible values. + This field is a member of `oneof`_ ``_port_pair_remote_location``. + port_pair_vlan (str): + Output only. [Output Only] Port pair VLAN constraints, which + can take one of the following values: + PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN Check + the PortPairVlan enum for the list of possible values. - This field is a member of `oneof`_ ``_bundle_operational_status``. - links (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkStatus]): - A list of InterconnectDiagnostics.LinkStatus - objects, describing the status for each link on - the Interconnect. - mac_address (str): - The MAC address of the Interconnect's bundle - interface. + This field is a member of `oneof`_ ``_port_pair_vlan``. + subnet_length_range (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraintsSubnetLengthRange): + Output only. [Output Only] - This field is a member of `oneof`_ ``_mac_address``. + [min-length, max-length] + + The minimum and maximum value (inclusive) for the IPv4 + subnet length. + + For example, an interconnectRemoteLocation for Azure has + {min: 30, max: 30} because Azure requires /30 subnets. + + This range specifies the values supported by both cloud + providers. Interconnect currently supports /29 and /30 IPv4 + subnet lengths. If a remote cloud has no constraint on IPv4 + subnet length, the range would thus be {min: 29, max: 30}. + + This field is a member of `oneof`_ ``_subnet_length_range``. """ - class BundleAggregationType(proto.Enum): - r"""The aggregation type of the bundle interface. + class PortPairRemoteLocation(proto.Enum): + r"""Output only. [Output Only] Port pair remote location constraints, + which can take one of the following values: + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + PORT_PAIR_MATCHING_REMOTE_LOCATION. + + Google Cloud API refers only to individual ports, but the UI uses + this field when ordering a pair of ports, to prevent users from + accidentally ordering something that is incompatible with their + cloud provider. Specifically, when ordering a redundant pair of + Cross-Cloud Interconnect ports, and one of them uses a remote + location with portPairMatchingRemoteLocation set to matching, the UI + requires that both ports use the same remote location. Values: - UNDEFINED_BUNDLE_AGGREGATION_TYPE (0): + UNDEFINED_PORT_PAIR_REMOTE_LOCATION (0): A value indicating that the enum field is not set. - BUNDLE_AGGREGATION_TYPE_LACP (27758925): - LACP is enabled. - BUNDLE_AGGREGATION_TYPE_STATIC (50678873): - LACP is disabled. + PORT_PAIR_MATCHING_REMOTE_LOCATION (207291859): + If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud + provider allocates ports in pairs, and the user should + choose the same remote location for both ports. + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION (60609829): + If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt + to provision a redundant pair of Cross-Cloud Interconnects + using two different remote locations in the same city. """ - UNDEFINED_BUNDLE_AGGREGATION_TYPE = 0 - BUNDLE_AGGREGATION_TYPE_LACP = 27758925 - BUNDLE_AGGREGATION_TYPE_STATIC = 50678873 + UNDEFINED_PORT_PAIR_REMOTE_LOCATION = 0 + PORT_PAIR_MATCHING_REMOTE_LOCATION = 207291859 + PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION = 60609829 - class BundleOperationalStatus(proto.Enum): - r"""The operational status of the bundle interface. + class PortPairVlan(proto.Enum): + r"""Output only. [Output Only] Port pair VLAN constraints, which can + take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, + PORT_PAIR_MATCHING_VLAN Values: - UNDEFINED_BUNDLE_OPERATIONAL_STATUS (0): + UNDEFINED_PORT_PAIR_VLAN (0): A value indicating that the enum field is not set. - BUNDLE_OPERATIONAL_STATUS_DOWN (453842693): - If bundleAggregationType is LACP: LACP is not - established and/or all links in the bundle have - DOWN operational status. If - bundleAggregationType is STATIC: one or more - links in the bundle has DOWN operational status. - BUNDLE_OPERATIONAL_STATUS_UP (161366462): - If bundleAggregationType is LACP: LACP is - established and at least one link in the bundle - has UP operational status. If - bundleAggregationType is STATIC: all links in - the bundle (typically just one) have UP - operational status. + PORT_PAIR_MATCHING_VLAN (250295358): + If PORT_PAIR_MATCHING_VLAN, the Interconnect for this + attachment is part of a pair of ports that should have + matching VLAN allocations. This occurs with Cross-Cloud + Interconnect to Azure remote locations. While GCP's API does + not explicitly group pairs of ports, the UI uses this field + to ensure matching VLAN ids when configuring a redundant + VLAN pair. + PORT_PAIR_UNCONSTRAINED_VLAN (175227948): + PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint. """ - UNDEFINED_BUNDLE_OPERATIONAL_STATUS = 0 - BUNDLE_OPERATIONAL_STATUS_DOWN = 453842693 - BUNDLE_OPERATIONAL_STATUS_UP = 161366462 + UNDEFINED_PORT_PAIR_VLAN = 0 + PORT_PAIR_MATCHING_VLAN = 250295358 + PORT_PAIR_UNCONSTRAINED_VLAN = 175227948 - arp_caches: MutableSequence[ - "InterconnectDiagnosticsARPEntry" - ] = proto.RepeatedField( - proto.MESSAGE, - number=414591761, - message="InterconnectDiagnosticsARPEntry", - ) - bundle_aggregation_type: str = proto.Field( + port_pair_remote_location: str = proto.Field( proto.STRING, - number=434939028, + number=495917351, optional=True, ) - bundle_operational_status: str = proto.Field( + port_pair_vlan: str = proto.Field( proto.STRING, - number=106433500, + number=478214506, optional=True, ) - links: MutableSequence["InterconnectDiagnosticsLinkStatus"] = proto.RepeatedField( - proto.MESSAGE, - number=102977465, - message="InterconnectDiagnosticsLinkStatus", - ) - mac_address: str = proto.Field( - proto.STRING, - number=332540164, - optional=True, + subnet_length_range: "InterconnectRemoteLocationConstraintsSubnetLengthRange" = ( + proto.Field( + proto.MESSAGE, + number=184473670, + optional=True, + message="InterconnectRemoteLocationConstraintsSubnetLengthRange", + ) ) -class InterconnectDiagnosticsARPEntry(proto.Message): - r"""Describing the ARP neighbor entries seen on this link +class InterconnectRemoteLocationConstraintsSubnetLengthRange(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ip_address (str): - The IP address of this ARP neighbor. + max_ (int): - This field is a member of `oneof`_ ``_ip_address``. - mac_address (str): - The MAC address of this ARP neighbor. + This field is a member of `oneof`_ ``_max``. + min_ (int): - This field is a member of `oneof`_ ``_mac_address``. + This field is a member of `oneof`_ ``_min``. """ - ip_address: str = proto.Field( - proto.STRING, - number=406272220, + max_: int = proto.Field( + proto.INT32, + number=107876, optional=True, ) - mac_address: str = proto.Field( - proto.STRING, - number=332540164, + min_: int = proto.Field( + proto.INT32, + number=108114, optional=True, ) -class InterconnectDiagnosticsLinkLACPStatus(proto.Message): - r""" +class InterconnectRemoteLocationList(proto.Message): + r"""Response to the list request, and contains a list of + interconnect remote locations. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - google_system_id (str): - System ID of the port on Google's side of the - LACP exchange. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_google_system_id``. - neighbor_system_id (str): - System ID of the port on the neighbor's side - of the LACP exchange. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocation]): + A list of InterconnectRemoteLocation + resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#interconnectRemoteLocationList for lists of + interconnect remote locations. - This field is a member of `oneof`_ ``_neighbor_system_id``. - state (str): - The state of a LACP link, which can take one - of the following values: - ACTIVE: The link is - configured and active within the bundle. - - DETACHED: The link is not configured within the - bundle. This means that the rest of the object - should be empty. Check the State enum for the - list of possible values. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token lets you get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_state``. - """ + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - class State(proto.Enum): - r"""The state of a LACP link, which can take one of the following - values: - ACTIVE: The link is configured and active within the - bundle. - DETACHED: The link is not configured within the - bundle. This means that the rest of the object should be empty. + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - The link is configured and active within the - bundle. - DETACHED (216562546): - The link is not configured within the bundle, - this means the rest of the object should be - empty. - """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - DETACHED = 216562546 + This field is a member of `oneof`_ ``_warning``. + """ - google_system_id: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=91210405, + number=3355, optional=True, ) - neighbor_system_id: str = proto.Field( + items: MutableSequence["InterconnectRemoteLocation"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InterconnectRemoteLocation", + ) + kind: str = proto.Field( proto.STRING, - number=343821342, + number=3292052, optional=True, ) - state: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=109757585, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class InterconnectDiagnosticsLinkOpticalPower(proto.Message): +class InterconnectRemoteLocationPermittedConnections(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - state (str): - The status of the current value when compared to the warning - and alarm levels for the receiving or transmitting - transceiver. Possible states include: - OK: The value has - not crossed a warning threshold. - LOW_WARNING: The value - has crossed below the low warning threshold. - HIGH_WARNING: - The value has crossed above the high warning threshold. - - LOW_ALARM: The value has crossed below the low alarm - threshold. - HIGH_ALARM: The value has crossed above the - high alarm threshold. Check the State enum for the list of - possible values. - - This field is a member of `oneof`_ ``_state``. - value (float): - Value of the current receiving or - transmitting optical power, read in dBm. Take a - known good optical value, give it a 10% margin - and trigger warnings relative to that value. In - general, a -7dBm warning and a -11dBm alarm are - good optical value estimates for most links. + interconnect_location (str): + Output only. [Output Only] URL of an Interconnect location + that is permitted to connect to this Interconnect remote + location. - This field is a member of `oneof`_ ``_value``. + This field is a member of `oneof`_ ``_interconnect_location``. """ - class State(proto.Enum): - r"""The status of the current value when compared to the warning and - alarm levels for the receiving or transmitting transceiver. Possible - states include: - OK: The value has not crossed a warning threshold. - - LOW_WARNING: The value has crossed below the low warning - threshold. - HIGH_WARNING: The value has crossed above the high - warning threshold. - LOW_ALARM: The value has crossed below the low - alarm threshold. - HIGH_ALARM: The value has crossed above the high - alarm threshold. - - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - HIGH_ALARM (305363284): - The value has crossed above the high alarm - threshold. - HIGH_WARNING (220984799): - The value of the current optical power has - crossed above the high warning threshold. - LOW_ALARM (316659046): - The value of the current optical power has - crossed below the low alarm threshold. - LOW_WARNING (338793841): - The value of the current optical power has - crossed below the low warning threshold. - OK (2524): - The value of the current optical power has - not crossed a warning threshold. - """ - UNDEFINED_STATE = 0 - HIGH_ALARM = 305363284 - HIGH_WARNING = 220984799 - LOW_ALARM = 316659046 - LOW_WARNING = 338793841 - OK = 2524 - - state: str = proto.Field( + interconnect_location: str = proto.Field( proto.STRING, - number=109757585, + number=492235846, optional=True, ) - value: float = proto.Field( - proto.FLOAT, - number=111972721, + + +class InterconnectsGetDiagnosticsResponse(proto.Message): + r"""Response for the InterconnectsGetDiagnosticsRequest. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + result (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + + This field is a member of `oneof`_ ``_result``. + """ + + result: "InterconnectDiagnostics" = proto.Field( + proto.MESSAGE, + number=139315229, optional=True, + message="InterconnectDiagnostics", ) -class InterconnectDiagnosticsLinkStatus(proto.Message): - r""" +class InterconnectsGetMacsecConfigResponse(proto.Message): + r"""Response for the InterconnectsGetMacsecConfigRequest. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - arp_caches (MutableSequence[google.cloud.compute_v1beta.types.InterconnectDiagnosticsARPEntry]): - A list of InterconnectDiagnostics.ARPEntry - objects, describing the ARP neighbor entries - seen on this link. This will be empty if the - link is bundled - circuit_id (str): - The unique ID for this link assigned during - turn up by Google. + etag (str): + end_interface: MixerGetResponseWithEtagBuilder - This field is a member of `oneof`_ ``_circuit_id``. - google_demarc (str): - The Demarc address assigned by Google and - provided in the LoA. + This field is a member of `oneof`_ ``_etag``. + result (google.cloud.compute_v1beta.types.InterconnectMacsecConfig): - This field is a member of `oneof`_ ``_google_demarc``. - lacp_status (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkLACPStatus): + This field is a member of `oneof`_ ``_result``. + """ - This field is a member of `oneof`_ ``_lacp_status``. - macsec (google.cloud.compute_v1beta.types.InterconnectDiagnosticsMacsecStatus): - Describes the status of MACsec encryption on - this link. + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + result: "InterconnectMacsecConfig" = proto.Field( + proto.MESSAGE, + number=139315229, + optional=True, + message="InterconnectMacsecConfig", + ) - This field is a member of `oneof`_ ``_macsec``. - operational_status (str): - The operational status of the link. - Check the OperationalStatus enum for the list of - possible values. - This field is a member of `oneof`_ ``_operational_status``. - receiving_optical_power (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkOpticalPower): - An InterconnectDiagnostics.LinkOpticalPower - object, describing the current value and status - of the received light level. +class InvalidateCacheRegionUrlMapRequest(proto.Message): + r"""A request message for RegionUrlMaps.InvalidateCache. See the + method description for details. - This field is a member of `oneof`_ ``_receiving_optical_power``. - transmitting_optical_power (google.cloud.compute_v1beta.types.InterconnectDiagnosticsLinkOpticalPower): - An InterconnectDiagnostics.LinkOpticalPower - object, describing the current value and status - of the transmitted light level. - This field is a member of `oneof`_ ``_transmitting_optical_power``. - """ + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class OperationalStatus(proto.Enum): - r"""The operational status of the link. + Attributes: + cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + begin_interface: MixerMutationRequestBuilder Request ID to + support idempotency. - Values: - UNDEFINED_OPERATIONAL_STATUS (0): - A value indicating that the enum field is not - set. - LINK_OPERATIONAL_STATUS_DOWN (281653885): - The interface is unable to communicate with - the remote end. - LINK_OPERATIONAL_STATUS_UP (305879862): - The interface has low level communication - with the remote end. - """ - UNDEFINED_OPERATIONAL_STATUS = 0 - LINK_OPERATIONAL_STATUS_DOWN = 281653885 - LINK_OPERATIONAL_STATUS_UP = 305879862 + This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap scoping this request. + """ - arp_caches: MutableSequence[ - "InterconnectDiagnosticsARPEntry" - ] = proto.RepeatedField( + cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( proto.MESSAGE, - number=414591761, - message="InterconnectDiagnosticsARPEntry", + number=312795565, + message="CacheInvalidationRule", ) - circuit_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=225180977, - optional=True, + number=227560217, ) - google_demarc: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=51084, - optional=True, + number=138946292, ) - lacp_status: "InterconnectDiagnosticsLinkLACPStatus" = proto.Field( - proto.MESSAGE, - number=361210415, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="InterconnectDiagnosticsLinkLACPStatus", ) - macsec: "InterconnectDiagnosticsMacsecStatus" = proto.Field( + url_map: str = proto.Field( + proto.STRING, + number=367020684, + ) + + +class InvalidateCacheUrlMapRequest(proto.Message): + r"""A request message for UrlMaps.InvalidateCache. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + url_map (str): + Name of the UrlMap scoping this request. + """ + + cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( proto.MESSAGE, - number=528867490, - optional=True, - message="InterconnectDiagnosticsMacsecStatus", + number=312795565, + message="CacheInvalidationRule", ) - operational_status: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=201070847, - optional=True, + number=227560217, ) - receiving_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( - proto.MESSAGE, - number=244717279, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="InterconnectDiagnosticsLinkOpticalPower", ) - transmitting_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( - proto.MESSAGE, - number=459431197, - optional=True, - message="InterconnectDiagnosticsLinkOpticalPower", + url_map: str = proto.Field( + proto.STRING, + number=367020684, ) -class InterconnectDiagnosticsMacsecStatus(proto.Message): - r"""Describes the status of MACsec encryption on the link. +class Items(proto.Message): + r"""Metadata .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ckn (str): - Indicates the Connectivity Association Key - Name (CKN) currently being used if MACsec is - operational. + key (str): + Key for the metadata entry. Keys must conform to the + following regexp: [a-zA-Z0-9-\_]+, and be less than 128 + bytes in length. This is reflected as part of a URL in the + metadata server. Additionally, to avoid ambiguity, keys must + not conflict with any other metadata keys for the project. - This field is a member of `oneof`_ ``_ckn``. - operational (bool): - Indicates whether or not MACsec is - operational on this link. + This field is a member of `oneof`_ ``_key``. + value (str): + Value for the metadata entry. These are + free-form strings, and only have meaning as + interpreted by the image running in the + instance. The only restriction placed on values + is that their size must be less than or equal to + 262144 bytes (256 KiB). - This field is a member of `oneof`_ ``_operational``. + This field is a member of `oneof`_ ``_value``. """ - ckn: str = proto.Field( + key: str = proto.Field( proto.STRING, - number=98566, + number=106079, optional=True, ) - operational: bool = proto.Field( - proto.BOOL, - number=129704914, + value: str = proto.Field( + proto.STRING, + number=111972721, optional=True, ) -class InterconnectGroup(proto.Message): - r"""An interconnect group resource allows customers to create, - analyze, and expand their redundant connections. +class License(proto.Message): + r"""Represents a License resource. + + A License represents billing and aggregate usage data forpublic + andmarketplace images. *Caution* This resource is intended for use + only by third-party partners who are creatingCloud Marketplace + images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): + allowed_replacement_licenses (MutableSequence[str]): + Specifies licenseCodes of licenses that can replace this + license. Note: such replacements are allowed even if + removable_from_disk is false. + appendable_to_disk (bool): + If true, this license can be appended to an + existing disk's set of licenses. - This field is a member of `oneof`_ ``_configured``. + This field is a member of `oneof`_ ``_appendable_to_disk``. + charges_use_fee (bool): + [Output Only] Deprecated. This field no longer reflects + whether a license charges a usage fee. + + This field is a member of `oneof`_ ``_charges_use_fee``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - An optional description of this resource. - Provide this property when you create the - resource. + An optional textual description of the + resource; provided by the client when the + resource is created. This field is a member of `oneof`_ ``_description``. - etag (str): - Opaque system-generated token that uniquely - identifies the configuration. If provided when - patching a configuration in update mode, the - provided token must match the current token or - the update is rejected. This provides a reliable - means of doing read-modify-write (optimistic - locking) as described by API 154. - - This field is a member of `oneof`_ ``_etag``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): - - This field is a member of `oneof`_ ``_intent``. - interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.InterconnectGroupInterconnect]): - Interconnects in the InterconnectGroup. Keys - are arbitrary user-specified strings. Users are - encouraged, but not required, to use their - preferred format for resource links as keys. - Note that there are add-members and - remove-members methods in gcloud. The size of - this map is limited by an "Interconnects per - group" quota. + incompatible_licenses (MutableSequence[str]): + Specifies licenseCodes of licenses that are + incompatible with this license. If a license is + incompatible with this license, it cannot be + attached to the same disk or image. kind (str): - [Output Only] Type of the resource. Always - compute#InterconnectGroup + Output only. [Output Only] Type of resource. Always + compute#license for licenses. This field is a member of `oneof`_ ``_kind``. + license_code (int): + [Output Only] The unique code used to attach this license to + images, snapshots, and disks. + + This field is a member of `oneof`_ ``_license_code``. + minimum_retention (google.cloud.compute_v1beta.types.Duration): + If set, this license will be unable to be removed or + replaced once attached to a disk until the minimum_retention + period has passed. + + This field is a member of `oneof`_ ``_minimum_retention``. + multi_tenant_only (bool): + If true, this license can only be used on VMs + on multi tenant nodes. + + This field is a member of `oneof`_ ``_multi_tenant_only``. name (str): - Name of the resource. Provided by the client when the - resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 - characters long and match the regular expression - ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first - character must be a lowercase letter, and all following - characters must be a dash, lowercase letter, or digit, - except the last character, which cannot be a dash. + Name of the resource. The name must be 1-63 + characters long and comply withRFC1035. This field is a member of `oneof`_ ``_name``. - physical_structure (google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructure): + os_license (bool): + If true, indicates this is an OS license. + Only one OS license can be attached to a disk or + image at a time. - This field is a member of `oneof`_ ``_physical_structure``. + This field is a member of `oneof`_ ``_os_license``. + removable_from_disk (bool): + If true, this license can be removed from a + disk's set of licenses, with no replacement + license needed. + + This field is a member of `oneof`_ ``_removable_from_disk``. + required_coattached_licenses (MutableSequence[str]): + Specifies the set of permissible coattached + licenseCodes of licenses that satisfy the + coattachment requirement of this license. At + least one license from the set must be attached + to the same disk or image as this license. + resource_requirements (google.cloud.compute_v1beta.types.LicenseResourceRequirements): + [Input Only] Deprecated. + + This field is a member of `oneof`_ ``_resource_requirements``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + sole_tenant_only (bool): + If true, this license can only be used on VMs + on sole tenant nodes. + + This field is a member of `oneof`_ ``_sole_tenant_only``. + transferable (bool): + If false, licenses will not be copied from + the source resource when creating an image from + a disk, disk from snapshot, or snapshot from + disk. + + This field is a member of `oneof`_ ``_transferable``. + update_timestamp (str): + Output only. [Output Only] Last update timestamp inRFC3339 + text format. + + This field is a member of `oneof`_ ``_update_timestamp``. """ - configured: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, + allowed_replacement_licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=195677718, + ) + appendable_to_disk: bool = proto.Field( + proto.BOOL, + number=16959254, + optional=True, + ) + charges_use_fee: bool = proto.Field( + proto.BOOL, + number=372412622, optional=True, - message="InterconnectGroupConfigured", ) creation_timestamp: str = proto.Field( proto.STRING, @@ -61905,3186 +73645,3148 @@ class InterconnectGroup(proto.Message): number=422937596, optional=True, ) - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - intent: "InterconnectGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, - optional=True, - message="InterconnectGroupIntent", - ) - interconnects: MutableMapping[ - str, "InterconnectGroupInterconnect" - ] = proto.MapField( + incompatible_licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, - proto.MESSAGE, - number=520187301, - message="InterconnectGroupInterconnect", + number=334239768, ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) + license_code: int = proto.Field( + proto.UINT64, + number=1467179, + optional=True, + ) + minimum_retention: "Duration" = proto.Field( + proto.MESSAGE, + number=155398189, + optional=True, + message="Duration", + ) + multi_tenant_only: bool = proto.Field( + proto.BOOL, + number=274395163, + optional=True, + ) name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - physical_structure: "InterconnectGroupPhysicalStructure" = proto.Field( + os_license: bool = proto.Field( + proto.BOOL, + number=487986406, + optional=True, + ) + removable_from_disk: bool = proto.Field( + proto.BOOL, + number=25854638, + optional=True, + ) + required_coattached_licenses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=129195265, + ) + resource_requirements: "LicenseResourceRequirements" = proto.Field( proto.MESSAGE, - number=195307531, + number=214292769, optional=True, - message="InterconnectGroupPhysicalStructure", + message="LicenseResourceRequirements", ) self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - - -class InterconnectGroupConfigured(proto.Message): - r"""[Output Only] The status of the group as configured. This has the - same structure as the operational field reported by the - OperationalStatus method, but does not take into account the - operational status of each resource. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - topology_capability (google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapability): - - This field is a member of `oneof`_ ``_topology_capability``. - """ - - topology_capability: "InterconnectGroupConfiguredTopologyCapability" = proto.Field( - proto.MESSAGE, - number=144190696, + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + sole_tenant_only: bool = proto.Field( + proto.BOOL, + number=427525559, + optional=True, + ) + transferable: bool = proto.Field( + proto.BOOL, + number=4349893, + optional=True, + ) + update_timestamp: str = proto.Field( + proto.STRING, + number=120894752, optional=True, - message="InterconnectGroupConfiguredTopologyCapability", ) -class InterconnectGroupConfiguredTopologyCapability(proto.Message): - r"""[Output Only] How reliable this topology is configured to be, and - why this group does or does not meet the requirements for the - intended capability. +class LicenseCode(proto.Message): + r"""Represents a License Code resource. + + A License Code is a unique identifier used to represent alicense + resource. *Caution* This resource is intended for use only by + third-party partners who are creatingCloud Marketplace images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - intended_capability_blockers (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers]): - - supported_sla (str): - Check the SupportedSla enum for the list of - possible values. - - This field is a member of `oneof`_ ``_supported_sla``. - """ - - class SupportedSla(proto.Enum): - r""" - - Values: - UNDEFINED_SUPPORTED_SLA (0): - A value indicating that the enum field is not - set. - NO_SLA (161460618): - No description available. - PRODUCTION_CRITICAL (470416485): - No description available. - PRODUCTION_NON_CRITICAL (117399223): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_SUPPORTED_SLA = 0 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 - UNSPECIFIED = 526786327 - - intended_capability_blockers: MutableSequence[ - "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" - ] = proto.RepeatedField( - proto.MESSAGE, - number=531644140, - message="InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", - ) - supported_sla: str = proto.Field( - proto.STRING, - number=59292183, - optional=True, - ) + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + Output only. [Output Only] Description of this License Code. -class InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers( - proto.Message -): - r"""[Output Only] Reasons why configuration.topologyCapability.sla - differs from intent.topologyCapability. This list is empty if and - only if those are the same. + This field is a member of `oneof`_ ``_description``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of resource. Always + compute#licenseCode for licenses. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + license_alias (MutableSequence[google.cloud.compute_v1beta.types.LicenseCodeLicenseAlias]): + [Output Only] URL and description aliases of Licenses with + the same License Code. + name (str): + Output only. [Output Only] Name of the resource. The name is + 1-20 characters long and must be a valid 64 bit integer. - Attributes: - blocker_type (str): - Check the BlockerType enum for the list of - possible values. + This field is a member of `oneof`_ ``_name``. + self_link (str): + Output only. [Output Only] Server-defined URL for the + resource. - This field is a member of `oneof`_ ``_blocker_type``. - documentation_link (str): - [Output Only] The url of Google Cloud public documentation - explaining this requirement. This is set for every type of - requirement. + This field is a member of `oneof`_ ``_self_link``. + state (str): + Output only. [Output Only] Current state of this License + Code. Check the State enum for the list of possible values. - This field is a member of `oneof`_ ``_documentation_link``. - explanation (str): - [Output Only] A human-readable explanation of this - requirement and why it's not met. This is set for every type - of requirement. + This field is a member of `oneof`_ ``_state``. + transferable (bool): + Output only. [Output Only] If true, the license will remain + attached when creating images or snapshots from disks. + Otherwise, the license is not transferred. - This field is a member of `oneof`_ ``_explanation``. - facilities (MutableSequence[str]): - [Output Only] Facilities used to explain this blocker in - more detail. Like - physicalStructure.metros.facilities.facility, this is a - numeric string like "5467". - interconnects (MutableSequence[str]): - [Output Only] Interconnects used to explain this blocker in - more detail. - metros (MutableSequence[str]): - [Output Only] Metros used to explain this blocker in more - detail. These are three-letter lowercase strings like "iad". - A blocker like INCOMPATIBLE_METROS will specify the - problematic metros in this field. - zones (MutableSequence[str]): - [Output Only] Zones used to explain this blocker in more - detail. Zone names are "zone1" and/or "zone2". + This field is a member of `oneof`_ ``_transferable``. """ - class BlockerType(proto.Enum): - r""" + class State(proto.Enum): + r"""Output only. [Output Only] Current state of this License Code. Values: - UNDEFINED_BLOCKER_TYPE (0): + UNDEFINED_STATE (0): A value indicating that the enum field is not set. - INCOMPATIBLE_METROS (290410432): - No description available. - NOT_AVAILABLE (140722205): - No description available. - NO_INTERCONNECTS (523549575): - No description available. - NO_INTERCONNECTS_IN_METRO_AND_ZONE (440966492): - No description available. - OTHER (75532016): - No description available. - UNSPECIFIED (526786327): + DISABLED (516696700): + Machines are not allowed to attach boot disks + with this License Code. Requests to create new + resources with this license will be rejected. + ENABLED (182130465): + Use is allowed for anyone with USE_READ_ONLY access to this + License Code. + RESTRICTED (261551195): + Use of this license is limited to a project + whitelist. + STATE_UNSPECIFIED (470755401): No description available. + TERMINATED (250018339): + Reserved state. """ - UNDEFINED_BLOCKER_TYPE = 0 - INCOMPATIBLE_METROS = 290410432 - NOT_AVAILABLE = 140722205 - NO_INTERCONNECTS = 523549575 - NO_INTERCONNECTS_IN_METRO_AND_ZONE = 440966492 - OTHER = 75532016 - UNSPECIFIED = 526786327 + UNDEFINED_STATE = 0 + DISABLED = 516696700 + ENABLED = 182130465 + RESTRICTED = 261551195 + STATE_UNSPECIFIED = 470755401 + TERMINATED = 250018339 - blocker_type: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=381194847, + number=30525366, optional=True, ) - documentation_link: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=93465183, + number=422937596, optional=True, ) - explanation: str = proto.Field( - proto.STRING, - number=504745497, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - facilities: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=536683137, - ) - interconnects: MutableSequence[str] = proto.RepeatedField( + kind: str = proto.Field( proto.STRING, - number=520187301, + number=3292052, + optional=True, ) - metros: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=533067386, + license_alias: MutableSequence["LicenseCodeLicenseAlias"] = proto.RepeatedField( + proto.MESSAGE, + number=43550930, + message="LicenseCodeLicenseAlias", ) - zones: MutableSequence[str] = proto.RepeatedField( + name: str = proto.Field( proto.STRING, - number=116085319, + number=3373707, + optional=True, ) - - -class InterconnectGroupIntent(proto.Message): - r"""The user's intent for this group. This is the only required - field besides the name that must be specified on group creation. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - topology_capability (str): - Check the TopologyCapability enum for the - list of possible values. - - This field is a member of `oneof`_ ``_topology_capability``. - """ - - class TopologyCapability(proto.Enum): - r""" - - Values: - UNDEFINED_TOPOLOGY_CAPABILITY (0): - A value indicating that the enum field is not - set. - NO_SLA (161460618): - No description available. - PRODUCTION_CRITICAL (470416485): - No description available. - PRODUCTION_NON_CRITICAL (117399223): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_TOPOLOGY_CAPABILITY = 0 - NO_SLA = 161460618 - PRODUCTION_CRITICAL = 470416485 - PRODUCTION_NON_CRITICAL = 117399223 - UNSPECIFIED = 526786327 - - topology_capability: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=144190696, + number=456214797, optional=True, ) - - -class InterconnectGroupInterconnect(proto.Message): - r"""An Interconnect in this InterconnectGroup. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - interconnect (str): - The URL of an Interconnect in this group. All - Interconnects in the group are unique. - - This field is a member of `oneof`_ ``_interconnect``. - """ - - interconnect: str = proto.Field( + state: str = proto.Field( proto.STRING, - number=224601230, + number=109757585, optional=True, ) - - -class InterconnectGroupPhysicalStructure(proto.Message): - r"""[Output Only] An analysis of the physical layout of Interconnects in - this group. Every Interconnect in the group is shown once in this - structure. - - Attributes: - metros (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetros]): - - """ - - metros: MutableSequence[ - "InterconnectGroupPhysicalStructureMetros" - ] = proto.RepeatedField( - proto.MESSAGE, - number=533067386, - message="InterconnectGroupPhysicalStructureMetros", + transferable: bool = proto.Field( + proto.BOOL, + number=4349893, + optional=True, ) -class InterconnectGroupPhysicalStructureMetros(proto.Message): - r"""[Output Only] The metros Interconnects in this group are in. +class LicenseCodeLicenseAlias(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - facilities (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilities]): + description (str): + Output only. [Output Only] Description of this License Code. - metro (str): - [Output Only] The name of the metro, as a three-letter - lowercase string like "iad". This is the first component of - the location of Interconnects underneath this. + This field is a member of `oneof`_ ``_description``. + self_link (str): + Output only. [Output Only] URL of license corresponding to + this License Code. - This field is a member of `oneof`_ ``_metro``. + This field is a member of `oneof`_ ``_self_link``. """ - facilities: MutableSequence[ - "InterconnectGroupPhysicalStructureMetrosFacilities" - ] = proto.RepeatedField( - proto.MESSAGE, - number=536683137, - message="InterconnectGroupPhysicalStructureMetrosFacilities", + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, ) - metro: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=103787801, + number=456214797, optional=True, ) -class InterconnectGroupPhysicalStructureMetrosFacilities(proto.Message): - r"""[Output Only] The facilities Interconnects in this metro are present - in. - +class LicenseResourceCommitment(proto.Message): + r"""Commitment for a particular license resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - facility (str): - [Output Only] The ID of this facility, as a numeric string - like "5467". This is the third component of the location of - Interconnects in this facility. + amount (int): + The number of licenses you plan to purchase. - This field is a member of `oneof`_ ``_facility``. - zones (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupPhysicalStructureMetrosFacilitiesZones]): + This field is a member of `oneof`_ ``_amount``. + cores_per_license (str): + The number of cores per license. + + This field is a member of `oneof`_ ``_cores_per_license``. + license_ (str): + The applicable license URI. + This field is a member of `oneof`_ ``_license``. """ - facility: str = proto.Field( + amount: int = proto.Field( + proto.INT64, + number=196759640, + optional=True, + ) + cores_per_license: str = proto.Field( proto.STRING, - number=501116579, + number=32482324, optional=True, ) - zones: MutableSequence[ - "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" - ] = proto.RepeatedField( - proto.MESSAGE, - number=116085319, - message="InterconnectGroupPhysicalStructureMetrosFacilitiesZones", + license_: str = proto.Field( + proto.STRING, + number=166757441, + optional=True, ) -class InterconnectGroupPhysicalStructureMetrosFacilitiesZones(proto.Message): - r"""[Output Only] The zones that Interconnects in this facility are - present in. - +class LicenseResourceRequirements(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnects (MutableSequence[str]): - [Output Only] URLs of Interconnects in this redundancy group - in the given metro, facility, and zone. - zone (str): - [Output Only] The name of the zone, either "zone1" or - "zone2". This is the second component of the location of - Interconnects in this facility. + min_guest_cpu_count (int): + [Input Only] Deprecated. This field no longer reflects the + minimum number of guest cpus required to use the Instance. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_min_guest_cpu_count``. + min_memory_mb (int): + [Input Only] Deprecated. This field no longer reflects the + minimum memory required to use the Instance. + + This field is a member of `oneof`_ ``_min_memory_mb``. """ - interconnects: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=520187301, + min_guest_cpu_count: int = proto.Field( + proto.INT32, + number=477964836, + optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + min_memory_mb: int = proto.Field( + proto.INT32, + number=504785894, optional=True, ) -class InterconnectGroupsCreateMembers(proto.Message): +class LicensesListResponse(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - intent_mismatch_behavior (str): - How to behave when - configured.topologyCapability.supportedSLA would - not equal intent.topologyCapability after this - call. Check the IntentMismatchBehavior enum for - the list of possible values. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_intent_mismatch_behavior``. - interconnects (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput]): + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.License]): + A list of License resources. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - template_interconnect (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembersInterconnectInput): - Parameters for the Interconnects to create. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_template_interconnect``. - """ + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - class IntentMismatchBehavior(proto.Enum): - r"""How to behave when configured.topologyCapability.supportedSLA - would not equal intent.topologyCapability after this call. + This field is a member of `oneof`_ ``_warning``. + """ - Values: - UNDEFINED_INTENT_MISMATCH_BEHAVIOR (0): - A value indicating that the enum field is not - set. - CREATE (385389820): - No description available. - REJECT (266102687): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_INTENT_MISMATCH_BEHAVIOR = 0 - CREATE = 385389820 - REJECT = 266102687 - UNSPECIFIED = 526786327 + @property + def raw_page(self): + return self - intent_mismatch_behavior: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=164408000, + number=3355, optional=True, ) - interconnects: MutableSequence[ - "InterconnectGroupsCreateMembersInterconnectInput" - ] = proto.RepeatedField( + items: MutableSequence["License"] = proto.RepeatedField( proto.MESSAGE, - number=520187301, - message="InterconnectGroupsCreateMembersInterconnectInput", + number=100526016, + message="License", ) - template_interconnect: "InterconnectGroupsCreateMembersInterconnectInput" = ( - proto.Field( - proto.MESSAGE, - number=224745523, - optional=True, - message="InterconnectGroupsCreateMembersInterconnectInput", - ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class InterconnectGroupsCreateMembersInterconnectInput(proto.Message): - r"""LINT.IfChange +class ListAcceleratorTypesRequest(proto.Message): + r"""A request message for AcceleratorTypes.List. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - admin_enabled (bool): - Administrative status of the interconnect. - When this is set to true, the Interconnect is - functional and can carry traffic. When set to - false, no packets can be carried over the - interconnect and no BGP routes are exchanged - over it. By default, the status is set to true. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_admin_enabled``. - customer_name (str): - Customer name, to put in the Letter of - Authorization as the party authorized to request - a crossconnect. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_customer_name``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_description``. - facility (str): - A zone-free location to use for all - Interconnects created in this call, like - "iad-1234". + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_facility``. - interconnect_type (str): - Type of interconnect, which can take one of the following - values: - PARTNER: A partner-managed interconnection shared - between customers though a partner. - DEDICATED: A dedicated - physical interconnection with the customer. Note that a - value IT_PRIVATE has been deprecated in favor of DEDICATED. - Check the InterconnectType enum for the list of possible - values. + :: - This field is a member of `oneof`_ ``_interconnect_type``. - link_type (str): - Type of link requested, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR - optics - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR - optics. - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with - LR4 optics. Note that this field indicates the speed of each - of the links in the bundle, not the speed of the entire - bundle. Check the LinkType enum for the list of possible - values. + labels.owner:* - This field is a member of `oneof`_ ``_link_type``. - name (str): - Name of the Interconnects to be created. This must be - specified on the template and/or on each individual - interconnect. The name, if not empty, must be 1-63 - characters long, and comply with RFC1035. Specifically, any - nonempty name must be 1-63 characters long and match the - regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which - means the first character must be a lowercase letter, and - all following characters must be a dash, lowercase letter, - or digit, except the last character, which cannot be a dash. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_name``. - noc_contact_email (str): - Email address to contact the customer NOC for - operations and maintenance notifications - regarding this Interconnect. If specified, this - will be used for notifications in addition to - all other forms described, such as Cloud - Monitoring logs alerting and Cloud - Notifications. This field is required for users - who sign up for Cloud Interconnect using - workforce identity federation. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_noc_contact_email``. - remote_location (str): - Indicates that this is a Cross-Cloud - Interconnect. This field specifies the location - outside of Google's network that the - interconnect is connected to. + :: - This field is a member of `oneof`_ ``_remote_location``. - requested_features (MutableSequence[str]): - Optional. List of features requested for this Interconnect - connection, which can take one of the following values: - - IF_MACSEC If specified then the connection is created on - MACsec capable hardware ports. If not specified, the default - value is false, which allocates non-MACsec capable ports - first if available. This parameter can be provided only with - Interconnect INSERT. It isn't valid for Interconnect PATCH. - Check the RequestedFeatures enum for the list of possible - values. - requested_link_count (int): - Target number of physical links in the link - bundle, as requested by the customer. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_requested_link_count``. - """ + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - class InterconnectType(proto.Enum): - r"""Type of interconnect, which can take one of the following values: - - PARTNER: A partner-managed interconnection shared between customers - though a partner. - DEDICATED: A dedicated physical interconnection - with the customer. Note that a value IT_PRIVATE has been deprecated - in favor of DEDICATED. + :: - Values: - UNDEFINED_INTERCONNECT_TYPE (0): - A value indicating that the enum field is not - set. - DEDICATED (258411983): - A dedicated physical interconnection with the - customer. - IT_PRIVATE (335677007): - [Deprecated] A private, physical interconnection with the - customer. - PARTNER (461924520): - A partner-managed interconnection shared - between customers via partner. - """ - UNDEFINED_INTERCONNECT_TYPE = 0 - DEDICATED = 258411983 - IT_PRIVATE = 335677007 - PARTNER = 461924520 + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - class LinkType(proto.Enum): - r"""Type of link requested, which can take one of the following values: - - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. Note - that this field indicates the speed of each of the links in the - bundle, not the speed of the entire bundle. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - Values: - UNDEFINED_LINK_TYPE (0): - A value indicating that the enum field is not - set. - LINK_TYPE_ETHERNET_100G_LR (337672551): - 100G Ethernet, LR Optics. - LINK_TYPE_ETHERNET_10G_LR (236739749): - 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; - LINK_TYPE_ETHERNET_400G_LR4 (127023690): - 400G Ethernet, LR4 Optics. - """ - UNDEFINED_LINK_TYPE = 0 - LINK_TYPE_ETHERNET_100G_LR = 337672551 - LINK_TYPE_ETHERNET_10G_LR = 236739749 - LINK_TYPE_ETHERNET_400G_LR4 = 127023690 + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - class RequestedFeatures(proto.Enum): - r""" + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - Values: - UNDEFINED_REQUESTED_FEATURES (0): - A value indicating that the enum field is not - set. - IF_CROSS_SITE_NETWORK (469111095): - Cross-Site Networking - IF_MACSEC (396279300): - Media Access Control security (MACsec) - """ - UNDEFINED_REQUESTED_FEATURES = 0 - IF_CROSS_SITE_NETWORK = 469111095 - IF_MACSEC = 396279300 + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, - optional=True, - ) - customer_name: str = proto.Field( - proto.STRING, - number=3665484, - optional=True, - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - facility: str = proto.Field( + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. + """ + + filter: str = proto.Field( proto.STRING, - number=501116579, + number=336120696, optional=True, ) - interconnect_type: str = proto.Field( - proto.STRING, - number=515165259, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - link_type: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=523207775, + number=160562920, optional=True, ) - name: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=3373707, + number=19994697, optional=True, ) - noc_contact_email: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=14072832, - optional=True, + number=227560217, ) - remote_location: str = proto.Field( - proto.STRING, - number=324388750, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - requested_features: MutableSequence[str] = proto.RepeatedField( + zone: str = proto.Field( proto.STRING, - number=461240814, - ) - requested_link_count: int = proto.Field( - proto.INT32, - number=45051387, - optional=True, + number=3744684, ) -class InterconnectGroupsCreateMembersRequest(proto.Message): - r""" +class ListAddressesRequest(proto.Message): + r"""A request message for Addresses.List. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - request (google.cloud.compute_v1beta.types.InterconnectGroupsCreateMembers): + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_request``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - request: "InterconnectGroupsCreateMembers" = proto.Field( - proto.MESSAGE, - number=21951119, - optional=True, - message="InterconnectGroupsCreateMembers", - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class InterconnectGroupsGetOperationalStatusResponse(proto.Message): - r"""Response for the - InterconnectGroupsGetOperationalStatusResponse. + :: + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - etag (str): + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_etag``. - result (google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatus): + :: - This field is a member of `oneof`_ ``_result``. - """ + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - result: "InterconnectGroupsOperationalStatus" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectGroupsOperationalStatus", - ) + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + :: -class InterconnectGroupsListResponse(proto.Message): - r""" + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - Attributes: - etag (str): + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroup]): - A list of InterconnectGroup resources. - kind (str): + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_return_partial_success``. """ - @property - def raw_page(self): - return self - - etag: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=3123477, + number=336120696, optional=True, ) - id: str = proto.Field( - proto.STRING, - number=3355, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - items: MutableSequence["InterconnectGroup"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InterconnectGroup", - ) - kind: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3292052, + number=160562920, optional=True, ) - next_page_token: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=79797525, + number=19994697, optional=True, ) - self_link: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + region: str = proto.Field( proto.STRING, - number=243372063, + number=138946292, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", ) -class InterconnectGroupsOperationalStatus(proto.Message): - r"""Request to get the status of the interconnect group with - extra detail. +class ListAssociationsFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.ListAssociations. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - configured (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): - The configuration analysis, as returned by - Get. - - This field is a member of `oneof`_ ``_configured``. - group_status (str): - Summarizes the status of the group. - Check the GroupStatus enum for the list of - possible values. - - This field is a member of `oneof`_ ``_group_status``. - intent (google.cloud.compute_v1beta.types.InterconnectGroupIntent): - The intent of the resource, as returned by - Get. - - This field is a member of `oneof`_ ``_intent``. - interconnect_statuses (MutableSequence[google.cloud.compute_v1beta.types.InterconnectGroupsOperationalStatusInterconnectStatus]): + include_inherited_policies (bool): + If set to "true", the response will contain a + list of all associations for the containing + folders and the containing organization of the + target. The parameter has no effect if the + target is an organization. - operational (google.cloud.compute_v1beta.types.InterconnectGroupConfigured): - The operational state of the group, including - only active Interconnects. + This field is a member of `oneof`_ ``_include_inherited_policies``. + target_resource (str): + The target resource to list associations. It + is an organization, or a folder. - This field is a member of `oneof`_ ``_operational``. + This field is a member of `oneof`_ ``_target_resource``. """ - class GroupStatus(proto.Enum): - r"""Summarizes the status of the group. - - Values: - UNDEFINED_GROUP_STATUS (0): - A value indicating that the enum field is not - set. - DEGRADED (396890926): - No description available. - FULLY_DOWN (255514647): - No description available. - FULLY_UP (504176464): - No description available. - GROUPS_STATUS_UNSPECIFIED (261932693): - No description available. - """ - UNDEFINED_GROUP_STATUS = 0 - DEGRADED = 396890926 - FULLY_DOWN = 255514647 - FULLY_UP = 504176464 - GROUPS_STATUS_UNSPECIFIED = 261932693 - - configured: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=295631422, + include_inherited_policies: bool = proto.Field( + proto.BOOL, + number=32280076, optional=True, - message="InterconnectGroupConfigured", ) - group_status: str = proto.Field( + target_resource: str = proto.Field( proto.STRING, - number=338778546, - optional=True, - ) - intent: "InterconnectGroupIntent" = proto.Field( - proto.MESSAGE, - number=426849948, + number=467318524, optional=True, - message="InterconnectGroupIntent", - ) - interconnect_statuses: MutableSequence[ - "InterconnectGroupsOperationalStatusInterconnectStatus" - ] = proto.RepeatedField( - proto.MESSAGE, - number=446756017, - message="InterconnectGroupsOperationalStatusInterconnectStatus", ) - operational: "InterconnectGroupConfigured" = proto.Field( - proto.MESSAGE, - number=129704914, + + +class ListAssociationsOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.ListAssociations. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + target_resource (str): + The target resource to list associations. It + is an organization, or a folder. + + This field is a member of `oneof`_ ``_target_resource``. + """ + + target_resource: str = proto.Field( + proto.STRING, + number=467318524, optional=True, - message="InterconnectGroupConfigured", ) -class InterconnectGroupsOperationalStatusInterconnectStatus(proto.Message): - r"""The status of one Interconnect in the group. The order is - arbitrary. +class ListAutoscalersRequest(proto.Message): + r"""A request message for Autoscalers.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - admin_enabled (bool): - Whether the Interconnect is enabled. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_admin_enabled``. - diagnostics (google.cloud.compute_v1beta.types.InterconnectDiagnostics): - The diagnostics of the Interconnect, as - returned by the existing get-diagnostics method. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_diagnostics``. - interconnect (str): - The URL of the Interconnect being described. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_interconnect``. - is_active (str): - Whether this interconnect is participating in - the redundant configuration. Check the IsActive - enum for the list of possible values. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_is_active``. - """ + :: - class IsActive(proto.Enum): - r"""Whether this interconnect is participating in the redundant - configuration. + labels.owner:* - Values: - UNDEFINED_IS_ACTIVE (0): - A value indicating that the enum field is not - set. - ACTIVE (314733318): - No description available. - INACTIVE (270421099): - No description available. - IS_ACTIVE_UNSPECIFIED (274948243): - No description available. - """ - UNDEFINED_IS_ACTIVE = 0 - ACTIVE = 314733318 - INACTIVE = 270421099 - IS_ACTIVE_UNSPECIFIED = 274948243 + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - admin_enabled: bool = proto.Field( - proto.BOOL, - number=445675089, - optional=True, - ) - diagnostics: "InterconnectDiagnostics" = proto.Field( - proto.MESSAGE, - number=333355436, - optional=True, - message="InterconnectDiagnostics", - ) - interconnect: str = proto.Field( - proto.STRING, - number=224601230, - optional=True, - ) - is_active: str = proto.Field( - proto.STRING, - number=114830267, - optional=True, - ) + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: -class InterconnectList(proto.Message): - r"""Response to the list request, and contains a list of - interconnects. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Interconnect]): - A list of Interconnect resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectList for lists of interconnects. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - This field is a member of `oneof`_ ``_warning``. - """ + You cannot combine constraints on multiple fields using + regular expressions. - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - id: str = proto.Field( + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. + """ + + filter: str = proto.Field( proto.STRING, - number=3355, + number=336120696, optional=True, ) - items: MutableSequence["Interconnect"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="Interconnect", + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - kind: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3292052, + number=160562920, optional=True, ) - next_page_token: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=79797525, + number=19994697, optional=True, ) - self_link: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class InterconnectLocation(proto.Message): - r"""Represents an Interconnect Attachment (VLAN) Location - resource. You can use this resource to find location details - about an Interconnect attachment (VLAN). For more information - about interconnect attachments, read Creating VLAN Attachments. +class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): + r"""A request message for + RegionSslPolicies.ListAvailableFeatures. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address (str): - [Output Only] The postal address of the Point of Presence, - each line in the address is separated by a newline - character. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_address``. - availability_zone (str): - [Output Only] Availability zone for this - InterconnectLocation. Within a metropolitan area (metro), - maintenance will not be simultaneously scheduled in more - than one availability zone. Example: "zone1" or "zone2". + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_availability_zone``. - available_features (MutableSequence[str]): - [Output only] List of features available at this - InterconnectLocation, which can take one of the following - values: - IF_MACSEC Check the AvailableFeatures enum for the - list of possible values. - available_link_types (MutableSequence[str]): - [Output only] List of link types available at this - InterconnectLocation, which can take one of the following - values: - LINK_TYPE_ETHERNET_10G_LR - - LINK_TYPE_ETHERNET_100G_LR - LINK_TYPE_ETHERNET_400G_LR4 - Check the AvailableLinkTypes enum for the list of possible - values. - city (str): - [Output Only] Metropolitan area designator that indicates - which city an interconnect is located. For example: - "Chicago, IL", "Amsterdam, Netherlands". + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_city``. - continent (str): - [Output Only] Continent for this location, which can take - one of the following values: - AFRICA - ASIA_PAC - EUROPE - - NORTH_AMERICA - SOUTH_AMERICA Check the Continent enum for - the list of possible values. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_continent``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + :: - This field is a member of `oneof`_ ``_creation_timestamp``. - cross_site_interconnect_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationCrossSiteInterconnectInfo]): - [Output Only] A list of - InterconnectLocation.CrossSiteInterconnectInfo objects, that - describe where Cross-Site Interconnect wires may connect to - from this location and associated connection parameters. - Cross-Site Interconnect isn't allowed to locations which are - not listed. - description (str): - [Output Only] An optional description of the resource. + labels.owner:* - This field is a member of `oneof`_ ``_description``. - facility_provider (str): - [Output Only] The name of the provider for this facility - (e.g., EQUINIX). + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_facility_provider``. - facility_provider_facility_id (str): - [Output Only] A provider-assigned Identifier for this - facility (e.g., Ashburn-DC1). + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_facility_provider_facility_id``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + :: - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#interconnectLocation for interconnect locations. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_kind``. - name (str): - [Output Only] Name of the resource. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_name``. - peeringdb_facility_id (str): - [Output Only] The peeringdb identifier for this facility - (corresponding with a netfac type in peeringdb). + :: - This field is a member of `oneof`_ ``_peeringdb_facility_id``. - region_infos (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocationRegionInfo]): - [Output Only] A list of InterconnectLocation.RegionInfo - objects, that describe parameters pertaining to the relation - between this InterconnectLocation and various Google Cloud - regions. - self_link (str): - [Output Only] Server-defined URL for the resource. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_self_link``. - single_region_production_critical_peer_locations (MutableSequence[str]): - [Output Only] URLs of the other locations that can pair up - with this location to support Single-Region 99.99% SLA. E.g. - iad-zone1-1 and iad-zone2-5467 are Single-Region 99.99% peer - locations of each other. - status (str): - [Output Only] The status of this InterconnectLocation, which - can take one of the following values: - CLOSED: The - InterconnectLocation is closed and is unavailable for - provisioning new Interconnects. - AVAILABLE: The - InterconnectLocation is available for provisioning new - Interconnects. Check the Status enum for the list of - possible values. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_status``. - supports_pzs (bool): - [Output Only] Reserved for future use. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_supports_pzs``. - """ + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - class AvailableFeatures(proto.Enum): - r""" + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - Values: - UNDEFINED_AVAILABLE_FEATURES (0): - A value indicating that the enum field is not - set. - IF_CROSS_SITE_NETWORK (469111095): - Cross-Site Networking - IF_MACSEC (396279300): - Media Access Control security (MACsec) - """ - UNDEFINED_AVAILABLE_FEATURES = 0 - IF_CROSS_SITE_NETWORK = 469111095 - IF_MACSEC = 396279300 + You cannot combine constraints on multiple fields using + regular expressions. - class AvailableLinkTypes(proto.Enum): - r""" + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - Values: - UNDEFINED_AVAILABLE_LINK_TYPES (0): - A value indicating that the enum field is not - set. - LINK_TYPE_ETHERNET_100G_LR (337672551): - 100G Ethernet, LR Optics. - LINK_TYPE_ETHERNET_10G_LR (236739749): - 10G Ethernet, LR Optics. [(rate_bps) = 10000000000]; - LINK_TYPE_ETHERNET_400G_LR4 (127023690): - 400G Ethernet, LR4 Optics. - """ - UNDEFINED_AVAILABLE_LINK_TYPES = 0 - LINK_TYPE_ETHERNET_100G_LR = 337672551 - LINK_TYPE_ETHERNET_10G_LR = 236739749 - LINK_TYPE_ETHERNET_400G_LR4 = 127023690 + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - class Continent(proto.Enum): - r"""[Output Only] Continent for this location, which can take one of the - following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - - SOUTH_AMERICA + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - Values: - UNDEFINED_CONTINENT (0): - A value indicating that the enum field is not - set. - AFRICA (317443706): - No description available. - ASIA_PAC (119782269): - No description available. - C_AFRICA (71993846): - No description available. - C_ASIA_PAC (465668089): - No description available. - C_EUROPE (200369438): - No description available. - C_NORTH_AMERICA (275697048): - No description available. - C_SOUTH_AMERICA (397149792): - No description available. - EUROPE (445819298): - No description available. - NORTH_AMERICA (448015508): - No description available. - SOUTH_AMERICA (32597340): - No description available. - """ - UNDEFINED_CONTINENT = 0 - AFRICA = 317443706 - ASIA_PAC = 119782269 - C_AFRICA = 71993846 - C_ASIA_PAC = 465668089 - C_EUROPE = 200369438 - C_NORTH_AMERICA = 275697048 - C_SOUTH_AMERICA = 397149792 - EUROPE = 445819298 - NORTH_AMERICA = 448015508 - SOUTH_AMERICA = 32597340 + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - class Status(proto.Enum): - r"""[Output Only] The status of this InterconnectLocation, which can - take one of the following values: - CLOSED: The InterconnectLocation - is closed and is unavailable for provisioning new Interconnects. - - AVAILABLE: The InterconnectLocation is available for provisioning - new Interconnects. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - AVAILABLE (442079913): - The InterconnectLocation is available for - provisioning new Interconnects. - CLOSED (380163436): - The InterconnectLocation is closed for - provisioning new Interconnects. - """ - UNDEFINED_STATUS = 0 - AVAILABLE = 442079913 - CLOSED = 380163436 + This field is a member of `oneof`_ ``_return_partial_success``. + """ - address: str = proto.Field( - proto.STRING, - number=462920692, - optional=True, - ) - availability_zone: str = proto.Field( - proto.STRING, - number=158459920, - optional=True, - ) - available_features: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=496344307, - ) - available_link_types: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=509504298, - ) - city: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=3053931, + number=336120696, optional=True, ) - continent: str = proto.Field( - proto.STRING, - number=133442996, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - creation_timestamp: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=30525366, + number=160562920, optional=True, ) - cross_site_interconnect_infos: MutableSequence[ - "InterconnectLocationCrossSiteInterconnectInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=248573837, - message="InterconnectLocationCrossSiteInterconnectInfo", - ) - description: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=422937596, + number=19994697, optional=True, ) - facility_provider: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=533303309, - optional=True, + number=227560217, ) - facility_provider_facility_id: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=87269125, - optional=True, + number=138946292, ) - id: int = proto.Field( - proto.UINT64, - number=3355, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - kind: str = proto.Field( + + +class ListAvailableFeaturesSslPoliciesRequest(proto.Message): + r"""A request message for SslPolicies.ListAvailableFeatures. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=3292052, + number=336120696, optional=True, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - peeringdb_facility_id: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=536567094, + number=160562920, optional=True, ) - region_infos: MutableSequence[ - "InterconnectLocationRegionInfo" - ] = proto.RepeatedField( - proto.MESSAGE, - number=312194170, - message="InterconnectLocationRegionInfo", - ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - single_region_production_critical_peer_locations: MutableSequence[ - str - ] = proto.RepeatedField( - proto.STRING, - number=439537103, - ) - status: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=181260274, - optional=True, + number=227560217, ) - supports_pzs: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=83983214, + number=517198390, optional=True, ) -class InterconnectLocationCrossSiteInterconnectInfo(proto.Message): - r"""Information about Cross-Site Interconnect wires which may be - created between the containing location and another remote - location. +class ListBackendBucketsRequest(proto.Message): + r"""A request message for BackendBuckets.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - city (str): - The remote location for Cross-Site - Interconnect wires. This specifies an - InterconnectLocation city (metropolitan area - designator), which itself may match multiple - InterconnectLocations. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_city``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - city: str = proto.Field( - proto.STRING, - number=3053931, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class InterconnectLocationList(proto.Message): - r"""Response to the list request, and contains a list of - interconnect locations. + :: + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectLocation]): - A list of InterconnectLocation resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectLocationList for lists of interconnect - locations. + :: - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + :: - This field is a member of `oneof`_ ``_warning``. - """ + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - @property - def raw_page(self): - return self + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - id: str = proto.Field( + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=3355, + number=336120696, optional=True, ) - items: MutableSequence["InterconnectLocation"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InterconnectLocation", + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - kind: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3292052, + number=160562920, optional=True, ) - next_page_token: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=79797525, + number=19994697, optional=True, ) - self_link: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", ) -class InterconnectLocationRegionInfo(proto.Message): - r"""Information about any potential InterconnectAttachments - between an Interconnect at a specific InterconnectLocation, and - a specific Cloud Region. +class ListBackendServicesRequest(proto.Message): + r"""A request message for BackendServices.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - expected_rtt_ms (int): - Expected round-trip time in milliseconds, - from this InterconnectLocation to a VM in this - region. - - This field is a member of `oneof`_ ``_expected_rtt_ms``. - location_presence (str): - Identifies the network presence of this - location. Check the LocationPresence enum for - the list of possible values. - - This field is a member of `oneof`_ ``_location_presence``. - region (str): - URL for the region of this location. - - This field is a member of `oneof`_ ``_region``. - """ + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - class LocationPresence(proto.Enum): - r"""Identifies the network presence of this location. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - Values: - UNDEFINED_LOCATION_PRESENCE (0): - A value indicating that the enum field is not - set. - GLOBAL (494663587): - This region is not in any common network - presence with this InterconnectLocation. - LOCAL_REGION (403535464): - This region shares the same regional network - presence as this InterconnectLocation. - LP_GLOBAL (429584062): - [Deprecated] This region is not in any common network - presence with this InterconnectLocation. - LP_LOCAL_REGION (488598851): - [Deprecated] This region shares the same regional network - presence as this InterconnectLocation. - """ - UNDEFINED_LOCATION_PRESENCE = 0 - GLOBAL = 494663587 - LOCAL_REGION = 403535464 - LP_GLOBAL = 429584062 - LP_LOCAL_REGION = 488598851 + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - expected_rtt_ms: int = proto.Field( - proto.INT64, - number=422543866, - optional=True, - ) - location_presence: str = proto.Field( - proto.STRING, - number=101517893, - optional=True, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - optional=True, - ) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: -class InterconnectMacsec(proto.Message): - r"""Configuration information for enabling Media Access Control - security (MACsec) on this Cloud Interconnect connection between - Google and your on-premises router. + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - Attributes: - fail_open (bool): - If set to true, the Interconnect connection - is configured with a should-secure MACsec - security policy, that allows the Google router - to fallback to cleartext traffic if the MKA - session cannot be established. By default, the - Interconnect connection is configured with a - must-secure security policy that drops all - traffic if the MKA session cannot be established - with your router. + :: - This field is a member of `oneof`_ ``_fail_open``. - pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecPreSharedKey]): - Required. A keychain placeholder describing a - set of named key objects along with their start - times. A MACsec CKN/CAK is generated for each - key in the key chain. Google router - automatically picks the key with the most recent - startTime when establishing or re-establishing a - MACsec secure link. - """ + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - fail_open: bool = proto.Field( - proto.BOOL, - number=532597451, - optional=True, - ) - pre_shared_keys: MutableSequence[ - "InterconnectMacsecPreSharedKey" - ] = proto.RepeatedField( - proto.MESSAGE, - number=420308466, - message="InterconnectMacsecPreSharedKey", - ) + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + :: -class InterconnectMacsecConfig(proto.Message): - r"""MACsec configuration information for the Interconnect - connection. Contains the generated Connectivity Association Key - Name (CKN) and the key (CAK) for this Interconnect connection. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - Attributes: - pre_shared_keys (MutableSequence[google.cloud.compute_v1beta.types.InterconnectMacsecConfigPreSharedKey]): - A keychain placeholder describing a set of - named key objects along with their start times. - A MACsec CKN/CAK is generated for each key in - the key chain. Google router automatically picks - the key with the most recent startTime when - establishing or re-establishing a MACsec secure - link. - """ + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - pre_shared_keys: MutableSequence[ - "InterconnectMacsecConfigPreSharedKey" - ] = proto.RepeatedField( - proto.MESSAGE, - number=420308466, - message="InterconnectMacsecConfigPreSharedKey", - ) + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. -class InterconnectMacsecConfigPreSharedKey(proto.Message): - r"""Describes a pre-shared key used to setup MACsec in static - connectivity association key (CAK) mode. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + You cannot combine constraints on multiple fields using + regular expressions. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - Attributes: - cak (str): - An auto-generated Connectivity Association - Key (CAK) for this key. + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - This field is a member of `oneof`_ ``_cak``. - ckn (str): - An auto-generated Connectivity Association - Key Name (CKN) for this key. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - This field is a member of `oneof`_ ``_ckn``. - name (str): - User provided name for this pre-shared key. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_name``. - start_time (str): - User provided timestamp on or after which - this key is valid. + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. """ - cak: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=98253, + number=336120696, optional=True, ) - ckn: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=98566, + number=160562920, optional=True, ) - name: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=3373707, + number=19994697, optional=True, ) - start_time: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=37467274, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) -class InterconnectMacsecPreSharedKey(proto.Message): - r"""Describes a pre-shared key used to setup MACsec in static - connectivity association key (CAK) mode. +class ListBgpRoutesRoutersRequest(proto.Message): + r"""A request message for Routers.ListBgpRoutes. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Required. A name for this pre-shared key. The name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. + address_family (str): + (Required) limit results to this address + family (either IPv4 or IPv6) Check the + AddressFamily enum for the list of possible + values. - This field is a member of `oneof`_ ``_name``. - start_time (str): - A RFC3339 timestamp on or after which the key - is valid. startTime can be in the future. If the - keychain has a single key, startTime can be - omitted. If the keychain has multiple keys, - startTime is mandatory for each key. The start - times of keys must be in increasing order. The - start times of two consecutive keys must be at - least 6 hours apart. + This field is a member of `oneof`_ ``_address_family``. + destination_prefix (str): + Limit results to destinations that are + subnets of this CIDR range - This field is a member of `oneof`_ ``_start_time``. - """ + This field is a member of `oneof`_ ``_destination_prefix``. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, - ) - start_time: str = proto.Field( - proto.STRING, - number=37467274, - optional=True, - ) + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. -class InterconnectOutageNotification(proto.Message): - r"""Description of a planned outage on this Interconnect. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - affected_circuits (MutableSequence[str]): - If issue_type is IT_PARTIAL_OUTAGE, a list of the - Google-side circuit IDs that will be affected. - description (str): - A description about the purpose of the - outage. + labels.owner:* - This field is a member of `oneof`_ ``_description``. - end_time (int): - Scheduled end time for the outage - (milliseconds since Unix epoch). + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_end_time``. - issue_type (str): - Form this outage is expected to take, which can take one of - the following values: - OUTAGE: The Interconnect may be - completely out of service for some or all of the specified - window. - PARTIAL_OUTAGE: Some circuits comprising the - Interconnect as a whole should remain up, but with reduced - bandwidth. Note that the versions of this enum prefixed with - "IT\_" have been deprecated in favor of the unprefixed - values. Check the IssueType enum for the list of possible - values. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_issue_type``. - name (str): - Unique identifier for this outage - notification. + :: - This field is a member of `oneof`_ ``_name``. - source (str): - The party that generated this notification, which can take - the following value: - GOOGLE: this notification as - generated by Google. Note that the value of NSRC_GOOGLE has - been deprecated in favor of GOOGLE. Check the Source enum - for the list of possible values. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_source``. - start_time (int): - Scheduled start time for the outage - (milliseconds since Unix epoch). + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_start_time``. - state (str): - State of this notification, which can take one of the - following values: - ACTIVE: This outage notification is - active. The event could be in the past, present, or future. - See start_time and end_time for scheduling. - CANCELLED: The - outage associated with this notification was cancelled - before the outage was due to start. - COMPLETED: The outage - associated with this notification is complete. Note that the - versions of this enum prefixed with "NS\_" have been - deprecated in favor of the unprefixed values. Check the - State enum for the list of possible values. + :: - This field is a member of `oneof`_ ``_state``. - """ + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - class IssueType(proto.Enum): - r"""Form this outage is expected to take, which can take one of the - following values: - OUTAGE: The Interconnect may be completely out - of service for some or all of the specified window. - - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole - should remain up, but with reduced bandwidth. Note that the versions - of this enum prefixed with "IT\_" have been deprecated in favor of - the unprefixed values. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - Values: - UNDEFINED_ISSUE_TYPE (0): - A value indicating that the enum field is not - set. - IT_OUTAGE (175779973): - [Deprecated] The Interconnect may be completely out of - service for some or all of the specified window. - IT_PARTIAL_OUTAGE (92103971): - [Deprecated] Some circuits comprising the Interconnect will - be out of service during the expected window. The - interconnect as a whole should remain up, albeit with - reduced bandwidth. - OUTAGE (195285745): - The Interconnect may be completely out of - service for some or all of the specified window. - PARTIAL_OUTAGE (147053455): - Some circuits comprising the Interconnect - will be out of service during the expected - window. The interconnect as a whole should - remain up, albeit with reduced bandwidth. - """ - UNDEFINED_ISSUE_TYPE = 0 - IT_OUTAGE = 175779973 - IT_PARTIAL_OUTAGE = 92103971 - OUTAGE = 195285745 - PARTIAL_OUTAGE = 147053455 + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - class Source(proto.Enum): - r"""The party that generated this notification, which can take the - following value: - GOOGLE: this notification as generated by Google. - Note that the value of NSRC_GOOGLE has been deprecated in favor of - GOOGLE. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + peer (str): + (Required) limit results to the BGP peer with + the given name. Name should conform to RFC1035. + + This field is a member of `oneof`_ ``_peer``. + policy_applied (bool): + When true, the method returns post-policy + routes. Otherwise, it returns pre-policy routes. + + This field is a member of `oneof`_ ``_policy_applied``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + route_type (str): + (Required) limit results to this type of + route (either LEARNED or ADVERTISED) + Check the RouteType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_route_type``. + router (str): + Name or id of the resource for this request. + Name should conform to RFC1035. + """ + + class AddressFamily(proto.Enum): + r"""(Required) limit results to this address family (either IPv4 + or IPv6) Values: - UNDEFINED_SOURCE (0): + UNDEFINED_ADDRESS_FAMILY (0): A value indicating that the enum field is not set. - GOOGLE (497439289): - This notification was generated by Google. - NSRC_GOOGLE (510574562): - [Deprecated] This notification was generated by Google. + IPV4 (2254341): + No description available. + IPV6 (2254343): + No description available. + UNSPECIFIED_IP_VERSION (72938440): + No description available. """ - UNDEFINED_SOURCE = 0 - GOOGLE = 497439289 - NSRC_GOOGLE = 510574562 + UNDEFINED_ADDRESS_FAMILY = 0 + IPV4 = 2254341 + IPV6 = 2254343 + UNSPECIFIED_IP_VERSION = 72938440 - class State(proto.Enum): - r"""State of this notification, which can take one of the following - values: - ACTIVE: This outage notification is active. The event - could be in the past, present, or future. See start_time and - end_time for scheduling. - CANCELLED: The outage associated with - this notification was cancelled before the outage was due to start. - - COMPLETED: The outage associated with this notification is - complete. Note that the versions of this enum prefixed with "NS\_" - have been deprecated in favor of the unprefixed values. + class RouteType(proto.Enum): + r"""(Required) limit results to this type of route (either + LEARNED or ADVERTISED) Values: - UNDEFINED_STATE (0): + UNDEFINED_ROUTE_TYPE (0): A value indicating that the enum field is not set. - ACTIVE (314733318): - This outage notification is active. The event could be in - the future, present, or past. See start_time and end_time - for scheduling. - CANCELLED (41957681): - The outage associated with this notification - was cancelled before the outage was due to - start. - COMPLETED (309921323): - The outage associated with this notification - is complete. - NS_ACTIVE (252563136): - [Deprecated] This outage notification is active. The event - could be in the future, present, or past. See start_time and - end_time for scheduling. - NS_CANCELED (506579411): - [Deprecated] The outage associated with this notification - was canceled before the outage was due to start. + ADVERTISED (20302109): + No description available. + LEARNED (231892419): + No description available. + UNSPECIFIED_ROUTE_TYPE (248064440): + No description available. """ - UNDEFINED_STATE = 0 - ACTIVE = 314733318 - CANCELLED = 41957681 - COMPLETED = 309921323 - NS_ACTIVE = 252563136 - NS_CANCELED = 506579411 + UNDEFINED_ROUTE_TYPE = 0 + ADVERTISED = 20302109 + LEARNED = 231892419 + UNSPECIFIED_ROUTE_TYPE = 248064440 - affected_circuits: MutableSequence[str] = proto.RepeatedField( + address_family: str = proto.Field( proto.STRING, - number=177717013, + number=173744655, + optional=True, ) - description: str = proto.Field( + destination_prefix: str = proto.Field( proto.STRING, - number=422937596, + number=263872483, optional=True, ) - end_time: int = proto.Field( - proto.INT64, - number=114938801, + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - issue_type: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=369639136, + number=160562920, optional=True, ) - name: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=3373707, + number=19994697, optional=True, ) - source: str = proto.Field( + peer: str = proto.Field( proto.STRING, - number=177235995, + number=3436898, optional=True, ) - start_time: int = proto.Field( - proto.INT64, - number=37467274, + policy_applied: bool = proto.Field( + proto.BOOL, + number=379464304, optional=True, ) - state: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=109757585, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, + optional=True, + ) + route_type: str = proto.Field( + proto.STRING, + number=375888752, optional=True, ) + router: str = proto.Field( + proto.STRING, + number=148608841, + ) -class InterconnectRemoteLocation(proto.Message): - r"""Represents a Cross-Cloud Interconnect Remote Location - resource. You can use this resource to find remote location - details about an Interconnect attachment (VLAN). +class ListCrossSiteNetworksRequest(proto.Message): + r"""A request message for CrossSiteNetworks.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address (str): - [Output Only] The postal address of the Point of Presence, - each line in the address is separated by a newline - character. - - This field is a member of `oneof`_ ``_address``. - attachment_configuration_constraints (google.cloud.compute_v1beta.types.InterconnectAttachmentConfigurationConstraints): - [Output Only] Subset of fields from InterconnectAttachment's - \|configurationConstraints\| field that apply to all - attachments for this remote location. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_attachment_configuration_constraints``. - city (str): - [Output Only] Metropolitan area designator that indicates - which city an interconnect is located. For example: - "Chicago, IL", "Amsterdam, Netherlands". + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_city``. - constraints (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraints): - [Output Only] Constraints on the parameters for creating - Cross-Cloud Interconnect and associated - InterconnectAttachments. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_constraints``. - continent (str): - [Output Only] Continent for this location, which can take - one of the following values: - AFRICA - ASIA_PAC - EUROPE - - NORTH_AMERICA - SOUTH_AMERICA Check the Continent enum for - the list of possible values. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_continent``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + :: - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - [Output Only] An optional description of the resource. + labels.owner:* - This field is a member of `oneof`_ ``_description``. - facility_provider (str): - [Output Only] The name of the provider for this facility - (e.g., EQUINIX). + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_facility_provider``. - facility_provider_facility_id (str): - [Output Only] A provider-assigned Identifier for this - facility (e.g., Ashburn-DC1). + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_facility_provider_facility_id``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + :: - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always - compute#interconnectRemoteLocation for interconnect remote - locations. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_kind``. - lacp (str): - [Output Only] Link Aggregation Control Protocol (LACP) - constraints, which can take one of the following values: - LACP_SUPPORTED, LACP_UNSUPPORTED Check the Lacp enum for the - list of possible values. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_lacp``. - max_lag_size100_gbps (int): - [Output Only] The maximum number of 100 Gbps ports supported - in a link aggregation group (LAG). When linkType is 100 - Gbps, requestedLinkCount cannot exceed - max_lag_size_100_gbps. + :: - This field is a member of `oneof`_ ``_max_lag_size100_gbps``. - max_lag_size10_gbps (int): - [Output Only] The maximum number of 10 Gbps ports supported - in a link aggregation group (LAG). When linkType is 10 Gbps, - requestedLinkCount cannot exceed max_lag_size_10_gbps. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_max_lag_size10_gbps``. - max_lag_size400_gbps (int): - [Output Only] The maximum number of 400 Gbps ports supported - in a link aggregation group (LAG). When linkType is 400 - Gbps, requestedLinkCount cannot exceed - max_lag_size_400_gbps. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_max_lag_size400_gbps``. - name (str): - [Output Only] Name of the resource. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_name``. - peeringdb_facility_id (str): - [Output Only] The peeringdb identifier for this facility - (corresponding with a netfac type in peeringdb). + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_peeringdb_facility_id``. - permitted_connections (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocationPermittedConnections]): - [Output Only] Permitted connections. - remote_service (str): - [Output Only] Indicates the service provider present at the - remote location. Example values: "Amazon Web Services", - "Microsoft Azure". + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - This field is a member of `oneof`_ ``_remote_service``. - self_link (str): - [Output Only] Server-defined URL for the resource. + You cannot combine constraints on multiple fields using + regular expressions. - This field is a member of `oneof`_ ``_self_link``. - status (str): - [Output Only] The status of this InterconnectRemoteLocation, - which can take one of the following values: - CLOSED: The - InterconnectRemoteLocation is closed and is unavailable for - provisioning new Cross-Cloud Interconnects. - AVAILABLE: The - InterconnectRemoteLocation is available for provisioning new - Cross-Cloud Interconnects. Check the Status enum for the - list of possible values. + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - This field is a member of `oneof`_ ``_status``. - """ + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - class Continent(proto.Enum): - r"""[Output Only] Continent for this location, which can take one of the - following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - - SOUTH_AMERICA + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - Values: - UNDEFINED_CONTINENT (0): - A value indicating that the enum field is not - set. - AFRICA (317443706): - No description available. - ASIA_PAC (119782269): - No description available. - EUROPE (445819298): - No description available. - NORTH_AMERICA (448015508): - No description available. - SOUTH_AMERICA (32597340): - No description available. - """ - UNDEFINED_CONTINENT = 0 - AFRICA = 317443706 - ASIA_PAC = 119782269 - EUROPE = 445819298 - NORTH_AMERICA = 448015508 - SOUTH_AMERICA = 32597340 + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - class Lacp(proto.Enum): - r"""[Output Only] Link Aggregation Control Protocol (LACP) constraints, - which can take one of the following values: LACP_SUPPORTED, - LACP_UNSUPPORTED + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - Values: - UNDEFINED_LACP (0): - A value indicating that the enum field is not - set. - LACP_SUPPORTED (339576113): - LACP_SUPPORTED: LACP is supported, and enabled by default on - the Cross-Cloud Interconnect. - LACP_UNSUPPORTED (203930104): - LACP_UNSUPPORTED: LACP is not supported and is not be - enabled on this port. GetDiagnostics shows - bundleAggregationType as "static". GCP does not support LAGs - without LACP, so requestedLinkCount must be 1. - """ - UNDEFINED_LACP = 0 - LACP_SUPPORTED = 339576113 - LACP_UNSUPPORTED = 203930104 + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - class Status(proto.Enum): - r"""[Output Only] The status of this InterconnectRemoteLocation, which - can take one of the following values: - CLOSED: The - InterconnectRemoteLocation is closed and is unavailable for - provisioning new Cross-Cloud Interconnects. - AVAILABLE: The - InterconnectRemoteLocation is available for provisioning new - Cross-Cloud Interconnects. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - AVAILABLE (442079913): - The InterconnectRemoteLocation is available - for provisioning new Cross-Cloud Interconnects. - CLOSED (380163436): - The InterconnectRemoteLocation is closed for - provisioning new Cross-Cloud Interconnects. - """ - UNDEFINED_STATUS = 0 - AVAILABLE = 442079913 - CLOSED = 380163436 + This field is a member of `oneof`_ ``_return_partial_success``. + """ - address: str = proto.Field( - proto.STRING, - number=462920692, - optional=True, - ) - attachment_configuration_constraints: "InterconnectAttachmentConfigurationConstraints" = proto.Field( - proto.MESSAGE, - number=326825041, - optional=True, - message="InterconnectAttachmentConfigurationConstraints", - ) - city: str = proto.Field( - proto.STRING, - number=3053931, - optional=True, - ) - constraints: "InterconnectRemoteLocationConstraints" = proto.Field( - proto.MESSAGE, - number=3909174, - optional=True, - message="InterconnectRemoteLocationConstraints", - ) - continent: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=133442996, + number=336120696, optional=True, ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - description: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=422937596, + number=160562920, optional=True, ) - facility_provider: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=533303309, + number=19994697, optional=True, ) - facility_provider_facility_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=87269125, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=227560217, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - lacp: str = proto.Field( + + +class ListDiskTypesRequest(proto.Message): + r"""A request message for DiskTypes.List. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. + """ + + filter: str = proto.Field( proto.STRING, - number=3313826, - optional=True, - ) - max_lag_size100_gbps: int = proto.Field( - proto.INT32, - number=245219253, - optional=True, - ) - max_lag_size10_gbps: int = proto.Field( - proto.INT32, - number=294007573, + number=336120696, optional=True, ) - max_lag_size400_gbps: int = proto.Field( - proto.INT32, - number=104941138, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - name: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3373707, + number=160562920, optional=True, ) - peeringdb_facility_id: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=536567094, + number=19994697, optional=True, ) - permitted_connections: MutableSequence[ - "InterconnectRemoteLocationPermittedConnections" - ] = proto.RepeatedField( - proto.MESSAGE, - number=442063278, - message="InterconnectRemoteLocationPermittedConnections", - ) - remote_service: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=391954364, - optional=True, + number=227560217, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - status: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=181260274, - optional=True, + number=3744684, ) -class InterconnectRemoteLocationConstraints(proto.Message): - r""" +class ListDisksRequest(proto.Message): + r"""A request message for Disks.List. See the method description + for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - port_pair_remote_location (str): - [Output Only] Port pair remote location constraints, which - can take one of the following values: - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers - only to individual ports, but the UI uses this field when - ordering a pair of ports, to prevent users from accidentally - ordering something that is incompatible with their cloud - provider. Specifically, when ordering a redundant pair of - Cross-Cloud Interconnect ports, and one of them uses a - remote location with portPairMatchingRemoteLocation set to - matching, the UI requires that both ports use the same - remote location. Check the PortPairRemoteLocation enum for - the list of possible values. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_port_pair_remote_location``. - port_pair_vlan (str): - [Output Only] Port pair VLAN constraints, which can take one - of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, - PORT_PAIR_MATCHING_VLAN Check the PortPairVlan enum for the - list of possible values. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_port_pair_vlan``. - subnet_length_range (google.cloud.compute_v1beta.types.InterconnectRemoteLocationConstraintsSubnetLengthRange): - [Output Only] [min-length, max-length] The minimum and - maximum value (inclusive) for the IPv4 subnet length. For - example, an interconnectRemoteLocation for Azure has {min: - 30, max: 30} because Azure requires /30 subnets. This range - specifies the values supported by both cloud providers. - Interconnect currently supports /29 and /30 IPv4 subnet - lengths. If a remote cloud has no constraint on IPv4 subnet - length, the range would thus be {min: 29, max: 30}. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_subnet_length_range``. - """ + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - class PortPairRemoteLocation(proto.Enum): - r"""[Output Only] Port pair remote location constraints, which can take - one of the following values: - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to - individual ports, but the UI uses this field when ordering a pair of - ports, to prevent users from accidentally ordering something that is - incompatible with their cloud provider. Specifically, when ordering - a redundant pair of Cross-Cloud Interconnect ports, and one of them - uses a remote location with portPairMatchingRemoteLocation set to - matching, the UI requires that both ports use the same remote - location. + :: - Values: - UNDEFINED_PORT_PAIR_REMOTE_LOCATION (0): - A value indicating that the enum field is not - set. - PORT_PAIR_MATCHING_REMOTE_LOCATION (207291859): - If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud - provider allocates ports in pairs, and the user should - choose the same remote location for both ports. - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION (60609829): - If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt - to provision a redundant pair of Cross-Cloud Interconnects - using two different remote locations in the same city. - """ - UNDEFINED_PORT_PAIR_REMOTE_LOCATION = 0 - PORT_PAIR_MATCHING_REMOTE_LOCATION = 207291859 - PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION = 60609829 + labels.owner:* - class PortPairVlan(proto.Enum): - r"""[Output Only] Port pair VLAN constraints, which can take one of the - following values: PORT_PAIR_UNCONSTRAINED_VLAN, - PORT_PAIR_MATCHING_VLAN + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Values: - UNDEFINED_PORT_PAIR_VLAN (0): - A value indicating that the enum field is not - set. - PORT_PAIR_MATCHING_VLAN (250295358): - If PORT_PAIR_MATCHING_VLAN, the Interconnect for this - attachment is part of a pair of ports that should have - matching VLAN allocations. This occurs with Cross-Cloud - Interconnect to Azure remote locations. While GCP's API does - not explicitly group pairs of ports, the UI uses this field - to ensure matching VLAN ids when configuring a redundant - VLAN pair. - PORT_PAIR_UNCONSTRAINED_VLAN (175227948): - PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint. - """ - UNDEFINED_PORT_PAIR_VLAN = 0 - PORT_PAIR_MATCHING_VLAN = 250295358 - PORT_PAIR_UNCONSTRAINED_VLAN = 175227948 + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - port_pair_remote_location: str = proto.Field( - proto.STRING, - number=495917351, - optional=True, - ) - port_pair_vlan: str = proto.Field( - proto.STRING, - number=478214506, - optional=True, - ) - subnet_length_range: "InterconnectRemoteLocationConstraintsSubnetLengthRange" = ( - proto.Field( - proto.MESSAGE, - number=184473670, - optional=True, - message="InterconnectRemoteLocationConstraintsSubnetLengthRange", - ) - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class InterconnectRemoteLocationConstraintsSubnetLengthRange(proto.Message): - r""" + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - max_ (int): + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_max``. - min_ (int): + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_min``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - max_: int = proto.Field( - proto.INT32, - number=107876, - optional=True, - ) - min_: int = proto.Field( - proto.INT32, - number=108114, - optional=True, - ) + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. -class InterconnectRemoteLocationList(proto.Message): - r"""Response to the list request, and contains a list of - interconnect remote locations. + You cannot combine constraints on multiple fields using + regular expressions. + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InterconnectRemoteLocation]): - A list of InterconnectRemoteLocation - resources. - kind (str): - [Output Only] Type of resource. Always - compute#interconnectRemoteLocationList for lists of - interconnect remote locations. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token lets you get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=3355, + number=336120696, optional=True, ) - items: MutableSequence["InterconnectRemoteLocation"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InterconnectRemoteLocation", + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - kind: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3292052, + number=160562920, optional=True, ) - next_page_token: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=79797525, + number=19994697, optional=True, ) - self_link: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class InterconnectRemoteLocationPermittedConnections(proto.Message): - r""" +class ListDisksStoragePoolsRequest(proto.Message): + r"""A request message for StoragePools.ListDisks. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - interconnect_location (str): - [Output Only] URL of an Interconnect location that is - permitted to connect to this Interconnect remote location. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_interconnect_location``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - interconnect_location: str = proto.Field( - proto.STRING, - number=492235846, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class InterconnectsGetDiagnosticsResponse(proto.Message): - r"""Response for the InterconnectsGetDiagnosticsRequest. + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + labels.owner:* - Attributes: - result (google.cloud.compute_v1beta.types.InterconnectDiagnostics): + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_result``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - result: "InterconnectDiagnostics" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectDiagnostics", - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class InterconnectsGetMacsecConfigResponse(proto.Message): - r"""Response for the InterconnectsGetMacsecConfigRequest. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + :: - Attributes: - etag (str): - end_interface: MixerGetResponseWithEtagBuilder + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_etag``. - result (google.cloud.compute_v1beta.types.InterconnectMacsecConfig): + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_result``. - """ + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - result: "InterconnectMacsecConfig" = proto.Field( - proto.MESSAGE, - number=139315229, - optional=True, - message="InterconnectMacsecConfig", - ) + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. -class InvalidateCacheRegionUrlMapRequest(proto.Message): - r"""A request message for RegionUrlMaps.InvalidateCache. See the - method description for details. + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - Attributes: - cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): - The body resource for this request + This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - begin_interface: MixerMutationRequestBuilder Request ID to - support idempotency. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap scoping this request. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + storage_pool (str): + Name of the storage pool to list disks of. + zone (str): + The name of the zone for this request. """ - cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( - proto.MESSAGE, - number=312795565, - message="CacheInvalidationRule", - ) - project: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=227560217, + number=336120696, + optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - request_id: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=37109963, + number=160562920, optional=True, ) - url_map: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=367020684, - ) - - -class InvalidateCacheUrlMapRequest(proto.Message): - r"""A request message for UrlMaps.InvalidateCache. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - cache_invalidation_rule_resource (google.cloud.compute_v1beta.types.CacheInvalidationRule): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - url_map (str): - Name of the UrlMap scoping this request. - """ - - cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( - proto.MESSAGE, - number=312795565, - message="CacheInvalidationRule", + number=19994697, + optional=True, ) project: str = proto.Field( proto.STRING, number=227560217, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) - url_map: str = proto.Field( + storage_pool: str = proto.Field( proto.STRING, - number=367020684, + number=360473440, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class Items(proto.Message): - r"""Metadata +class ListErrorsInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.ListErrors. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - key (str): - Key for the metadata entry. Keys must conform to the - following regexp: [a-zA-Z0-9-\_]+, and be less than 128 - bytes in length. This is reflected as part of a URL in the - metadata server. Additionally, to avoid ambiguity, keys must - not conflict with any other metadata keys for the project. - - This field is a member of `oneof`_ ``_key``. - value (str): - Value for the metadata entry. These are - free-form strings, and only have meaning as - interpreted by the image running in the - instance. The only restriction placed on values - is that their size must be less than or equal to - 262144 bytes (256 KiB). + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_value``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - key: str = proto.Field( - proto.STRING, - number=106079, - optional=True, - ) - value: str = proto.Field( - proto.STRING, - number=111972721, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class License(proto.Message): - r"""Represents a License resource. A License represents billing and - aggregate usage data for public and marketplace images. *Caution* - This resource is intended for use only by third-party partners who - are creating Cloud Marketplace images. + :: + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - allowed_replacement_licenses (MutableSequence[str]): - Specifies licenseCodes of licenses that can replace this - license. Note: such replacements are allowed even if - removable_from_disk is false. - appendable_to_disk (bool): - If true, this license can be appended to an - existing disk's set of licenses. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_appendable_to_disk``. - charges_use_fee (bool): - [Output Only] Deprecated. This field no longer reflects - whether a license charges a usage fee. + :: - This field is a member of `oneof`_ ``_charges_use_fee``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - An optional textual description of the - resource; provided by the client when the - resource is created. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + :: - This field is a member of `oneof`_ ``_id``. - incompatible_licenses (MutableSequence[str]): - Specifies licenseCodes of licenses that are - incompatible with this license. If a license is - incompatible with this license, it cannot be - attached to the same disk or image. - kind (str): - [Output Only] Type of resource. Always compute#license for - licenses. + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - This field is a member of `oneof`_ ``_kind``. - license_code (int): - [Output Only] The unique code used to attach this license to - images, snapshots, and disks. + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: - This field is a member of `oneof`_ ``_license_code``. - minimum_retention (google.cloud.compute_v1beta.types.Duration): - If set, this license will be unable to be removed or - replaced once attached to a disk until the minimum_retention - period has passed. + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` - This field is a member of `oneof`_ ``_minimum_retention``. - multi_tenant_only (bool): - If true, this license can only be used on VMs - on multi tenant nodes. + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. - This field is a member of `oneof`_ ``_multi_tenant_only``. - name (str): - Name of the resource. The name must be 1-63 - characters long and comply with RFC1035. + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. - This field is a member of `oneof`_ ``_name``. - os_license (bool): - If true, indicates this is an OS license. - Only one OS license can be attached to a disk or - image at a time. + You cannot combine constraints on multiple fields using + regular expressions. - This field is a member of `oneof`_ ``_os_license``. - removable_from_disk (bool): - If true, this license can be removed from a - disk's set of licenses, with no replacement - license needed. + This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It must be a string + that meets the requirements in RFC1035, or an unsigned long + integer: must match regexp pattern: + (?:`a-z `__?)|1-9{0,19}. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) - This field is a member of `oneof`_ ``_removable_from_disk``. - required_coattached_licenses (MutableSequence[str]): - Specifies the set of permissible coattached - licenseCodes of licenses that satisfy the - coattachment requirement of this license. At - least one license from the set must be attached - to the same disk or image as this license. - resource_requirements (google.cloud.compute_v1beta.types.LicenseResourceRequirements): - [Input Only] Deprecated. + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. - This field is a member of `oneof`_ ``_resource_requirements``. - self_link (str): - [Output Only] Server-defined URL for the resource. + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. - This field is a member of `oneof`_ ``_self_link_with_id``. - sole_tenant_only (bool): - If true, this license can only be used on VMs - on sole tenant nodes. + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. - This field is a member of `oneof`_ ``_sole_tenant_only``. - transferable (bool): - If false, licenses will not be copied from - the source resource when creating an image from - a disk, disk from snapshot, or snapshot from - disk. + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. - This field is a member of `oneof`_ ``_transferable``. - update_timestamp (str): - [Output Only] Last update timestamp in RFC3339 text format. + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. - This field is a member of `oneof`_ ``_update_timestamp``. + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. + It should conform to RFC1035. """ - allowed_replacement_licenses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=195677718, - ) - appendable_to_disk: bool = proto.Field( - proto.BOOL, - number=16959254, - optional=True, - ) - charges_use_fee: bool = proto.Field( - proto.BOOL, - number=372412622, - optional=True, - ) - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - incompatible_licenses: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=334239768, - ) - kind: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=3292052, - optional=True, - ) - license_code: int = proto.Field( - proto.UINT64, - number=1467179, - optional=True, - ) - minimum_retention: "Duration" = proto.Field( - proto.MESSAGE, - number=155398189, - optional=True, - message="Duration", - ) - multi_tenant_only: bool = proto.Field( - proto.BOOL, - number=274395163, + number=336120696, optional=True, ) - name: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=3373707, - optional=True, - ) - os_license: bool = proto.Field( - proto.BOOL, - number=487986406, - optional=True, + number=249363395, ) - removable_from_disk: bool = proto.Field( - proto.BOOL, - number=25854638, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - required_coattached_licenses: MutableSequence[str] = proto.RepeatedField( + order_by: str = proto.Field( proto.STRING, - number=129195265, - ) - resource_requirements: "LicenseResourceRequirements" = proto.Field( - proto.MESSAGE, - number=214292769, + number=160562920, optional=True, - message="LicenseResourceRequirements", ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - self_link_with_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=44520962, - optional=True, - ) - sole_tenant_only: bool = proto.Field( - proto.BOOL, - number=427525559, - optional=True, + number=227560217, ) - transferable: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=4349893, + number=517198390, optional=True, ) - update_timestamp: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=120894752, - optional=True, + number=3744684, ) -class LicenseCode(proto.Message): - r"""Represents a License Code resource. A License Code is a unique - identifier used to represent a license resource. *Caution* This - resource is intended for use only by third-party partners who are - creating Cloud Marketplace images. +class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.ListErrors. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - [Output Only] Description of this License Code. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of resource. Always compute#licenseCode - for licenses. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_kind``. - license_alias (MutableSequence[google.cloud.compute_v1beta.types.LicenseCodeLicenseAlias]): - [Output Only] URL and description aliases of Licenses with - the same License Code. - name (str): - [Output Only] Name of the resource. The name is 1-20 - characters long and must be a valid 64 bit integer. + :: - This field is a member of `oneof`_ ``_name``. - self_link (str): - [Output Only] Server-defined URL for the resource. + labels.owner:* - This field is a member of `oneof`_ ``_self_link``. - state (str): - [Output Only] Current state of this License Code. Check the - State enum for the list of possible values. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_state``. - transferable (bool): - [Output Only] If true, the license will remain attached when - creating images or snapshots from disks. Otherwise, the - license is not transferred. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_transferable``. - """ + :: - class State(proto.Enum): - r"""[Output Only] Current state of this License Code. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Values: - UNDEFINED_STATE (0): - A value indicating that the enum field is not - set. - DISABLED (516696700): - Machines are not allowed to attach boot disks - with this License Code. Requests to create new - resources with this license will be rejected. - ENABLED (182130465): - Use is allowed for anyone with USE_READ_ONLY access to this - License Code. - RESTRICTED (261551195): - Use of this license is limited to a project - whitelist. - STATE_UNSPECIFIED (470755401): - No description available. - TERMINATED (250018339): - Reserved state. - """ - UNDEFINED_STATE = 0 - DISABLED = 516696700 - ENABLED = 182130465 - RESTRICTED = 261551195 - STATE_UNSPECIFIED = 470755401 - TERMINATED = 250018339 + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - creation_timestamp: str = proto.Field( + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It must be a string + that meets the requirements in RFC1035, or an unsigned long + integer: must match regexp pattern: + (?:`a-z `__?)|1-9{0,19}. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + This should conform to RFC1035. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=30525366, + number=336120696, optional=True, ) - description: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=422937596, - optional=True, + number=249363395, ) - id: int = proto.Field( - proto.UINT64, - number=3355, + max_results: int = proto.Field( + proto.UINT32, + number=54715419, optional=True, ) - kind: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=3292052, + number=160562920, optional=True, ) - license_alias: MutableSequence["LicenseCodeLicenseAlias"] = proto.RepeatedField( - proto.MESSAGE, - number=43550930, - message="LicenseCodeLicenseAlias", - ) - name: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=3373707, + number=19994697, optional=True, ) - self_link: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=227560217, ) - state: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=109757585, - optional=True, + number=138946292, ) - transferable: bool = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, - number=4349893, + number=517198390, optional=True, ) -class LicenseCodeLicenseAlias(proto.Message): - r""" +class ListExternalVpnGatewaysRequest(proto.Message): + r"""A request message for ExternalVpnGateways.List. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - [Output Only] Description of this License Code. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_description``. - self_link (str): - [Output Only] URL of license corresponding to this License - Code. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_self_link``. - """ + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: -class LicenseResourceCommitment(proto.Message): - r"""Commitment for a particular license resource. + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - amount (int): - The number of licenses you plan to purchase. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_amount``. - cores_per_license (str): - The number of cores per license. + :: - This field is a member of `oneof`_ ``_cores_per_license``. - license_ (str): - The applicable license URI. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_license``. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. """ - amount: int = proto.Field( - proto.INT64, - number=196759640, + filter: str = proto.Field( + proto.STRING, + number=336120696, optional=True, ) - cores_per_license: str = proto.Field( + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( proto.STRING, - number=32482324, + number=160562920, optional=True, ) - license_: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=166757441, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) -class LicenseResourceRequirements(proto.Message): - r""" +class ListFirewallPoliciesRequest(proto.Message): + r"""A request message for FirewallPolicies.List. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - min_guest_cpu_count (int): - [Input Only] Deprecated. This field no longer reflects the - minimum number of guest cpus required to use the Instance. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_min_guest_cpu_count``. - min_memory_mb (int): - [Input Only] Deprecated. This field no longer reflects the - minimum memory required to use the Instance. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_min_memory_mb``. - """ + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - min_guest_cpu_count: int = proto.Field( - proto.INT32, - number=477964836, - optional=True, - ) - min_memory_mb: int = proto.Field( - proto.INT32, - number=504785894, - optional=True, - ) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + :: -class LicensesListResponse(proto.Message): - r""" + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.License]): - A list of License resources. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + :: - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: - This field is a member of `oneof`_ ``_warning``. - """ + :: - @property - def raw_page(self): - return self + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) - id: str = proto.Field( + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + parent_id (str): + Parent ID for this request. The ID can be either be + "folders/[FOLDER_ID]" if the parent is a folder or + "organizations/[ORGANIZATION_ID]" if the parent is an + organization. + + This field is a member of `oneof`_ ``_parent_id``. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + """ + + filter: str = proto.Field( proto.STRING, - number=3355, + number=336120696, optional=True, ) - items: MutableSequence["License"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="License", + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, ) - next_page_token: str = proto.Field( + order_by: str = proto.Field( proto.STRING, - number=79797525, + number=160562920, optional=True, ) - self_link: str = proto.Field( + page_token: str = proto.Field( proto.STRING, - number=456214797, + number=19994697, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + parent_id: str = proto.Field( + proto.STRING, + number=459714768, + optional=True, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, - message="Warning", ) -class ListAcceleratorTypesRequest(proto.Message): - r"""A request message for AcceleratorTypes.List. See the method +class ListFirewallsRequest(proto.Message): + r"""A request message for Firewalls.List. See the method description for details. @@ -65097,42 +76799,69 @@ class ListAcceleratorTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65147,13 +76876,17 @@ class ListAcceleratorTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65168,15 +76901,14 @@ class ListAcceleratorTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -65208,14 +76940,10 @@ class ListAcceleratorTypesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListAddressesRequest(proto.Message): - r"""A request message for Addresses.List. See the method +class ListForwardingRulesRequest(proto.Message): + r"""A request message for ForwardingRules.List. See the method description for details. @@ -65228,42 +76956,69 @@ class ListAddressesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65278,13 +77033,17 @@ class ListAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65297,14 +77056,15 @@ class ListAddressesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -65345,53 +77105,172 @@ class ListAddressesRequest(proto.Message): ) -class ListAssociationsFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.ListAssociations. See - the method description for details. +class ListFutureReservationsRequest(proto.Message): + r"""A request message for FutureReservations.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - target_resource (str): - The target resource to list associations. It - is an organization, or a folder. + filter (str): + A filter expression that filters resources listed in the + response. Most Compute resources support two types of filter + expressions: expressions that support regular expressions + and expressions that follow API improvement proposal + AIP-160. These two types of filter expressions cannot be + mixed in one request. - This field is a member of `oneof`_ ``_target_resource``. - """ + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - target_resource: str = proto.Field( - proto.STRING, - number=467318524, - optional=True, - ) + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: -class ListAssociationsOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.ListAssociations. See the method - description for details. + :: + labels.owner:* - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - Attributes: - target_resource (str): - The target resource to list associations. It - is an organization, or a folder. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_target_resource``. + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + + By default, each expression is an ``AND`` expression. + However, you can include ``AND`` and ``OR`` expressions + explicitly. For example: + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + + If you want to use a regular expression, use the ``eq`` + (equal) or ``ne`` (not equal) operator against a single + un-parenthesized expression with or without quotes or + against multiple parenthesized expressions. Examples: + + ``fieldname eq unquoted literal`` + ``fieldname eq 'single quoted literal'`` + ``fieldname eq "double quoted literal"`` + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. + + This field is a member of `oneof`_ ``_filter``. + max_results (int): + The maximum number of results per page that should be + returned. If the number of available results is larger than + ``maxResults``, Compute Engine returns a ``nextPageToken`` + that can be used to get the next page of results in + subsequent list requests. Acceptable values are ``0`` to + ``500``, inclusive. (Default: ``500``) + + This field is a member of `oneof`_ ``_max_results``. + order_by (str): + Sorts list results by a certain order. By default, results + are returned in alphanumerical order based on the resource + name. + + You can also sort results in descending order based on the + creation timestamp using + ``orderBy="creationTimestamp desc"``. This sorts results + based on the ``creationTimestamp`` field in reverse + chronological order (newest result first). Use this to sort + resources like operations so that the newest operation is + returned first. + + Currently, only sorting by ``name`` or + ``creationTimestamp desc`` is supported. + + This field is a member of `oneof`_ ``_order_by``. + page_token (str): + Specifies a page token to use. Set ``pageToken`` to the + ``nextPageToken`` returned by a previous list request to get + the next page of results. + + This field is a member of `oneof`_ ``_page_token``. + project (str): + Project ID for this request. + return_partial_success (bool): + Opt-in for partial success behavior which + provides partial results in case of failure. The + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no + resources, with an error code. + + This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. Name + should conform to RFC1035. """ - target_resource: str = proto.Field( + filter: str = proto.Field( proto.STRING, - number=467318524, + number=336120696, + optional=True, + ) + max_results: int = proto.Field( + proto.UINT32, + number=54715419, + optional=True, + ) + order_by: str = proto.Field( + proto.STRING, + number=160562920, + optional=True, + ) + page_token: str = proto.Field( + proto.STRING, + number=19994697, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + return_partial_success: bool = proto.Field( + proto.BOOL, + number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListAutoscalersRequest(proto.Message): - r"""A request message for Autoscalers.List. See the method +class ListGlobalAddressesRequest(proto.Message): + r"""A request message for GlobalAddresses.List. See the method description for details. @@ -65404,42 +77283,69 @@ class ListAutoscalersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65454,13 +77360,17 @@ class ListAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65475,15 +77385,14 @@ class ListAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. """ filter: str = proto.Field( @@ -65515,16 +77424,11 @@ class ListAutoscalersRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): - r"""A request message for - RegionSslPolicies.ListAvailableFeatures. See the method - description for details. +class ListGlobalForwardingRulesRequest(proto.Message): + r"""A request message for GlobalForwardingRules.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -65536,42 +77440,69 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65586,13 +77517,17 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65604,15 +77539,14 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -65642,10 +77576,6 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -65653,8 +77583,8 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): ) -class ListAvailableFeaturesSslPoliciesRequest(proto.Message): - r"""A request message for SslPolicies.ListAvailableFeatures. See +class ListGlobalNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for GlobalNetworkEndpointGroups.List. See the method description for details. @@ -65667,42 +77597,69 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65717,13 +77674,17 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65738,10 +77699,11 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -65778,8 +77740,8 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): ) -class ListBackendBucketsRequest(proto.Message): - r"""A request message for BackendBuckets.List. See the method +class ListGlobalOperationsRequest(proto.Message): + r"""A request message for GlobalOperations.List. See the method description for details. @@ -65792,42 +77754,69 @@ class ListBackendBucketsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65842,13 +77831,17 @@ class ListBackendBucketsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65863,10 +77856,11 @@ class ListBackendBucketsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -65903,9 +77897,9 @@ class ListBackendBucketsRequest(proto.Message): ) -class ListBackendServicesRequest(proto.Message): - r"""A request message for BackendServices.List. See the method - description for details. +class ListGlobalOrganizationOperationsRequest(proto.Message): + r"""A request message for GlobalOrganizationOperations.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -65917,42 +77911,69 @@ class ListBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -65967,13 +77988,17 @@ class ListBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -65983,15 +78008,18 @@ class ListBackendServicesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -66017,9 +78045,10 @@ class ListBackendServicesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=227560217, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -66028,68 +78057,83 @@ class ListBackendServicesRequest(proto.Message): ) -class ListBgpRoutesRoutersRequest(proto.Message): - r"""A request message for Routers.ListBgpRoutes. See the method - description for details. +class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for GlobalPublicDelegatedPrefixes.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - address_family (str): - (Required) limit results to this address - family (either IPv4 or IPv6) Check the - AddressFamily enum for the list of possible - values. - - This field is a member of `oneof`_ ``_address_family``. - destination_prefix (str): - Limit results to destinations that are - subnets of this CIDR range - - This field is a member of `oneof`_ ``_destination_prefix``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66104,13 +78148,17 @@ class ListBgpRoutesRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66120,91 +78168,21 @@ class ListBgpRoutesRoutersRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - peer (str): - (Required) limit results to the BGP peer with - the given name. Name should conform to RFC1035. - - This field is a member of `oneof`_ ``_peer``. - policy_applied (bool): - When true, the method returns post-policy - routes. Otherwise, it returns pre-policy routes. - - This field is a member of `oneof`_ ``_policy_applied``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - route_type (str): - (Required) limit results to this type of - route (either LEARNED or ADVERTISED) Check the - RouteType enum for the list of possible values. - - This field is a member of `oneof`_ ``_route_type``. - router (str): - Name or id of the resource for this request. - Name should conform to RFC1035. """ - class AddressFamily(proto.Enum): - r"""(Required) limit results to this address family (either IPv4 - or IPv6) - - Values: - UNDEFINED_ADDRESS_FAMILY (0): - A value indicating that the enum field is not - set. - IPV4 (2254341): - No description available. - IPV6 (2254343): - No description available. - UNSPECIFIED_IP_VERSION (72938440): - No description available. - """ - UNDEFINED_ADDRESS_FAMILY = 0 - IPV4 = 2254341 - IPV6 = 2254343 - UNSPECIFIED_IP_VERSION = 72938440 - - class RouteType(proto.Enum): - r"""(Required) limit results to this type of route (either - LEARNED or ADVERTISED) - - Values: - UNDEFINED_ROUTE_TYPE (0): - A value indicating that the enum field is not - set. - ADVERTISED (20302109): - No description available. - LEARNED (231892419): - No description available. - UNSPECIFIED_ROUTE_TYPE (248064440): - No description available. - """ - UNDEFINED_ROUTE_TYPE = 0 - ADVERTISED = 20302109 - LEARNED = 231892419 - UNSPECIFIED_ROUTE_TYPE = 248064440 - - address_family: str = proto.Field( - proto.STRING, - number=173744655, - optional=True, - ) - destination_prefix: str = proto.Field( - proto.STRING, - number=263872483, - optional=True, - ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -66225,43 +78203,20 @@ class RouteType(proto.Enum): number=19994697, optional=True, ) - peer: str = proto.Field( - proto.STRING, - number=3436898, - optional=True, - ) - policy_applied: bool = proto.Field( - proto.BOOL, - number=379464304, - optional=True, - ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - route_type: str = proto.Field( - proto.STRING, - number=375888752, - optional=True, - ) - router: str = proto.Field( - proto.STRING, - number=148608841, - ) -class ListCrossSiteNetworksRequest(proto.Message): - r"""A request message for CrossSiteNetworks.List. See the method - description for details. +class ListGlobalVmExtensionPoliciesRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66273,42 +78228,69 @@ class ListCrossSiteNetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66323,13 +78305,17 @@ class ListCrossSiteNetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66344,10 +78330,11 @@ class ListCrossSiteNetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -66384,8 +78371,8 @@ class ListCrossSiteNetworksRequest(proto.Message): ) -class ListDiskTypesRequest(proto.Message): - r"""A request message for DiskTypes.List. See the method +class ListHealthChecksRequest(proto.Message): + r"""A request message for HealthChecks.List. See the method description for details. @@ -66398,42 +78385,69 @@ class ListDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66448,13 +78462,17 @@ class ListDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66469,15 +78487,14 @@ class ListDiskTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -66509,14 +78526,10 @@ class ListDiskTypesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListDisksRequest(proto.Message): - r"""A request message for Disks.List. See the method description +class ListImagesRequest(proto.Message): + r"""A request message for Images.List. See the method description for details. @@ -66529,42 +78542,69 @@ class ListDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -66579,13 +78619,17 @@ class ListDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66600,15 +78644,18 @@ class ListDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone for this request. + The zone query parameter. + + This field is a member of `oneof`_ ``_zone``. """ filter: str = proto.Field( @@ -66643,11 +78690,13 @@ class ListDisksRequest(proto.Message): zone: str = proto.Field( proto.STRING, number=3744684, + optional=True, ) -class ListDisksStoragePoolsRequest(proto.Message): - r"""A request message for StoragePools.ListDisks. See the method +class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): + r"""A request message for + InstanceGroupManagerResizeRequests.List. See the method description for details. @@ -66660,186 +78709,74 @@ class ListDisksStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_return_partial_success``. - storage_pool (str): - Name of the storage pool to list disks of. - zone (str): - The name of the zone for this request. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - storage_pool: str = proto.Field( - proto.STRING, - number=360473440, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) - - -class ListErrorsInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.ListErrors. See - the method description for details. + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. instance_group_manager (str): - The name of the managed instance group. It must be a string - that meets the requirements in RFC1035, or an unsigned long - integer: must match regexp pattern: - (?:`a-z `__?)|1-9{0,19}. + The name of the managed instance group. The + name should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -66852,13 +78789,17 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -66873,17 +78814,18 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone where the managed + instance group is located. The name should + conform to RFC1035. """ filter: str = proto.Field( @@ -66925,9 +78867,9 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): ) -class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.ListErrors. - See the method description for details. +class ListInstanceGroupManagersRequest(proto.Message): + r"""A request message for InstanceGroupManagers.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -66939,49 +78881,71 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It must be a string - that meets the requirements in RFC1035, or an unsigned long - integer: must match regexp pattern: - (?:`a-z `__?)|1-9{0,19}. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -66994,13 +78958,17 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67012,19 +78980,20 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. This - should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone where the managed + instance group is located. """ filter: str = proto.Field( @@ -67032,10 +79001,6 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -67055,20 +79020,20 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListExternalVpnGatewaysRequest(proto.Message): - r"""A request message for ExternalVpnGateways.List. See the - method description for details. +class ListInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67080,42 +79045,69 @@ class ListExternalVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67130,13 +79122,17 @@ class ListExternalVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67151,13 +79147,17 @@ class ListExternalVpnGatewaysRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of thezone + where the instance group is located. """ filter: str = proto.Field( @@ -67189,10 +79189,14 @@ class ListExternalVpnGatewaysRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListFirewallPoliciesRequest(proto.Message): - r"""A request message for FirewallPolicies.List. See the method +class ListInstanceTemplatesRequest(proto.Message): + r"""A request message for InstanceTemplates.List. See the method description for details. @@ -67205,42 +79209,69 @@ class ListFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67255,13 +79286,17 @@ class ListFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67271,25 +79306,47 @@ class ListFirewallPoliciesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. The ID can be either be - "folders/[FOLDER_ID]" if the parent is a folder or - "organizations/[ORGANIZATION_ID]" if the parent is an - organization. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + view (str): + View of the instance template. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. """ + class View(proto.Enum): + r"""View of the instance template. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -67310,21 +79367,25 @@ class ListFirewallPoliciesRequest(proto.Message): number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) -class ListFirewallsRequest(proto.Message): - r"""A request message for Firewalls.List. See the method - description for details. +class ListInstancesInstanceGroupsRequest(proto.Message): + r"""A request message for InstanceGroups.ListInstances. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67336,44 +79397,76 @@ class ListFirewallsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group (str): + The name of the instance group from which you + want to generate a list of included instances. + instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsListInstancesRequest): + The body resource for this request max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -67386,13 +79479,17 @@ class ListFirewallsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67407,13 +79504,17 @@ class ListFirewallsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone + where the instance group is located. """ filter: str = proto.Field( @@ -67421,6 +79522,15 @@ class ListFirewallsRequest(proto.Message): number=336120696, optional=True, ) + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) + instance_groups_list_instances_request_resource: "InstanceGroupsListInstancesRequest" = proto.Field( + proto.MESSAGE, + number=476255263, + message="InstanceGroupsListInstancesRequest", + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -67445,11 +79555,15 @@ class ListFirewallsRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListForwardingRulesRequest(proto.Message): - r"""A request message for ForwardingRules.List. See the method - description for details. +class ListInstancesRegionInstanceGroupsRequest(proto.Message): + r"""A request message for RegionInstanceGroups.ListInstances. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67461,44 +79575,74 @@ class ListForwardingRulesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group (str): + Name of the regional instance group for which + we want to list the instances. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -67511,13 +79655,17 @@ class ListForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67531,13 +79679,16 @@ class ListForwardingRulesRequest(proto.Message): Project ID for this request. region (str): Name of the region scoping this request. + region_instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest): + The body resource for this request return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67548,6 +79699,10 @@ class ListForwardingRulesRequest(proto.Message): number=336120696, optional=True, ) + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -67571,6 +79726,11 @@ class ListForwardingRulesRequest(proto.Message): proto.STRING, number=138946292, ) + region_instance_groups_list_instances_request_resource: "RegionInstanceGroupsListInstancesRequest" = proto.Field( + proto.MESSAGE, + number=48239828, + message="RegionInstanceGroupsListInstancesRequest", + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -67578,8 +79738,8 @@ class ListForwardingRulesRequest(proto.Message): ) -class ListFutureReservationsRequest(proto.Message): - r"""A request message for FutureReservations.List. See the method +class ListInstancesRequest(proto.Message): + r"""A request message for Instances.List. See the method description for details. @@ -67592,42 +79752,69 @@ class ListFutureReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67642,13 +79829,17 @@ class ListFutureReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67663,18 +79854,44 @@ class ListFutureReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + view (str): + View of the instance. + 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. Name - should conform to RFC1035. + The name of the zone for this request. """ + class View(proto.Enum): + r"""View of the instance. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -67704,14 +79921,19 @@ class ListFutureReservationsRequest(proto.Message): number=517198390, optional=True, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class ListGlobalAddressesRequest(proto.Message): - r"""A request message for GlobalAddresses.List. See the method +class ListInstantSnapshotsRequest(proto.Message): + r"""A request message for InstantSnapshots.List. See the method description for details. @@ -67724,42 +79946,69 @@ class ListGlobalAddressesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67774,13 +80023,17 @@ class ListGlobalAddressesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67795,13 +80048,16 @@ class ListGlobalAddressesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -67833,11 +80089,15 @@ class ListGlobalAddressesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListGlobalForwardingRulesRequest(proto.Message): - r"""A request message for GlobalForwardingRules.List. See the - method description for details. +class ListInterconnectAttachmentGroupsRequest(proto.Message): + r"""A request message for InterconnectAttachmentGroups.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67849,42 +80109,69 @@ class ListGlobalForwardingRulesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -67899,13 +80186,17 @@ class ListGlobalForwardingRulesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -67920,10 +80211,11 @@ class ListGlobalForwardingRulesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -67960,9 +80252,9 @@ class ListGlobalForwardingRulesRequest(proto.Message): ) -class ListGlobalNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for GlobalNetworkEndpointGroups.List. See - the method description for details. +class ListInterconnectAttachmentsRequest(proto.Message): + r"""A request message for InterconnectAttachments.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -67974,42 +80266,69 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68024,13 +80343,17 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68042,13 +80365,16 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -68078,6 +80404,10 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -68085,8 +80415,8 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): ) -class ListGlobalOperationsRequest(proto.Message): - r"""A request message for GlobalOperations.List. See the method +class ListInterconnectGroupsRequest(proto.Message): + r"""A request message for InterconnectGroups.List. See the method description for details. @@ -68099,42 +80429,69 @@ class ListGlobalOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68149,13 +80506,17 @@ class ListGlobalOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68170,10 +80531,11 @@ class ListGlobalOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -68210,9 +80572,9 @@ class ListGlobalOperationsRequest(proto.Message): ) -class ListGlobalOrganizationOperationsRequest(proto.Message): - r"""A request message for GlobalOrganizationOperations.List. See - the method description for details. +class ListInterconnectLocationsRequest(proto.Message): + r"""A request message for InterconnectLocations.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68224,170 +80586,69 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_parent_id``. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - This field is a member of `oneof`_ ``_return_partial_success``. - """ - - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - parent_id: str = proto.Field( - proto.STRING, - number=459714768, - optional=True, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for GlobalPublicDelegatedPrefixes.List. See - the method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68402,13 +80663,17 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68423,10 +80688,11 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -68463,9 +80729,9 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): ) -class ListHealthChecksRequest(proto.Message): - r"""A request message for HealthChecks.List. See the method - description for details. +class ListInterconnectRemoteLocationsRequest(proto.Message): + r"""A request message for InterconnectRemoteLocations.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68477,42 +80743,69 @@ class ListHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68527,13 +80820,17 @@ class ListHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68548,10 +80845,11 @@ class ListHealthChecksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -68588,9 +80886,9 @@ class ListHealthChecksRequest(proto.Message): ) -class ListImagesRequest(proto.Message): - r"""A request message for Images.List. See the method description - for details. +class ListInterconnectsRequest(proto.Message): + r"""A request message for Interconnects.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68602,42 +80900,69 @@ class ListImagesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68652,13 +80977,17 @@ class ListImagesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68673,17 +81002,14 @@ class ListImagesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The zone query parameter. - - This field is a member of `oneof`_ ``_zone``. """ filter: str = proto.Field( @@ -68715,16 +81041,10 @@ class ListImagesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - optional=True, - ) -class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): - r"""A request message for - InstanceGroupManagerResizeRequests.List. See the method +class ListLicensesRequest(proto.Message): + r"""A request message for Licenses.List. See the method description for details. @@ -68737,47 +81057,71 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -68790,13 +81134,17 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68811,17 +81159,14 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the managed - instance group is located. The name should - conform to RFC1035. """ filter: str = proto.Field( @@ -68829,10 +81174,6 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -68857,15 +81198,11 @@ class ListInstanceGroupManagerResizeRequestsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstanceGroupManagersRequest(proto.Message): - r"""A request message for InstanceGroupManagers.List. See the - method description for details. +class ListMachineImagesRequest(proto.Message): + r"""A request message for MachineImages.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -68877,42 +81214,69 @@ class ListInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -68927,13 +81291,17 @@ class ListInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -68948,16 +81316,14 @@ class ListInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the managed - instance group is located. """ filter: str = proto.Field( @@ -68989,14 +81355,10 @@ class ListInstanceGroupManagersRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.List. See the method +class ListMachineTypesRequest(proto.Message): + r"""A request message for MachineTypes.List. See the method description for details. @@ -69009,42 +81371,69 @@ class ListInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69059,13 +81448,17 @@ class ListInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69080,16 +81473,16 @@ class ListInstanceGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone for this request. """ filter: str = proto.Field( @@ -69127,8 +81520,9 @@ class ListInstanceGroupsRequest(proto.Message): ) -class ListInstanceTemplatesRequest(proto.Message): - r"""A request message for InstanceTemplates.List. See the method +class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.ListManagedInstances. See the method description for details. @@ -69141,44 +81535,73 @@ class ListInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -69191,13 +81614,17 @@ class ListInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69212,46 +81639,28 @@ class ListInstanceTemplatesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - view (str): - View of the instance template. - Check the View enum for the list of possible - values. - - This field is a member of `oneof`_ ``_view``. + zone (str): + The name of thezone where the managed + instance group is located. """ - class View(proto.Enum): - r"""View of the instance template. - - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 - filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -69276,16 +81685,16 @@ class View(proto.Enum): number=517198390, optional=True, ) - view: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=3619493, - optional=True, + number=3744684, ) -class ListInstancesInstanceGroupsRequest(proto.Message): - r"""A request message for InstanceGroups.ListInstances. See the - method description for details. +class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ListManagedInstances. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69297,49 +81706,73 @@ class ListInstancesInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group (str): - The name of the instance group from which you - want to generate a list of included instances. - instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsListInstancesRequest): - The body resource for this request + instance_group_manager (str): + The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -69352,13 +81785,17 @@ class ListInstancesInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69370,19 +81807,19 @@ class ListInstancesInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the instance group - is located. """ filter: str = proto.Field( @@ -69390,14 +81827,9 @@ class ListInstancesInstanceGroupsRequest(proto.Message): number=336120696, optional=True, ) - instance_group: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=81095253, - ) - instance_groups_list_instances_request_resource: "InstanceGroupsListInstancesRequest" = proto.Field( - proto.MESSAGE, - number=476255263, - message="InstanceGroupsListInstancesRequest", + number=249363395, ) max_results: int = proto.Field( proto.UINT32, @@ -69418,20 +81850,20 @@ class ListInstancesInstanceGroupsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInstancesRegionInstanceGroupsRequest(proto.Message): - r"""A request message for RegionInstanceGroups.ListInstances. See - the method description for details. +class ListNetworkAttachmentsRequest(proto.Message): + r"""A request message for NetworkAttachments.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69443,47 +81875,71 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group (str): - Name of the regional instance group for which - we want to list the instances. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -69496,13 +81952,17 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69515,16 +81975,15 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. - region_instance_groups_list_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest): - The body resource for this request + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -69535,10 +81994,6 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): number=336120696, optional=True, ) - instance_group: str = proto.Field( - proto.STRING, - number=81095253, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -69562,11 +82017,6 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): proto.STRING, number=138946292, ) - region_instance_groups_list_instances_request_resource: "RegionInstanceGroupsListInstancesRequest" = proto.Field( - proto.MESSAGE, - number=48239828, - message="RegionInstanceGroupsListInstancesRequest", - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -69574,9 +82024,9 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): ) -class ListInstancesRequest(proto.Message): - r"""A request message for Instances.List. See the method - description for details. +class ListNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for NetworkEndpointGroups.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69588,42 +82038,69 @@ class ListInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69638,13 +82115,17 @@ class ListInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69659,43 +82140,20 @@ class ListInstancesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - view (str): - View of the instance. - Check the View enum for the list of possible - values. - - This field is a member of `oneof`_ ``_view``. zone (str): - The name of the zone for this request. + The name of thezone + where the network endpoint group is located. It + should comply with RFC1035. """ - class View(proto.Enum): - r"""View of the instance. - - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 - filter: str = proto.Field( proto.STRING, number=336120696, @@ -69725,19 +82183,15 @@ class View(proto.Enum): number=517198390, optional=True, ) - view: str = proto.Field( - proto.STRING, - number=3619493, - optional=True, - ) zone: str = proto.Field( proto.STRING, number=3744684, ) -class ListInstantSnapshotsRequest(proto.Message): - r"""A request message for InstantSnapshots.List. See the method +class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for + GlobalNetworkEndpointGroups.ListNetworkEndpoints. See the method description for details. @@ -69750,42 +82204,69 @@ class ListInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69797,16 +82278,25 @@ class ListInstantSnapshotsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69821,15 +82311,14 @@ class ListInstantSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -69842,6 +82331,10 @@ class ListInstantSnapshotsRequest(proto.Message): number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -69861,15 +82354,12 @@ class ListInstantSnapshotsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListInterconnectAttachmentGroupsRequest(proto.Message): - r"""A request message for InterconnectAttachmentGroups.List. See - the method description for details. +class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for + NetworkEndpointGroups.ListNetworkEndpoints. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -69881,42 +82371,69 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -69928,16 +82445,27 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. + network_endpoint_groups_list_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsListEndpointsRequest): + The body resource for this request order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -69952,13 +82480,18 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone where + the network endpoint group is located. It should + comply with RFC1035. """ filter: str = proto.Field( @@ -69971,6 +82504,15 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) + network_endpoint_groups_list_endpoints_request_resource: "NetworkEndpointGroupsListEndpointsRequest" = proto.Field( + proto.MESSAGE, + number=59493390, + message="NetworkEndpointGroupsListEndpointsRequest", + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -69990,11 +82532,16 @@ class ListInterconnectAttachmentGroupsRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListInterconnectAttachmentsRequest(proto.Message): - r"""A request message for InterconnectAttachments.List. See the - method description for details. +class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for + RegionNetworkEndpointGroups.ListNetworkEndpoints. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -70006,42 +82553,69 @@ class ListInterconnectAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70053,16 +82627,25 @@ class ListInterconnectAttachmentsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + network_endpoint_group (str): + The name of the network endpoint group from + which you want to generate a list of included + network endpoints. It should comply with + RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70075,14 +82658,17 @@ class ListInterconnectAttachmentsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + The name of theregion + where the network endpoint group is located. It + should comply with RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70098,6 +82684,10 @@ class ListInterconnectAttachmentsRequest(proto.Message): number=54715419, optional=True, ) + network_endpoint_group: str = proto.Field( + proto.STRING, + number=433907078, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -70123,9 +82713,9 @@ class ListInterconnectAttachmentsRequest(proto.Message): ) -class ListInterconnectGroupsRequest(proto.Message): - r"""A request message for InterconnectGroups.List. See the method - description for details. +class ListNetworkFirewallPoliciesRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -70137,167 +82727,69 @@ class ListInterconnectGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_return_partial_success``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class ListInterconnectLocationsRequest(proto.Message): - r"""A request message for InterconnectLocations.List. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70312,13 +82804,17 @@ class ListInterconnectLocationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70333,10 +82829,11 @@ class ListInterconnectLocationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70373,9 +82870,9 @@ class ListInterconnectLocationsRequest(proto.Message): ) -class ListInterconnectRemoteLocationsRequest(proto.Message): - r"""A request message for InterconnectRemoteLocations.List. See - the method description for details. +class ListNetworkProfilesRequest(proto.Message): + r"""A request message for NetworkProfiles.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -70387,42 +82884,69 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70437,13 +82961,17 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70458,10 +82986,11 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70498,8 +83027,8 @@ class ListInterconnectRemoteLocationsRequest(proto.Message): ) -class ListInterconnectsRequest(proto.Message): - r"""A request message for Interconnects.List. See the method +class ListNetworksRequest(proto.Message): + r"""A request message for Networks.List. See the method description for details. @@ -70512,42 +83041,69 @@ class ListInterconnectsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70562,13 +83118,17 @@ class ListInterconnectsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70583,10 +83143,11 @@ class ListInterconnectsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70623,8 +83184,8 @@ class ListInterconnectsRequest(proto.Message): ) -class ListLicensesRequest(proto.Message): - r"""A request message for Licenses.List. See the method +class ListNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.List. See the method description for details. @@ -70637,42 +83198,69 @@ class ListLicensesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70687,13 +83275,17 @@ class ListLicensesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70708,13 +83300,16 @@ class ListLicensesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -70746,10 +83341,14 @@ class ListLicensesRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListMachineImagesRequest(proto.Message): - r"""A request message for MachineImages.List. See the method +class ListNodeTemplatesRequest(proto.Message): + r"""A request message for NodeTemplates.List. See the method description for details. @@ -70762,42 +83361,69 @@ class ListMachineImagesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70812,13 +83438,17 @@ class ListMachineImagesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70830,13 +83460,16 @@ class ListMachineImagesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + The name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -70866,6 +83499,10 @@ class ListMachineImagesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -70873,8 +83510,8 @@ class ListMachineImagesRequest(proto.Message): ) -class ListMachineTypesRequest(proto.Message): - r"""A request message for MachineTypes.List. See the method +class ListNodeTypesRequest(proto.Message): + r"""A request message for NodeTypes.List. See the method description for details. @@ -70887,42 +83524,69 @@ class ListMachineTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -70937,13 +83601,17 @@ class ListMachineTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -70958,10 +83626,11 @@ class ListMachineTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71004,9 +83673,8 @@ class ListMachineTypesRequest(proto.Message): ) -class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.ListManagedInstances. See the method +class ListNodesNodeGroupsRequest(proto.Message): + r"""A request message for NodeGroups.ListNodes. See the method description for details. @@ -71019,46 +83687,71 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -71068,16 +83761,23 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. + node_group (str): + Name of the NodeGroup resource whose nodes + you want to list. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71092,16 +83792,16 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the managed - instance group is located. + The name of the zone for this request. """ filter: str = proto.Field( @@ -71109,15 +83809,15 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) + node_group: str = proto.Field( + proto.STRING, + number=469958146, + ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71143,10 +83843,9 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): ) -class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ListManagedInstances. See the method - description for details. +class ListOrganizationSecurityPoliciesRequest(proto.Message): + r"""A request message for OrganizationSecurityPolicies.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71158,179 +83857,69 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. - - This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + mixed in one request. - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListNetworkAttachmentsRequest(proto.Message): - r"""A request message for NetworkAttachments.List. See the method - description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71345,13 +83934,17 @@ class ListNetworkAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71361,17 +83954,18 @@ class ListNetworkAttachmentsRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71397,13 +83991,10 @@ class ListNetworkAttachmentsRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=138946292, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -71412,9 +84003,9 @@ class ListNetworkAttachmentsRequest(proto.Message): ) -class ListNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for NetworkEndpointGroups.List. See the - method description for details. +class ListPacketMirroringsRequest(proto.Message): + r"""A request message for PacketMirrorings.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71426,42 +84017,69 @@ class ListNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71476,13 +84094,17 @@ class ListNetworkEndpointGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71494,20 +84116,19 @@ class ListNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. """ filter: str = proto.Field( @@ -71534,68 +84155,100 @@ class ListNetworkEndpointGroupsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for - GlobalNetworkEndpointGroups.ListNetworkEndpoints. See the method - description for details. +class ListPeeringRoutesNetworksRequest(proto.Message): + r"""A request message for Networks.ListPeeringRoutes. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + direction (str): + The direction of the exchanged routes. + Check the Direction enum for the list of + possible values. + + This field is a member of `oneof`_ ``_direction``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -71607,21 +84260,22 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. + network (str): + Name of the network for this request. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71631,20 +84285,53 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. + peering_name (str): + The response will show routes exchanged over + the given peering connection. + + This field is a member of `oneof`_ ``_peering_name``. project (str): Project ID for this request. + region (str): + The region of the request. The response will + include all subnet routes, static routes and + dynamic routes in the region. + + This field is a member of `oneof`_ ``_region``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. """ + class Direction(proto.Enum): + r"""The direction of the exchanged routes. + + Values: + UNDEFINED_DIRECTION (0): + A value indicating that the enum field is not + set. + INCOMING (338552870): + For routes exported from peer network. + OUTGOING (307438444): + For routes exported from local network. + """ + UNDEFINED_DIRECTION = 0 + INCOMING = 338552870 + OUTGOING = 307438444 + + direction: str = proto.Field( + proto.STRING, + number=111150975, + optional=True, + ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -71655,9 +84342,9 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=433907078, + number=232872494, ) order_by: str = proto.Field( proto.STRING, @@ -71669,10 +84356,20 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): number=19994697, optional=True, ) + peering_name: str = proto.Field( + proto.STRING, + number=249571370, + optional=True, + ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + optional=True, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -71680,9 +84377,9 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): ) -class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): +class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): r"""A request message for - NetworkEndpointGroups.ListNetworkEndpoints. See the method + InstanceGroupManagers.ListPerInstanceConfigs. See the method description for details. @@ -71695,44 +84392,74 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It + should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -71742,23 +84469,20 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. - network_endpoint_groups_list_endpoints_request_resource (google.cloud.compute_v1beta.types.NetworkEndpointGroupsListEndpointsRequest): - The body resource for this request order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71773,17 +84497,18 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - The name of the zone where the network - endpoint group is located. It should comply with - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ filter: str = proto.Field( @@ -71791,20 +84516,15 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) - network_endpoint_groups_list_endpoints_request_resource: "NetworkEndpointGroupsListEndpointsRequest" = proto.Field( - proto.MESSAGE, - number=59493390, - message="NetworkEndpointGroupsListEndpointsRequest", - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71830,10 +84550,10 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): ) -class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): +class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): r"""A request message for - RegionNetworkEndpointGroups.ListNetworkEndpoints. See the method - description for details. + RegionInstanceGroupManagers.ListPerInstanceConfigs. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71845,44 +84565,74 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance_group_manager (str): + The name of the managed instance group. It + should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -71892,21 +84642,20 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network_endpoint_group (str): - The name of the network endpoint group from - which you want to generate a list of included - network endpoints. It should comply with - RFC1035. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -71919,16 +84668,16 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. + Name of the region scoping this request, + should conform to RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -71939,15 +84688,15 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): number=336120696, optional=True, ) + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - network_endpoint_group: str = proto.Field( - proto.STRING, - number=433907078, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -71973,9 +84722,10 @@ class ListNetworkEndpointsRegionNetworkEndpointGroupsRequest(proto.Message): ) -class ListNetworkFirewallPoliciesRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.List. See the - method description for details. +class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.ListPreconfiguredExpressionSets. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -71987,42 +84737,69 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72037,13 +84814,17 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72053,15 +84834,18 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. + parent_id (str): + Parent ID for this request. + + This field is a member of `oneof`_ ``_parent_id``. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72087,9 +84871,10 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( + parent_id: str = proto.Field( proto.STRING, - number=227560217, + number=459714768, + optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -72098,8 +84883,9 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): ) -class ListNetworkProfilesRequest(proto.Message): - r"""A request message for NetworkProfiles.List. See the method +class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): + r"""A request message for + SecurityPolicies.ListPreconfiguredExpressionSets. See the method description for details. @@ -72112,42 +84898,69 @@ class ListNetworkProfilesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72162,13 +84975,17 @@ class ListNetworkProfilesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72183,10 +85000,11 @@ class ListNetworkProfilesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72223,8 +85041,8 @@ class ListNetworkProfilesRequest(proto.Message): ) -class ListNetworksRequest(proto.Message): - r"""A request message for Networks.List. See the method +class ListPreviewFeaturesRequest(proto.Message): + r"""A request message for PreviewFeatures.List. See the method description for details. @@ -72237,42 +85055,69 @@ class ListNetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72287,13 +85132,17 @@ class ListNetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72308,10 +85157,11 @@ class ListNetworksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72348,9 +85198,9 @@ class ListNetworksRequest(proto.Message): ) -class ListNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.List. See the method - description for details. +class ListPublicAdvertisedPrefixesRequest(proto.Message): + r"""A request message for PublicAdvertisedPrefixes.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -72362,42 +85212,69 @@ class ListNodeGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72412,13 +85289,17 @@ class ListNodeGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72433,15 +85314,14 @@ class ListNodeGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -72473,15 +85353,11 @@ class ListNodeGroupsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListNodeTemplatesRequest(proto.Message): - r"""A request message for NodeTemplates.List. See the method - description for details. +class ListPublicDelegatedPrefixesRequest(proto.Message): + r"""A request message for PublicDelegatedPrefixes.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -72493,42 +85369,69 @@ class ListNodeTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72543,13 +85446,17 @@ class ListNodeTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72562,14 +85469,15 @@ class ListNodeTemplatesRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region for this request. + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72610,8 +85518,8 @@ class ListNodeTemplatesRequest(proto.Message): ) -class ListNodeTypesRequest(proto.Message): - r"""A request message for NodeTypes.List. See the method +class ListReferrersInstancesRequest(proto.Message): + r"""A request message for Instances.ListReferrers. See the method description for details. @@ -72624,44 +85532,75 @@ class ListNodeTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. + instance (str): + Name of the target instance scoping this + request, or '-' if the request should span over + all instances in the container. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -72674,13 +85613,17 @@ class ListNodeTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72695,10 +85638,11 @@ class ListNodeTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72711,6 +85655,10 @@ class ListNodeTypesRequest(proto.Message): number=336120696, optional=True, ) + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -72741,8 +85689,8 @@ class ListNodeTypesRequest(proto.Message): ) -class ListNodesNodeGroupsRequest(proto.Message): - r"""A request message for NodeGroups.ListNodes. See the method +class ListRegionAutoscalersRequest(proto.Message): + r"""A request message for RegionAutoscalers.List. See the method description for details. @@ -72755,42 +85703,69 @@ class ListNodesNodeGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72802,19 +85777,20 @@ class ListNodesNodeGroupsRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - node_group (str): - Name of the NodeGroup resource whose nodes - you want to list. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72826,18 +85802,19 @@ class ListNodesNodeGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -72850,10 +85827,6 @@ class ListNodesNodeGroupsRequest(proto.Message): number=54715419, optional=True, ) - node_group: str = proto.Field( - proto.STRING, - number=469958146, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -72868,20 +85841,20 @@ class ListNodesNodeGroupsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListOrganizationSecurityPoliciesRequest(proto.Message): - r"""A request message for OrganizationSecurityPolicies.List. See - the method description for details. +class ListRegionBackendBucketsRequest(proto.Message): + r"""A request message for RegionBackendBuckets.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -72893,42 +85866,69 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -72943,13 +85943,17 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -72959,17 +85963,18 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -72995,10 +86000,13 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -73007,9 +86015,9 @@ class ListOrganizationSecurityPoliciesRequest(proto.Message): ) -class ListPacketMirroringsRequest(proto.Message): - r"""A request message for PacketMirrorings.List. See the method - description for details. +class ListRegionBackendServicesRequest(proto.Message): + r"""A request message for RegionBackendServices.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73021,42 +86029,69 @@ class ListPacketMirroringsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73071,13 +86106,17 @@ class ListPacketMirroringsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73090,14 +86129,15 @@ class ListPacketMirroringsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73138,62 +86178,83 @@ class ListPacketMirroringsRequest(proto.Message): ) -class ListPeeringRoutesNetworksRequest(proto.Message): - r"""A request message for Networks.ListPeeringRoutes. See the - method description for details. +class ListRegionCommitmentsRequest(proto.Message): + r"""A request message for RegionCommitments.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - direction (str): - The direction of the exchanged routes. - Check the Direction enum for the list of - possible values. - - This field is a member of `oneof`_ ``_direction``. filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73205,18 +86266,20 @@ class ListPeeringRoutesNetworksRequest(proto.Message): ``500``, inclusive. (Default: ``500``) This field is a member of `oneof`_ ``_max_results``. - network (str): - Name of the network for this request. order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73226,52 +86289,23 @@ class ListPeeringRoutesNetworksRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - peering_name (str): - The response will show routes exchanged over - the given peering connection. - - This field is a member of `oneof`_ ``_peering_name``. project (str): Project ID for this request. region (str): - The region of the request. The response will - include all subnet routes, static routes and - dynamic routes in the region. - - This field is a member of `oneof`_ ``_region``. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. """ - class Direction(proto.Enum): - r"""The direction of the exchanged routes. - - Values: - UNDEFINED_DIRECTION (0): - A value indicating that the enum field is not - set. - INCOMING (338552870): - For routes exported from peer network. - OUTGOING (307438444): - For routes exported from local network. - """ - UNDEFINED_DIRECTION = 0 - INCOMING = 338552870 - OUTGOING = 307438444 - - direction: str = proto.Field( - proto.STRING, - number=111150975, - optional=True, - ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -73282,10 +86316,6 @@ class Direction(proto.Enum): number=54715419, optional=True, ) - network: str = proto.Field( - proto.STRING, - number=232872494, - ) order_by: str = proto.Field( proto.STRING, number=160562920, @@ -73296,11 +86326,6 @@ class Direction(proto.Enum): number=19994697, optional=True, ) - peering_name: str = proto.Field( - proto.STRING, - number=249571370, - optional=True, - ) project: str = proto.Field( proto.STRING, number=227560217, @@ -73308,7 +86333,6 @@ class Direction(proto.Enum): region: str = proto.Field( proto.STRING, number=138946292, - optional=True, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -73317,10 +86341,9 @@ class Direction(proto.Enum): ) -class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.ListPerInstanceConfigs. See the method - description for details. +class ListRegionCompositeHealthChecksRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73332,47 +86355,71 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73385,13 +86432,17 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73403,20 +86454,19 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. """ filter: str = proto.Field( @@ -73424,10 +86474,6 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73447,21 +86493,20 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ListPerInstanceConfigs. See the - method description for details. +class ListRegionDiskTypesRequest(proto.Message): + r"""A request message for RegionDiskTypes.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73473,47 +86518,71 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -73526,13 +86595,17 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73545,15 +86618,15 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request, - should conform to RFC1035. + The name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73564,10 +86637,6 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -73598,10 +86667,9 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): ) -class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.ListPreconfiguredExpressionSets. - See the method description for details. +class ListRegionDisksRequest(proto.Message): + r"""A request message for RegionDisks.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73613,42 +86681,69 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73663,13 +86758,17 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73679,17 +86778,18 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_id (str): - Parent ID for this request. - - This field is a member of `oneof`_ ``_parent_id``. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73715,10 +86815,13 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M number=19994697, optional=True, ) - parent_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=459714768, - optional=True, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -73727,10 +86830,9 @@ class ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest(proto.M ) -class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): - r"""A request message for - SecurityPolicies.ListPreconfiguredExpressionSets. See the method - description for details. +class ListRegionHealthAggregationPoliciesRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.List. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73742,42 +86844,69 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73792,13 +86921,17 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73810,13 +86943,16 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73846,6 +86982,10 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -73853,9 +86993,9 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): ) -class ListPreviewFeaturesRequest(proto.Message): - r"""A request message for PreviewFeatures.List. See the method - description for details. +class ListRegionHealthCheckServicesRequest(proto.Message): + r"""A request message for RegionHealthCheckServices.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73867,42 +87007,69 @@ class ListPreviewFeaturesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -73917,13 +87084,17 @@ class ListPreviewFeaturesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -73935,13 +87106,16 @@ class ListPreviewFeaturesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -73971,6 +87145,10 @@ class ListPreviewFeaturesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -73978,9 +87156,9 @@ class ListPreviewFeaturesRequest(proto.Message): ) -class ListPublicAdvertisedPrefixesRequest(proto.Message): - r"""A request message for PublicAdvertisedPrefixes.List. See the - method description for details. +class ListRegionHealthChecksRequest(proto.Message): + r"""A request message for RegionHealthChecks.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -73992,42 +87170,69 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74042,13 +87247,17 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74060,13 +87269,16 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74096,6 +87308,10 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -74103,8 +87319,8 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): ) -class ListPublicDelegatedPrefixesRequest(proto.Message): - r"""A request message for PublicDelegatedPrefixes.List. See the +class ListRegionHealthSourcesRequest(proto.Message): + r"""A request message for RegionHealthSources.List. See the method description for details. @@ -74117,42 +87333,69 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74167,13 +87410,17 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74186,14 +87433,15 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region of this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74234,8 +87482,9 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): ) -class ListReferrersInstancesRequest(proto.Message): - r"""A request message for Instances.ListReferrers. See the method +class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagerResizeRequests.List. See the method description for details. @@ -74248,48 +87497,74 @@ class ListReferrersInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance (str): - Name of the target instance scoping this - request, or '-' if the request should span over - all instances in the container. + instance_group_manager (str): + The name of the managed instance group. The + name should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -74302,13 +87577,17 @@ class ListReferrersInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74320,18 +87599,21 @@ class ListReferrersInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region + scoping this request. Name should conform to + RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -74339,9 +87621,9 @@ class ListReferrersInstancesRequest(proto.Message): number=336120696, optional=True, ) - instance: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=18257045, + number=249363395, ) max_results: int = proto.Field( proto.UINT32, @@ -74362,20 +87644,20 @@ class ListReferrersInstancesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListRegionAutoscalersRequest(proto.Message): - r"""A request message for RegionAutoscalers.List. See the method - description for details. +class ListRegionInstanceGroupManagersRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74387,42 +87669,69 @@ class ListRegionAutoscalersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74437,13 +87746,17 @@ class ListRegionAutoscalersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74460,10 +87773,11 @@ class ListRegionAutoscalersRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74504,8 +87818,8 @@ class ListRegionAutoscalersRequest(proto.Message): ) -class ListRegionBackendServicesRequest(proto.Message): - r"""A request message for RegionBackendServices.List. See the +class ListRegionInstanceGroupsRequest(proto.Message): + r"""A request message for RegionInstanceGroups.List. See the method description for details. @@ -74518,42 +87832,69 @@ class ListRegionBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74568,13 +87909,17 @@ class ListRegionBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74591,10 +87936,11 @@ class ListRegionBackendServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74635,9 +87981,9 @@ class ListRegionBackendServicesRequest(proto.Message): ) -class ListRegionCommitmentsRequest(proto.Message): - r"""A request message for RegionCommitments.List. See the method - description for details. +class ListRegionInstanceTemplatesRequest(proto.Message): + r"""A request message for RegionInstanceTemplates.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74649,42 +87995,69 @@ class ListRegionCommitmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74699,13 +88072,17 @@ class ListRegionCommitmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74718,19 +88095,46 @@ class ListRegionCommitmentsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + The name of the regions for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + view (str): + View of the instance template. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. """ + class View(proto.Enum): + r"""View of the instance template. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + Include everything except Partner Metadata. + FULL (2169487): + Include everything. + INSTANCE_VIEW_UNSPECIFIED (8444647): + The default / unset value. The API will + default to the BASIC view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + FULL = 2169487 + INSTANCE_VIEW_UNSPECIFIED = 8444647 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -74764,11 +88168,16 @@ class ListRegionCommitmentsRequest(proto.Message): number=517198390, optional=True, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) -class ListRegionDiskTypesRequest(proto.Message): - r"""A request message for RegionDiskTypes.List. See the method - description for details. +class ListRegionInstantSnapshotsRequest(proto.Message): + r"""A request message for RegionInstantSnapshots.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -74780,42 +88189,69 @@ class ListRegionDiskTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74830,13 +88266,17 @@ class ListRegionDiskTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74853,10 +88293,11 @@ class ListRegionDiskTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -74897,8 +88338,8 @@ class ListRegionDiskTypesRequest(proto.Message): ) -class ListRegionDisksRequest(proto.Message): - r"""A request message for RegionDisks.List. See the method +class ListRegionMultiMigsRequest(proto.Message): + r"""A request message for RegionMultiMigs.List. See the method description for details. @@ -74911,42 +88352,69 @@ class ListRegionDisksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -74961,13 +88429,17 @@ class ListRegionDisksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -74984,10 +88456,11 @@ class ListRegionDisksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75028,9 +88501,9 @@ class ListRegionDisksRequest(proto.Message): ) -class ListRegionHealthCheckServicesRequest(proto.Message): - r"""A request message for RegionHealthCheckServices.List. See the - method description for details. +class ListRegionNetworkEndpointGroupsRequest(proto.Message): + r"""A request message for RegionNetworkEndpointGroups.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -75042,42 +88515,69 @@ class ListRegionHealthCheckServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75092,13 +88592,17 @@ class ListRegionHealthCheckServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75111,14 +88615,17 @@ class ListRegionHealthCheckServicesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + The name of theregion + where the network endpoint group is located. It + should comply with RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75159,9 +88666,9 @@ class ListRegionHealthCheckServicesRequest(proto.Message): ) -class ListRegionHealthChecksRequest(proto.Message): - r"""A request message for RegionHealthChecks.List. See the method - description for details. +class ListRegionNetworkFirewallPoliciesRequest(proto.Message): + r"""A request message for RegionNetworkFirewallPolicies.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -75173,42 +88680,69 @@ class ListRegionHealthChecksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75223,13 +88757,17 @@ class ListRegionHealthChecksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75246,10 +88784,11 @@ class ListRegionHealthChecksRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75290,8 +88829,8 @@ class ListRegionHealthChecksRequest(proto.Message): ) -class ListRegionHealthSourcesRequest(proto.Message): - r"""A request message for RegionHealthSources.List. See the +class ListRegionNetworkPoliciesRequest(proto.Message): + r"""A request message for RegionNetworkPolicies.List. See the method description for details. @@ -75304,42 +88843,69 @@ class ListRegionHealthSourcesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75354,13 +88920,17 @@ class ListRegionHealthSourcesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75373,14 +88943,15 @@ class ListRegionHealthSourcesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75421,10 +88992,9 @@ class ListRegionHealthSourcesRequest(proto.Message): ) -class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagerResizeRequests.List. See the method - description for details. +class ListRegionNotificationEndpointsRequest(proto.Message): + r"""A request message for RegionNotificationEndpoints.List. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -75436,47 +89006,71 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. - instance_group_manager (str): - The name of the managed instance group. The - name should conform to RFC1035. max_results (int): The maximum number of results per page that should be returned. If the number of available results is larger than @@ -75489,13 +89083,17 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75508,15 +89106,15 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. Name - should conform to RFC1035. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75527,10 +89125,6 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): number=336120696, optional=True, ) - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) max_results: int = proto.Field( proto.UINT32, number=54715419, @@ -75561,9 +89155,9 @@ class ListRegionInstanceGroupManagerResizeRequestsRequest(proto.Message): ) -class ListRegionInstanceGroupManagersRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.List. See - the method description for details. +class ListRegionOperationsRequest(proto.Message): + r"""A request message for RegionOperations.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -75575,42 +89169,69 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75625,13 +89246,17 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75644,14 +89269,15 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75692,8 +89318,8 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): ) -class ListRegionInstanceGroupsRequest(proto.Message): - r"""A request message for RegionInstanceGroups.List. See the +class ListRegionSecurityPoliciesRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.List. See the method description for details. @@ -75706,42 +89332,69 @@ class ListRegionInstanceGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75756,13 +89409,17 @@ class ListRegionInstanceGroupsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75779,10 +89436,11 @@ class ListRegionInstanceGroupsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -75823,9 +89481,9 @@ class ListRegionInstanceGroupsRequest(proto.Message): ) -class ListRegionInstanceTemplatesRequest(proto.Message): - r"""A request message for RegionInstanceTemplates.List. See the - method description for details. +class ListRegionSnapshotsRequest(proto.Message): + r"""A request message for RegionSnapshots.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -75837,42 +89495,69 @@ class ListRegionInstanceTemplatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -75887,13 +89572,17 @@ class ListRegionInstanceTemplatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -75906,45 +89595,20 @@ class ListRegionInstanceTemplatesRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the regions for this request. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - view (str): - View of the instance template. - Check the View enum for the list of possible - values. - - This field is a member of `oneof`_ ``_view``. """ - class View(proto.Enum): - r"""View of the instance template. - - Values: - UNDEFINED_VIEW (0): - A value indicating that the enum field is not - set. - BASIC (62970894): - Include everything except Partner Metadata. - FULL (2169487): - Include everything. - INSTANCE_VIEW_UNSPECIFIED (8444647): - The default / unset value. The API will - default to the BASIC view. - """ - UNDEFINED_VIEW = 0 - BASIC = 62970894 - FULL = 2169487 - INSTANCE_VIEW_UNSPECIFIED = 8444647 - filter: str = proto.Field( proto.STRING, number=336120696, @@ -75978,15 +89642,10 @@ class View(proto.Enum): number=517198390, optional=True, ) - view: str = proto.Field( - proto.STRING, - number=3619493, - optional=True, - ) -class ListRegionInstantSnapshotsRequest(proto.Message): - r"""A request message for RegionInstantSnapshots.List. See the +class ListRegionSslCertificatesRequest(proto.Message): + r"""A request message for RegionSslCertificates.List. See the method description for details. @@ -75999,42 +89658,69 @@ class ListRegionInstantSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76049,13 +89735,17 @@ class ListRegionInstantSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76068,14 +89758,15 @@ class ListRegionInstantSnapshotsRequest(proto.Message): project (str): Project ID for this request. region (str): - The name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76116,8 +89807,8 @@ class ListRegionInstantSnapshotsRequest(proto.Message): ) -class ListRegionMultiMigsRequest(proto.Message): - r"""A request message for RegionMultiMigs.List. See the method +class ListRegionSslPoliciesRequest(proto.Message): + r"""A request message for RegionSslPolicies.List. See the method description for details. @@ -76130,42 +89821,69 @@ class ListRegionMultiMigsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76180,13 +89898,17 @@ class ListRegionMultiMigsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76199,14 +89921,15 @@ class ListRegionMultiMigsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76247,9 +89970,9 @@ class ListRegionMultiMigsRequest(proto.Message): ) -class ListRegionNetworkEndpointGroupsRequest(proto.Message): - r"""A request message for RegionNetworkEndpointGroups.List. See - the method description for details. +class ListRegionTargetHttpProxiesRequest(proto.Message): + r"""A request message for RegionTargetHttpProxies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -76261,175 +89984,69 @@ class ListRegionNetworkEndpointGroupsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + mixed in one request. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) - - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - The name of the region where the network - endpoint group is located. It should comply with - RFC1035. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListRegionNetworkFirewallPoliciesRequest(proto.Message): - r"""A request message for RegionNetworkFirewallPolicies.List. See - the method description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76444,13 +90061,17 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76467,10 +90088,11 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76511,8 +90133,8 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): ) -class ListRegionNetworkPoliciesRequest(proto.Message): - r"""A request message for RegionNetworkPolicies.List. See the +class ListRegionTargetHttpsProxiesRequest(proto.Message): + r"""A request message for RegionTargetHttpsProxies.List. See the method description for details. @@ -76525,42 +90147,69 @@ class ListRegionNetworkPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76575,13 +90224,17 @@ class ListRegionNetworkPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76594,14 +90247,15 @@ class ListRegionNetworkPoliciesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region of this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76642,9 +90296,9 @@ class ListRegionNetworkPoliciesRequest(proto.Message): ) -class ListRegionNotificationEndpointsRequest(proto.Message): - r"""A request message for RegionNotificationEndpoints.List. See - the method description for details. +class ListRegionTargetTcpProxiesRequest(proto.Message): + r"""A request message for RegionTargetTcpProxies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -76656,42 +90310,69 @@ class ListRegionNotificationEndpointsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76706,13 +90387,17 @@ class ListRegionNotificationEndpointsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76729,10 +90414,11 @@ class ListRegionNotificationEndpointsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76773,8 +90459,8 @@ class ListRegionNotificationEndpointsRequest(proto.Message): ) -class ListRegionOperationsRequest(proto.Message): - r"""A request message for RegionOperations.List. See the method +class ListRegionUrlMapsRequest(proto.Message): + r"""A request message for RegionUrlMaps.List. See the method description for details. @@ -76787,42 +90473,69 @@ class ListRegionOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76837,13 +90550,17 @@ class ListRegionOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76856,14 +90573,15 @@ class ListRegionOperationsRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -76904,9 +90622,9 @@ class ListRegionOperationsRequest(proto.Message): ) -class ListRegionSecurityPoliciesRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.List. See the - method description for details. +class ListRegionZonesRequest(proto.Message): + r"""A request message for RegionZones.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -76918,42 +90636,69 @@ class ListRegionSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -76968,13 +90713,17 @@ class ListRegionSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -76987,14 +90736,15 @@ class ListRegionSecurityPoliciesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + Region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77035,8 +90785,8 @@ class ListRegionSecurityPoliciesRequest(proto.Message): ) -class ListRegionSnapshotsRequest(proto.Message): - r"""A request message for RegionSnapshots.List. See the method +class ListRegionsRequest(proto.Message): + r"""A request message for Regions.List. See the method description for details. @@ -77049,42 +90799,69 @@ class ListRegionSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77099,13 +90876,17 @@ class ListRegionSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77117,15 +90898,14 @@ class ListRegionSnapshotsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77155,10 +90935,6 @@ class ListRegionSnapshotsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -77166,9 +90942,9 @@ class ListRegionSnapshotsRequest(proto.Message): ) -class ListRegionSslCertificatesRequest(proto.Message): - r"""A request message for RegionSslCertificates.List. See the - method description for details. +class ListReservationBlocksRequest(proto.Message): + r"""A request message for ReservationBlocks.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -77180,42 +90956,69 @@ class ListRegionSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77230,13 +91033,17 @@ class ListRegionSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77248,18 +91055,24 @@ class ListRegionSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. + reservation (str): + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. Zone name + should conform to RFC1035. """ filter: str = proto.Field( @@ -77286,20 +91099,24 @@ class ListRegionSslCertificatesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( + reservation: str = proto.Field( proto.STRING, - number=138946292, + number=47530956, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListRegionSslPoliciesRequest(proto.Message): - r"""A request message for RegionSslPolicies.List. See the method - description for details. +class ListReservationSubBlocksRequest(proto.Message): + r"""A request message for ReservationSubBlocks.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -77311,173 +91128,69 @@ class ListRegionSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_return_partial_success``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) - - -class ListRegionTargetHttpProxiesRequest(proto.Message): - r"""A request message for RegionTargetHttpProxies.List. See the - method description for details. + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77492,13 +91205,17 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77508,20 +91225,26 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. + parent_name (str): + The name of the parent reservation and parent block. In the + format of + reservations/{reservation_name}/reservationBlocks/{reservation_block_name} project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. Zone name + should conform to RFC1035. """ filter: str = proto.Field( @@ -77544,24 +91267,28 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): number=19994697, optional=True, ) - project: str = proto.Field( + parent_name: str = proto.Field( proto.STRING, - number=227560217, + number=478151936, ) - region: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=138946292, + number=227560217, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListRegionTargetHttpsProxiesRequest(proto.Message): - r"""A request message for RegionTargetHttpsProxies.List. See the - method description for details. +class ListReservationsRequest(proto.Message): + r"""A request message for Reservations.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -77573,42 +91300,69 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77623,13 +91377,17 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77641,18 +91399,19 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for this request. """ filter: str = proto.Field( @@ -77679,20 +91438,20 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListRegionTargetTcpProxiesRequest(proto.Message): - r"""A request message for RegionTargetTcpProxies.List. See the - method description for details. +class ListResourcePoliciesRequest(proto.Message): + r"""A request message for ResourcePolicies.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -77704,42 +91463,69 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77754,13 +91540,17 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77773,14 +91563,15 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77821,8 +91612,8 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): ) -class ListRegionUrlMapsRequest(proto.Message): - r"""A request message for RegionUrlMaps.List. See the method +class ListRolloutPlansRequest(proto.Message): + r"""A request message for RolloutPlans.List. See the method description for details. @@ -77835,42 +91626,69 @@ class ListRegionUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -77885,13 +91703,17 @@ class ListRegionUrlMapsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -77903,15 +91725,14 @@ class ListRegionUrlMapsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -77941,10 +91762,6 @@ class ListRegionUrlMapsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -77952,8 +91769,8 @@ class ListRegionUrlMapsRequest(proto.Message): ) -class ListRegionZonesRequest(proto.Message): - r"""A request message for RegionZones.List. See the method +class ListRolloutsRequest(proto.Message): + r"""A request message for Rollouts.List. See the method description for details. @@ -77966,42 +91783,69 @@ class ListRegionZonesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78016,13 +91860,17 @@ class ListRegionZonesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78034,15 +91882,14 @@ class ListRegionZonesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78072,10 +91919,6 @@ class ListRegionZonesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -78083,9 +91926,9 @@ class ListRegionZonesRequest(proto.Message): ) -class ListRegionsRequest(proto.Message): - r"""A request message for Regions.List. See the method - description for details. +class ListRoutePoliciesRoutersRequest(proto.Message): + r"""A request message for Routers.ListRoutePolicies. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -78097,167 +91940,69 @@ class ListRegionsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + :: - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + labels.owner:* - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. - This field is a member of `oneof`_ ``_return_partial_success``. - """ + To filter on multiple expressions, provide each separate + expression within parentheses. For example: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + :: + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") -class ListReservationBlocksRequest(proto.Message): - r"""A request message for ReservationBlocks.List. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78272,13 +92017,17 @@ class ListReservationBlocksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78290,22 +92039,22 @@ class ListReservationBlocksRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. Zone name - should conform to RFC1035. + router (str): + Name or id of the resource for this request. + Name should conform to RFC1035. """ filter: str = proto.Field( @@ -78332,24 +92081,24 @@ class ListReservationBlocksRequest(proto.Message): proto.STRING, number=227560217, ) - reservation: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=47530956, + number=138946292, ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( + router: str = proto.Field( proto.STRING, - number=3744684, + number=148608841, ) -class ListReservationSubBlocksRequest(proto.Message): - r"""A request message for ReservationSubBlocks.List. See the - method description for details. +class ListRoutersRequest(proto.Message): + r"""A request message for Routers.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -78361,42 +92110,69 @@ class ListReservationSubBlocksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78411,13 +92187,17 @@ class ListReservationSubBlocksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78427,25 +92207,21 @@ class ListReservationSubBlocksRequest(proto.Message): the next page of results. This field is a member of `oneof`_ ``_page_token``. - parent_name (str): - The name of the parent reservation and parent block. In the - format of - reservations/{reservation_name}/reservationBlocks/{reservation_block_name} project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. Zone name - should conform to RFC1035. """ filter: str = proto.Field( @@ -78468,28 +92244,24 @@ class ListReservationSubBlocksRequest(proto.Message): number=19994697, optional=True, ) - parent_name: str = proto.Field( - proto.STRING, - number=478151936, - ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListReservationsRequest(proto.Message): - r"""A request message for Reservations.List. See the method - description for details. +class ListRoutesRequest(proto.Message): + r"""A request message for Routes.List. See the method description + for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -78501,42 +92273,69 @@ class ListReservationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78551,13 +92350,17 @@ class ListReservationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78572,15 +92375,14 @@ class ListReservationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone for this request. """ filter: str = proto.Field( @@ -78612,14 +92414,10 @@ class ListReservationsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListResourcePoliciesRequest(proto.Message): - r"""A request message for ResourcePolicies.List. See the method +class ListSecurityPoliciesRequest(proto.Message): + r"""A request message for SecurityPolicies.List. See the method description for details. @@ -78632,42 +92430,69 @@ class ListResourcePoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78682,13 +92507,17 @@ class ListResourcePoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78700,15 +92529,14 @@ class ListResourcePoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -78738,10 +92566,6 @@ class ListResourcePoliciesRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -78749,9 +92573,9 @@ class ListResourcePoliciesRequest(proto.Message): ) -class ListRoutePoliciesRoutersRequest(proto.Message): - r"""A request message for Routers.ListRoutePolicies. See the - method description for details. +class ListServiceAttachmentsRequest(proto.Message): + r"""A request message for ServiceAttachments.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -78763,42 +92587,69 @@ class ListRoutePoliciesRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78813,13 +92664,17 @@ class ListRoutePoliciesRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78832,20 +92687,18 @@ class ListRoutePoliciesRoutersRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - router (str): - Name or id of the resource for this request. - Name should conform to RFC1035. """ filter: str = proto.Field( @@ -78881,14 +92734,10 @@ class ListRoutePoliciesRoutersRequest(proto.Message): number=517198390, optional=True, ) - router: str = proto.Field( - proto.STRING, - number=148608841, - ) -class ListRoutersRequest(proto.Message): - r"""A request message for Routers.List. See the method +class ListSnapshotsRequest(proto.Message): + r"""A request message for Snapshots.List. See the method description for details. @@ -78901,42 +92750,69 @@ class ListRoutersRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -78951,13 +92827,17 @@ class ListRoutersRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -78969,15 +92849,14 @@ class ListRoutersRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79007,10 +92886,6 @@ class ListRoutersRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -79018,9 +92893,9 @@ class ListRoutersRequest(proto.Message): ) -class ListRoutesRequest(proto.Message): - r"""A request message for Routes.List. See the method description - for details. +class ListSslCertificatesRequest(proto.Message): + r"""A request message for SslCertificates.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -79032,42 +92907,69 @@ class ListRoutesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79082,13 +92984,17 @@ class ListRoutesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79103,10 +93009,11 @@ class ListRoutesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79143,8 +93050,8 @@ class ListRoutesRequest(proto.Message): ) -class ListSecurityPoliciesRequest(proto.Message): - r"""A request message for SecurityPolicies.List. See the method +class ListSslPoliciesRequest(proto.Message): + r"""A request message for SslPolicies.List. See the method description for details. @@ -79157,42 +93064,69 @@ class ListSecurityPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79207,13 +93141,17 @@ class ListSecurityPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79228,10 +93166,11 @@ class ListSecurityPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79268,8 +93207,8 @@ class ListSecurityPoliciesRequest(proto.Message): ) -class ListServiceAttachmentsRequest(proto.Message): - r"""A request message for ServiceAttachments.List. See the method +class ListStoragePoolTypesRequest(proto.Message): + r"""A request message for StoragePoolTypes.List. See the method description for details. @@ -79282,42 +93221,69 @@ class ListServiceAttachmentsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79332,13 +93298,17 @@ class ListServiceAttachmentsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79350,18 +93320,19 @@ class ListServiceAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region of this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -79388,19 +93359,19 @@ class ListServiceAttachmentsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListSnapshotsRequest(proto.Message): - r"""A request message for Snapshots.List. See the method +class ListStoragePoolsRequest(proto.Message): + r"""A request message for StoragePools.List. See the method description for details. @@ -79413,42 +93384,69 @@ class ListSnapshotsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79463,13 +93461,17 @@ class ListSnapshotsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79484,13 +93486,16 @@ class ListSnapshotsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + The name of the zone for this request. """ filter: str = proto.Field( @@ -79522,10 +93527,14 @@ class ListSnapshotsRequest(proto.Message): number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListSslCertificatesRequest(proto.Message): - r"""A request message for SslCertificates.List. See the method +class ListSubnetworksRequest(proto.Message): + r"""A request message for Subnetworks.List. See the method description for details. @@ -79538,42 +93547,69 @@ class ListSslCertificatesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79588,13 +93624,17 @@ class ListSslCertificatesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79606,18 +93646,55 @@ class ListSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Check the Views enum for the list of possible values. + + This field is a member of `oneof`_ ``_views``. """ + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: + + :: + + - WITH_UTILIZATION: Utilization data is included in the + response. + + Values: + UNDEFINED_VIEWS (0): + A value indicating that the enum field is not + set. + DEFAULT (115302945): + No description available. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. + """ + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -79642,15 +93719,24 @@ class ListSslCertificatesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + views: str = proto.Field( + proto.STRING, + number=112204398, + optional=True, + ) -class ListSslPoliciesRequest(proto.Message): - r"""A request message for SslPolicies.List. See the method +class ListTargetGrpcProxiesRequest(proto.Message): + r"""A request message for TargetGrpcProxies.List. See the method description for details. @@ -79663,42 +93749,69 @@ class ListSslPoliciesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79713,13 +93826,17 @@ class ListSslPoliciesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79734,10 +93851,11 @@ class ListSslPoliciesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -79774,8 +93892,8 @@ class ListSslPoliciesRequest(proto.Message): ) -class ListStoragePoolTypesRequest(proto.Message): - r"""A request message for StoragePoolTypes.List. See the method +class ListTargetHttpProxiesRequest(proto.Message): + r"""A request message for TargetHttpProxies.List. See the method description for details. @@ -79788,42 +93906,69 @@ class ListStoragePoolTypesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79838,13 +93983,17 @@ class ListStoragePoolTypesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79859,15 +94008,14 @@ class ListStoragePoolTypesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -79899,14 +94047,10 @@ class ListStoragePoolTypesRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListStoragePoolsRequest(proto.Message): - r"""A request message for StoragePools.List. See the method +class ListTargetHttpsProxiesRequest(proto.Message): + r"""A request message for TargetHttpsProxies.List. See the method description for details. @@ -79919,42 +94063,69 @@ class ListStoragePoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -79969,13 +94140,17 @@ class ListStoragePoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -79990,15 +94165,14 @@ class ListStoragePoolsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - The name of the zone for this request. """ filter: str = proto.Field( @@ -80030,14 +94204,10 @@ class ListStoragePoolsRequest(proto.Message): number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListSubnetworksRequest(proto.Message): - r"""A request message for Subnetworks.List. See the method +class ListTargetInstancesRequest(proto.Message): + r"""A request message for TargetInstances.List. See the method description for details. @@ -80050,42 +94220,69 @@ class ListSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80100,13 +94297,17 @@ class ListSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80118,45 +94319,21 @@ class ListSubnetworksRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - views (str): - Defines the extra views returned back in the subnetwork - resource. Supported values: - WITH_UTILIZATION: Utilization - data is included in the response. Check the Views enum for - the list of possible values. - - This field is a member of `oneof`_ ``_views``. + zone (str): + Name of the zone scoping this request. """ - class Views(proto.Enum): - r"""Defines the extra views returned back in the subnetwork resource. - Supported values: - WITH_UTILIZATION: Utilization data is included - in the response. - - Values: - UNDEFINED_VIEWS (0): - A value indicating that the enum field is not - set. - DEFAULT (115302945): - No description available. - WITH_UTILIZATION (504090633): - Utilization data is included in the response. - """ - UNDEFINED_VIEWS = 0 - DEFAULT = 115302945 - WITH_UTILIZATION = 504090633 - filter: str = proto.Field( proto.STRING, number=336120696, @@ -80181,24 +94358,19 @@ class Views(proto.Enum): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - views: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=112204398, - optional=True, + number=3744684, ) -class ListTargetGrpcProxiesRequest(proto.Message): - r"""A request message for TargetGrpcProxies.List. See the method +class ListTargetPoolsRequest(proto.Message): + r"""A request message for TargetPools.List. See the method description for details. @@ -80211,42 +94383,69 @@ class ListTargetGrpcProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80261,13 +94460,17 @@ class ListTargetGrpcProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80279,13 +94482,16 @@ class ListTargetGrpcProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80315,6 +94521,10 @@ class ListTargetGrpcProxiesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -80322,8 +94532,8 @@ class ListTargetGrpcProxiesRequest(proto.Message): ) -class ListTargetHttpProxiesRequest(proto.Message): - r"""A request message for TargetHttpProxies.List. See the method +class ListTargetSslProxiesRequest(proto.Message): + r"""A request message for TargetSslProxies.List. See the method description for details. @@ -80336,42 +94546,69 @@ class ListTargetHttpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80386,13 +94623,17 @@ class ListTargetHttpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80407,10 +94648,11 @@ class ListTargetHttpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80447,8 +94689,8 @@ class ListTargetHttpProxiesRequest(proto.Message): ) -class ListTargetHttpsProxiesRequest(proto.Message): - r"""A request message for TargetHttpsProxies.List. See the method +class ListTargetTcpProxiesRequest(proto.Message): + r"""A request message for TargetTcpProxies.List. See the method description for details. @@ -80461,42 +94703,69 @@ class ListTargetHttpsProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80511,13 +94780,17 @@ class ListTargetHttpsProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80532,10 +94805,11 @@ class ListTargetHttpsProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80572,8 +94846,8 @@ class ListTargetHttpsProxiesRequest(proto.Message): ) -class ListTargetInstancesRequest(proto.Message): - r"""A request message for TargetInstances.List. See the method +class ListTargetVpnGatewaysRequest(proto.Message): + r"""A request message for TargetVpnGateways.List. See the method description for details. @@ -80586,42 +94860,69 @@ class ListTargetInstancesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80636,13 +94937,17 @@ class ListTargetInstancesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80654,18 +94959,19 @@ class ListTargetInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - zone (str): - Name of the zone scoping this request. """ filter: str = proto.Field( @@ -80692,19 +94998,19 @@ class ListTargetInstancesRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ListTargetPoolsRequest(proto.Message): - r"""A request message for TargetPools.List. See the method +class ListUrlMapsRequest(proto.Message): + r"""A request message for UrlMaps.List. See the method description for details. @@ -80717,42 +95023,69 @@ class ListTargetPoolsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80767,13 +95100,17 @@ class ListTargetPoolsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80785,15 +95122,14 @@ class ListTargetPoolsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region scoping this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80823,10 +95159,6 @@ class ListTargetPoolsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -80834,9 +95166,9 @@ class ListTargetPoolsRequest(proto.Message): ) -class ListTargetSslProxiesRequest(proto.Message): - r"""A request message for TargetSslProxies.List. See the method - description for details. +class ListUsableBackendBucketsRequest(proto.Message): + r"""A request message for BackendBuckets.ListUsable. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -80848,42 +95180,69 @@ class ListTargetSslProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -80898,13 +95257,17 @@ class ListTargetSslProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -80919,10 +95282,11 @@ class ListTargetSslProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -80959,9 +95323,9 @@ class ListTargetSslProxiesRequest(proto.Message): ) -class ListTargetTcpProxiesRequest(proto.Message): - r"""A request message for TargetTcpProxies.List. See the method - description for details. +class ListUsableBackendServicesRequest(proto.Message): + r"""A request message for BackendServices.ListUsable. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -80973,42 +95337,69 @@ class ListTargetTcpProxiesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81023,13 +95414,17 @@ class ListTargetTcpProxiesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81044,10 +95439,11 @@ class ListTargetTcpProxiesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81084,9 +95480,9 @@ class ListTargetTcpProxiesRequest(proto.Message): ) -class ListTargetVpnGatewaysRequest(proto.Message): - r"""A request message for TargetVpnGateways.List. See the method - description for details. +class ListUsableRegionBackendBucketsRequest(proto.Message): + r"""A request message for RegionBackendBuckets.ListUsable. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -81098,42 +95494,69 @@ class ListTargetVpnGatewaysRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81148,13 +95571,17 @@ class ListTargetVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81167,14 +95594,17 @@ class ListTargetVpnGatewaysRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region for this request. + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81215,9 +95645,9 @@ class ListTargetVpnGatewaysRequest(proto.Message): ) -class ListUrlMapsRequest(proto.Message): - r"""A request message for UrlMaps.List. See the method - description for details. +class ListUsableRegionBackendServicesRequest(proto.Message): + r"""A request message for RegionBackendServices.ListUsable. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -81229,167 +95659,69 @@ class ListUrlMapsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + mixed in one request. - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. - - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListUsableBackendBucketsRequest(proto.Message): - r"""A request message for BackendBuckets.ListUsable. See the - method description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81404,13 +95736,17 @@ class ListUsableBackendBucketsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81422,13 +95758,18 @@ class ListUsableBackendBucketsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81458,6 +95799,10 @@ class ListUsableBackendBucketsRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -81465,9 +95810,9 @@ class ListUsableBackendBucketsRequest(proto.Message): ) -class ListUsableBackendServicesRequest(proto.Message): - r"""A request message for BackendServices.ListUsable. See the - method description for details. +class ListUsableSubnetworksRequest(proto.Message): + r"""A request message for Subnetworks.ListUsable. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -81479,42 +95824,69 @@ class ListUsableBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81529,13 +95901,17 @@ class ListUsableBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81550,13 +95926,21 @@ class ListUsableBackendServicesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + service_project (str): + The project id or project number in which the subnetwork is + intended to be used. Only applied for Shared VPC. See + `Shared VPC + documentation `__ + + This field is a member of `oneof`_ ``_service_project``. """ filter: str = proto.Field( @@ -81588,11 +95972,16 @@ class ListUsableBackendServicesRequest(proto.Message): number=517198390, optional=True, ) + service_project: str = proto.Field( + proto.STRING, + number=530592655, + optional=True, + ) -class ListUsableRegionBackendServicesRequest(proto.Message): - r"""A request message for RegionBackendServices.ListUsable. See - the method description for details. +class ListVpnGatewaysRequest(proto.Message): + r"""A request message for VpnGateways.List. See the method + description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -81604,42 +95993,69 @@ class ListUsableRegionBackendServicesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81654,13 +96070,17 @@ class ListUsableRegionBackendServicesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81673,16 +96093,15 @@ class ListUsableRegionBackendServicesRequest(proto.Message): project (str): Project ID for this request. region (str): - Name of the region scoping this request. It - must be a string that meets the requirements in - RFC1035. + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -81723,8 +96142,8 @@ class ListUsableRegionBackendServicesRequest(proto.Message): ) -class ListUsableSubnetworksRequest(proto.Message): - r"""A request message for Subnetworks.ListUsable. See the method +class ListVpnTunnelsRequest(proto.Message): + r"""A request message for VpnTunnels.List. See the method description for details. @@ -81737,42 +96156,69 @@ class ListUsableSubnetworksRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81787,13 +96233,17 @@ class ListUsableSubnetworksRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81805,23 +96255,19 @@ class ListUsableSubnetworksRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. + region (str): + Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. - service_project (str): - The project id or project number in which the subnetwork is - intended to be used. Only applied for Shared VPC. See - `Shared VPC - documentation `__ - - This field is a member of `oneof`_ ``_service_project``. """ filter: str = proto.Field( @@ -81848,68 +96294,96 @@ class ListUsableSubnetworksRequest(proto.Message): proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - service_project: str = proto.Field( - proto.STRING, - number=530592655, - optional=True, - ) -class ListVpnGatewaysRequest(proto.Message): - r"""A request message for VpnGateways.List. See the method +class ListWireGroupsRequest(proto.Message): + r"""A request message for WireGroups.List. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + cross_site_network (str): + filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -81924,13 +96398,17 @@ class ListVpnGatewaysRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -81942,20 +96420,23 @@ class ListVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. """ + cross_site_network: str = proto.Field( + proto.STRING, + number=108192469, + ) filter: str = proto.Field( proto.STRING, number=336120696, @@ -81980,10 +96461,6 @@ class ListVpnGatewaysRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, @@ -81991,8 +96468,8 @@ class ListVpnGatewaysRequest(proto.Message): ) -class ListVpnTunnelsRequest(proto.Message): - r"""A request message for VpnTunnels.List. See the method +class ListXpnHostsProjectsRequest(proto.Message): + r"""A request message for Projects.ListXpnHosts. See the method description for details. @@ -82005,42 +96482,69 @@ class ListVpnTunnelsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82055,13 +96559,17 @@ class ListVpnTunnelsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82073,15 +96581,16 @@ class ListVpnTunnelsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - region (str): - Name of the region for this request. + projects_list_xpn_hosts_request_resource (google.cloud.compute_v1beta.types.ProjectsListXpnHostsRequest): + The body resource for this request return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82111,9 +96620,12 @@ class ListVpnTunnelsRequest(proto.Message): proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + projects_list_xpn_hosts_request_resource: "ProjectsListXpnHostsRequest" = ( + proto.Field( + proto.MESSAGE, + number=238266391, + message="ProjectsListXpnHostsRequest", + ) ) return_partial_success: bool = proto.Field( proto.BOOL, @@ -82122,187 +96634,83 @@ class ListVpnTunnelsRequest(proto.Message): ) -class ListWireGroupsRequest(proto.Message): - r"""A request message for WireGroups.List. See the method +class ListZoneOperationsRequest(proto.Message): + r"""A request message for ZoneOperations.List. See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - cross_site_network (str): - filter (str): A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` - By default, each expression is an ``AND`` expression. - However, you can include ``AND`` and ``OR`` expressions - explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` - If you want to use a regular expression, use the ``eq`` - (equal) or ``ne`` (not equal) operator against a single - un-parenthesized expression with or without quotes or - against multiple parenthesized expressions. Examples: - ``fieldname eq unquoted literal`` - ``fieldname eq 'single quoted literal'`` - ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. - - This field is a member of `oneof`_ ``_filter``. - max_results (int): - The maximum number of results per page that should be - returned. If the number of available results is larger than - ``maxResults``, Compute Engine returns a ``nextPageToken`` - that can be used to get the next page of results in - subsequent list requests. Acceptable values are ``0`` to - ``500``, inclusive. (Default: ``500``) + mixed in one request. - This field is a member of `oneof`_ ``_max_results``. - order_by (str): - Sorts list results by a certain order. By default, results - are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using - ``orderBy="creationTimestamp desc"``. This sorts results - based on the ``creationTimestamp`` field in reverse - chronological order (newest result first). Use this to sort - resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or - ``creationTimestamp desc`` is supported. + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. - This field is a member of `oneof`_ ``_order_by``. - page_token (str): - Specifies a page token to use. Set ``pageToken`` to the - ``nextPageToken`` returned by a previous list request to get - the next page of results. + For example, if you are filtering Compute Engine instances, + you can exclude instances named ``example-instance`` by + specifying ``name != example-instance``. - This field is a member of `oneof`_ ``_page_token``. - project (str): - Project ID for this request. - return_partial_success (bool): - Opt-in for partial success behavior which - provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no - resources, with an error code. + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: - This field is a member of `oneof`_ ``_return_partial_success``. - """ + :: - cross_site_network: str = proto.Field( - proto.STRING, - number=108192469, - ) - filter: str = proto.Field( - proto.STRING, - number=336120696, - optional=True, - ) - max_results: int = proto.Field( - proto.UINT32, - number=54715419, - optional=True, - ) - order_by: str = proto.Field( - proto.STRING, - number=160562920, - optional=True, - ) - page_token: str = proto.Field( - proto.STRING, - number=19994697, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - return_partial_success: bool = proto.Field( - proto.BOOL, - number=517198390, - optional=True, - ) + labels.owner:* + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. -class ListXpnHostsProjectsRequest(proto.Message): - r"""A request message for Projects.ListXpnHosts. See the method - description for details. + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + :: - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") - Attributes: - filter (str): - A filter expression that filters resources listed in the - response. Most Compute resources support two types of filter - expressions: expressions that support regular expressions - and expressions that follow API improvement proposal - AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. - For example, if you are filtering Compute Engine instances, - you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82317,13 +96725,17 @@ class ListXpnHostsProjectsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82335,18 +96747,19 @@ class ListXpnHostsProjectsRequest(proto.Message): This field is a member of `oneof`_ ``_page_token``. project (str): Project ID for this request. - projects_list_xpn_hosts_request_resource (google.cloud.compute_v1beta.types.ProjectsListXpnHostsRequest): - The body resource for this request return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + zone (str): + Name of the zone for request. """ filter: str = proto.Field( @@ -82373,23 +96786,20 @@ class ListXpnHostsProjectsRequest(proto.Message): proto.STRING, number=227560217, ) - projects_list_xpn_hosts_request_resource: "ProjectsListXpnHostsRequest" = ( - proto.Field( - proto.MESSAGE, - number=238266391, - message="ProjectsListXpnHostsRequest", - ) - ) return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ListZoneOperationsRequest(proto.Message): - r"""A request message for ZoneOperations.List. See the method - description for details. +class ListZoneVmExtensionPoliciesRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.List. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -82401,42 +96811,69 @@ class ListZoneOperationsRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82451,13 +96888,17 @@ class ListZoneOperationsRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82472,15 +96913,16 @@ class ListZoneOperationsRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. zone (str): - Name of the zone for request. + Name of the zone for this request. """ filter: str = proto.Field( @@ -82532,42 +96974,69 @@ class ListZonesRequest(proto.Message): expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be - mixed in one request. If you want to use AIP-160, your - expression must specify the field name, an operator, and the - value that you want to use for filtering. The value must be - a string, a number, or a boolean. The operator must be - either ``=``, ``!=``, ``>``, ``<``, ``<=``, ``>=`` or ``:``. + mixed in one request. + + If you want to use AIP-160, your expression must specify the + field name, an operator, and the value that you want to use + for filtering. The value must be a string, a number, or a + boolean. The operator must be either ``=``, ``!=``, ``>``, + ``<``, ``<=``, ``>=`` or ``:``. + For example, if you are filtering Compute Engine instances, you can exclude instances named ``example-instance`` by - specifying ``name != example-instance``. The ``:*`` - comparison can be used to test whether a key has been - defined. For example, to find all objects with ``owner`` - label use: ``labels.owner:*`` You can also filter nested - fields. For example, you could specify - ``scheduling.automaticRestart = false`` to include instances - only if they are not scheduled for automatic restarts. You - can use filtering on nested fields to filter based on - resource labels. To filter on multiple expressions, provide - each separate expression within parentheses. For example: - ``(scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake")`` + specifying ``name != example-instance``. + + The ``:*`` comparison can be used to test whether a key has + been defined. For example, to find all objects with + ``owner`` label use: + + :: + + labels.owner:* + + You can also filter nested fields. For example, you could + specify ``scheduling.automaticRestart = false`` to include + instances only if they are not scheduled for automatic + restarts. You can use filtering on nested fields to filter + based onresource labels. + + To filter on multiple expressions, provide each separate + expression within parentheses. For example: + + :: + + (scheduling.automaticRestart = true) + (cpuPlatform = "Intel Skylake") + By default, each expression is an ``AND`` expression. However, you can include ``AND`` and ``OR`` expressions explicitly. For example: - ``(cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)`` + + :: + + (cpuPlatform = "Intel Skylake") OR + (cpuPlatform = "Intel Broadwell") AND + (scheduling.automaticRestart = true) + If you want to use a regular expression, use the ``eq`` (equal) or ``ne`` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: + ``fieldname eq unquoted literal`` ``fieldname eq 'single quoted literal'`` ``fieldname eq "double quoted literal"`` - ``(fieldname1 eq literal) (fieldname2 ne "literal")`` The - literal value is interpreted as a regular expression using - Google RE2 library syntax. The literal value must match the - entire field. For example, to filter for instances that do - not end with name "instance", you would use - ``name ne .*instance``. You cannot combine constraints on - multiple fields using regular expressions. + ``(fieldname1 eq literal) (fieldname2 ne "literal")`` + + The literal value is interpreted as a regular expression + using GoogleRE2 library syntax. The literal value must match + the entire field. + + For example, to filter for instances that do not end with + name "instance", you would use ``name ne .*instance``. + + You cannot combine constraints on multiple fields using + regular expressions. This field is a member of `oneof`_ ``_filter``. max_results (int): @@ -82582,13 +97051,17 @@ class ListZonesRequest(proto.Message): order_by (str): Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource - name. You can also sort results in descending order based on - the creation timestamp using + name. + + You can also sort results in descending order based on the + creation timestamp using ``orderBy="creationTimestamp desc"``. This sorts results based on the ``creationTimestamp`` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is - returned first. Currently, only sorting by ``name`` or + returned first. + + Currently, only sorting by ``name`` or ``creationTimestamp desc`` is supported. This field is a member of `oneof`_ ``_order_by``. @@ -82603,10 +97076,11 @@ class ListZonesRequest(proto.Message): return_partial_success (bool): Opt-in for partial success behavior which provides partial results in case of failure. The - default value is false. For example, when - partial success behavior is enabled, - aggregatedList for a single zone scope either - returns all resources in the zone or no + default value is false. + + For example, when partial success behavior is + enabled, aggregatedList for a single zone scope + either returns all resources in the zone or no resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. @@ -82801,14 +97275,14 @@ class LocationPolicyLocation(proto.Message): This field is a member of `oneof`_ ``_constraints``. preference (str): Preference for a given location. Set to - either ALLOW or DENY. Check the Preference enum + either ALLOW orDENY. Check the Preference enum for the list of possible values. This field is a member of `oneof`_ ``_preference``. """ class Preference(proto.Enum): - r"""Preference for a given location. Set to either ALLOW or DENY. + r"""Preference for a given location. Set to either ALLOW orDENY. Values: UNDEFINED_PREFERENCE (0): @@ -82861,19 +97335,20 @@ class LocationPolicyLocationConstraints(proto.Message): class MachineImage(proto.Message): - r"""Represents a machine image resource. A machine image is a - Compute Engine resource that stores all the configuration, - metadata, permissions, and data from one or more disks required - to create a Virtual machine (VM) instance. For more information, - see Machine images. + r"""Represents a machine image resource. + + A machine image is a Compute Engine resource that stores all the + configuration, metadata, permissions, and data from one or more + disks required to create a Virtual machine (VM) instance. For + more information, seeMachine images. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] The creation timestamp for this machine image - in RFC3339 text format. + Output only. [Output Only] The creation timestamp for this + machine image inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -82889,8 +97364,8 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_guest_flush``. id (int): - [Output Only] A unique identifier for this machine image. - The server defines this identifier. + Output only. [Output Only] A unique identifier for this + machine image. The server defines this identifier. This field is a member of `oneof`_ ``_id``. instance_properties (google.cloud.compute_v1beta.types.InstanceProperties): @@ -82898,8 +97373,8 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_instance_properties``. kind (str): - [Output Only] The resource type, which is always - compute#machineImage for machine image. + Output only. [Output Only] The resource type, which is + alwayscompute#machineImage for machine image. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -82910,36 +97385,40 @@ class MachineImage(proto.Message): Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order - to update or change labels. To see the latest - fingerprint, make get() request to the machine - image. + to update or change labels. + + To see the latest fingerprint, make get() + request to the machine image. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this machine image. These can be later modified by the setLabels method. machine_image_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the machine image using a - customer-supplied encryption key. After you - encrypt a machine image using a + Encrypts the machine image using + acustomer-supplied encryption key. + + After you encrypt a machine image using a customer-supplied key, you must provide the same key if you use the machine image later. For example, you must provide the encryption key when you create an instance from the encrypted machine image in a future request. + Customer-supplied encryption keys do not protect - access to metadata of the machine image. If you - do not provide an encryption key when creating - the machine image, then the machine image will - be encrypted using an automatically generated - key and you do not need to provide a key to use - the machine image later. + access to metadata of the machine image. + + If you do not provide an encryption key when + creating the machine image, then the machine + image will be encrypted using an automatically + generated key and you do not need to provide a + key to use the machine image later. This field is a member of `oneof`_ ``_machine_image_encryption_key``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -82952,19 +97431,20 @@ class MachineImage(proto.Message): This field is a member of `oneof`_ ``_satisfies_pzi``. satisfies_pzs (bool): - [Output Only] Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzs``. saved_disks (MutableSequence[google.cloud.compute_v1beta.types.SavedDisk]): - An array of Machine Image specific properties - for disks attached to the source instance + Output only. An array of Machine Image + specific properties for disks attached to the + source instance self_link (str): - [Output Only] The URL for this machine image. The server - defines this URL. + Output only. [Output Only] The URL for this machine image. + The server defines this URL. This field is a member of `oneof`_ ``_self_link``. source_disk_encryption_keys (MutableSequence[google.cloud.compute_v1beta.types.SourceDiskEncryptionKey]): - [Input Only] The customer-supplied encryption key of the + [Input Only] Thecustomer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key. @@ -82972,39 +97452,43 @@ class MachineImage(proto.Message): The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance This field is a member of `oneof`_ ``_source_instance``. source_instance_properties (google.cloud.compute_v1beta.types.SourceInstanceProperties): - [Output Only] DEPRECATED: Please use instance_properties - instead for source instance related properties. New - properties will not be added to this field. + Output only. [Output Only] DEPRECATED: Please use + instance_properties instead for source instance related + properties. New properties will not be added to this field. This field is a member of `oneof`_ ``_source_instance_properties``. status (str): - [Output Only] The status of the machine image. One of the - following values: INVALID, CREATING, READY, DELETING, and - UPLOADING. Check the Status enum for the list of possible - values. + Output only. [Output Only] The status of the machine image. + One of the following values:INVALID, CREATING, + READY,DELETING, and UPLOADING. Check the Status enum for the + list of possible values. This field is a member of `oneof`_ ``_status``. storage_locations (MutableSequence[str]): The regional or multi-regional Cloud Storage - bucket location where the machine image is + bucket location where themachine image is stored. total_storage_bytes (int): - [Output Only] Total size of the storage used by the machine - image. + Output only. [Output Only] Total size of the storage used by + the machine image. This field is a member of `oneof`_ ``_total_storage_bytes``. """ class Status(proto.Enum): - r"""[Output Only] The status of the machine image. One of the following - values: INVALID, CREATING, READY, DELETING, and UPLOADING. + r"""Output only. [Output Only] The status of the machine image. One of + the following values:INVALID, CREATING, READY,DELETING, and + UPLOADING. Values: UNDEFINED_STATUS (0): @@ -83148,21 +97632,23 @@ class MachineImageList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.MachineImage]): A list of MachineImage resources. kind (str): - [Output Only] The resource type, which is always - compute#machineImagesListResponse for machine image lists. + Output only. [Output Only] The resource type, which is + alwayscompute#machineImagesListResponse for machine image + lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -83209,9 +97695,11 @@ def raw_page(self): class MachineType(proto.Message): - r"""Represents a Machine Type resource. You can use specific - machine types for your VM instances based on performance and - pricing requirements. For more information, read Machine Types. + r"""Represents a Machine Type resource. + + You can use specific machine types for your VM instances based + on performance and pricing requirements. For more information, + readMachine Types. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -83231,7 +97719,7 @@ class MachineType(proto.Message): This field is a member of `oneof`_ ``_bundled_local_ssds``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -83260,12 +97748,12 @@ class MachineType(proto.Message): This field is a member of `oneof`_ ``_image_space_gb``. is_shared_cpu (bool): [Output Only] Whether this machine type has a shared CPU. - See Shared-core machine types for more information. + SeeShared-core machine types for more information. This field is a member of `oneof`_ ``_is_shared_cpu``. kind (str): - [Output Only] The type of the resource. Always - compute#machineType for machine types. + Output only. [Output Only] The type of the resource. + Alwayscompute#machineType for machine types. This field is a member of `oneof`_ ``_kind``. maximum_persistent_disks (int): @@ -83420,26 +97908,27 @@ class MachineTypeAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.MachineTypesScopedList]): A list of MachineTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#machineTypeAggregatedList for aggregated lists of - machine types. + Output only. [Output Only] Type of resource. + Alwayscompute#machineTypeAggregatedList for aggregated lists + of machine types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -83502,21 +97991,22 @@ class MachineTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.MachineType]): A list of MachineType resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#machineTypeList for lists of machine types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -83598,122 +98088,142 @@ class ManagedInstance(proto.Message): Attributes: all_instances_config (google.cloud.compute_v1beta.types.ManagedInstanceAllInstancesConfig): - [Output Only] Current all-instances configuration revision - applied to this instance. + Output only. [Output Only] Current all-instances + configuration revision applied to this instance. This field is a member of `oneof`_ ``_all_instances_config``. current_action (str): - [Output Only] The current action that the managed instance - group has scheduled for the instance. Possible values: - - NONE The instance is running, and the managed instance group - does not have any scheduled actions for this instance. - - CREATING The managed instance group is creating this - instance. If the group fails to create this instance, it - will try again until it is successful. - - CREATING_WITHOUT_RETRIES The managed instance group is - attempting to create this instance only once. If the group - fails to create this instance, it does not try again and the - group's targetSize value is decreased instead. - RECREATING - The managed instance group is recreating this instance. - - DELETING The managed instance group is permanently deleting - this instance. - ABANDONING The managed instance group is - abandoning this instance. The instance will be removed from - the instance group and from any target pools that are - associated with this group. - RESTARTING The managed - instance group is restarting the instance. - REFRESHING The - managed instance group is applying configuration changes to - the instance without stopping it. For example, the group can - update the target pool list for an instance without stopping - that instance. - VERIFYING The managed instance group has - created the instance and it is in the process of being - verified. Check the CurrentAction enum for the list of - possible values. + Output only. [Output Only] The current action that the + managed instance group has scheduled for the instance. + Possible values: + + :: + + - NONE The instance is running, and the managed + instance group does not have any scheduled actions for this instance. + - CREATING The managed instance group is creating this + instance. If the group fails to create this instance, it will try again + until it is successful. + - CREATING_WITHOUT_RETRIES The managed instance group + is attempting to create this instance only once. If the group fails + to create this instance, it does not try again and the group'stargetSize value is decreased instead. + - RECREATING The managed instance group is recreating + this instance. + - DELETING The managed instance group is permanently + deleting this instance. + - ABANDONING The managed instance group is abandoning + this instance. The instance will be removed from the instance group + and from any target pools that are associated with this group. + - RESTARTING The managed instance group is restarting + the instance. + - REFRESHING The managed instance group is applying + configuration changes to the instance without stopping it. For example, + the group can update the target pool list for an instance without + stopping that instance. + - VERIFYING The managed instance group has created the + instance and it is in the process of being verified. + + Check the CurrentAction enum for the list of possible + values. This field is a member of `oneof`_ ``_current_action``. id (int): - [Output only] The unique identifier for this resource. This - field is empty when instance does not exist. + Output only. [Output only] The unique identifier for this + resource. This field is empty when instance does not exist. This field is a member of `oneof`_ ``_id``. instance (str): - [Output Only] The URL of the instance. The URL can exist - even if the instance has not yet been created. + Output only. [Output Only] The URL of the instance. The URL + can exist even if the instance has not yet been created. This field is a member of `oneof`_ ``_instance``. instance_health (MutableSequence[google.cloud.compute_v1beta.types.ManagedInstanceInstanceHealth]): - [Output Only] Health state of the instance per health-check. + Output only. [Output Only] Health state of the instance per + health-check. instance_status (str): - [Output Only] The status of the instance. This field is - empty when the instance does not exist. Check the + Output only. [Output Only] The status of the instance. This + field is empty when the instance does not exist. Check the InstanceStatus enum for the list of possible values. This field is a member of `oneof`_ ``_instance_status``. last_attempt (google.cloud.compute_v1beta.types.ManagedInstanceLastAttempt): - [Output Only] Information about the last attempt to create - or delete the instance. + Output only. [Output Only] Information about the last + attempt to create or delete the instance. This field is a member of `oneof`_ ``_last_attempt``. name (str): - [Output Only] The name of the instance. The name always - exists even if the instance has not yet been created. + Output only. [Output Only] The name of the instance. The + name always exists even if the instance has not yet been + created. This field is a member of `oneof`_ ``_name``. preserved_state_from_config (google.cloud.compute_v1beta.types.PreservedState): - [Output Only] Preserved state applied from per-instance - config for this instance. + Output only. [Output Only] Preserved state applied from + per-instance config for this instance. This field is a member of `oneof`_ ``_preserved_state_from_config``. preserved_state_from_policy (google.cloud.compute_v1beta.types.PreservedState): - [Output Only] Preserved state generated based on stateful - policy for this instance. + Output only. [Output Only] Preserved state generated based + on stateful policy for this instance. This field is a member of `oneof`_ ``_preserved_state_from_policy``. properties_from_flexibility_policy (google.cloud.compute_v1beta.types.ManagedInstancePropertiesFromFlexibilityPolicy): - [Output Only] Instance properties selected for this instance - resulting from InstanceFlexibilityPolicy. + Output only. [Output Only] Instance properties selected for + this instance resulting from InstanceFlexibilityPolicy. This field is a member of `oneof`_ ``_properties_from_flexibility_policy``. scheduling (google.cloud.compute_v1beta.types.ManagedInstanceScheduling): - [Output Only] Information about the termination timestamp of - the instance, if applicable. + Output only. [Output Only] Information about the termination + timestamp of the instance, if applicable. This field is a member of `oneof`_ ``_scheduling``. target_status (str): - [Output Only] The eventual status of the instance. The - instance group manager will not be identified as stable till - each managed instance reaches its targetStatus. Check the - TargetStatus enum for the list of possible values. + Output only. [Output Only] The eventual status of the + instance. The instance group manager will not be identified + as stable till each managed instance reaches its + targetStatus. Check the TargetStatus enum for the list of + possible values. This field is a member of `oneof`_ ``_target_status``. version (google.cloud.compute_v1beta.types.ManagedInstanceVersion): - [Output Only] Intended version of this instance. + Output only. [Output Only] Intended version of this + instance. This field is a member of `oneof`_ ``_version``. """ class CurrentAction(proto.Enum): - r"""[Output Only] The current action that the managed instance group has - scheduled for the instance. Possible values: - NONE The instance is - running, and the managed instance group does not have any scheduled - actions for this instance. - CREATING The managed instance group is - creating this instance. If the group fails to create this instance, - it will try again until it is successful. - CREATING_WITHOUT_RETRIES - The managed instance group is attempting to create this instance - only once. If the group fails to create this instance, it does not - try again and the group's targetSize value is decreased instead. - - RECREATING The managed instance group is recreating this instance. - - DELETING The managed instance group is permanently deleting this - instance. - ABANDONING The managed instance group is abandoning this - instance. The instance will be removed from the instance group and - from any target pools that are associated with this group. - - RESTARTING The managed instance group is restarting the instance. - - REFRESHING The managed instance group is applying configuration - changes to the instance without stopping it. For example, the group - can update the target pool list for an instance without stopping - that instance. - VERIFYING The managed instance group has created - the instance and it is in the process of being verified. Additional - supported values which may be not listed in the enum directly due to - technical reasons: STOPPING SUSPENDING + r"""Output only. [Output Only] The current action that the managed + instance group has scheduled for the instance. Possible values: + + :: + + - NONE The instance is running, and the managed + instance group does not have any scheduled actions for this instance. + - CREATING The managed instance group is creating this + instance. If the group fails to create this instance, it will try again + until it is successful. + - CREATING_WITHOUT_RETRIES The managed instance group + is attempting to create this instance only once. If the group fails + to create this instance, it does not try again and the group'stargetSize value is decreased instead. + - RECREATING The managed instance group is recreating + this instance. + - DELETING The managed instance group is permanently + deleting this instance. + - ABANDONING The managed instance group is abandoning + this instance. The instance will be removed from the instance group + and from any target pools that are associated with this group. + - RESTARTING The managed instance group is restarting + the instance. + - REFRESHING The managed instance group is applying + configuration changes to the instance without stopping it. For example, + the group can update the target pool list for an instance without + stopping that instance. + - VERIFYING The managed instance group has created the + instance and it is in the process of being verified. + + Additional supported values which may be not listed in the enum + directly due to technical reasons: STOPPING SUSPENDING Values: UNDEFINED_CURRENT_ACTION (0): @@ -83724,6 +98234,9 @@ class CurrentAction(proto.Enum): instance. The instance will be removed from the instance group and from any target pools that are associated with this group. + ADOPTING (414293554): + The managed instance group is adopting this + instance. CREATING (455564985): The managed instance group is creating this instance. If the group fails to create this @@ -83763,17 +98276,20 @@ class CurrentAction(proto.Enum): The managed instance group is verifying this already created instance. Verification happens every time the instance is (re)created or - restarted and consists of: 1. Waiting until - health check specified as part of this managed - instance group's autohealing policy reports - HEALTHY. Note: Applies only if autohealing - policy has a health check specified 2. Waiting - for addition verification steps performed as - post-instance creation (subject to future - extensions). + restarted and consists of: + + 1. Waiting until health check specified as part + of this managed instance group's + autohealing policy reports HEALTHY. + Note: Applies only if autohealing policy has + a health check specified + 2. Waiting for addition verification steps + performed as post-instance creation + (subject to future extensions). """ UNDEFINED_CURRENT_ACTION = 0 ABANDONING = 388244813 + ADOPTING = 414293554 CREATING = 455564985 CREATING_WITHOUT_RETRIES = 428843785 DELETING = 528602024 @@ -83786,10 +98302,10 @@ class CurrentAction(proto.Enum): VERIFYING = 16982185 class InstanceStatus(proto.Enum): - r"""[Output Only] The status of the instance. This field is empty when - the instance does not exist. Additional supported values which may - be not listed in the enum directly due to technical reasons: RUNNING - STOPPED STOPPING SUSPENDED SUSPENDING + r"""Output only. [Output Only] The status of the instance. This field is + empty when the instance does not exist. Additional supported values + which may be not listed in the enum directly due to technical + reasons: RUNNING STOPPED STOPPING SUSPENDED SUSPENDING Values: UNDEFINED_INSTANCE_STATUS (0): @@ -83842,11 +98358,11 @@ class InstanceStatus(proto.Enum): TERMINATED = 250018339 class TargetStatus(proto.Enum): - r"""[Output Only] The eventual status of the instance. The instance - group manager will not be identified as stable till each managed - instance reaches its targetStatus. Additional supported values which - may be not listed in the enum directly due to technical reasons: - RUNNING STOPPED SUSPENDED + r"""Output only. [Output Only] The eventual status of the instance. The + instance group manager will not be identified as stable till each + managed instance reaches its targetStatus. Additional supported + values which may be not listed in the enum directly due to technical + reasons: RUNNING STOPPED SUSPENDED Values: UNDEFINED_TARGET_STATUS (0): @@ -83952,8 +98468,9 @@ class ManagedInstanceAllInstancesConfig(proto.Message): Attributes: revision (str): - [Output Only] Current all-instances configuration revision. - This value is in RFC3339 text format. + Output only. [Output Only] Current all-instances + configuration revision. This value is in RFC3339 text + format. This field is a member of `oneof`_ ``_revision``. """ @@ -83972,20 +98489,21 @@ class ManagedInstanceInstanceHealth(proto.Message): Attributes: detailed_health_state (str): - [Output Only] The current detailed instance health state. - Check the DetailedHealthState enum for the list of possible - values. + Output only. [Output Only] The current detailed instance + health state. Check the DetailedHealthState enum for the + list of possible values. This field is a member of `oneof`_ ``_detailed_health_state``. health_check (str): - [Output Only] The URL for the health check that verifies - whether the instance is healthy. + Output only. [Output Only] The URL for the health check that + verifies whether the instance is healthy. This field is a member of `oneof`_ ``_health_check``. """ class DetailedHealthState(proto.Enum): - r"""[Output Only] The current detailed instance health state. + r"""Output only. [Output Only] The current detailed instance health + state. Values: UNDEFINED_DETAILED_HEALTH_STATE (0): @@ -84040,8 +98558,8 @@ class ManagedInstanceLastAttempt(proto.Message): Attributes: errors (google.cloud.compute_v1beta.types.ManagedInstanceLastAttemptErrors): - [Output Only] Encountered errors during the last attempt to - create or delete the instance. + Output only. [Output Only] Encountered errors during the + last attempt to create or delete the instance. This field is a member of `oneof`_ ``_errors``. """ @@ -84055,8 +98573,8 @@ class ManagedInstanceLastAttempt(proto.Message): class ManagedInstanceLastAttemptErrors(proto.Message): - r"""[Output Only] Encountered errors during the last attempt to create - or delete the instance. + r"""Output only. [Output Only] Encountered errors during the last + attempt to create or delete the instance. Attributes: errors (MutableSequence[google.cloud.compute_v1beta.types.Errors]): @@ -84077,21 +98595,30 @@ class ManagedInstancePropertiesFromFlexibilityPolicy(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + disks (MutableSequence[google.cloud.compute_v1beta.types.AttachedDisk]): + List of disks to be attached to the instance. machine_type (str): - The machine type to be used for this - instance. + Output only. The machine type to be used for + this instance. This field is a member of `oneof`_ ``_machine_type``. + min_cpu_platform (str): + Name of the minimum CPU platform to be used + by this instance. e.g. 'Intel Ice Lake'. + + This field is a member of `oneof`_ ``_min_cpu_platform``. provisioning_model (str): - The provisioning model to be used for this - instance. Check the ProvisioningModel enum for - the list of possible values. + Output only. The provisioning model to be + used for this instance. Check the + ProvisioningModel enum for the list of possible + values. This field is a member of `oneof`_ ``_provisioning_model``. """ class ProvisioningModel(proto.Enum): - r"""The provisioning model to be used for this instance. + r"""Output only. The provisioning model to be used for this + instance. Values: UNDEFINED_PROVISIONING_MODEL (0): @@ -84115,11 +98642,21 @@ class ProvisioningModel(proto.Enum): SPOT = 2552066 STANDARD = 484642493 + disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( + proto.MESSAGE, + number=95594102, + message="AttachedDisk", + ) machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, ) + min_cpu_platform: str = proto.Field( + proto.STRING, + number=242912759, + optional=True, + ) provisioning_model: str = proto.Field( proto.STRING, number=494423, @@ -84134,8 +98671,9 @@ class ManagedInstanceScheduling(proto.Message): Attributes: termination_timestamp (str): - [Output Only] The timestamp at which the managed instance - will be terminated. This is in RFC3339 text format. + Output only. [Output Only] The timestamp at which the + managed instance will be terminated. This is in RFC3339 text + format. This field is a member of `oneof`_ ``_termination_timestamp``. """ @@ -84154,13 +98692,13 @@ class ManagedInstanceVersion(proto.Message): Attributes: instance_template (str): - [Output Only] The intended template of the instance. This - field is empty when current_action is one of { DELETING, - ABANDONING }. + Output only. [Output Only] The intended template of the + instance. This field is empty when current_action is one of + { DELETING, ABANDONING }. This field is a member of `oneof`_ ``_instance_template``. name (str): - [Output Only] Name of the version. + Output only. [Output Only] Name of the version. This field is a member of `oneof`_ ``_name``. """ @@ -84192,17 +98730,18 @@ class Metadata(proto.Message): or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve the resource. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve the resource. This field is a member of `oneof`_ ``_fingerprint``. items (MutableSequence[google.cloud.compute_v1beta.types.Items]): Array of key/value pairs. The total size of all keys and values must be less than 512 KB. kind (str): - [Output Only] Type of the resource. Always compute#metadata - for metadata. + Output only. [Output Only] Type of the resource. Always + compute#metadata for metadata. This field is a member of `oneof`_ ``_kind``. """ @@ -84230,15 +98769,19 @@ class MetadataFilter(proto.Message): and sidecars involved in load balancing would typically present metadata to the load balancers that need to match criteria specified here. If a match takes place, the relevant configuration is made - available to those proxies. For each metadataFilter in this list, if - its filterMatchCriteria is set to MATCH_ANY, at least one of the - filterLabels must match the corresponding label provided in the - metadata. If its filterMatchCriteria is set to MATCH_ALL, then all - of its filterLabels must match with corresponding labels provided in - the metadata. An example for using metadataFilters would be: if load - balancing involves Envoys, they receive routing configuration when - values in metadataFilters match values supplied in of their XDS - requests to loadbalancers. + available to those proxies. + + For each metadataFilter in this list, if itsfilterMatchCriteria is + set to MATCH_ANY, at least one of thefilterLabels must match the + corresponding label provided in the metadata. If its + filterMatchCriteria is set to MATCH_ALL, then all of its + filterLabels must match with corresponding labels provided in the + metadata. + + An example for using metadataFilters would be: if load balancing + involves Envoys, they receive routing configuration when values + inmetadataFilters match values supplied in of their XDS requests to + loadbalancers. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -84247,16 +98790,26 @@ class MetadataFilter(proto.Message): filter_labels (MutableSequence[google.cloud.compute_v1beta.types.MetadataFilterLabelMatch]): The list of label value pairs that must match labels in the provided metadata based on - filterMatchCriteria This list must not be empty - and can have at the most 64 entries. + filterMatchCriteria + + This list must not be empty and can have at the + most 64 entries. filter_match_criteria (str): Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall - metadataFilter match. Supported values are: - MATCH_ANY: at - least one of the filterLabels must have a matching label in - the provided metadata. - MATCH_ALL: all filterLabels must - have matching labels in the provided metadata. Check the - FilterMatchCriteria enum for the list of possible values. + metadataFilter match. + + Supported values are: + + :: + + - MATCH_ANY: at least one of the filterLabels + must have a matching label in the provided metadata. + - MATCH_ALL: all filterLabels must have + matching labels in the provided metadata. + + Check the FilterMatchCriteria enum for the list of possible + values. This field is a member of `oneof`_ ``_filter_match_criteria``. """ @@ -84264,10 +98817,16 @@ class MetadataFilter(proto.Message): class FilterMatchCriteria(proto.Enum): r"""Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter - match. Supported values are: - MATCH_ANY: at least one of the - filterLabels must have a matching label in the provided metadata. - - MATCH_ALL: all filterLabels must have matching labels in the - provided metadata. + match. + + Supported values are: + + :: + + - MATCH_ANY: at least one of the filterLabels + must have a matching label in the provided metadata. + - MATCH_ALL: all filterLabels must have + matching labels in the provided metadata. Values: UNDEFINED_FILTER_MATCH_CRITERIA (0): @@ -84275,13 +98834,13 @@ class FilterMatchCriteria(proto.Enum): set. MATCH_ALL (180663271): Specifies that all filterLabels must match - for the metadataFilter to be considered a match. + for themetadataFilter to be considered a match. MATCH_ANY (180663346): Specifies that any filterLabel must match for - the metadataFilter to be considered a match. + themetadataFilter to be considered a match. NOT_SET (163646646): Indicates that the match criteria was not - set. A metadataFilter must never be created with + set. AmetadataFilter must never be created with this value. """ UNDEFINED_FILTER_MATCH_CRITERIA = 0 @@ -84302,8 +98861,8 @@ class FilterMatchCriteria(proto.Enum): class MetadataFilterLabelMatch(proto.Message): - r"""MetadataFilter label name value pairs that are expected to - match corresponding labels presented as metadata to the load + r"""MetadataFilter label name value pairs that are expected + to match corresponding labels presented as metadata to the load balancer. @@ -84311,15 +98870,18 @@ class MetadataFilterLabelMatch(proto.Message): Attributes: name (str): - Name of metadata label. The name can have a - maximum length of 1024 characters and must be at - least 1 character long. + Name of metadata label. + + The name can have a maximum length of 1024 + characters and must be at least 1 character + long. This field is a member of `oneof`_ ``_name``. value (str): The value of the label must match the - specified value. value can have a maximum length - of 1024 characters. + specified value. + value can have a maximum length of 1024 + characters. This field is a member of `oneof`_ ``_value``. """ @@ -84358,17 +98920,21 @@ class MoveAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84414,17 +98980,21 @@ class MoveDiskProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84465,17 +99035,21 @@ class MoveFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84515,17 +99089,21 @@ class MoveGlobalAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84567,17 +99145,21 @@ class MoveInstanceProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -84615,17 +99197,21 @@ class MoveOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -84655,8 +99241,8 @@ class MultiMig(proto.Message): Attributes: creation_timestamp (str): - [Output only] The creation timestamp of this multi-MIG in - RFC3339 text format. + Output only. [Output only] The creation timestamp of this + multi-MIG in RFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -84664,19 +99250,19 @@ class MultiMig(proto.Message): This field is a member of `oneof`_ ``_description``. id (int): - [Output only] The unique identifier for this resource type. - The server generates this identifier. + Output only. [Output only] The unique identifier for this + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always compute#multiMig - for multi-MIGs. + Output only. [Output only] Type of the resource. + Alwayscompute#multiMig for multi-MIGs. This field is a member of `oneof`_ ``_kind``. name (str): The name of the multi-MIG. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, @@ -84684,10 +99270,10 @@ class MultiMig(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output only] The URL of the region where the resource - resides. You must specify this field as part of the HTTP - request URL. You cannot set the region as a field in the - request body. + Output only. [Output only] The URL of the region where the + resource resides. You must specify this field as part of the + HTTP request URL. You cannot set the region as a field in + the request body. This field is a member of `oneof`_ ``_region``. resource_policies (google.cloud.compute_v1beta.types.MultiMigResourcePolicies): @@ -84695,7 +99281,8 @@ class MultiMig(proto.Message): This field is a member of `oneof`_ ``_resource_policies``. self_link (str): - [Output only] Server-defined URL for the resource. + Output only. [Output only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. status (google.cloud.compute_v1beta.types.MultiMigStatus): @@ -84764,11 +99351,15 @@ class MultiMigResourcePolicies(proto.Message): The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a - workload policy: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /resourcePolicies/resourcePolicy - - projects/project/regions/region/resourcePolicies/resourcePolicy - - regions/region/resourcePolicies/resourcePolicy + workload policy: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy + - + projects/project/regions/region/resourcePolicies/resourcePolicy + - + regions/region/resourcePolicies/resourcePolicy This field is a member of `oneof`_ ``_workload_policy``. """ @@ -84785,9 +99376,9 @@ class MultiMigStatus(proto.Message): Attributes: applied_accelerator_topologies (MutableSequence[google.cloud.compute_v1beta.types.MultiMigStatusAcceleratorTopology]): - [Output Only] The accelerator topology applied to this - multi-MIG. Currently only one accelerator topology is - supported. + Output only. [Output Only] The accelerator topology applied + to this multi-MIG. Currently only one accelerator topology + is supported. """ applied_accelerator_topologies: MutableSequence[ @@ -84806,26 +99397,26 @@ class MultiMigStatusAcceleratorTopology(proto.Message): Attributes: accelerator_topology (str): - [Output Only] Topology in the format of: "16x16", "4x4x4", - etc. The value is the same as configured in the - WorkloadPolicy. + Output only. [Output Only] Topology in the format of: + "16x16", "4x4x4", etc. The value is the same as configured + in the WorkloadPolicy. This field is a member of `oneof`_ ``_accelerator_topology``. accelerator_topology_state (str): - [Output Only] The state of the accelerator topology. Check - the AcceleratorTopologyState enum for the list of possible - values. + Output only. [Output Only] The state of the accelerator + topology. Check the AcceleratorTopologyState enum for the + list of possible values. This field is a member of `oneof`_ ``_accelerator_topology_state``. accelerator_topology_state_last_check (google.cloud.compute_v1beta.types.MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck): - [Output Only] The result of the latest accelerator topology - state check. + Output only. [Output Only] The result of the latest + accelerator topology state check. This field is a member of `oneof`_ ``_accelerator_topology_state_last_check``. """ class AcceleratorTopologyState(proto.Enum): - r"""[Output Only] The state of the accelerator topology. + r"""Output only. [Output Only] The state of the accelerator topology. Values: UNDEFINED_ACCELERATOR_TOPOLOGY_STATE (0): @@ -84881,12 +99472,13 @@ class MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck(proto.M Attributes: error (google.cloud.compute_v1beta.types.Error): - [Output Only] Encountered errors on the last state check. + Output only. [Output Only] Encountered errors on the last + state check. This field is a member of `oneof`_ ``_error``. timestamp (str): - [Output Only] Timestamp is shown only if there is an error. - The field has // RFC3339 // text format. + Output only. [Output Only] Timestamp is shown only if there + is an error. The field has // RFC3339 // text format. This field is a member of `oneof`_ ``_timestamp``. """ @@ -84922,12 +99514,12 @@ class MultiMigsList(proto.Message): A list of multi-MIGs in the specified project and region. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): This token allows you to get the next page of - results for maxResults, use the nextPageToken as + results formaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging @@ -84935,7 +99527,8 @@ class MultiMigsList(proto.Message): This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output only] Server-defined URL for this resource. + Output only. [Output only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): @@ -84999,9 +99592,9 @@ class NamedPort(proto.Message): Attributes: name (str): - The name for this named port. The name must - be 1-63 characters long, and comply with - RFC1035. + The name for this named port. + The name must be 1-63 characters long, and + comply withRFC1035. This field is a member of `oneof`_ ``_name``. port (int): @@ -85032,11 +99625,11 @@ class NatIpInfo(proto.Message): Attributes: nat_ip_info_mappings (MutableSequence[google.cloud.compute_v1beta.types.NatIpInfoNatIpInfoMapping]): - A list of all NAT IPs assigned to this NAT - config. + Output only. A list of all NAT IPs assigned + to this NAT config. nat_name (str): - Name of the NAT config which the NAT IP - belongs to. + Output only. Name of the NAT config which the + NAT IP belongs to. This field is a member of `oneof`_ ``_nat_name``. """ @@ -85062,25 +99655,27 @@ class NatIpInfoNatIpInfoMapping(proto.Message): Attributes: mode (str): - Specifies whether NAT IP is auto or manual. - Check the Mode enum for the list of possible - values. + Output only. Specifies whether NAT IP is auto + or manual. Check the Mode enum for the list of + possible values. This field is a member of `oneof`_ ``_mode``. nat_ip (str): - NAT IP address. For example: 203.0.113.11. + Output only. NAT IP address. For example: + 203.0.113.11. This field is a member of `oneof`_ ``_nat_ip``. usage (str): - Specifies whether NAT IP is currently serving - at least one endpoint or not. Check the Usage - enum for the list of possible values. + Output only. Specifies whether NAT IP is + currently serving at least one endpoint or not. + Check the Usage enum for the list of possible + values. This field is a member of `oneof`_ ``_usage``. """ class Mode(proto.Enum): - r"""Specifies whether NAT IP is auto or manual. + r"""Output only. Specifies whether NAT IP is auto or manual. Values: UNDEFINED_MODE (0): @@ -85096,8 +99691,8 @@ class Mode(proto.Enum): MANUAL = 119397318 class Usage(proto.Enum): - r"""Specifies whether NAT IP is currently serving at least one - endpoint or not. + r"""Output only. Specifies whether NAT IP is currently serving at + least one endpoint or not. Values: UNDEFINED_USAGE (0): @@ -85145,9 +99740,10 @@ class NatIpInfoResponse(proto.Message): class Network(proto.Message): - r"""Represents a VPC Network resource. Networks connect resources - to each other and to the internet. For more information, read - Virtual Private Cloud (VPC) Network. + r"""Represents a VPC Network resource. + + Networks connect resources to each other and to the internet. + For more information, readVirtual Private Cloud (VPC) Network. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -85156,27 +99752,32 @@ class Network(proto.Message): I_pv4_range (str): Deprecated in favor of subnet mode networks. The range of internal addresses that are legal - on this network. This range is a CIDR - specification, for example: 192.168.0.0/16. + on this network. This range is aCIDR + specification, for example:192.168.0.0/16. Provided by the client when the network is created. This field is a member of `oneof`_ ``_I_pv4_range``. auto_create_subnetworks (bool): Must be set to create a VPC network. If not - set, a legacy network is created. When set to - true, the VPC network is created in auto mode. - When set to false, the VPC network is created in - custom mode. An auto mode VPC network starts - with one subnet per region. Each subnet has a - predetermined range as described in Auto mode - VPC network IP ranges. For custom mode VPC - networks, you can add subnets using the - subnetworks insert method. + set, a legacy network is created. + + When set to true, the VPC network is created in + auto mode. When set to false, the VPC network is + created in custom mode. + + An auto mode VPC network starts with one subnet + per region. Each subnet has a predetermined + range as described inAuto mode VPC network IP + ranges. + + For custom mode VPC networks, you can add + subnets using the subnetworksinsert method. This field is a member of `oneof`_ ``_auto_create_subnetworks``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85191,8 +99792,8 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_enable_ula_internal_ipv6``. firewall_policy (str): - [Output Only] URL of the firewall policy the network is - associated with. + Output only. [Output Only] URL of the firewall policy the + network is associated with. This field is a member of `oneof`_ ``_firewall_policy``. gateway_i_pv4 (str): @@ -85201,8 +99802,8 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_gateway_i_pv4``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. internal_ipv6_range (str): @@ -85218,13 +99819,13 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_internal_ipv6_range``. kind (str): - [Output Only] Type of the resource. Always compute#network - for networks. + Output only. [Output Only] Type of the resource. Always + compute#network for networks. This field is a member of `oneof`_ ``_kind``. mtu (int): - Maximum Transmission Unit in bytes. The - minimum value for this field is 1300 and the + Maximum Transmission Unit in bytes. + The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo @@ -85235,7 +99836,7 @@ class Network(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -85255,10 +99856,12 @@ class Network(proto.Message): network_profile (str): A full or partial URL of the network profile to apply to this network. This field can be set only at resource - creation time. For example, the following are valid URLs: - - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - - - projects/{project_id}/global/networkProfiles/{network_profile_name} + creation time. For example, the following are valid URLs: + + :: + + - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} + - projects/{project_id}/global/networkProfiles/{network_profile_name} This field is a member of `oneof`_ ``_network_profile``. params (google.cloud.compute_v1beta.types.NetworkParams): @@ -85267,10 +99870,11 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_params``. peerings (MutableSequence[google.cloud.compute_v1beta.types.NetworkPeering]): - [Output Only] A list of network peerings for the resource. + Output only. [Output Only] A list of network peerings for + the resource. routing_config (google.cloud.compute_v1beta.types.NetworkRoutingConfig): The network-level routing configuration for - this network. Used by Cloud Router to determine + this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. @@ -85280,8 +99884,8 @@ class Network(proto.Message): This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. subnetworks (MutableSequence[str]): @@ -85411,21 +100015,24 @@ class NetworkFirewallPolicyEnforcementOrder(proto.Enum): class NetworkAttachment(proto.Message): - r"""NetworkAttachments A network attachment resource ... + r"""NetworkAttachments + A network attachment resource ... + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: connection_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkAttachmentConnectedEndpoint]): - [Output Only] An array of connections for all the producers - connected to this network attachment. + Output only. [Output Only] An array of connections for all + the producers connected to this network attachment. connection_preference (str): Check the ConnectionPreference enum for the list of possible values. This field is a member of `oneof`_ ``_connection_preference``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85442,18 +100049,18 @@ class NetworkAttachment(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. + Output only. [Output Only] Type of the resource. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -85462,8 +100069,8 @@ class NetworkAttachment(proto.Message): This field is a member of `oneof`_ ``_name``. network (str): - [Output Only] The URL of the network which the Network - Attachment belongs to. Practically it is inferred by + Output only. [Output Only] The URL of the network which the + Network Attachment belongs to. Practically it is inferred by fetching the network of the first subnetwork associated. Because it is required that all the subnetworks must be from the same network, it is assured that the Network Attachment @@ -85479,19 +100086,21 @@ class NetworkAttachment(proto.Message): this network attachment. The project can be specified using its id or number. region (str): - [Output Only] URL of the region where the network attachment - resides. This field applies only to the region resource. You - must specify this field as part of the HTTP request URL. It - is not settable as a field in the request body. + Output only. [Output Only] URL of the region where the + network attachment resides. This field applies only to the + region resource. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource's - resource id. + Output only. [Output Only] Server-defined URL for this + resource's resource id. This field is a member of `oneof`_ ``_self_link_with_id``. subnetworks (MutableSequence[str]): @@ -85616,7 +100225,7 @@ class NetworkAttachmentAggregatedList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -85708,8 +100317,8 @@ class NetworkAttachmentConnectedEndpoint(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. subnetwork_cidr_range (str): - [Output Only] The CIDR range of the subnet from which the - IPv4 internal IP was allocated from. + Output only. [Output Only] The CIDR range of the subnet from + which the IPv4 internal IP was allocated from. This field is a member of `oneof`_ ``_subnetwork_cidr_range``. """ @@ -85803,7 +100412,7 @@ class NetworkAttachmentList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -85894,7 +100503,8 @@ class NetworkEdgeSecurityService(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -85911,27 +100521,28 @@ class NetworkEdgeSecurityService(proto.Message): NetworkEdgeSecurityService. An up-to-date fingerprint must be provided in order to update the NetworkEdgeSecurityService, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a NetworkEdgeSecurityService. This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#networkEdgeSecurityService for + Output only. [Output only] Type of the resource. + Alwayscompute#networkEdgeSecurityService for NetworkEdgeSecurityServices This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -85940,9 +100551,10 @@ class NetworkEdgeSecurityService(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] URL of the region where the resource resides. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. + Output only. [Output Only] URL of the region where the + resource resides. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_region``. security_policy (str): @@ -85952,12 +100564,13 @@ class NetworkEdgeSecurityService(proto.Message): This field is a member of `oneof`_ ``_security_policy``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. """ @@ -86032,26 +100645,27 @@ class NetworkEdgeSecurityServiceAggregatedList(proto.Message): A list of NetworkEdgeSecurityServicesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkEdgeSecurityServiceAggregatedList for lists - of Network Edge Security Services. + Output only. [Output Only] Type of resource. + Alwayscompute#networkEdgeSecurityServiceAggregatedList for + lists of Network Edge Security Services. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -86149,27 +100763,32 @@ class NetworkEndpoint(proto.Message): the network endpoint. client_destination_port (int): Represents the port number to which PSC consumer sends - packets. Optional. Only valid for network endpoint groups - created with GCE_VM_IP_PORTMAP endpoint type. + packets. + + Optional. Only valid for network endpoint groups created + withGCE_VM_IP_PORTMAP endpoint type. This field is a member of `oneof`_ ``_client_destination_port``. fqdn (str): Optional fully qualified domain name of network endpoint. This can only be specified when - NetworkEndpointGroup.network_endpoint_type is - NON_GCP_FQDN_PORT. + NetworkEndpointGroup.network_endpoint_type + isNON_GCP_FQDN_PORT. This field is a member of `oneof`_ ``_fqdn``. instance (str): The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type - GCE_VM_IP and GCE_VM_IP_PORT. The instance must be in the - same zone of network endpoint group (for zonal NEGs) or in - the zone within the region of the NEG (for regional NEGs). - If the ipAddress is specified, it must belongs to the VM - instance. The name must be 1-63 characters long, and comply - with RFC1035 or be a valid URL pointing to an existing + GCE_VM_IP andGCE_VM_IP_PORT. + + The instance must be in the same zone of network endpoint + group (for zonal NEGs) or in the zone within the region of + the NEG (for regional NEGs). If the ipAddress is specified, + it must belongs to the VM instance. + + The name must be 1-63 characters long, and comply + withRFC1035 or be a valid URL pointing to an existing instance. This field is a member of `oneof`_ ``_instance``. @@ -86179,13 +100798,14 @@ class NetworkEndpoint(proto.Message): or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to - will be used. This field is redundant and need not be set - for network endpoints of type GCE_VM_IP. If set, it must be - set to the primary internal IP address of the attached VM - instance that matches the subnetwork of the NEG. The primary - internal IP address from any NIC of a multi-NIC VM instance - can be added to a NEG as long as it matches the NEG - subnetwork. + will be used. + + This field is redundant and need not be set for network + endpoints of typeGCE_VM_IP. If set, it must be set to the + primary internal IP address of the attached VM instance that + matches the subnetwork of the NEG. The primary internal IP + address from any NIC of a multi-NIC VM instance can be added + to a NEG as long as it matches the NEG subnetwork. This field is a member of `oneof`_ ``_ip_address``. ipv6_address (str): @@ -86195,8 +100815,9 @@ class NetworkEndpoint(proto.Message): port (int): Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. - This field can not be set for network endpoints of type - GCE_VM_IP. + + This field can not be set for network endpoints of + typeGCE_VM_IP. This field is a member of `oneof`_ ``_port``. """ @@ -86239,11 +100860,12 @@ class NetworkEndpoint(proto.Message): class NetworkEndpointGroup(proto.Message): - r"""Represents a collection of network endpoints. A network - endpoint group (NEG) defines how a set of endpoints should be - reached, whether they are reachable, and where they are located. - For more information about using NEGs for different use cases, - see Network endpoint groups overview. + r"""Represents a collection of network endpoints. + + A network endpoint group (NEG) defines how a set of endpoints + should be reached, whether they are reachable, and where they + are located. For more information about using NEGs for different + use cases, seeNetwork endpoint groups overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -86254,31 +100876,34 @@ class NetworkEndpointGroup(proto.Message): the network endpoint group. app_engine (google.cloud.compute_v1beta.types.NetworkEndpointGroupAppEngine): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_app_engine``. cloud_function (google.cloud.compute_v1beta.types.NetworkEndpointGroupCloudFunction): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_cloud_function``. cloud_run (google.cloud.compute_v1beta.types.NetworkEndpointGroupCloudRun): Optional. Only valid when networkEndpointType - is SERVERLESS. Only one of cloudRun, appEngine - or cloudFunction may be set. + isSERVERLESS. Only one of cloudRun,appEngine or + cloudFunction may be set. This field is a member of `oneof`_ ``_cloud_run``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. default_port (int): The default port used if the port number is not specified in - the network endpoint. Optional. If the network endpoint type - is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, - this field must not be specified. + the network endpoint. + + Optional. If the network endpoint type is either + GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this field + must not be specified. This field is a member of `oneof`_ ``_default_port``. description (str): @@ -86288,13 +100913,14 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_description``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#networkEndpointGroup for network endpoint group. + Output only. [Output Only] Type of the resource. + Alwayscompute#networkEndpointGroup for network endpoint + group. This field is a member of `oneof`_ ``_kind``. load_balancer (google.cloud.compute_v1beta.types.NetworkEndpointGroupLbNetworkEndpointGroup): @@ -86306,7 +100932,7 @@ class NetworkEndpointGroup(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -86322,45 +100948,48 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_network``. network_endpoint_type (str): Type of network endpoints in this network endpoint group. - Can be one of GCE_VM_IP, GCE_VM_IP_PORT, - NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, - INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, - GCE_VM_IP_PORTMAP. Check the NetworkEndpointType enum for - the list of possible values. + Can be one ofGCE_VM_IP, + GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, + INTERNET_FQDN_PORT,INTERNET_IP_PORT, + SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. Check + the NetworkEndpointType enum for the list of possible + values. This field is a member of `oneof`_ ``_network_endpoint_type``. psc_data (google.cloud.compute_v1beta.types.NetworkEndpointGroupPscData): - Optional. Only valid when networkEndpointType is - PRIVATE_SERVICE_CONNECT. + Optional. Only valid when networkEndpointType + isPRIVATE_SERVICE_CONNECT. This field is a member of `oneof`_ ``_psc_data``. psc_target_service (str): The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: - asia-northeast3-cloudkms.googleapis.com. Optional. Only - valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. + asia-northeast3-cloudkms.googleapis.com. + + Optional. Only valid when networkEndpointType + isPRIVATE_SERVICE_CONNECT. This field is a member of `oneof`_ ``_psc_target_service``. region (str): - [Output Only] The URL of the region where the network - endpoint group is located. + Output only. [Output Only] The URL of theregion where the + network endpoint group is located. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. serverless_deployment (google.cloud.compute_v1beta.types.NetworkEndpointGroupServerlessDeployment): - Only valid when networkEndpointType is - SERVERLESS. Only one of cloudRun, appEngine, - cloudFunction or serverlessDeployment may be - set. + Only valid when networkEndpointType + isSERVERLESS. Only one of cloudRun,appEngine, + cloudFunction orserverlessDeployment may be set. This field is a member of `oneof`_ ``_serverless_deployment``. size (int): - [Output only] Number of network endpoints in the network - endpoint group. + Output only. [Output only] Number of network endpoints in + the network endpoint group. This field is a member of `oneof`_ ``_size``. subnetwork (str): @@ -86369,17 +100998,17 @@ class NetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. zone (str): - [Output Only] The URL of the zone where the network endpoint - group is located. + Output only. [Output Only] The URL of thezone where the + network endpoint group is located. This field is a member of `oneof`_ ``_zone``. """ class NetworkEndpointType(proto.Enum): r"""Type of network endpoints in this network endpoint group. Can be one - of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, - INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, - PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. + ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, + INTERNET_FQDN_PORT,INTERNET_IP_PORT, + SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. Values: UNDEFINED_NETWORK_ENDPOINT_TYPE (0): @@ -86551,26 +101180,27 @@ class NetworkEndpointGroupAggregatedList(proto.Message): A list of NetworkEndpointGroupsScopedList resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupAggregatedList for aggregated - lists of network endpoint groups. + Output only. [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupAggregatedList for + aggregated lists of network endpoint groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -86623,41 +101253,53 @@ class NetworkEndpointGroupAppEngine(proto.Message): r"""Configuration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided - explicitly or in the URL mask when service is present. Note: App - Engine service must be in the same project and located in the - same region as the Serverless NEG. + explicitly or in the URL mask when service is present. + + Note: App Engine service must be in the same project and located + in the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: service (str): - Optional serving service. The service name is - case-sensitive and must be 1-63 characters long. + Optional serving service. + + The service name is case-sensitive and must be + 1-63 characters long. + Example value: default, my-service. This field is a member of `oneof`_ ``_service``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse service - and version fields from a request URL. URL mask - allows for routing to multiple App Engine - services without having to create multiple - Network Endpoint Groups and backend services. - For example, the request URLs - foo1-dot-appname.appspot.com/v1 and - foo1-dot-appname.appspot.com/v2 can be backed by - the same Serverless NEG with URL mask - -dot-appname.appspot.com/. The - URL mask will parse them to { service = "foo1", - version = "v1" } and { service = "foo1", version - = "v2" } respectively. + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse service and version fields + from a request URL. URL mask allows for routing + to multiple App Engine services without having + to create multiple Network Endpoint Groups and + backend services. + + For example, the request + URLsfoo1-dot-appname.appspot.com/v1 + andfoo1-dot-appname.appspot.com/v2 can be backed + by the same Serverless NEG with URL + mask-dot-appname.appspot.com/. + The URL mask will parse them to { service = + "foo1", version = "v1" } and { service = "foo1", + version = "v2" } + respectively. This field is a member of `oneof`_ ``_url_mask``. version (str): - Optional serving version. The version name is - case-sensitive and must be 1-100 characters - long. Example value: v1, v2. + Optional serving version. + + The version name is case-sensitive and must be + 1-100 characters long. + + Example value: v1, v2. This field is a member of `oneof`_ ``_version``. """ @@ -86682,8 +101324,10 @@ class NetworkEndpointGroupAppEngine(proto.Message): class NetworkEndpointGroupCloudFunction(proto.Message): r"""Configuration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL - mask. Note: Cloud Function must be in the same project and - located in the same region as the Serverless NEG. + mask. + + Note: Cloud Function must be in the same project and located in + the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -86691,22 +101335,29 @@ class NetworkEndpointGroupCloudFunction(proto.Message): Attributes: function (str): A user-defined name of the Cloud Function. + The function name is case-sensitive and must be - 1-63 characters long. Example value: func1. + 1-63 characters long. + + Example value: func1. This field is a member of `oneof`_ ``_function``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse function - field from a request URL. URL mask allows for - routing to multiple Cloud Functions without - having to create multiple Network Endpoint - Groups and backend services. For example, - request URLs mydomain.com/function1 and - mydomain.com/function2 can be backed by the same - Serverless NEG with URL mask /. The - URL mask will parse them to { function = - "function1" } and { function = "function2" } + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse function field from a + request URL. URL mask allows for routing to + multiple Cloud Functions without having to + create multiple Network Endpoint Groups and + backend services. + + For example, request URLs mydomain.com/function1 + andmydomain.com/function2 can be backed by the + same Serverless NEG with URL mask /. + The URL mask will parse them to { function = + "function1" } and{ function = "function2" } respectively. This field is a member of `oneof`_ ``_url_mask``. @@ -86728,6 +101379,7 @@ class NetworkEndpointGroupCloudRun(proto.Message): r"""Configuration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask. + Note: Cloud Run service must be in the same project and located in the same region as the Serverless NEG. @@ -86737,31 +101389,40 @@ class NetworkEndpointGroupCloudRun(proto.Message): Attributes: service (str): Cloud Run service is the main resource of - Cloud Run. The service must be 1-63 characters - long, and comply with RFC1035. Example value: - "run-service". + Cloud Run. + The service must be 1-63 characters long, and + comply withRFC1035. + + Example value: "run-service". This field is a member of `oneof`_ ``_service``. tag (str): Optional Cloud Run tag represents the "named-revision" to provide additional - fine-grained traffic routing information. The - tag must be 1-63 characters long, and comply - with RFC1035. Example value: "revision-0010". + fine-grained traffic routing information. + + The tag must be 1-63 characters long, and comply + withRFC1035. + + Example value: "revision-0010". This field is a member of `oneof`_ ``_tag``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse - and fields from a request URL. - URL mask allows for routing to multiple Run - services without having to create multiple - network endpoint groups and backend services. + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse and fields + from a request URL. URL mask allows for routing + to multiple Run services without having to + create multiple network endpoint groups and + backend services. + For example, request URLs foo1.domain.com/bar1 - and foo1.domain.com/bar2 can be backed by the + andfoo1.domain.com/bar2 can be backed by the same Serverless Network Endpoint Group (NEG) - with URL mask .domain.com/. The - URL mask will parse them to { service="bar1", + with URL mask.domain.com/. The URL + mask will parse them to { service="bar1", tag="foo1" } and { service="bar2", tag="foo2" } respectively. @@ -86793,10 +101454,11 @@ class NetworkEndpointGroupLbNetworkEndpointGroup(proto.Message): Attributes: default_port (int): The default port used if the port number is not specified in - the network endpoint. If the network endpoint type is either - GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field - must not be specified. [Deprecated] This field is - deprecated. + the network endpoint. + + If the network endpoint type is either GCE_VM_IP,SERVERLESS + or PRIVATE_SERVICE_CONNECT, this field must not be + specified. [Deprecated] This field is deprecated. This field is a member of `oneof`_ ``_default_port``. network (str): @@ -86812,8 +101474,9 @@ class NetworkEndpointGroupLbNetworkEndpointGroup(proto.Message): This field is a member of `oneof`_ ``_subnetwork``. zone (str): - [Output Only] The URL of the zone where the network endpoint - group is located. [Deprecated] This field is deprecated. + Output only. [Output Only] The URL of thezone where the + network endpoint group is located. [Deprecated] This field + is deprecated. This field is a member of `oneof`_ ``_zone``. """ @@ -86854,22 +101517,23 @@ class NetworkEndpointGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpointGroup]): A list of NetworkEndpointGroup resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupList for network endpoint group - lists. + Output only. [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupList for network endpoint + group lists. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -86924,9 +101588,9 @@ class NetworkEndpointGroupPscData(proto.Message): Attributes: consumer_psc_address (str): - [Output Only] Address allocated from given subnetwork for - PSC. This IP address acts as a VIP for a PSC NEG, allowing - it to act as an endpoint in L7 PSC-XLB. + Output only. [Output Only] Address allocated from given + subnetwork for PSC. This IP address acts as a VIP for a PSC + NEG, allowing it to act as an endpoint in L7 PSC-XLB. This field is a member of `oneof`_ ``_consumer_psc_address``. producer_port (int): @@ -86936,20 +101600,21 @@ class NetworkEndpointGroupPscData(proto.Message): This field is a member of `oneof`_ ``_producer_port``. psc_connection_id (int): - [Output Only] The PSC connection id of the PSC Network - Endpoint Group Consumer. + Output only. [Output Only] The PSC connection id of the PSC + Network Endpoint Group Consumer. This field is a member of `oneof`_ ``_psc_connection_id``. psc_connection_status (str): - [Output Only] The connection status of the PSC Forwarding - Rule. Check the PscConnectionStatus enum for the list of - possible values. + Output only. [Output Only] The connection status of the PSC + Forwarding Rule. Check the PscConnectionStatus enum for the + list of possible values. This field is a member of `oneof`_ ``_psc_connection_status``. """ class PscConnectionStatus(proto.Enum): - r"""[Output Only] The connection status of the PSC Forwarding Rule. + r"""Output only. [Output Only] The connection status of the PSC + Forwarding Rule. Values: UNDEFINED_PSC_CONNECTION_STATUS (0): @@ -87008,9 +101673,9 @@ class PscConnectionStatus(proto.Enum): class NetworkEndpointGroupServerlessDeployment(proto.Message): r"""Configuration for a serverless network endpoint group (NEG). - The platform must be provided. Note: The target backend service - must be in the same project and located in the same region as - the Serverless NEG. + Theplatform must be provided. + Note: The target backend service must be in the same project and + located in the same region as the Serverless NEG. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -87018,8 +101683,8 @@ class NetworkEndpointGroupServerlessDeployment(proto.Message): Attributes: platform (str): The platform of the backend target(s) of this - NEG. The only supported value is API Gateway: - apigateway.googleapis.com. + NEG. The only supported value is + API Gateway: apigateway.googleapis.com. This field is a member of `oneof`_ ``_platform``. resource (str): @@ -87027,33 +101692,48 @@ class NetworkEndpointGroupServerlessDeployment(proto.Message): workload/instance. This value must be provided explicitly or in the urlMask. The resource identified by this value is platform-specific - and is as follows: 1. API Gateway: The gateway - ID 2. App Engine: The service name 3. Cloud - Functions: The function name 4. Cloud Run: The - service name + and is as follows: + + + + 1. API Gateway: The gateway ID + 2. App Engine: The service name + 3. Cloud Functions: The function name + 4. Cloud Run: The service name This field is a member of `oneof`_ ``_resource``. url_mask (str): - An URL mask is one of the main components of - the Cloud Function. A template to parse - platform-specific fields from a request URL. URL - mask allows for routing to multiple resources on - the same serverless platform without having to - create multiple Network Endpoint Groups and - backend resources. The fields parsed by this - template are platform-specific and are as - follows: 1. API Gateway: The gateway ID 2. App - Engine: The service and version 3. Cloud - Functions: The function name 4. Cloud Run: The - service and tag + An URL + mask is one of the main components of the Cloud + Function. + + A template to parse platform-specific fields + from a request URL. URL mask allows for routing + to multiple resources on the same serverless + platform without having to create multiple + Network Endpoint Groups and backend resources. + The fields parsed by this template are + platform-specific and are as follows: + + + + 1. API Gateway: The gateway ID + 2. App Engine: The service and version + 3. Cloud Functions: The function name + 4. Cloud Run: The service and tag This field is a member of `oneof`_ ``_url_mask``. version (str): The optional resource version. The version identified by this value is platform-specific - and is follows: 1. API Gateway: Unused 2. App - Engine: The service version 3. Cloud Functions: - Unused 4. Cloud Run: The service tag + and is follows: + + + + 1. API Gateway: Unused + 2. App Engine: The service version + 3. Cloud Functions: Unused + 4. Cloud Run: The service tag This field is a member of `oneof`_ ``_version``. """ @@ -87126,9 +101806,9 @@ class NetworkEndpointGroupsListEndpointsRequest(proto.Message): health status of each network endpoint. Valid options are SKIP or SHOW. If you don't specify this parameter, the health status of network - endpoints will not be provided. Check the - HealthStatus enum for the list of possible - values. + endpoints will not be provided. + Check the HealthStatus enum for the list of + possible values. This field is a member of `oneof`_ ``_health_status``. """ @@ -87202,16 +101882,16 @@ class NetworkEndpointGroupsListNetworkEndpoints(proto.Message): A list of NetworkEndpointWithHealthStatus resources. kind (str): - [Output Only] The resource type, which is always - compute#networkEndpointGroupsListNetworkEndpoints for the - list of network endpoints in the specified network endpoint - group. + Output only. [Output Only] The resource type, which is + alwayscompute#networkEndpointGroupsListNetworkEndpoints for + the list of network endpoints in the specified network + endpoint group. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -87262,11 +101942,12 @@ class NetworkEndpointGroupsScopedList(proto.Message): Attributes: network_endpoint_groups (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpointGroup]): - [Output Only] The list of network endpoint groups that are - contained in this scope. + Output only. [Output Only] The list ofnetwork endpoint + groups that are contained in this scope. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] An informational warning that replaces the - list of network endpoint groups when the list is empty. + Output only. [Output Only] An informational warning that + replaces the list of network endpoint groups when the list + is empty. This field is a member of `oneof`_ ``_warning``. """ @@ -87293,11 +101974,13 @@ class NetworkEndpointWithHealthStatus(proto.Message): Attributes: healths (MutableSequence[google.cloud.compute_v1beta.types.HealthStatusForNetworkEndpoint]): - [Output only] The health status of network endpoint. + Output only. [Output only] The health status of network + endpoint. + Optional. Displayed only if the network endpoint has centralized health checking configured. network_endpoint (google.cloud.compute_v1beta.types.NetworkEndpoint): - [Output only] The network endpoint. + Output only. [Output only] The network endpoint. This field is a member of `oneof`_ ``_network_endpoint``. """ @@ -87330,26 +102013,27 @@ class NetworkFirewallPolicyAggregatedList(proto.Message): A list of FirewallPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkFirewallPoliciesAggregatedList for lists of - network firewall policies. + Output only. [Output Only] Type of resource. + Alwayscompute#networkFirewallPoliciesAggregatedList for + lists of network firewall policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -87407,8 +102091,8 @@ class NetworkInterface(proto.Message): access_configs (MutableSequence[google.cloud.compute_v1beta.types.AccessConfig]): An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - there are no accessConfigs specified, then this instance - will have no external internet access. + there are noaccessConfigs specified, then this instance will + have no external internet access. alias_ip_ranges (MutableSequence[google.cloud.compute_v1beta.types.AliasIpRange]): An array of alias IP ranges for this network interface. You can only specify this field for @@ -87417,11 +102101,11 @@ class NetworkInterface(proto.Message): Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a - NetworkInterface. An up-to-date fingerprint must - be provided in order to update the - NetworkInterface. The request will fail with - error 400 Bad Request if the fingerprint is not - provided, or 412 Precondition Failed if the + NetworkInterface. An up-to-date + fingerprint must be provided in order to update + theNetworkInterface. The request will fail with + error400 Bad Request if the fingerprint is not + provided, or412 Precondition Failed if the fingerprint is out of date. This field is a member of `oneof`_ ``_fingerprint``. @@ -87444,11 +102128,12 @@ class NetworkInterface(proto.Message): supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. ipv6_access_type (str): - [Output Only] One of EXTERNAL, INTERNAL to indicate whether - the IP can be accessed from the Internet. This field is - always inherited from its subnetwork. Valid only if - stackType is IPV4_IPV6. Check the Ipv6AccessType enum for - the list of possible values. + Output only. [Output Only] One of EXTERNAL, INTERNAL to + indicate whether the IP can be accessed from the Internet. + This field is always inherited from its subnetwork. + + Valid only if stackType is IPV4_IPV6. Check the + Ipv6AccessType enum for the list of possible values. This field is a member of `oneof`_ ``_ipv6_access_type``. ipv6_address (str): @@ -87462,15 +102147,15 @@ class NetworkInterface(proto.Message): This field is a member of `oneof`_ ``_ipv6_address``. kind (str): - [Output Only] Type of the resource. Always - compute#networkInterface for network interfaces. + Output only. [Output Only] Type of the resource. + Alwayscompute#networkInterface for network interfaces. This field is a member of `oneof`_ ``_kind``. name (str): [Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 - and 7. The default interface value is nic0. + and7. The default interface value is nic0. This field is a member of `oneof`_ ``_name``. network (str): @@ -87482,13 +102167,17 @@ class NetworkInterface(proto.Message): network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is - inferred. If you specify this property, you can - specify the network as a full or partial URL. - For example, the following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/global/networks/ - network - - projects/project/global/networks/network - - global/networks/default + inferred. + + If you specify this property, you can specify + the network as a full or partial URL. For + example, the following are all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/global/networks/network + - projects/project/global/networks/network + - global/networks/default This field is a member of `oneof`_ ``_network``. network_attachment (str): @@ -87506,8 +102195,8 @@ class NetworkInterface(proto.Message): This field is a member of `oneof`_ ``_network_i_p``. nic_type (str): The type of vNIC to be used on this - interface. This may be gVNIC or VirtioNet. Check - the NicType enum for the list of possible + interface. This may be gVNIC or VirtioNet. + Check the NicType enum for the list of possible values. This field is a member of `oneof`_ ``_nic_type``. @@ -87526,30 +102215,34 @@ class NetworkInterface(proto.Message): stack_type (str): The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 - addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is - used. This field can be both set at instance creation and - update network interface operations. Check the StackType - enum for the list of possible values. + addresses, useIPV4_IPV6. If not specified, IPV4_ONLY is + used. + + This field can be both set at instance creation and update + network interface operations. Check the StackType enum for + the list of possible values. This field is a member of `oneof`_ ``_stack_type``. subnetwork (str): The URL of the Subnetwork resource for this - instance. If the network resource is in legacy + instance. If the network resource is inlegacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. - For example, the following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /subnetworks/subnetwork - - regions/region/subnetworks/subnetwork + For example, the following are all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork + - regions/region/subnetworks/subnetwork This field is a member of `oneof`_ ``_subnetwork``. vlan (int): VLAN tag of a dynamic network interface, must - be an integer in the range from 2 to 255 + be an integer in the range from 2 to 255 inclusively. This field is a member of `oneof`_ ``_vlan``. @@ -87576,9 +102269,11 @@ class IgmpQuery(proto.Enum): IGMP_QUERY_V2 = 333493457 class Ipv6AccessType(proto.Enum): - r"""[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP - can be accessed from the Internet. This field is always inherited - from its subnetwork. Valid only if stackType is IPV4_IPV6. + r"""Output only. [Output Only] One of EXTERNAL, INTERNAL to indicate + whether the IP can be accessed from the Internet. This field is + always inherited from its subnetwork. + + Valid only if stackType is IPV4_IPV6. Values: UNDEFINED_IPV6_ACCESS_TYPE (0): @@ -87630,9 +102325,10 @@ class NicType(proto.Enum): class StackType(proto.Enum): r"""The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, - use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can - be both set at instance creation and update network interface - operations. + useIPV4_IPV6. If not specified, IPV4_ONLY is used. + + This field can be both set at instance creation and update network + interface operations. Values: UNDEFINED_STACK_TYPE (0): @@ -87767,21 +102463,22 @@ class NetworkList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Network]): A list of Network resources. kind (str): - [Output Only] Type of resource. Always compute#networkList - for lists of networks. + Output only. [Output Only] Type of resource. Always + compute#networkList for lists of networks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -87837,11 +102534,15 @@ class NetworkParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -87862,18 +102563,18 @@ class NetworkPeering(proto.Message): Attributes: auto_create_routes (bool): - This field will be deprecated soon. Use the - exchange_subnet_routes field instead. Indicates whether full - mesh connectivity is created and managed automatically + This field will be deprecated soon. Use + theexchange_subnet_routes field instead. Indicates whether + full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks - when peering state is ACTIVE. + when peering state isACTIVE. This field is a member of `oneof`_ ``_auto_create_routes``. connection_status (google.cloud.compute_v1beta.types.NetworkPeeringConnectionStatus): - [Output Only] The effective state of the peering connection - as a whole. + Output only. [Output Only] The effective state of the + peering connection as a whole. This field is a member of `oneof`_ ``_connection_status``. exchange_subnet_routes (bool): @@ -87883,7 +102584,7 @@ class NetworkPeering(proto.Message): true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state - is ACTIVE. + isACTIVE. This field is a member of `oneof`_ ``_exchange_subnet_routes``. export_custom_routes (bool): @@ -87894,9 +102595,10 @@ class NetworkPeering(proto.Message): export_subnet_routes_with_public_ip (bool): Whether subnet routes with public IP range are exported. The default value is true, all - subnet routes are exported. IPv4 special-use - ranges are always exported to peers and are not - controlled by this field. + subnet routes are exported.IPv4 special-use + ranges are always + exported to peers and are not controlled by this + field. This field is a member of `oneof`_ ``_export_subnet_routes_with_public_ip``. import_custom_routes (bool): @@ -87906,14 +102608,15 @@ class NetworkPeering(proto.Message): This field is a member of `oneof`_ ``_import_custom_routes``. import_subnet_routes_with_public_ip (bool): Whether subnet routes with public IP range - are imported. The default value is false. IPv4 - special-use ranges are always imported from - peers and are not controlled by this field. + are imported. The default value is false.IPv4 + special-use ranges are always + imported from peers and are not controlled by + this field. This field is a member of `oneof`_ ``_import_subnet_routes_with_public_ip``. name (str): Name of this peering. Provided by the client when the - peering is created. The name must comply with RFC1035. + peering is created. The name must comply withRFC1035. Specifically, the name must be 1-63 characters long and match regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all the @@ -87931,8 +102634,8 @@ class NetworkPeering(proto.Message): This field is a member of `oneof`_ ``_network``. peer_mtu (int): - [Output Only] Maximum Transmission Unit in bytes of the peer - network. + Output only. [Output Only] Maximum Transmission Unit in + bytes of the peer network. This field is a member of `oneof`_ ``_peer_mtu``. stack_type (str): @@ -87943,15 +102646,15 @@ class NetworkPeering(proto.Message): This field is a member of `oneof`_ ``_stack_type``. state (str): - [Output Only] State for the peering, either ``ACTIVE`` or - ``INACTIVE``. The peering is ``ACTIVE`` when there's a - matching configuration in the peer network. Check the State - enum for the list of possible values. + Output only. [Output Only] State for the peering, either + ``ACTIVE`` or ``INACTIVE``. The peering is ``ACTIVE`` when + there's a matching configuration in the peer network. Check + the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. state_details (str): - [Output Only] Details about the current state of the - peering. + Output only. [Output Only] Details about the current state + of the peering. This field is a member of `oneof`_ ``_state_details``. update_strategy (str): @@ -87986,8 +102689,8 @@ class StackType(proto.Enum): IPV4_ONLY = 22373798 class State(proto.Enum): - r"""[Output Only] State for the peering, either ``ACTIVE`` or - ``INACTIVE``. The peering is ``ACTIVE`` when there's a matching + r"""Output only. [Output Only] State for the peering, either ``ACTIVE`` + or ``INACTIVE``. The peering is ``ACTIVE`` when there's a matching configuration in the peer network. Values: @@ -88017,10 +102720,11 @@ class UpdateStrategy(proto.Enum): Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the - matching peering. To delete a peering with the - consensus update strategy, both the peerings - must request the deletion of the peering before - the peering can be deleted. + matching peering. + To delete a peering with the consensus update + strategy, both the peerings must request the + deletion of the peering before the peering can + be deleted. INDEPENDENT (127011674): In this mode, changes to the peering configuration can be unilaterally altered by @@ -88151,10 +102855,11 @@ class UpdateStrategy(proto.Enum): Updates are reflected in the local peering but aren't applied to the peering connection until a complementary change is made to the - matching peering. To delete a peering with the - consensus update strategy, both the peerings - must request the deletion of the peering before - the peering can be deleted. + matching peering. + To delete a peering with the consensus update + strategy, both the peerings must request the + deletion of the peering before the peering can + be deleted. INDEPENDENT (127011674): In this mode, changes to the peering configuration can be unilaterally altered by @@ -88192,7 +102897,7 @@ class UpdateStrategy(proto.Enum): class NetworkPeeringConnectionStatusConsensusState(proto.Message): r"""The status of update/delete for a consensus peering connection. Only - set when connection_status.update_strategy is CONSENSUS or a network + set when connection_status.update_strategy isCONSENSUS or a network peering is proposing to update the strategy to CONSENSUS. @@ -88225,9 +102930,15 @@ class DeleteStatus(proto.Enum): consensus peering connection can be deleted. DELETE_STATUS_UNSPECIFIED (395396446): No description available. + LOCAL_CANCEL_REQUESTED (169545277): + The local network admin requested to cancel their delete + request after DELETE_ACKNOWLEDGED. LOCAL_DELETE_REQUESTED (227335214): Network admin has requested deletion of this peering connection. + PEER_CANCEL_REQUESTED (140057862): + The peer network admin requested to cancel their delete + request after DELETE_ACKNOWLEDGED. PEER_DELETE_REQUESTED (197847799): The peer network admin has requested deletion of this peering connection. @@ -88235,7 +102946,9 @@ class DeleteStatus(proto.Enum): UNDEFINED_DELETE_STATUS = 0 DELETE_ACKNOWLEDGED = 325293916 DELETE_STATUS_UNSPECIFIED = 395396446 + LOCAL_CANCEL_REQUESTED = 169545277 LOCAL_DELETE_REQUESTED = 227335214 + PEER_CANCEL_REQUESTED = 140057862 PEER_DELETE_REQUESTED = 197847799 class UpdateStatus(proto.Enum): @@ -88247,7 +102960,7 @@ class UpdateStatus(proto.Enum): set. IN_SYNC (2273653): No pending configuration update proposals to - the peering connection. + the peering connection. PENDING_LOCAL_ACKNOWLEDMENT (229926592): The peer network admin has made an updatePeering call. The change is awaiting @@ -88433,10 +103146,11 @@ class NetworkPolicy(proto.Message): Attributes: associations (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicyAssociation]): - [Output Only] A list of associations that belong to this - network policy. + Output only. [Output Only] A list of associations that + belong to this network policy. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -88451,8 +103165,8 @@ class NetworkPolicy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#networkPolicy for network policies + Output only. [Output only] Type of the resource. + Alwayscompute#networkPolicy for network policies This field is a member of `oneof`_ ``_kind``. name (str): @@ -88460,29 +103174,31 @@ class NetworkPolicy(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] URL of the region where the regional network - policy resides. You must specify this field as part of the - HTTP request URL. It is not settable as a field in the - request body. + Output only. [Output Only] URL of the region where the + regional network policy resides. You must specify this field + as part of the HTTP request URL. It is not settable as a + field in the request body. This field is a member of `oneof`_ ``_region``. rule_tuple_count (int): - [Output Only] Total count of all network policy rule tuples. - A network policy can not exceed a set number of tuples. + Output only. [Output Only] Total count of all network policy + rule tuples. A network policy can not exceed a set number of + tuples. This field is a member of `oneof`_ ``_rule_tuple_count``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. traffic_classification_rules (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule]): - [Output Only] A list of traffic classification rules that - belong to this policy. + Output only. [Output Only] A list of traffic classification + rules that belong to this policy. """ associations: MutableSequence["NetworkPolicyAssociation"] = proto.RepeatedField( @@ -88559,26 +103275,27 @@ class NetworkPolicyAggregatedList(proto.Message): A list of NetworkPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#networkPolicyAggregatedList for lists of network - policies. + Output only. [Output Only] Type of resource. + Alwayscompute#networkPolicyAggregatedList for lists of + network policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -88670,14 +103387,15 @@ class NetworkPolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicy]): A list of NetworkPolicy resources. kind (str): - [Output Only] Type of resource. Always - compute#networkPolicyList for lists of network policies. + Output only. [Output Only] Type of resource. + Alwayscompute#networkPolicyList for lists of network + policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -88748,9 +103466,9 @@ class NetworkPolicyTrafficClassificationRule(proto.Message): This field is a member of `oneof`_ ``_disabled``. kind (str): - [Output only] Type of the resource. Always - compute#networkPolicyTrafficClassificationRule for network - policy traffic classification rules + Output only. [Output only] Type of the resource. + Alwayscompute#networkPolicyTrafficClassificationRule for + network policy traffic classification rules This field is a member of `oneof`_ ``_kind``. match (google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleMatcher): @@ -88776,8 +103494,8 @@ class NetworkPolicyTrafficClassificationRule(proto.Message): This field is a member of `oneof`_ ``_rule_name``. rule_tuple_count (int): - [Output Only] Calculation of the complexity of a single - network policy rule. + Output only. [Output Only] Calculation of the complexity of + a single network policy rule. This field is a member of `oneof`_ ``_rule_tuple_count``. target_secure_tags (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleSecureTag]): @@ -88790,9 +103508,9 @@ class NetworkPolicyTrafficClassificationRule(proto.Message): targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as - targetServiceAccounts. If neither - targetServiceAccounts nor targetSecureTag are - specified, the traffic classification rule + targetServiceAccounts. If + neithertargetServiceAccounts nor targetSecureTag + are specified, the traffic classification rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. @@ -88864,9 +103582,11 @@ class NetworkPolicyTrafficClassificationRuleAction(proto.Message): Attributes: dscp_mode (str): - The traffic class that should be applied to - the matching packet. Check the DscpMode enum for - the list of possible values. + DSCP mode. When set to AUTO, the DSCP value + will be picked automatically based on selected + trafficClass. Otherwise,dscpValue needs to be + explicitly specified. Check the DscpMode enum + for the list of possible values. This field is a member of `oneof`_ ``_dscp_mode``. dscp_value (int): @@ -88887,8 +103607,9 @@ class NetworkPolicyTrafficClassificationRuleAction(proto.Message): """ class DscpMode(proto.Enum): - r"""The traffic class that should be applied to the matching - packet. + r"""DSCP mode. When set to AUTO, the DSCP value will be picked + automatically based on selected trafficClass. + Otherwise,dscpValue needs to be explicitly specified. Values: UNDEFINED_DSCP_MODE (0): @@ -88968,14 +103689,16 @@ class NetworkPolicyTrafficClassificationRuleMatcher(proto.Message): Attributes: dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - destination CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of destination CIDR IP ranges + allowed is 5000. layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleMatcherLayer4Config]): Pairs of IP protocols and ports that the rule should match. src_ip_ranges (MutableSequence[str]): - CIDR IP address range. Maximum number of - source CIDR IP ranges allowed is 5000. + CIDR IP address range. + Maximum number of source CIDR IP ranges allowed + is 5000. """ dest_ip_ranges: MutableSequence[str] = proto.RepeatedField( @@ -89006,16 +103729,19 @@ class NetworkPolicyTrafficClassificationRuleMatcherLayer4Config(proto.Message): The protocol type is required when creating a traffic classification rule. This value can either be one of the following well known - protocol strings (tcp, udp, icmp, esp, ah, ipip, - sctp), or the IP protocol number. + protocol strings (tcp, udp, icmp,esp, ah, + ipip,sctp), or the IP protocol number. This field is a member of `oneof`_ ``_ip_protocol``. ports (MutableSequence[str]): An optional list of ports to which this rule applies. This - field is only applicable for UDP or TCP protocol. Each entry - must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. + field is only applicable for UDP, TCP or SCTP protocol. Each + entry must be either an integer or a range. If not + specified, this rule applies to connections through any + port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. """ ip_protocol: str = proto.Field( @@ -89041,18 +103767,19 @@ class NetworkPolicyTrafficClassificationRuleSecureTag(proto.Message): This field is a member of `oneof`_ ``_name``. state (str): - [Output Only] State of the secure tag, either ``EFFECTIVE`` - or ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` when it - is deleted or its network is deleted. Check the State enum - for the list of possible values. + Output only. [Output Only] State of the secure tag, either + ``EFFECTIVE`` or ``INEFFECTIVE``. A secure tag is + ``INEFFECTIVE`` when it is deleted or its network is + deleted. Check the State enum for the list of possible + values. This field is a member of `oneof`_ ``_state``. """ class State(proto.Enum): - r"""[Output Only] State of the secure tag, either ``EFFECTIVE`` or - ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` when it is deleted - or its network is deleted. + r"""Output only. [Output Only] State of the secure tag, either + ``EFFECTIVE`` or ``INEFFECTIVE``. A secure tag is ``INEFFECTIVE`` + when it is deleted or its network is deleted. Values: UNDEFINED_STATE (0): @@ -89091,46 +103818,51 @@ class NetworkProfile(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - [Output Only] An optional description of this resource. + Output only. [Output Only] An optional description of this + resource. This field is a member of `oneof`_ ``_description``. features (google.cloud.compute_v1beta.types.NetworkProfileNetworkFeatures): - [Output Only] Features supported by the network. + Output only. [Output Only] Features supported by the + network. This field is a member of `oneof`_ ``_features``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#networkProfile for network profiles. + Output only. [Output Only] Type of the resource. + Alwayscompute#networkProfile for network profiles. This field is a member of `oneof`_ ``_kind``. location (google.cloud.compute_v1beta.types.NetworkProfileLocation): - [Output Only] Location to which the network is restricted. + Output only. [Output Only] Location to which the network is + restricted. This field is a member of `oneof`_ ``_location``. name (str): - [Output Only] Name of the resource. + Output only. [Output Only] Name of the resource. This field is a member of `oneof`_ ``_name``. profile_type (google.cloud.compute_v1beta.types.NetworkProfileProfileType): - [Output Only] Type of the network profile. + Output only. [Output Only] Type of the network profile. This field is a member of `oneof`_ ``_profile_type``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. zone (str): @@ -89255,9 +103987,9 @@ class NetworkProfileNetworkFeatures(proto.Message): the list of possible values. allow_alias_ip_ranges (str): Specifies whether alias IP ranges (and - secondary address ranges) are allowed. Check the - AllowAliasIpRanges enum for the list of possible - values. + secondary address ranges) are allowed. + Check the AllowAliasIpRanges enum for the list + of possible values. This field is a member of `oneof`_ ``_allow_alias_ip_ranges``. allow_auto_mode_subnet (str): @@ -89299,6 +104031,13 @@ class NetworkProfileNetworkFeatures(proto.Message): possible values. This field is a member of `oneof`_ ``_allow_external_ip_access``. + allow_firewall_policy (str): + Specifies whether firewall policy can be + attached to the network. Check the + AllowFirewallPolicy enum for the list of + possible values. + + This field is a member of `oneof`_ ``_allow_firewall_policy``. allow_interconnect (str): Specifies whether Cloud Interconnect creation is allowed. Check the AllowInterconnect enum for @@ -89324,6 +104063,12 @@ class NetworkProfileNetworkFeatures(proto.Message): possible values. This field is a member of `oneof`_ ``_allow_multi_nic_in_same_network``. + allow_multicast (str): + Specifies whether multicast is allowed. + Check the AllowMulticast enum for the list of + possible values. + + This field is a member of `oneof`_ ``_allow_multicast``. allow_ncc (str): Specifies whether NCC is allowed. Check the AllowNcc enum for the list of possible @@ -89385,11 +104130,20 @@ class NetworkProfileNetworkFeatures(proto.Message): values. This field is a member of `oneof`_ ``_allow_vpn``. + firewall_policy_types (MutableSequence[str]): + Check the FirewallPolicyTypes enum for the + list of possible values. interface_types (MutableSequence[str]): If set, limits the interface types that the network supports. If empty, all interface types are supported. Check the InterfaceTypes enum for the list of possible values. + multicast (str): + Specifies which type of multicast is + supported. Check the Multicast enum for the list + of possible values. + + This field is a member of `oneof`_ ``_multicast``. subnet_purposes (MutableSequence[str]): Specifies which subnetwork purposes are supported. Check the SubnetPurposes enum for the @@ -89399,13 +104153,15 @@ class NetworkProfileNetworkFeatures(proto.Message): supported. Check the SubnetStackTypes enum for the list of possible values. subnetwork_purposes (MutableSequence[str]): - Specifies which subnetwork purposes are - supported. Check the SubnetworkPurposes enum for - the list of possible values. + Output only. Specifies which subnetwork + purposes are supported. Check the + SubnetworkPurposes enum for the list of possible + values. subnetwork_stack_types (MutableSequence[str]): - Specifies which subnetwork stack types are - supported. Check the SubnetworkStackTypes enum - for the list of possible values. + Output only. Specifies which subnetwork stack + types are supported. Check the + SubnetworkStackTypes enum for the list of + possible values. unicast (str): Specifies which type of unicast is supported. Check the Unicast enum for the list of possible @@ -89578,6 +104334,23 @@ class AllowExternalIpAccess(proto.Enum): EXTERNAL_IP_ACCESS_ALLOWED = 109530193 EXTERNAL_IP_ACCESS_BLOCKED = 462564501 + class AllowFirewallPolicy(proto.Enum): + r"""Specifies whether firewall policy can be attached to the + network. + + Values: + UNDEFINED_ALLOW_FIREWALL_POLICY (0): + A value indicating that the enum field is not + set. + FIREWALL_POLICY_ALLOWED (388488346): + No description available. + FIREWALL_POLICY_BLOCKED (204651742): + No description available. + """ + UNDEFINED_ALLOW_FIREWALL_POLICY = 0 + FIREWALL_POLICY_ALLOWED = 388488346 + FIREWALL_POLICY_BLOCKED = 204651742 + class AllowInterconnect(proto.Enum): r"""Specifies whether Cloud Interconnect creation is allowed. @@ -89642,6 +104415,22 @@ class AllowMultiNicInSameNetwork(proto.Enum): MULTI_NIC_IN_SAME_NETWORK_ALLOWED = 457555419 MULTI_NIC_IN_SAME_NETWORK_BLOCKED = 273718815 + class AllowMulticast(proto.Enum): + r"""Specifies whether multicast is allowed. + + Values: + UNDEFINED_ALLOW_MULTICAST (0): + A value indicating that the enum field is not + set. + MULTICAST_ALLOWED (44693537): + No description available. + MULTICAST_BLOCKED (397727845): + No description available. + """ + UNDEFINED_ALLOW_MULTICAST = 0 + MULTICAST_ALLOWED = 44693537 + MULTICAST_BLOCKED = 397727845 + class AllowNcc(proto.Enum): r"""Specifies whether NCC is allowed. @@ -89802,6 +104591,22 @@ class AllowVpn(proto.Enum): VPN_ALLOWED = 162163997 VPN_BLOCKED = 515198305 + class FirewallPolicyTypes(proto.Enum): + r""" + + Values: + UNDEFINED_FIREWALL_POLICY_TYPES (0): + A value indicating that the enum field is not + set. + RDMA_ROCE_POLICY (148757145): + No description available. + VPC_POLICY (74319208): + No description available. + """ + UNDEFINED_FIREWALL_POLICY_TYPES = 0 + RDMA_ROCE_POLICY = 148757145 + VPC_POLICY = 74319208 + class InterfaceTypes(proto.Enum): r""" @@ -89830,6 +104635,22 @@ class InterfaceTypes(proto.Enum): UNSPECIFIED_NIC_TYPE = 67411801 VIRTIO_NET = 452123481 + class Multicast(proto.Enum): + r"""Specifies which type of multicast is supported. + + Values: + UNDEFINED_MULTICAST (0): + A value indicating that the enum field is not + set. + MULTICAST_SDN (532209462): + No description available. + MULTICAST_ULL (532211630): + No description available. + """ + UNDEFINED_MULTICAST = 0 + MULTICAST_SDN = 532209462 + MULTICAST_ULL = 532211630 + class SubnetPurposes(proto.Enum): r""" @@ -89920,7 +104741,7 @@ class SubnetworkStackTypes(proto.Enum): New VMs in this subnet will only be assigned IPv4 addresses. IPV6_ONLY (79632100): - New VMs in this subnet will only be assigned + New VMs in this subnet will only be assigned IPv6 addresses. """ UNDEFINED_SUBNETWORK_STACK_TYPES = 0 @@ -89983,6 +104804,11 @@ class Unicast(proto.Enum): number=131538110, optional=True, ) + allow_firewall_policy: str = proto.Field( + proto.STRING, + number=254200923, + optional=True, + ) allow_interconnect: str = proto.Field( proto.STRING, number=280512964, @@ -90003,6 +104829,11 @@ class Unicast(proto.Enum): number=88251004, optional=True, ) + allow_multicast: str = proto.Field( + proto.STRING, + number=11002498, + optional=True, + ) allow_ncc: str = proto.Field( proto.STRING, number=372354904, @@ -90053,10 +104884,19 @@ class Unicast(proto.Enum): number=372363006, optional=True, ) + firewall_policy_types: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=390742027, + ) interface_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=157981171, ) + multicast: str = proto.Field( + proto.STRING, + number=404098040, + optional=True, + ) subnet_purposes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=301338039, @@ -90211,26 +105051,27 @@ class NetworkProfilesListResponse(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NetworkProfile]): A list of NetworkProfile resources. kind (str): - [Output Only] Type of resource. Always - compute#networkProfileList for network profiles. + Output only. [Output Only] Type of resource. + Alwayscompute#networkProfileList for network profiles. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -90304,28 +105145,29 @@ class NetworkRoutingConfig(proto.Message): The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY - (default) or STANDARD. Check the - BgpBestPathSelectionMode enum for the list of - possible values. + (default) or STANDARD. + Check the BgpBestPathSelectionMode enum for the + list of possible values. This field is a member of `oneof`_ ``_bgp_best_path_selection_mode``. bgp_inter_region_cost (str): Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT - or ADD_COST_TO_MED. Check the BgpInterRegionCost enum for - the list of possible values. + orADD_COST_TO_MED. Check the BgpInterRegionCost enum for the + list of possible values. This field is a member of `oneof`_ ``_bgp_inter_region_cost``. effective_bgp_always_compare_med (bool): - [Output Only] Effective value of the bgp_always_compare_med - field. + Output only. [Output Only] Effective value of the + bgp_always_compare_med field. This field is a member of `oneof`_ ``_effective_bgp_always_compare_med``. effective_bgp_inter_region_cost (str): - [Output Only] Effective value of the bgp_inter_region_cost - field. Check the EffectiveBgpInterRegionCost enum for the - list of possible values. + Output only. [Output Only] Effective value of the + bgp_inter_region_cost field. Check the + EffectiveBgpInterRegionCost enum for the list of possible + values. This field is a member of `oneof`_ ``_effective_bgp_inter_region_cost``. routing_mode (str): @@ -90333,7 +105175,7 @@ class NetworkRoutingConfig(proto.Message): to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set - to GLOBAL, this network's Cloud Routers will + toGLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. Check the RoutingMode enum for the list of possible values. @@ -90362,7 +105204,7 @@ class BgpBestPathSelectionMode(proto.Enum): class BgpInterRegionCost(proto.Enum): r"""Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path - selection algorithm. Can be DEFAULT or ADD_COST_TO_MED. Additional + selection algorithm. Can be DEFAULT orADD_COST_TO_MED. Additional supported values which may be not listed in the enum directly due to technical reasons: ADD_COST_TO_MED DEFAULT @@ -90380,9 +105222,10 @@ class BgpInterRegionCost(proto.Enum): DEFAULT = 115302945 class EffectiveBgpInterRegionCost(proto.Enum): - r"""[Output Only] Effective value of the bgp_inter_region_cost field. - Additional supported values which may be not listed in the enum - directly due to technical reasons: ADD_COST_TO_MED DEFAULT + r"""Output only. [Output Only] Effective value of the + bgp_inter_region_cost field. Additional supported values which may + be not listed in the enum directly due to technical reasons: + ADD_COST_TO_MED DEFAULT Values: UNDEFINED_EFFECTIVE_BGP_INTER_REGION_COST (0): @@ -90395,7 +105238,7 @@ class RoutingMode(proto.Enum): r"""The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set - to GLOBAL, this network's Cloud Routers will advertise routes + toGLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. Values: @@ -90450,13 +105293,13 @@ class NetworksAddPeeringRequest(proto.Message): Attributes: auto_create_routes (bool): - This field will be deprecated soon. Use - exchange_subnet_routes in network_peering instead. Indicates - whether full mesh connectivity is created and managed - automatically between peered networks. Currently this field - should always be true since Google Compute Engine will - automatically create and manage subnetwork routes between - two networks when peering state is ACTIVE. + This field will be deprecated soon. + Useexchange_subnet_routes in network_peering instead. + Indicates whether full mesh connectivity is created and + managed automatically between peered networks. Currently + this field should always be true since Google Compute Engine + will automatically create and manage subnetwork routes + between two networks when peering state isACTIVE. This field is a member of `oneof`_ ``_auto_create_routes``. name (str): @@ -90468,13 +105311,13 @@ class NetworksAddPeeringRequest(proto.Message): Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer - network, exchange_subnet_routes) in the network_peering + network,exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon. This field is a member of `oneof`_ ``_network_peering``. peer_network (str): - URL of the peer network. It can be either + URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that @@ -90507,6 +105350,26 @@ class NetworksAddPeeringRequest(proto.Message): ) +class NetworksCancelRequestRemovePeeringRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + name (str): + Name of the peering, which should conform to + RFC1035. + + This field is a member of `oneof`_ ``_name``. + """ + + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + + class NetworksGetEffectiveFirewallsResponse(proto.Message): r""" @@ -90514,9 +105377,9 @@ class NetworksGetEffectiveFirewallsResponse(proto.Message): firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): [Output Only] Effective firewalls from firewall policy. It returns Global Network Firewall Policies and Hierarchical - Firewall Policies. Use - regionNetworkFirewallPolicies.getEffectiveFirewalls to get - Regional Network Firewall Policies as well. + Firewall Policies. + UseregionNetworkFirewallPolicies.getEffectiveFirewalls to + get Regional Network Firewall Policies as well. firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): Effective firewalls on the network. organization_firewalls (MutableSequence[google.cloud.compute_v1beta.types.NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy]): @@ -90552,37 +105415,38 @@ class NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy(proto.Message Attributes: display_name (str): - [Output Only] Deprecated, please use short name instead. The - display name of the firewall policy. + Output only. [Output Only] Deprecated, please use short name + instead. The display name of the firewall policy. This field is a member of `oneof`_ ``_display_name``. name (str): - [Output Only] The name of the firewall policy. + Output only. [Output Only] The name of the firewall policy. This field is a member of `oneof`_ ``_name``. packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - [Output Only] The packet mirroring rules that apply to the - network. + Output only. [Output Only] The packet mirroring rules that + apply to the network. priority (int): - [Output only] Priority of firewall policy association. Not - applicable for type=HIERARCHY. + Output only. [Output only] Priority of firewall policy + association. Not applicable for type=HIERARCHY. This field is a member of `oneof`_ ``_priority``. rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): [Output Only] The rules that apply to the network. short_name (str): - [Output Only] The short name of the firewall policy. + Output only. [Output Only] The short name of the firewall + policy. This field is a member of `oneof`_ ``_short_name``. type_ (str): - [Output Only] The type of the firewall policy. Check the - Type enum for the list of possible values. + Output only. [Output Only] The type of the firewall policy. + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): - r"""[Output Only] The type of the firewall policy. + r"""Output only. [Output Only] The type of the firewall policy. Values: UNDEFINED_TYPE (0): @@ -90649,8 +105513,8 @@ class NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy(proto.Mess Attributes: id (int): - [Output Only] The unique identifier for the security policy. - This identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + security policy. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. rules (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRule]): @@ -90729,12 +105593,14 @@ class NetworksUpdatePeeringRequest(proto.Message): class NodeGroup(proto.Message): - r"""Represents a sole-tenant Node Group resource. A sole-tenant - node is a physical server that is dedicated to hosting VM - instances only for your specific project. Use sole-tenant nodes - to keep your instances physically separated from instances in - other projects, or to group your instances together on the same - host hardware. For more information, read Sole-tenant nodes. + r"""Represents a sole-tenant Node Group resource. + + A sole-tenant node is a physical server that is dedicated to + hosting VM instances only for your specific project. Use + sole-tenant nodes to keep your instances physically separated + from instances in other projects, or to group your instances + together on the same host hardware. For more information, + readSole-tenant nodes. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -90745,7 +105611,8 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_autoscaling_policy``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -90758,13 +105625,13 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeGroup for node group. + Output only. [Output Only] The type of the resource. + Alwayscompute#nodeGroup for node group. This field is a member of `oneof`_ ``_kind``. location_hint (str): @@ -90784,11 +105651,11 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_maintenance_interval``. maintenance_policy (str): Specifies how to handle instances when a node in the group - undergoes maintenance. Set to one of: DEFAULT, - RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default - value is DEFAULT. For more information, see Maintenance - policies. Check the MaintenancePolicy enum for the list of - possible values. + undergoes maintenance. Set to one of: + DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The + default value is DEFAULT. For more information, see + Maintenance policies. Check the MaintenancePolicy enum for + the list of possible values. This field is a member of `oneof`_ ``_maintenance_policy``. maintenance_window (google.cloud.compute_v1beta.types.NodeGroupMaintenanceWindow): @@ -90797,7 +105664,7 @@ class NodeGroup(proto.Message): name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -90811,7 +105678,8 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_node_template``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. share_settings (google.cloud.compute_v1beta.types.ShareSettings): @@ -90819,7 +105687,8 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_share_settings``. size (int): - [Output Only] The total number of nodes in the node group. + Output only. [Output Only] The total number of nodes in the + node group. This field is a member of `oneof`_ ``_size``. status (str): @@ -90828,8 +105697,8 @@ class NodeGroup(proto.Message): This field is a member of `oneof`_ ``_status``. zone (str): - [Output Only] The name of the zone where the node group - resides, such as us-central1-a. + Output only. [Output Only] The name of the zone where the + node group resides, such as us-central1-a. This field is a member of `oneof`_ ``_zone``. """ @@ -90847,13 +105716,13 @@ class MaintenanceInterval(proto.Enum): and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. + than the PERIODIC andRECURRENT options. PERIODIC (142804635): VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT (194244550): @@ -90861,7 +105730,7 @@ class MaintenanceInterval(proto.Enum): periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. @@ -90873,7 +105742,7 @@ class MaintenanceInterval(proto.Enum): class MaintenancePolicy(proto.Enum): r"""Specifies how to handle instances when a node in the group undergoes - maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or + maintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. @@ -91034,26 +105903,27 @@ class NodeGroupAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeGroupsScopedList]): A list of NodeGroupsScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeGroupAggregatedList for aggregated lists of node - groups. + Output only. [Output Only] Type of + resource.Alwayscompute#nodeGroupAggregatedList for + aggregated lists of node groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -91182,21 +106052,22 @@ class NodeGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NodeGroup]): A list of NodeGroup resources. kind (str): - [Output Only] Type of resource.Always compute#nodeGroupList - for lists of node groups. + Output only. [Output Only] Type of resource.Always + compute#nodeGroupList for lists of node groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -91251,15 +106122,15 @@ class NodeGroupMaintenanceWindow(proto.Message): Attributes: maintenance_duration (google.cloud.compute_v1beta.types.Duration): - [Output only] A predetermined duration for the window, - automatically chosen to be the smallest possible in the - given scenario. + Output only. [Output only] A predetermined duration for the + window, automatically chosen to be the smallest possible in + the given scenario. This field is a member of `oneof`_ ``_maintenance_duration``. start_time (str): Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, - 08:00, 12:00, 16:00, or 20:00. For example, both + 08:00,12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. This field is a member of `oneof`_ ``_start_time``. @@ -91287,8 +106158,8 @@ class NodeGroupNode(proto.Message): accelerators (MutableSequence[google.cloud.compute_v1beta.types.AcceleratorConfig]): Accelerators for this node. consumed_resources (google.cloud.compute_v1beta.types.InstanceConsumptionInfo): - Node resources that are reserved by all - instances. + Output only. Node resources that are reserved + by all instances. This field is a member of `oneof`_ ``_consumed_resources``. cpu_overcommit_type (str): @@ -91300,8 +106171,8 @@ class NodeGroupNode(proto.Message): disks (MutableSequence[google.cloud.compute_v1beta.types.LocalDisk]): Local disk configurations. instance_consumption_data (MutableSequence[google.cloud.compute_v1beta.types.InstanceConsumptionData]): - Instance data that shows consumed resources - on the node. + Output only. Instance data that shows + consumed resources on the node. instances (MutableSequence[str]): Instances scheduled on this node. name (str): @@ -91313,7 +106184,7 @@ class NodeGroupNode(proto.Message): This field is a member of `oneof`_ ``_node_type``. satisfies_pzs (bool): - [Output Only] Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzs``. server_binding (google.cloud.compute_v1beta.types.ServerBinding): @@ -91330,13 +106201,13 @@ class NodeGroupNode(proto.Message): This field is a member of `oneof`_ ``_status``. total_resources (google.cloud.compute_v1beta.types.InstanceConsumptionInfo): - Total amount of available resources on the - node. + Output only. Total amount of available + resources on the node. This field is a member of `oneof`_ ``_total_resources``. upcoming_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): - [Output Only] The information about an upcoming maintenance - event. + Output only. [Output Only] The information about an upcoming + maintenance event. This field is a member of `oneof`_ ``_upcoming_maintenance``. """ @@ -91503,33 +106374,34 @@ class NodeGroupsListNodes(proto.Message): Attributes: id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + Output only. [Output Only] Unique identifier for the + resource; defined by the server. This field is a member of `oneof`_ ``_id``. items (MutableSequence[google.cloud.compute_v1beta.types.NodeGroupNode]): A list of Node resources. kind (str): - [Output Only] The resource type, which is always - compute.nodeGroupsListNodes for the list of nodes in the - specified node group. + Output only. [Output Only] The resource type, which is + alwayscompute.nodeGroupsListNodes for the list of nodes in + the specified node group. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Output only. [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -91661,9 +106533,11 @@ class NodeGroupsSimulateMaintenanceEventRequest(proto.Message): class NodeTemplate(proto.Message): - r"""Represent a sole-tenant Node Template resource. You can use a - template to define properties for nodes in a node group. For - more information, read Creating node groups and instances. + r"""Represent a sole-tenant Node Template resource. + + You can use a template to define properties for nodes in a node + group. For more information, readCreating node groups + and instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -91678,7 +106552,8 @@ class NodeTemplate(proto.Message): This field is a member of `oneof`_ ``_cpu_overcommit_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -91690,19 +106565,19 @@ class NodeTemplate(proto.Message): disks (MutableSequence[google.cloud.compute_v1beta.types.LocalDisk]): id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeTemplate for node templates. + Output only. [Output Only] The type of the resource. + Alwayscompute#nodeTemplate for node templates. This field is a member of `oneof`_ ``_kind``. name (str): The name of the resource, provided by the client when initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, + 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -91723,32 +106598,39 @@ class NodeTemplate(proto.Message): This field is a member of `oneof`_ ``_node_type_flexibility``. region (str): - [Output Only] The name of the region where the node template - resides, such as us-central1. + Output only. [Output Only] The name of the region where the + node template resides, such as us-central1. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. server_binding (google.cloud.compute_v1beta.types.ServerBinding): Sets the binding properties for the physical server. Valid - values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: - Restarts VMs on any available physical server - - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same - physical server whenever possible See Sole-tenant node - options for more information. + values include: + + :: + + - *[Default]* RESTART_NODE_ON_ANY_SERVER: + Restarts VMs on any available + physical server + - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same + physical server whenever possible + + See Sole-tenant node options for more information. This field is a member of `oneof`_ ``_server_binding``. status (str): - [Output Only] The status of the node template. One of the - following values: CREATING, READY, and DELETING. Check the - Status enum for the list of possible values. + Output only. [Output Only] The status of the node template. + One of the following values:CREATING, READY, and DELETING. + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. status_message (str): - [Output Only] An optional, human-readable explanation of the - status. + Output only. [Output Only] An optional, human-readable + explanation of the status. This field is a member of `oneof`_ ``_status_message``. """ @@ -91773,8 +106655,8 @@ class CpuOvercommitType(proto.Enum): NONE = 2402104 class Status(proto.Enum): - r"""[Output Only] The status of the node template. One of the following - values: CREATING, READY, and DELETING. + r"""Output only. [Output Only] The status of the node template. One of + the following values:CREATING, READY, and DELETING. Values: UNDEFINED_STATUS (0): @@ -91893,26 +106775,27 @@ class NodeTemplateAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeTemplatesScopedList]): A list of NodeTemplatesScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeTemplateAggregatedList for aggregated lists of - node templates. + Output only. [Output Only] Type of + resource.Alwayscompute#nodeTemplateAggregatedList for + aggregated lists of node templates. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -91975,21 +106858,22 @@ class NodeTemplateList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NodeTemplate]): A list of NodeTemplate resources. kind (str): - [Output Only] Type of resource.Always + Output only. [Output Only] Type of resource.Always compute#nodeTemplateList for lists of node templates. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -92099,12 +106983,13 @@ class NodeTemplatesScopedList(proto.Message): class NodeType(proto.Message): - r"""Represent a sole-tenant Node Type resource. Each node within - a node group must have a node type. A node type specifies the - total amount of cores and memory for that node. Currently, the - only available node type is n1-node-96-624 node type that has 96 - vCPUs and 624 GB of memory, available in multiple zones. For - more information read Node types. + r"""Represent a sole-tenant Node Type resource. + + Each node within a node group must have a node type. A node type + specifies the total amount of cores and memory for that node. + Currently, the only available node type is n1-node-96-624 node + type that has 96 vCPUs and 624 GB of memory, available in + multiple zones. For more information readNode types. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -92115,7 +107000,7 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_cpu_platform``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -92139,8 +107024,8 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] The type of the resource. Always - compute#nodeType for node types. + Output only. [Output Only] The type of the resource. + Alwayscompute#nodeType for node types. This field is a member of `oneof`_ ``_kind``. local_ssd_gb (int): @@ -92149,8 +107034,8 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_local_ssd_gb``. max_vms (int): - [Output Only] Maximum number of VMs that can be created for - this node type. + Output only. [Output Only] Maximum number of VMs that can be + created for this node type. This field is a member of `oneof`_ ``_max_vms``. memory_mb (int): @@ -92163,12 +107048,13 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_name``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. zone (str): - [Output Only] The name of the zone where the node type - resides, such as us-central1-a. + Output only. [Output Only] The name of the zone where the + node type resides, such as us-central1-a. This field is a member of `oneof`_ ``_zone``. """ @@ -92255,26 +107141,27 @@ class NodeTypeAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.NodeTypesScopedList]): A list of NodeTypesScopedList resources. kind (str): - [Output Only] Type of resource.Always - compute#nodeTypeAggregatedList for aggregated lists of node - types. + Output only. [Output Only] Type of + resource.Alwayscompute#nodeTypeAggregatedList for aggregated + lists of node types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -92337,21 +107224,22 @@ class NodeTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NodeType]): A list of NodeType resources. kind (str): - [Output Only] Type of resource.Always compute#nodeTypeList - for lists of node types. + Output only. [Output Only] Type of resource.Always + compute#nodeTypeList for lists of node types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -92426,17 +107314,22 @@ class NodeTypesScopedList(proto.Message): class NotificationEndpoint(proto.Message): - r"""Represents a notification endpoint. A notification endpoint - resource defines an endpoint to receive notifications when there - are status changes detected by the associated health check - service. For more information, see Health checks overview. + r"""Represents a notification endpoint. + + A notification endpoint resource defines an endpoint to receive + notifications when there are status changes detected by the + associated health check service. + + For more information, see + Health checks overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -92452,19 +107345,20 @@ class NotificationEndpoint(proto.Message): This field is a member of `oneof`_ ``_grpc_settings``. id (int): - [Output Only] A unique identifier for this resource type. - The server generates this identifier. + Output only. [Output Only] A unique identifier for this + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#notificationEndpoint for notification endpoints. + Output only. [Output Only] Type of the resource. + Alwayscompute#notificationEndpoint for notification + endpoints. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -92473,15 +107367,16 @@ class NotificationEndpoint(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] URL of the region where the notification - endpoint resides. This field applies only to the regional - resource. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + Output only. [Output Only] URL of the region where the + notification endpoint resides. This field applies only to + the regional resource. You must specify this field as part + of the HTTP request URL. It is not settable as a field in + the request body. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. """ @@ -92616,14 +107511,15 @@ class NotificationEndpointList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.NotificationEndpoint]): A list of NotificationEndpoint resources. kind (str): - [Output Only] Type of the resource. Always - compute#notificationEndpoint for notification endpoints. + Output only. [Output Only] Type of the resource. + Alwayscompute#notificationEndpoint for notification + endpoints. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -92677,19 +107573,32 @@ def raw_page(self): class Operation(proto.Message): - r"""Represents an Operation resource. Google Compute Engine has three - Operation resources: \* - `Global `__ \* - `Regional `__ \* - `Zonal `__ You can - use an operation resource to manage asynchronous API requests. For - more information, read Handling API responses. Operations can be - global, regional or zonal. - For global operations, use the - ``globalOperations`` resource. - For regional operations, use the - ``regionOperations`` resource. - For zonal operations, use the - ``zoneOperations`` resource. For more information, read Global, - Regional, and Zonal Resources. Note that completed Operation - resources have a limited retention period. + r"""Represents an Operation resource. + + Google Compute Engine has three Operation resources: + + - `Global `__ + - `Regional `__ + - `Zonal `__ + + You can use an operation resource to manage asynchronous API + requests. For more information, readHandling API responses. + + Operations can be global, regional or zonal. + + :: + + - For global operations, use the `globalOperations` + resource. + - For regional operations, use the + `regionOperations` resource. + - For zonal operations, use + the `zoneOperations` resource. + + For more information, read Global, Regional, and Zonal Resources. + + Note that completed Operation resources have a limited retention + period. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -92711,7 +107620,7 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_description``. end_time (str): [Output Only] The time that this operation was completed. - This value is in RFC3339 text format. + This value is inRFC3339 text format. This field is a member of `oneof`_ ``_end_time``. error (google.cloud.compute_v1beta.types.Error): @@ -92738,14 +107647,14 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_id``. insert_time (str): [Output Only] The time that this operation was requested. - This value is in RFC3339 text format. + This value is inRFC3339 text format. This field is a member of `oneof`_ ``_insert_time``. instances_bulk_insert_operation_metadata (google.cloud.compute_v1beta.types.InstancesBulkInsertOperationMetadata): This field is a member of `oneof`_ ``_instances_bulk_insert_operation_metadata``. kind (str): - [Output Only] Type of the resource. Always + Output only. [Output Only] Type of the resource. Always ``compute#operation`` for Operation resources. This field is a member of `oneof`_ ``_kind``. @@ -92754,9 +107663,9 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_name``. operation_group_id (str): - [Output Only] An ID that represents a group of operations, - such as when a group of operations results from a - ``bulkInsert`` API request. + Output only. [Output Only] An ID that represents a group of + operations, such as when a group of operations results from + a ``bulkInsert`` API request. This field is a member of `oneof`_ ``_operation_group_id``. operation_type (str): @@ -92784,14 +107693,14 @@ class Operation(proto.Message): This field is a member of `oneof`_ ``_self_link``. set_common_instance_metadata_operation_metadata (google.cloud.compute_v1beta.types.SetCommonInstanceMetadataOperationMetadata): - [Output Only] If the operation is for + Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state. This field is a member of `oneof`_ ``_set_common_instance_metadata_operation_metadata``. start_time (str): [Output Only] The time that this operation was started by - the server. This value is in RFC3339 text format. + the server. This value is inRFC3339 text format. This field is a member of `oneof`_ ``_start_time``. status (google.cloud.compute_v1beta.types.Operation.Status): @@ -93009,7 +107918,7 @@ class OperationAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.OperationsScopedList]): [Output Only] A map of scoped operation lists. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always ``compute#operationAggregatedList`` for aggregated lists of operations. @@ -93028,7 +107937,7 @@ class OperationAggregatedList(proto.Message): This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -93091,7 +108000,7 @@ class OperationList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Operation]): [Output Only] A list of Operation resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always ``compute#operations`` for Operations resource. This field is a member of `oneof`_ ``_kind``. @@ -93188,9 +108097,10 @@ class OrganizationSecurityPoliciesListAssociationsResponse(proto.Message): associations (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyAssociation]): A list of associations. kind (str): - [Output Only] Type of securityPolicy associations. Always - compute#organizationSecurityPoliciesListAssociations for - lists of securityPolicy associations. + Output only. [Output Only] Type of securityPolicy + associations. + Alwayscompute#organizationSecurityPoliciesListAssociations + for lists of securityPolicy associations. This field is a member of `oneof`_ ``_kind``. """ @@ -93217,9 +108127,10 @@ class OutlierDetection(proto.Message): Attributes: base_ejection_time (google.cloud.compute_v1beta.types.Duration): The base time that a backend endpoint is - ejected for. Defaults to 30000ms or 30s. After a - backend endpoint is returned back to the load - balancing pool, it can be ejected again in + ejected for. Defaults to 30000ms or 30s. + + After a backend endpoint is returned back to the + load balancing pool, it can be ejected again in another ejection analysis. Thus, the total ejection time is equal to the base ejection time multiplied by the number of times the backend @@ -93264,8 +108175,9 @@ class OutlierDetection(proto.Message): will be ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to - ramp it up slowly. Defaults to 100. Not - supported when the backend service uses + ramp it up slowly. Defaults to 100. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_enforcing_success_rate``. @@ -93274,8 +108186,9 @@ class OutlierDetection(proto.Message): sweeps. This can result in both new ejections and backend endpoints being returned to service. The interval is equal to the number of seconds - as defined in outlierDetection.interval.seconds - plus the number of nanoseconds as defined in + as defined in + outlierDetection.interval.seconds plus the + number of nanoseconds as defined in outlierDetection.interval.nanos. Defaults to 1 second. @@ -93295,7 +108208,9 @@ class OutlierDetection(proto.Message): setting, outlier detection via success rate statistics is not performed for any backend endpoint in the load balancing pool. Defaults to - 5. Not supported when the backend service uses + 5. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_success_rate_minimum_hosts``. @@ -93307,8 +108222,10 @@ class OutlierDetection(proto.Message): detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that backend - endpoint. Defaults to 100. Not supported when - the backend service uses Serverless NEG. + endpoint. Defaults to 100. + + Not supported when the backend service uses + Serverless NEG. This field is a member of `oneof`_ ``_success_rate_request_volume``. success_rate_stdev_factor (int): @@ -93319,8 +108236,9 @@ class OutlierDetection(proto.Message): rate: mean - (stdev \* successRateStdevFactor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. - Defaults to 1900. Not supported when the backend service - uses Serverless NEG. + Defaults to 1900. + + Not supported when the backend service uses Serverless NEG. This field is a member of `oneof`_ ``_success_rate_stdev_factor``. """ @@ -93504,27 +108422,30 @@ class Type(proto.Enum): class PacketMirroring(proto.Message): - r"""Represents a Packet Mirroring resource. Packet Mirroring - clones the traffic of specified instances in your Virtual - Private Cloud (VPC) network and forwards it to a collector - destination, such as an instance group of an internal TCP/UDP - load balancer, for analysis or examination. For more information - about setting up Packet Mirroring, see Using Packet Mirroring. + r"""Represents a Packet Mirroring resource. + + Packet Mirroring clones the traffic of specified instances in + your Virtual Private Cloud (VPC) network and forwards it to a + collector destination, such as an instance group of an internal + TCP/UDP load balancer, for analysis or examination. + For more information about setting up Packet Mirroring, seeUsing + Packet Mirroring. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: collector_ilb (google.cloud.compute_v1beta.types.PacketMirroringForwardingRuleInfo): - The Forwarding Rule resource of type - loadBalancingScheme=INTERNAL that will be used - as collector for mirrored traffic. The specified - forwarding rule must have isMirroringCollector - set to true. + The Forwarding Rule resource of + typeloadBalancingScheme=INTERNAL that will be + used as collector for mirrored traffic. The + specified forwarding rule must have + isMirroringCollector set to true. This field is a member of `oneof`_ ``_collector_ilb``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -93537,8 +108458,11 @@ class PacketMirroring(proto.Message): Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on - the network. The default is TRUE. Check the - Enable enum for the list of possible values. + the network. + + The default is TRUE. + Check the Enable enum for the list of possible + values. This field is a member of `oneof`_ ``_enable``. filter (google.cloud.compute_v1beta.types.PacketMirroringFilter): @@ -93547,13 +108471,13 @@ class PacketMirroring(proto.Message): This field is a member of `oneof`_ ``_filter``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#packetMirroring for packet mirrorings. + Output only. [Output Only] Type of the resource. + Alwayscompute#packetMirroring for packet mirrorings. This field is a member of `oneof`_ ``_kind``. mirrored_resources (google.cloud.compute_v1beta.types.PacketMirroringMirroredResourceInfo): @@ -93567,7 +108491,7 @@ class PacketMirroring(proto.Message): name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -93589,8 +108513,10 @@ class PacketMirroring(proto.Message): there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered - priority value wins. Default value is 1000. - Valid range is 0 through 65535. + priority value wins. + + Default value is 1000. Valid range is 0 through + 65535. This field is a member of `oneof`_ ``_priority``. region (str): @@ -93599,7 +108525,8 @@ class PacketMirroring(proto.Message): This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. """ @@ -93607,7 +108534,9 @@ class PacketMirroring(proto.Message): class Enable(proto.Enum): r"""Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be - enforced on the network. The default is TRUE. + enforced on the network. + + The default is TRUE. Values: UNDEFINED_ENABLE (0): @@ -93707,24 +108636,25 @@ class PacketMirroringAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.PacketMirroringsScopedList]): A list of PacketMirroring resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -93783,9 +108713,9 @@ class PacketMirroringFilter(proto.Message): Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges - is mirrored. If neither cidrRanges nor - IPProtocols is specified, all IPv4 traffic is - mirrored. + is mirrored. + If neither cidrRanges nor IPProtocols is + specified, all IPv4 traffic is mirrored. cidr_ranges (MutableSequence[str]): One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or @@ -93847,8 +108777,8 @@ class PacketMirroringForwardingRuleInfo(proto.Message): Attributes: canonical_url (str): - [Output Only] Unique identifier for the forwarding rule; - defined by the server. + Output only. [Output Only] Unique identifier for the + forwarding rule; defined by the server. This field is a member of `oneof`_ ``_canonical_url``. url (str): @@ -93885,21 +108815,22 @@ class PacketMirroringList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.PacketMirroring]): A list of PacketMirroring resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#packetMirroring for packetMirrorings. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -93953,17 +108884,21 @@ class PacketMirroringMirroredResourceInfo(proto.Message): A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this - packetMirroring. Note that this config will - apply only to those network interfaces of the - Instances that belong to the network specified - in this packetMirroring. You may specify a - maximum of 50 Instances. + packetMirroring. + + Note that this config will apply only to those + network interfaces of the Instances that belong + to the network specified in this + packetMirroring. + + You may specify a maximum of 50 Instances. subnetworks (MutableSequence[google.cloud.compute_v1beta.types.PacketMirroringMirroredResourceInfoSubnetInfo]): A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this - packetMirroring. You may specify a maximum of 5 - subnetworks. + packetMirroring. + + You may specify a maximum of 5 subnetworks. tags (MutableSequence[str]): A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags @@ -93997,8 +108932,8 @@ class PacketMirroringMirroredResourceInfoInstanceInfo(proto.Message): Attributes: canonical_url (str): - [Output Only] Unique identifier for the instance; defined by - the server. + Output only. [Output Only] Unique identifier for the + instance; defined by the server. This field is a member of `oneof`_ ``_canonical_url``. url (str): @@ -94027,8 +108962,8 @@ class PacketMirroringMirroredResourceInfoSubnetInfo(proto.Message): Attributes: canonical_url (str): - [Output Only] Unique identifier for the subnetwork; defined - by the server. + Output only. [Output Only] Unique identifier for the + subnetwork; defined by the server. This field is a member of `oneof`_ ``_canonical_url``. url (str): @@ -94058,8 +108993,8 @@ class PacketMirroringNetworkInfo(proto.Message): Attributes: canonical_url (str): - [Output Only] Unique identifier for the network; defined by - the server. + Output only. [Output Only] Unique identifier for the + network; defined by the server. This field is a member of `oneof`_ ``_canonical_url``. url (str): @@ -94126,7 +109061,7 @@ class PartnerMetadata(proto.Message): partner_metadata (MutableMapping[str, google.cloud.compute_v1beta.types.StructuredEntries]): Partner Metadata assigned to the instance. A map from a subdomain to entries map. Subdomain - name must be compliant with RFC1035 definition. + name must be compliant withRFC1035 definition. The total size of all keys and values must be less than 2MB. Subdomain 'metadata.compute.googleapis.com' is reserverd @@ -94168,17 +109103,21 @@ class PatchAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94228,17 +109167,21 @@ class PatchAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -94289,17 +109232,21 @@ class PatchBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94343,17 +109290,21 @@ class PatchBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94396,15 +109347,18 @@ class PatchCrossSiteNetworkRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -94467,17 +109421,21 @@ class PatchDiskSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -94531,17 +109489,21 @@ class PatchFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94581,17 +109543,21 @@ class PatchFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94637,17 +109603,21 @@ class PatchForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94695,17 +109665,21 @@ class PatchGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94750,17 +109724,21 @@ class PatchGlobalPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94804,17 +109782,21 @@ class PatchHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94858,17 +109840,21 @@ class PatchImageRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -94912,22 +109898,26 @@ class PatchInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the managed instance group. + The name of the zone where + you want to create the managed instance group. """ instance_group_manager: str = proto.Field( @@ -94971,17 +109961,21 @@ class PatchInstanceSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -95038,15 +110032,18 @@ class PatchInterconnectAttachmentGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95102,17 +110099,21 @@ class PatchInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95160,15 +110161,18 @@ class PatchInterconnectGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95222,17 +110226,21 @@ class PatchInterconnectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95278,15 +110286,18 @@ class PatchNetworkAttachmentRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -95341,17 +110352,21 @@ class PatchNetworkEdgeSecurityServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -95414,17 +110429,21 @@ class PatchNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95468,17 +110487,21 @@ class PatchNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95522,17 +110545,21 @@ class PatchNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -95576,17 +110603,21 @@ class PatchOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -95643,17 +110674,21 @@ class PatchPacketMirroringRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95704,17 +110739,21 @@ class PatchPacketMirroringRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95764,17 +110803,21 @@ class PatchPacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -95823,17 +110866,21 @@ class PatchPartnerMetadataInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -95874,8 +110921,8 @@ class PatchPerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_patch_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersPatchPerInstanceConfigsReq): The body resource for this request project (str): @@ -95885,23 +110932,27 @@ class PatchPerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -95938,8 +110989,8 @@ class PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. region (str): @@ -95952,17 +111003,21 @@ class PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96011,17 +111066,21 @@ class PatchPublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96068,17 +111127,21 @@ class PatchPublicDelegatedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96130,17 +111193,21 @@ class PatchRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96170,6 +111237,67 @@ class PatchRegionAutoscalerRequest(proto.Message): ) +class PatchRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.Patch. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + backend_bucket (str): + Name of the BackendBucket resource to patch. + backend_bucket_resource (google.cloud.compute_v1beta.types.BackendBucket): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. Specify a + unique request ID so that if you must retry your request, + the server will know to ignore the request if it has already + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: + MixerMutationRequestBuilder + + This field is a member of `oneof`_ ``_request_id``. + """ + + backend_bucket: str = proto.Field( + proto.STRING, + number=91714037, + ) + backend_bucket_resource: "BackendBucket" = proto.Field( + proto.MESSAGE, + number=380757784, + message="BackendBucket", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.Patch. See the method description for details. @@ -96191,17 +111319,21 @@ class PatchRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96230,6 +111362,72 @@ class PatchRegionBackendServiceRequest(proto.Message): ) +class PatchRegionCompositeHealthCheckRequest(proto.Message): + r"""A request message for RegionCompositeHealthChecks.Patch. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + composite_health_check (str): + Name of the CompositeHealthCheck to update. + The name must be 1-63 characters long, and + comply with RFC1035. + composite_health_check_resource (google.cloud.compute_v1beta.types.CompositeHealthCheck): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + composite_health_check: str = proto.Field( + proto.STRING, + number=466984989, + ) + composite_health_check_resource: "CompositeHealthCheck" = proto.Field( + proto.MESSAGE, + number=132195824, + message="CompositeHealthCheck", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionDiskSettingRequest(proto.Message): r"""A request message for RegionDiskSettings.Patch. See the method description for details. @@ -96249,17 +111447,21 @@ class PatchRegionDiskSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -96294,6 +111496,72 @@ class PatchRegionDiskSettingRequest(proto.Message): ) +class PatchRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for RegionHealthAggregationPolicies.Patch. + See the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + health_aggregation_policy (str): + Name of the HealthAggregationPolicy to + update. The name must be 1-63 characters long, + and comply with RFC1035. + health_aggregation_policy_resource (google.cloud.compute_v1beta.types.HealthAggregationPolicy): + The body resource for this request + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + health_aggregation_policy: str = proto.Field( + proto.STRING, + number=240314354, + ) + health_aggregation_policy_resource: "HealthAggregationPolicy" = proto.Field( + proto.MESSAGE, + number=293526971, + message="HealthAggregationPolicy", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class PatchRegionHealthCheckRequest(proto.Message): r"""A request message for RegionHealthChecks.Patch. See the method description for details. @@ -96315,17 +111583,21 @@ class PatchRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96377,17 +111649,21 @@ class PatchRegionHealthCheckServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96439,17 +111715,21 @@ class PatchRegionHealthSourceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96499,17 +111779,21 @@ class PatchRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96559,17 +111843,21 @@ class PatchRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96620,17 +111908,21 @@ class PatchRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -96676,17 +111968,21 @@ class PatchRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -96746,17 +112042,21 @@ class PatchRegionSnapshotSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_settings_resource (google.cloud.compute_v1beta.types.SnapshotSettings): @@ -96810,17 +112110,21 @@ class PatchRegionSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -96872,17 +112176,21 @@ class PatchRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -96980,17 +112288,21 @@ class PatchResourcePolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource_policy (str): @@ -97050,17 +112362,21 @@ class PatchRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route_policy_resource (google.cloud.compute_v1beta.types.RoutePolicy): @@ -97111,17 +112427,21 @@ class PatchRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -97175,17 +112495,21 @@ class PatchRuleFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97234,17 +112558,21 @@ class PatchRuleNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97291,17 +112619,21 @@ class PatchRuleOrganizationSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -97367,17 +112699,21 @@ class PatchRuleRegionNetworkFirewallPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -97550,17 +112886,21 @@ class PatchSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy (str): @@ -97617,17 +112957,21 @@ class PatchServiceAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. service_attachment (str): @@ -97678,17 +113022,21 @@ class PatchSnapshotSettingRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. snapshot_settings_resource (google.cloud.compute_v1beta.types.SnapshotSettings): @@ -97736,17 +113084,21 @@ class PatchSslPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy (str): @@ -97790,12 +113142,14 @@ class PatchSubnetworkRequest(proto.Message): the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following - conditions are true: - the subnetwork being patched has - purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork - being patched has role = BACKUP - the patch request is - setting the role to ACTIVE. Note that after this patch - operation the roles of the ACTIVE and BACKUP subnetworks - will be swapped. + conditions are true: + + - the subnetwork being patched has purpose = + INTERNAL_HTTPS_LOAD_BALANCER + - the subnetwork being patched has role = BACKUP + - the patch request is setting the role to ACTIVE. Note that + after this patch operation the roles of the ACTIVE and + BACKUP subnetworks will be swapped. This field is a member of `oneof`_ ``_drain_timeout_seconds``. project (str): @@ -97807,17 +113161,21 @@ class PatchSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -97870,17 +113228,21 @@ class PatchTargetGrpcProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_grpc_proxy (str): @@ -97925,17 +113287,21 @@ class PatchTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -97980,17 +113346,21 @@ class PatchTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -98050,17 +113420,21 @@ class PatchTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -98109,17 +113483,21 @@ class PatchUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map (str): @@ -98164,15 +113542,18 @@ class PatchWireGroupRequest(proto.Message): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already - been completed. For example, consider a situation where you - make an initial request and the request times out. If you - make the request again with the same request ID, the server - can check if original operation with the same request ID was - received, and if so, will ignore the second request. This - prevents clients from accidentally creating duplicate - commitments. The request ID must be a valid UUID with the - exception that zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). end_interface: + been completed. + + For example, consider a situation where you make an initial + request and the request times out. If you make the request + again with the same request ID, the server can check if + original operation with the same request ID was received, + and if so, will ignore the second request. This prevents + clients from accidentally creating duplicate commitments. + + The request ID must be a valid UUID with the exception that + zero UUID is not supported + (00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder This field is a member of `oneof`_ ``_request_id``. @@ -98237,38 +113618,50 @@ class PathMatcher(proto.Message): Attributes: default_custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): defaultCustomErrorResponsePolicy specifies how the Load - Balancer returns error responses when BackendServiceor - BackendBucket responds with an error. This policy takes - effect at the PathMatcher level and applies only when no - policy has been defined for the error code at lower levels - like RouteRule and PathRule within this PathMatcher. If an - error code does not have a policy defined in - defaultCustomErrorResponsePolicy, then a policy defined for - the error code in UrlMap.defaultCustomErrorResponsePolicy - takes effect. For example, consider a UrlMap with the - following configuration: - - UrlMap.defaultCustomErrorResponsePolicy is configured with - policies for 5xx and 4xx errors - A RouteRule for - /coming_soon/ is configured for the error code 404. If the - request is for www.myotherdomain.com and a 404 is - encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - RouteRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. When used in conjunction with - pathMatcher.defaultRouteAction.retryPolicy, retries take - precedence. Only once all retries are exhausted, the - defaultCustomErrorResponsePolicy is applied. While + Balancer returns error responses when + BackendServiceorBackendBucket responds with an error. + + This policy takes effect at the PathMatcher level and + applies only when no policy has been defined for the error + code at lower levels likeRouteRule and PathRule within + thisPathMatcher. If an error code does not have a policy + defined in defaultCustomErrorResponsePolicy, then a policy + defined for the error code in + UrlMap.defaultCustomErrorResponsePolicy takes effect. + + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy is configured + with policies for 5xx and 4xx errors + - A RouteRule for /coming_soon/ is configured for the + error code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in RouteRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + When used in conjunction + withpathMatcher.defaultRouteAction.retryPolicy, retries take + precedence. Only once all retries are exhausted, + thedefaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to - the client. defaultCustomErrorResponsePolicy is supported - only for global external Application Load Balancers. + the client. + + defaultCustomErrorResponsePolicy is supported only for + global external Application Load Balancers. This field is a member of `oneof`_ ``_default_custom_error_response_policy``. default_route_action (google.cloud.compute_v1beta.types.HttpRouteAction): @@ -98277,41 +113670,56 @@ class PathMatcher(proto.Message): balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected - backend. Only one of defaultUrlRedirect, - defaultService or - defaultRouteAction.weightedBackendService can be - set. URL maps for classic Application Load - Balancers only support the urlRewrite action - within a path matcher's defaultRouteAction. + backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + URL maps for classic Application Load Balancers + only support the urlRewrite action within a path + matcher'sdefaultRouteAction. This field is a member of `oneof`_ ``_default_route_action``. default_service (str): The full or partial URL to the BackendService resource. This - URL is used if none of the pathRules or routeRules defined - by this PathMatcher are matched. For example, the following - are all valid URLs to a BackendService resource: - - https://www.googleapis.com/compute/v1/projects/project - /global/backendServices/backendService - - compute/v1/projects/project/global/backendServices/backendService - - global/backendServices/backendService If - defaultRouteAction is also specified, advanced routing + URL is used if none of the pathRules orrouteRules defined by + this PathMatcher are matched. For example, the following are + all valid URLs to a BackendService resource: + + :: + + - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService + - compute/v1/projects/project/global/backendServices/backendService + - global/backendServices/backendService + + If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending - the request to the backend. Only one of defaultUrlRedirect, - defaultService or defaultRouteAction.weightedBackendService - can be set. Authorization requires one or more of the - following Google IAM permissions on the specified resource - default_service: - compute.backendBuckets.use - - compute.backendServices.use + the request to the backend. + + Only one of defaultUrlRedirect, defaultService or + defaultRouteAction.weightedBackendService can be set. + + Authorization requires one or more of the following Google + IAM permissions on the specified resource default_service: + + :: + + - compute.backendBuckets.use + - compute.backendServices.use This field is a member of `oneof`_ ``_default_service``. default_url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): - When none of the specified pathRules or - routeRules match, the request is redirected to a - URL specified by defaultUrlRedirect. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. Not supported when the URL map is bound to - a target gRPC proxy. + When none of the specified pathRules + orrouteRules match, the request is redirected to + a URL specified by defaultUrlRedirect. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_default_url_redirect``. description (str): @@ -98323,40 +113731,50 @@ class PathMatcher(proto.Message): header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backend service. HeaderAction specified - here are applied after the matching - HttpRouteRule HeaderAction and before the - HeaderAction in the UrlMap HeaderAction is not - supported for load balancers that have their - loadBalancingScheme set to EXTERNAL. Not - supported when the URL map is bound to a target - gRPC proxy that has validateForProxyless field - set to true. + selected backend service. + + HeaderAction specified here are applied after + the matchingHttpRouteRule HeaderAction and + before theHeaderAction in the UrlMap + + HeaderAction is not supported for load balancers + that have + their loadBalancingScheme set to EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. name (str): The name to which this PathMatcher is - referred by the HostRule. + referred by theHostRule. This field is a member of `oneof`_ ``_name``. path_rules (MutableSequence[google.cloud.compute_v1beta.types.PathRule]): The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's - required. The order by which path rules are specified does - not matter. Matches are always done on the - longest-path-first basis. For example: a pathRule with a - path /a/b/c/\* will match before /a/b/\* irrespective of the - order in which those paths appear in this list. Within a - given pathMatcher, only one of pathRules or routeRules must - be set. + required. A path rule can only include a wildcard character + (\*) after a forward slash character ("/"). + + The order by which path rules are specified does not matter. + Matches are always done on the longest-path-first basis. + + For example: a pathRule with a path /a/b/c/\* will match + before /a/b/\* irrespective of the order in which those + paths appear in this list. + + Within a given pathMatcher, only one ofpathRules or + routeRules must be set. route_rules (MutableSequence[google.cloud.compute_v1beta.types.HttpRouteRule]): The list of HTTP route rules. Use this list - instead of pathRules when advanced route - matching and routing actions are desired. - routeRules are evaluated in order of priority, - from the lowest to highest number. Within a - given pathMatcher, you can set only one of - pathRules or routeRules. + instead ofpathRules when advanced route matching + and routing actions are desired. routeRules are + evaluated in order of priority, from the lowest + to highest number. + + Within a given pathMatcher, you can set only one + ofpathRules or routeRules. """ default_custom_error_response_policy: "CustomErrorResponsePolicy" = proto.Field( @@ -98412,7 +113830,7 @@ class PathMatcher(proto.Message): class PathRule(proto.Message): r"""A path-matching rule for a URL. If matched, will use the - specified BackendService to handle the traffic arriving at this + specifiedBackendService to handle the traffic arriving at this URL. @@ -98421,29 +113839,41 @@ class PathRule(proto.Message): Attributes: custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): customErrorResponsePolicy specifies how the Load Balancer - returns error responses when BackendServiceor BackendBucket - responds with an error. If a policy for an error code is not - configured for the PathRule, a policy for the error code - configured in pathMatcher.defaultCustomErrorResponsePolicy - is applied. If one is not specified in - pathMatcher.defaultCustomErrorResponsePolicy, the policy + returns error responses when BackendServiceorBackendBucket + responds with an error. + + If a policy for an error code is not configured for the + PathRule, a policy for the error code configured + inpathMatcher.defaultCustomErrorResponsePolicy is applied. + If one is not specified + inpathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes - effect. For example, consider a UrlMap with the following - configuration: - UrlMap.defaultCustomErrorResponsePolicy are - configured with policies for 5xx and 4xx errors - A PathRule - for /coming_soon/ is configured for the error code 404. If - the request is for www.myotherdomain.com and a 404 is - encountered, the policy under - UrlMap.defaultCustomErrorResponsePolicy takes effect. If a - 404 response is encountered for the request - www.example.com/current_events/, the pathMatcher's policy - takes effect. If however, the request for - www.example.com/coming_soon/ encounters a 404, the policy in - PathRule.customErrorResponsePolicy takes effect. If any of - the requests in this example encounter a 500 error code, the - policy at UrlMap.defaultCustomErrorResponsePolicy takes - effect. customErrorResponsePolicy is supported only for - global external Application Load Balancers. + effect. + + For example, consider a UrlMap with the following + configuration: + + :: + + - UrlMap.defaultCustomErrorResponsePolicy are configured + with policies for 5xx and 4xx errors + - A PathRule for /coming_soon/ is configured for the error + code 404. + + If the request is for www.myotherdomain.com and a404 is + encountered, the policy + underUrlMap.defaultCustomErrorResponsePolicy takes effect. + If a404 response is encountered for the + requestwww.example.com/current_events/, the pathMatcher's + policy takes effect. If however, the request + forwww.example.com/coming_soon/ encounters a 404, the policy + in PathRule.customErrorResponsePolicy takes effect. If any + of the requests in this example encounter a 500 error code, + the policy atUrlMap.defaultCustomErrorResponsePolicy takes + effect. + + customErrorResponsePolicy is supported only for global + external Application Load Balancers. This field is a member of `oneof`_ ``_custom_error_response_policy``. paths (MutableSequence[str]): @@ -98457,11 +113887,14 @@ class PathRule(proto.Message): balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected - backend. Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + URL maps for classic Application Load Balancers only support the urlRewrite action within a path - rule's routeAction. + rule'srouteAction. This field is a member of `oneof`_ ``_route_action``. service (str): @@ -98470,16 +113903,19 @@ class PathRule(proto.Message): this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request - to the backend. Only one of urlRedirect, service - or routeAction.weightedBackendService can be - set. + to the backend. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. This field is a member of `oneof`_ ``_service``. url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. - Only one of urlRedirect, service or - routeAction.weightedBackendService can be set. + + Only one of urlRedirect, service + orrouteAction.weightedBackendService can be set. + Not supported when the URL map is bound to a target gRPC proxy. @@ -98570,7 +114006,7 @@ class Status(proto.Enum): The per-instance configuration is being applied to the instance, but is not yet effective, possibly waiting for the instance to, - for example, REFRESH. + for example,REFRESH. DELETING (528602024): The per-instance configuration deletion is being applied on the instance, possibly waiting @@ -98638,17 +114074,21 @@ class PerformMaintenanceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -98693,17 +114133,21 @@ class PerformMaintenanceNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -98749,25 +114193,31 @@ class PerformMaintenanceReservationBlockRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. reservation_block (str): - The name of the reservation block. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation block. + Name should conform to RFC1035 or be a resource + ID. reservations_blocks_perform_maintenance_request_resource (google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest): The body resource for this request zone (str): @@ -98818,22 +114268,27 @@ class PerformMaintenanceReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): - The name of the reservation. Name should - conform to RFC1035 or be a resource ID. + The name of the reservation. + Name should conform to RFC1035 or be a resource + ID. reservations_perform_maintenance_request_resource (google.cloud.compute_v1beta.types.ReservationsPerformMaintenanceRequest): The body resource for this request zone (str): @@ -98885,22 +114340,27 @@ class PerformMaintenanceReservationSubBlockRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. zone (str): Name of the zone for this request. Zone name should conform to RFC1035. @@ -98931,23 +114391,75 @@ class PerformMaintenanceReservationSubBlockRequest(proto.Message): class Policy(proto.Message): r"""An Identity and Access Management (IAM) policy, which specifies - access controls for Google Cloud resources. A ``Policy`` is a - collection of ``bindings``. A ``binding`` binds one or more - ``members``, or principals, to a single ``role``. Principals can be - user accounts, service accounts, Google groups, and domains (such as - G Suite). A ``role`` is a named list of permissions; each ``role`` - can be an IAM predefined role or a user-created custom role. For - some types of Google Cloud resources, a ``binding`` can also specify - a ``condition``, which is a logical expression that allows access to - a resource only if the expression evaluates to ``true``. A condition - can add constraints based on attributes of the request, the - resource, or both. To learn which resources support conditions in - their IAM policies, see the `IAM + access controls for Google Cloud resources. + + A ``Policy`` is a collection of ``bindings``. A ``binding`` binds + one or more ``members``, or principals, to a single ``role``. + Principals can be user accounts, service accounts, Google groups, + and domains (such as G Suite). A ``role`` is a named list of + permissions; each ``role`` can be an IAM predefined role or a + user-created custom role. + + For some types of Google Cloud resources, a ``binding`` can also + specify a ``condition``, which is a logical expression that allows + access to a resource only if the expression evaluates to ``true``. A + condition can add constraints based on attributes of the request, + the resource, or both. To learn which resources support conditions + in their IAM policies, see the `IAM documentation `__. + **JSON example:** - ``{ "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }`` + + :: + + { + "bindings": [ + { + "role": "roles/resourcemanager.organizationAdmin", + "members": [ + "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + }, + { + "role": "roles/resourcemanager.organizationViewer", + "members": [ + "user:eve@example.com" + ], + "condition": { + "title": "expirable access", + "description": "Does not grant access after Sep 2020", + "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + } + } + ], + "etag": "BwWWja0YfJA=", + "version": 3 + } + **YAML example:** - ``bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3`` + + :: + + bindings: + - members: + - user:mike@example.com + - group:admins@example.com + - domain:google.com + - serviceAccount:my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin + - members: + - user:eve@example.com + role: roles/resourcemanager.organizationViewer + condition: + title: expirable access + description: Does not grant access after Sep 2020 + expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + etag: BwWWja0YfJA= + version: 3 + For a description of IAM and its features, see the `IAM documentation `__. @@ -98962,8 +114474,9 @@ class Policy(proto.Message): Associates a list of ``members``, or principals, with a ``role``. Optionally, may specify a ``condition`` that determines how and when the ``bindings`` are applied. Each - of the ``bindings`` must contain at least one principal. The - ``bindings`` in a ``Policy`` can refer to up to 1,500 + of the ``bindings`` must contain at least one principal. + + The ``bindings`` in a ``Policy`` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the ``bindings`` grant 50 different @@ -98980,6 +114493,7 @@ class Policy(proto.Message): ``getIamPolicy``, and systems are expected to put that etag in the request to ``setIamPolicy`` to ensure that their change will be applied to the same version of the policy. + **Important:** If you use IAM Conditions, you must include the ``etag`` field whenever you call ``setIamPolicy``. If you omit this field, then IAM allows you to overwrite a @@ -98991,25 +114505,33 @@ class Policy(proto.Message): This field is a member of `oneof`_ ``_iam_owned``. version (int): - Specifies the format of the policy. Valid values are ``0``, - ``1``, and ``3``. Requests that specify an invalid value are - rejected. Any operation that affects conditional role - bindings must specify version ``3``. This requirement - applies to the following operations: \* Getting a policy - that includes a conditional role binding \* Adding a - conditional role binding to a policy \* Changing a - conditional role binding in a policy \* Removing any role - binding, with or without a condition, from a policy that - includes conditions **Important:** If you use IAM - Conditions, you must include the ``etag`` field whenever you - call ``setIamPolicy``. If you omit this field, then IAM - allows you to overwrite a version ``3`` policy with a - version ``1`` policy, and all of the conditions in the - version ``3`` policy are lost. If a policy does not include - any conditions, operations on that policy may specify any - valid version or leave the field unset. To learn which - resources support conditions in their IAM policies, see the - `IAM + Specifies the format of the policy. + + Valid values are ``0``, ``1``, and ``3``. Requests that + specify an invalid value are rejected. + + Any operation that affects conditional role bindings must + specify version ``3``. This requirement applies to the + following operations: + + - Getting a policy that includes a conditional role binding + - Adding a conditional role binding to a policy + - Changing a conditional role binding in a policy + - Removing any role binding, with or without a condition, + from a policy that includes conditions + + **Important:** If you use IAM Conditions, you must include + the ``etag`` field whenever you call ``setIamPolicy``. If + you omit this field, then IAM allows you to overwrite a + version ``3`` policy with a version ``1`` policy, and all of + the conditions in the version ``3`` policy are lost. + + If a policy does not include any conditions, operations on + that policy may specify any valid version or leave the field + unset. + + To learn which resources support conditions in their IAM + policies, see the `IAM documentation `__. This field is a member of `oneof`_ ``_version``. @@ -99124,8 +114646,8 @@ class PreservedStatePreservedDisk(proto.Message): This field is a member of `oneof`_ ``_auto_delete``. mode (str): - The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the + The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values. @@ -99158,8 +114680,8 @@ class AutoDelete(proto.Enum): ON_PERMANENT_INSTANCE_DELETION = 95727719 class Mode(proto.Enum): - r"""The mode in which to attach this disk, either READ_WRITE or - READ_ONLY. If not specified, the default is to attach the disk in + r"""The mode in which to attach this disk, either READ_WRITE + orREAD_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Values: @@ -99171,8 +114693,8 @@ class Mode(proto.Enum): can use a disk in READ_ONLY mode at a time. READ_WRITE (173607894): *[Default]* Attaches this disk in READ_WRITE mode. Only one - VM instance at a time can be attached to a disk in - READ_WRITE mode. + VM instance at a time can be attached to a disk inREAD_WRITE + mode. """ UNDEFINED_MODE = 0 READ_ONLY = 91950261 @@ -99208,8 +114730,9 @@ class PreservedStatePreservedNetworkIp(proto.Message): configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group - is deleted. Check the AutoDelete enum for the - list of possible values. + is deleted. + Check the AutoDelete enum for the list of + possible values. This field is a member of `oneof`_ ``_auto_delete``. ip_address (google.cloud.compute_v1beta.types.PreservedStatePreservedNetworkIpIpAddress): @@ -99220,10 +114743,10 @@ class PreservedStatePreservedNetworkIp(proto.Message): class AutoDelete(proto.Enum): r"""These stateful IPs will never be released during autohealing, - update or VM instance recreate operations. This flag is used to - configure if the IP reservation should be deleted after it is no - longer used by the group, e.g. when the given instance or the - whole group is deleted. + update or VM instance recreate operations. + This flag is used to configure if the IP reservation should be + deleted after it is no longer used by the group, e.g. when the + given instance or the whole group is deleted. Values: UNDEFINED_AUTO_DELETE (0): @@ -99294,20 +114817,21 @@ class PreviewFeature(proto.Message): This field is a member of `oneof`_ ``_activation_status``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): - [Output Only] Description of the feature. + Output only. [Output Only] Description of the feature. This field is a member of `oneof`_ ``_description``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] The type of the feature. Always + Output only. [Output only] The type of the feature. Always "compute#previewFeature" for preview features. This field is a member of `oneof`_ ``_kind``. @@ -99320,11 +114844,12 @@ class PreviewFeature(proto.Message): This field is a member of `oneof`_ ``_rollout_operation``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. status (google.cloud.compute_v1beta.types.PreviewFeatureStatus): - [Output only] Status of the feature. + Output only. [Output only] Status of the feature. This field is a member of `oneof`_ ``_status``. """ @@ -99416,19 +114941,20 @@ class PreviewFeatureList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -99504,9 +115030,12 @@ class PreviewFeatureRolloutOperationRolloutInput(proto.Message): Attributes: name (str): - The name of the rollout plan Ex. + The name of the rollout plan + Ex. organizations//locations/global/rolloutPlans/ - Ex. folders//locations/global/rolloutPlans/ Ex. + Ex. + folders//locations/global/rolloutPlans/ + Ex. projects//locations/global/rolloutPlans/. This field is a member of `oneof`_ ``_name``. @@ -99564,12 +115093,12 @@ class PreviewFeatureStatus(proto.Message): Attributes: description (str): - [Output Only] The description of the feature. + Output only. [Output Only] The description of the feature. This field is a member of `oneof`_ ``_description``. help_link (str): - [Output Only] Link to the public documentation for the - feature. + Output only. [Output Only] Link to the public documentation + for the feature. This field is a member of `oneof`_ ``_help_link``. release_status (google.cloud.compute_v1beta.types.PreviewFeatureStatusReleaseStatus): @@ -99602,8 +115131,8 @@ class PreviewFeatureStatusReleaseStatus(proto.Message): Attributes: stage (str): - [Output Only] The stage of the feature. Check the Stage enum - for the list of possible values. + Output only. [Output Only] The stage of the feature. Check + the Stage enum for the list of possible values. This field is a member of `oneof`_ ``_stage``. update_date (google.cloud.compute_v1beta.types.Date): @@ -99614,7 +115143,7 @@ class PreviewFeatureStatusReleaseStatus(proto.Message): """ class Stage(proto.Enum): - r"""[Output Only] The stage of the feature. + r"""Output only. [Output Only] The stage of the feature. Values: UNDEFINED_STAGE (0): @@ -99686,20 +115215,24 @@ class PreviewRouterRequest(proto.Message): class Project(proto.Message): - r"""Represents a Project resource. A project is used to organize - resources in a Google Cloud Platform environment. For more - information, read about the Resource Hierarchy. + r"""Represents a Project resource. + + A project is used to organize resources in a Google Cloud + Platform environment. For more information, read about the + Resource Hierarchy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: cloud_armor_tier (str): - [Output Only] The Cloud Armor tier for this project. It can - be one of the following values: CA_STANDARD, - CA_ENTERPRISE_PAYGO. If this field is not specified, it is - assumed to be CA_STANDARD. Check the CloudArmorTier enum for - the list of possible values. + Output only. [Output Only] The Cloud Armor tier for this + project. It can be one of the following values: + CA_STANDARD,CA_ENTERPRISE_PAYGO. + + If this field is not specified, it is assumed to + beCA_STANDARD. Check the CloudArmorTier enum for the list of + possible values. This field is a member of `oneof`_ ``_cloud_armor_tier``. common_instance_metadata (google.cloud.compute_v1beta.types.Metadata): @@ -99709,16 +115242,17 @@ class Project(proto.Message): This field is a member of `oneof`_ ``_common_instance_metadata``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. default_network_tier (str): This signifies the default network tier used for configuring resources of the project and can - only take the following values: PREMIUM, + only take the following values:PREMIUM, STANDARD. Initially the default network tier is - PREMIUM. Check the DefaultNetworkTier enum for - the list of possible values. + PREMIUM. + Check the DefaultNetworkTier enum for the list + of possible values. This field is a member of `oneof`_ ``_default_network_tier``. default_service_account (str): @@ -99742,16 +115276,18 @@ class Project(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always compute#project - for projects. + Output only. [Output Only] Type of the resource. Always + compute#project for projects. This field is a member of `oneof`_ ``_kind``. managed_protection_tier (str): - [Output Only] The Cloud Armor Managed Protection (CAMP) tier - for this project. It can be one of the following values: - CA_STANDARD, CAMP_PLUS_PAYGO. If this field is not - specified, it is assumed to be CA_STANDARD. Check the - ManagedProtectionTier enum for the list of possible values. + Output only. [Output Only] The Cloud Armor Managed + Protection (CAMP) tier for this project. It can be one of + the following values:CA_STANDARD, CAMP_PLUS_PAYGO. + + If this field is not specified, it is assumed to + beCA_STANDARD. Check the ManagedProtectionTier enum for the + list of possible values. This field is a member of `oneof`_ ``_managed_protection_tier``. name (str): @@ -99773,9 +115309,9 @@ class Project(proto.Message): This field is a member of `oneof`_ ``_usage_export_location``. vm_dns_setting (str): - [Output Only] Default internal DNS setting used by VMs - running in this project. Check the VmDnsSetting enum for the - list of possible values. + Output only. [Output Only] Default internal DNS setting used + by VMs running in this project. Check the VmDnsSetting enum + for the list of possible values. This field is a member of `oneof`_ ``_vm_dns_setting``. xpn_project_status (str): @@ -99789,11 +115325,12 @@ class Project(proto.Message): """ class CloudArmorTier(proto.Enum): - r"""[Output Only] The Cloud Armor tier for this project. It can be one - of the following values: CA_STANDARD, CA_ENTERPRISE_PAYGO. If this - field is not specified, it is assumed to be CA_STANDARD. Additional - supported values which may be not listed in the enum directly due to - technical reasons: CA_STANDARD + r"""Output only. [Output Only] The Cloud Armor tier for this project. It + can be one of the following values: CA_STANDARD,CA_ENTERPRISE_PAYGO. + + If this field is not specified, it is assumed to beCA_STANDARD. + Additional supported values which may be not listed in the enum + directly due to technical reasons: CA_STANDARD Values: UNDEFINED_CLOUD_ARMOR_TIER (0): @@ -99813,8 +115350,8 @@ class CloudArmorTier(proto.Enum): class DefaultNetworkTier(proto.Enum): r"""This signifies the default network tier used for configuring - resources of the project and can only take the following values: - PREMIUM, STANDARD. Initially the default network tier is + resources of the project and can only take the following + values:PREMIUM, STANDARD. Initially the default network tier is PREMIUM. Values: @@ -99840,11 +115377,13 @@ class DefaultNetworkTier(proto.Enum): STANDARD_OVERRIDES_FIXED_STANDARD = 465847234 class ManagedProtectionTier(proto.Enum): - r"""[Output Only] The Cloud Armor Managed Protection (CAMP) tier for - this project. It can be one of the following values: CA_STANDARD, - CAMP_PLUS_PAYGO. If this field is not specified, it is assumed to be - CA_STANDARD. Additional supported values which may be not listed in - the enum directly due to technical reasons: CA_STANDARD + r"""Output only. [Output Only] The Cloud Armor Managed Protection (CAMP) + tier for this project. It can be one of the following + values:CA_STANDARD, CAMP_PLUS_PAYGO. + + If this field is not specified, it is assumed to beCA_STANDARD. + Additional supported values which may be not listed in the enum + directly due to technical reasons: CA_STANDARD Values: UNDEFINED_MANAGED_PROTECTION_TIER (0): @@ -99860,8 +115399,8 @@ class ManagedProtectionTier(proto.Enum): CAMP_PLUS_PAYGO = 165150985 class VmDnsSetting(proto.Enum): - r"""[Output Only] Default internal DNS setting used by VMs running in - this project. + r"""Output only. [Output Only] Default internal DNS setting used by VMs + running in this project. Values: UNDEFINED_VM_DNS_SETTING (0): @@ -100030,18 +115569,18 @@ class ProjectsGetXpnResources(proto.Message): Attributes: kind (str): - [Output Only] Type of resource. Always - compute#projectsGetXpnResources for lists of service + Output only. [Output Only] Type of resource. + Alwayscompute#projectsGetXpnResources for lists of service resources (a.k.a service projects) This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. resources (MutableSequence[google.cloud.compute_v1beta.types.XpnResourceId]): @@ -100230,12 +115769,13 @@ class PublicAdvertisedPrefix(proto.Message): Attributes: byoip_api_version (str): - [Output Only] The version of BYOIP API. Check the - ByoipApiVersion enum for the list of possible values. + Output only. [Output Only] The version of BYOIP API. Check + the ByoipApiVersion enum for the list of possible values. This field is a member of `oneof`_ ``_byoip_api_version``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -100256,16 +115796,16 @@ class PublicAdvertisedPrefix(proto.Message): ignored when inserting a new PublicAdvertisedPrefix. An up-to-date fingerprint must be provided in order to update - the PublicAdvertisedPrefix, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - PublicAdvertisedPrefix. + thePublicAdvertisedPrefix, otherwise the request + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a PublicAdvertisedPrefix. This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. ip_cidr_range (str): @@ -100273,16 +115813,22 @@ class PublicAdvertisedPrefix(proto.Message): represented by this public advertised prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + The internet access type for IPv6 Public + Advertised Prefixes. Check the Ipv6AccessType + enum for the list of possible values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. kind (str): - [Output Only] Type of the resource. Always - compute#publicAdvertisedPrefix for public advertised + Output only. [Output Only] Type of the resource. + Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -100292,21 +115838,27 @@ class PublicAdvertisedPrefix(proto.Message): This field is a member of `oneof`_ ``_name``. pdp_scope (str): Specifies how child public delegated prefix will be scoped. - It could be one of following values: - ``REGIONAL``: The - public delegated prefix is regional only. The provisioning - will take a few minutes. - ``GLOBAL``: The public delegated - prefix is global only. The provisioning will take ~4 weeks. - - ``GLOBAL_AND_REGIONAL`` [output only]: The public - delegated prefixes is BYOIP V1 legacy prefix. This is output - only value and no longer supported in BYOIP V2. Check the - PdpScope enum for the list of possible values. + It could be one of following values: + + :: + + - `REGIONAL`: The public delegated prefix is regional only. The + provisioning will take a few minutes. + - `GLOBAL`: The public delegated prefix is global only. The + provisioning will take ~4 weeks. + - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is + BYOIP V1 legacy prefix. This is output only value and no longer + supported in BYOIP V2. + + Check the PdpScope enum for the list of possible values. This field is a member of `oneof`_ ``_pdp_scope``. public_delegated_prefixs (MutableSequence[google.cloud.compute_v1beta.types.PublicAdvertisedPrefixPublicDelegatedPrefix]): - [Output Only] The list of public delegated prefixes that - exist for this public advertised prefix. + Output only. [Output Only] The list of public delegated + prefixes that exist for this public advertised prefix. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. shared_secret (str): @@ -100316,21 +115868,26 @@ class PublicAdvertisedPrefix(proto.Message): This field is a member of `oneof`_ ``_shared_secret``. status (str): The status of the public advertised prefix. Possible values - include: - ``INITIAL``: RPKI validation is complete. - - ``PTR_CONFIGURED``: User has configured the PTR. - - ``VALIDATED``: Reverse DNS lookup is successful. - - ``REVERSE_DNS_LOOKUP_FAILED``: Reverse DNS lookup failed. - - ``PREFIX_CONFIGURATION_IN_PROGRESS``: The prefix is being - configured. - ``PREFIX_CONFIGURATION_COMPLETE``: The prefix - is fully configured. - ``PREFIX_REMOVAL_IN_PROGRESS``: The - prefix is being removed. Check the Status enum for the list - of possible values. + include: + + :: + + - `INITIAL`: RPKI validation is complete. + - `PTR_CONFIGURED`: User has configured the PTR. + - `VALIDATED`: Reverse DNS lookup is successful. + - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. + - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being + configured. + - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. + - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. """ class ByoipApiVersion(proto.Enum): - r"""[Output Only] The version of BYOIP API. + r"""Output only. [Output Only] The version of BYOIP API. Values: UNDEFINED_BYOIP_API_VERSION (0): @@ -100353,14 +115910,41 @@ class ByoipApiVersion(proto.Enum): V1 = 2715 V2 = 2716 + class Ipv6AccessType(proto.Enum): + r"""The internet access type for IPv6 Public Advertised Prefixes. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + Default IPv6 access type. The prefix will be + announced to the internet. All children Public + Delegated Prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The prefix will not be announced to the + internet. Prefix will be used privately within + Cloud. All children Public Delegated Prefixes + will have IPv6 access type as INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class PdpScope(proto.Enum): r"""Specifies how child public delegated prefix will be scoped. It could - be one of following values: - ``REGIONAL``: The public delegated - prefix is regional only. The provisioning will take a few minutes. - - ``GLOBAL``: The public delegated prefix is global only. The - provisioning will take ~4 weeks. - ``GLOBAL_AND_REGIONAL`` [output - only]: The public delegated prefixes is BYOIP V1 legacy prefix. This - is output only value and no longer supported in BYOIP V2. + be one of following values: + + :: + + - `REGIONAL`: The public delegated prefix is regional only. The + provisioning will take a few minutes. + - `GLOBAL`: The public delegated prefix is global only. The + provisioning will take ~4 weeks. + - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is + BYOIP V1 legacy prefix. This is output only value and no longer + supported in BYOIP V2. Values: UNDEFINED_PDP_SCOPE (0): @@ -100384,13 +115968,17 @@ class PdpScope(proto.Enum): class Status(proto.Enum): r"""The status of the public advertised prefix. Possible values include: - - ``INITIAL``: RPKI validation is complete. - ``PTR_CONFIGURED``: - User has configured the PTR. - ``VALIDATED``: Reverse DNS lookup is - successful. - ``REVERSE_DNS_LOOKUP_FAILED``: Reverse DNS lookup - failed. - ``PREFIX_CONFIGURATION_IN_PROGRESS``: The prefix is being - configured. - ``PREFIX_CONFIGURATION_COMPLETE``: The prefix is fully - configured. - ``PREFIX_REMOVAL_IN_PROGRESS``: The prefix is being - removed. + + :: + + - `INITIAL`: RPKI validation is complete. + - `PTR_CONFIGURED`: User has configured the PTR. + - `VALIDATED`: Reverse DNS lookup is successful. + - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. + - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being + configured. + - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. + - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. Values: UNDEFINED_STATUS (0): @@ -100462,6 +116050,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) kind: str = proto.Field( proto.STRING, number=3292052, @@ -100515,15 +116108,15 @@ class PublicAdvertisedPrefixList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.PublicAdvertisedPrefix]): A list of PublicAdvertisedPrefix resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicAdvertisedPrefix for public advertised + Output only. [Output Only] Type of the resource. + Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -100605,10 +116198,11 @@ class PublicAdvertisedPrefixPublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_region``. status (str): The status of the public delegated prefix. - Possible values are: INITIALIZING: The public + Possible values are: INITIALIZING: The public delegated prefix is being initialized and - addresses cannot be created yet. ANNOUNCED: The - public delegated prefix is active. + addresses cannot be created yet. + ANNOUNCED: The public delegated prefix is + active. This field is a member of `oneof`_ ``_status``. """ @@ -100661,12 +116255,13 @@ class PublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_allocatable_prefix_length``. byoip_api_version (str): - [Output Only] The version of BYOIP API. Check the - ByoipApiVersion enum for the list of possible values. + Output only. [Output Only] The version of BYOIP API. Check + the ByoipApiVersion enum for the list of possible values. This field is a member of `oneof`_ ``_byoip_api_version``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -100676,8 +116271,8 @@ class PublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_description``. enable_enhanced_ipv4_allocation (bool): - [Output Only] Whether this PDP supports enhanced IPv4 - allocations. Applicable for IPv4 PDPs only. + Output only. [Output Only] Whether this PDP supports + enhanced IPv4 allocations. Applicable for IPv4 PDPs only. This field is a member of `oneof`_ ``_enable_enhanced_ipv4_allocation``. fingerprint (str): @@ -100686,16 +116281,17 @@ class PublicDelegatedPrefix(proto.Message): used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint - must be provided in order to update the - PublicDelegatedPrefix, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve a PublicDelegatedPrefix. + must be provided in order to update + thePublicDelegatedPrefix, otherwise the request + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a PublicDelegatedPrefix. This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. ip_cidr_range (str): @@ -100703,13 +116299,21 @@ class PublicDelegatedPrefix(proto.Message): represented by this public delegated prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + Output only. [Output Only] The internet access type for IPv6 + Public Delegated Prefixes. Inherited from parent prefix. + Check the Ipv6AccessType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. is_live_migration (bool): If true, the prefix will be live migrated. This field is a member of `oneof`_ ``_is_live_migration``. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefix for public delegated prefixes. + Output only. [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefix for public delegated + prefixes. This field is a member of `oneof`_ ``_kind``. mode (str): @@ -100721,7 +116325,7 @@ class PublicDelegatedPrefix(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -100738,33 +116342,40 @@ class PublicDelegatedPrefix(proto.Message): The list of sub public delegated prefixes that exist for this public delegated prefix. region (str): - [Output Only] URL of the region where the public delegated - prefix resides. This field applies only to the region - resource. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + Output only. [Output Only] URL of the region where the + public delegated prefix resides. This field applies only to + the region resource. You must specify this field as part of + the HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. status (str): [Output Only] The status of the public delegated prefix, - which can be one of following values: - ``INITIALIZING`` The - public delegated prefix is being initialized and addresses - cannot be created yet. - ``READY_TO_ANNOUNCE`` The public - delegated prefix is a live migration prefix and is active. - - ``ANNOUNCED`` The public delegated prefix is announced and - ready to use. - ``DELETING`` The public delegated prefix is - being deprovsioned. Check the Status enum for the list of - possible values. + which can be one of following values: + + :: + + - `INITIALIZING` The public delegated prefix is being initialized and + addresses cannot be created yet. + - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration + prefix and is active. + - `ANNOUNCED` The public delegated prefix is announced and ready to + use. + - `DELETING` The public delegated prefix is being deprovsioned. + - `ACTIVE` The public delegated prefix is ready to use. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. """ class ByoipApiVersion(proto.Enum): - r"""[Output Only] The version of BYOIP API. + r"""Output only. [Output Only] The version of BYOIP API. Values: UNDEFINED_BYOIP_API_VERSION (0): @@ -100784,6 +116395,30 @@ class ByoipApiVersion(proto.Enum): V1 = 2715 V2 = 2716 + class Ipv6AccessType(proto.Enum): + r"""Output only. [Output Only] The internet access type for IPv6 Public + Delegated Prefixes. Inherited from parent prefix. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + The parent public advertised prefix will be + announced to the internet. All children public + delegated prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The parent public advertised prefix will not + be announced to the internet. Prefix will be + used privately within Cloud. All children public + delegated prefixes will have IPv6 access type as + INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class Mode(proto.Enum): r"""The public delegated prefix mode for IPv6 only. @@ -100798,30 +116433,50 @@ class Mode(proto.Enum): EXTERNAL_IPV6_FORWARDING_RULE_CREATION (398684356): The public delegated prefix is used for creating forwarding rules only. Such prefixes - cannot set publicDelegatedSubPrefixes. + cannot set publicDelegatedSubPrefixes. Parent + public delegated prefix must have IPv6 access + type as EXTERNAL. EXTERNAL_IPV6_SUBNETWORK_CREATION (61198284): The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + Parent public delegated prefix must have IPv6 + access type as EXTERNAL. + INTERNAL_IPV6_SUBNETWORK_CREATION (153239834): + The public delegated prefix is used for + creating dual stack or IPv6-only subnetwork with + internal access only. Such prefixes cannot set + publicDelegatedSubPrefixes and + allocatablePrefixLength. Parent public delegated + prefix must have IPv6 access type as INTERNAL. """ UNDEFINED_MODE = 0 DELEGATION = 264149288 EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 + INTERNAL_IPV6_SUBNETWORK_CREATION = 153239834 class Status(proto.Enum): r"""[Output Only] The status of the public delegated prefix, which can - be one of following values: - ``INITIALIZING`` The public delegated - prefix is being initialized and addresses cannot be created yet. - - ``READY_TO_ANNOUNCE`` The public delegated prefix is a live - migration prefix and is active. - ``ANNOUNCED`` The public delegated - prefix is announced and ready to use. - ``DELETING`` The public - delegated prefix is being deprovsioned. + be one of following values: + + :: + + - `INITIALIZING` The public delegated prefix is being initialized and + addresses cannot be created yet. + - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration + prefix and is active. + - `ANNOUNCED` The public delegated prefix is announced and ready to + use. + - `DELETING` The public delegated prefix is being deprovsioned. + - `ACTIVE` The public delegated prefix is ready to use. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. + ACTIVE (314733318): + The public delegated prefix is ready to use. ANNOUNCED (365103355): The public delegated prefix is announced and ready to use. @@ -100842,6 +116497,7 @@ class Status(proto.Enum): withdrawn but ready to be announced. """ UNDEFINED_STATUS = 0 + ACTIVE = 314733318 ANNOUNCED = 365103355 ANNOUNCED_TO_GOOGLE = 454875705 ANNOUNCED_TO_INTERNET = 177880897 @@ -100889,6 +116545,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) is_live_migration: bool = proto.Field( proto.BOOL, number=511823856, @@ -100953,15 +116614,15 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): A list of PublicDelegatedPrefixesScopedList resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefixAggregatedList for aggregated - lists of public delegated prefixes. + Output only. [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefixAggregatedList for + aggregated lists of public delegated prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -100972,7 +116633,7 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -101035,15 +116696,15 @@ class PublicDelegatedPrefixList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.PublicDelegatedPrefix]): A list of PublicDelegatedPrefix resources. kind (str): - [Output Only] Type of the resource. Always - compute#publicDelegatedPrefixList for public delegated + Output only. [Output Only] Type of the resource. + Alwayscompute#publicDelegatedPrefixList for public delegated prefixes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -101119,8 +116780,8 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix(proto.Message): This field is a member of `oneof`_ ``_description``. enable_enhanced_ipv4_allocation (bool): - [Output Only] Whether this PDP supports enhanced IPv4 - allocations. Applicable for IPv4 PDPs only. + Output only. [Output Only] Whether this PDP supports + enhanced IPv4 allocations. Applicable for IPv4 PDPs only. This field is a member of `oneof`_ ``_enable_enhanced_ipv4_allocation``. ip_cidr_range (str): @@ -101128,6 +116789,13 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix(proto.Message): represented by this sub public delegated prefix. This field is a member of `oneof`_ ``_ip_cidr_range``. + ipv6_access_type (str): + Output only. [Output Only] The internet access type for IPv6 + Public Delegated Sub Prefixes. Inherited from parent prefix. + Check the Ipv6AccessType enum for the list of possible + values. + + This field is a member of `oneof`_ ``_ipv6_access_type``. is_address (bool): Whether the sub prefix is delegated to create Address resources in the delegatee project. @@ -101144,17 +116812,43 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] The region of the sub public delegated prefix - if it is regional. If absent, the sub prefix is global. + Output only. [Output Only] The region of the sub public + delegated prefix if it is regional. If absent, the sub + prefix is global. This field is a member of `oneof`_ ``_region``. status (str): - [Output Only] The status of the sub public delegated prefix. - Check the Status enum for the list of possible values. + Output only. [Output Only] The status of the sub public + delegated prefix. Check the Status enum for the list of + possible values. This field is a member of `oneof`_ ``_status``. """ + class Ipv6AccessType(proto.Enum): + r"""Output only. [Output Only] The internet access type for IPv6 Public + Delegated Sub Prefixes. Inherited from parent prefix. + + Values: + UNDEFINED_IPV6_ACCESS_TYPE (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + The parent public advertised prefix will be + announced to the internet. All children public + delegated prefixes will have IPv6 access type as + EXTERNAL. + INTERNAL (279295677): + The parent public advertised prefix will not + be announced to the internet. Prefix will be + used privately within Cloud. All children public + delegated prefixes will have IPv6 access type as + INTERNAL. + """ + UNDEFINED_IPV6_ACCESS_TYPE = 0 + EXTERNAL = 35607499 + INTERNAL = 279295677 + class Mode(proto.Enum): r"""The PublicDelegatedSubPrefix mode for IPv6 only. @@ -101169,19 +116863,32 @@ class Mode(proto.Enum): EXTERNAL_IPV6_FORWARDING_RULE_CREATION (398684356): The public delegated prefix is used for creating forwarding rules only. Such prefixes - cannot set publicDelegatedSubPrefixes. + cannot set publicDelegatedSubPrefixes. Parent + public delegated prefix must have IPv6 access + type as EXTERNAL. EXTERNAL_IPV6_SUBNETWORK_CREATION (61198284): The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + Parent public delegated prefix must have IPv6 + access type as EXTERNAL. + INTERNAL_IPV6_SUBNETWORK_CREATION (153239834): + The public delegated prefix is used for + creating dual stack or IPv6-only subnetwork with + internal access only. Such prefixes cannot set + publicDelegatedSubPrefixes and + allocatablePrefixLength. Parent public delegated + prefix must have IPv6 access type as INTERNAL. """ UNDEFINED_MODE = 0 DELEGATION = 264149288 EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 + INTERNAL_IPV6_SUBNETWORK_CREATION = 153239834 class Status(proto.Enum): - r"""[Output Only] The status of the sub public delegated prefix. + r"""Output only. [Output Only] The status of the sub public delegated + prefix. Values: UNDEFINED_STATUS (0): @@ -101221,6 +116928,11 @@ class Status(proto.Enum): number=98117322, optional=True, ) + ipv6_access_type: str = proto.Field( + proto.STRING, + number=504658653, + optional=True, + ) is_address: bool = proto.Field( proto.BOOL, number=352617951, @@ -101811,743 +117523,1565 @@ class Metric(proto.Enum): VPN_TUNNELS = 104327296 XPN_SERVICE_PROJECTS = 95191981 - limit: float = proto.Field( - proto.DOUBLE, - number=102976443, + limit: float = proto.Field( + proto.DOUBLE, + number=102976443, + optional=True, + ) + metric: str = proto.Field( + proto.STRING, + number=533067184, + optional=True, + ) + owner: str = proto.Field( + proto.STRING, + number=106164915, + optional=True, + ) + usage: float = proto.Field( + proto.DOUBLE, + number=111574433, + optional=True, + ) + + +class QuotaExceededInfo(proto.Message): + r"""Additional details for quota exceeded error for resource + quota. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dimensions (MutableMapping[str, str]): + The map holding related quota dimensions. + future_limit (float): + Future quota limit being rolled out. The + limit's unit depends on the quota type or + metric. + + This field is a member of `oneof`_ ``_future_limit``. + limit (float): + Current effective quota limit. The limit's + unit depends on the quota type or metric. + + This field is a member of `oneof`_ ``_limit``. + limit_name (str): + The name of the quota limit. + + This field is a member of `oneof`_ ``_limit_name``. + metric_name (str): + The Compute Engine quota metric name. + + This field is a member of `oneof`_ ``_metric_name``. + rollout_status (str): + Rollout status of the future quota limit. + Check the RolloutStatus enum for the list of + possible values. + + This field is a member of `oneof`_ ``_rollout_status``. + """ + + class RolloutStatus(proto.Enum): + r"""Rollout status of the future quota limit. + + Values: + UNDEFINED_ROLLOUT_STATUS (0): + A value indicating that the enum field is not + set. + IN_PROGRESS (469193735): + IN_PROGRESS - A rollout is in process which will change the + limit value to future limit. + ROLLOUT_STATUS_UNSPECIFIED (26864568): + ROLLOUT_STATUS_UNSPECIFIED - Rollout status is not + specified. The default value. + """ + UNDEFINED_ROLLOUT_STATUS = 0 + IN_PROGRESS = 469193735 + ROLLOUT_STATUS_UNSPECIFIED = 26864568 + + dimensions: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=414334925, + ) + future_limit: float = proto.Field( + proto.DOUBLE, + number=456564287, + optional=True, + ) + limit: float = proto.Field( + proto.DOUBLE, + number=102976443, + optional=True, + ) + limit_name: str = proto.Field( + proto.STRING, + number=398197903, + optional=True, + ) + metric_name: str = proto.Field( + proto.STRING, + number=409881530, + optional=True, + ) + rollout_status: str = proto.Field( + proto.STRING, + number=476426816, + optional=True, + ) + + +class QuotaStatusWarning(proto.Message): + r"""Output only. [Output Only] Warning of fetching the ``quotas`` field + for this region. This field is populated only if fetching of the + ``quotas`` field fails. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + code (str): + [Output Only] A warning code, if applicable. For example, + Compute Engine returns NO_RESULTS_ON_PAGE if there are no + results in the response. Check the Code enum for the list of + possible values. + + This field is a member of `oneof`_ ``_code``. + data (MutableSequence[google.cloud.compute_v1beta.types.Data]): + [Output Only] Metadata about this warning in key: value + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } + message (str): + [Output Only] A human-readable description of the warning + code. + + This field is a member of `oneof`_ ``_message``. + """ + + class Code(proto.Enum): + r"""[Output Only] A warning code, if applicable. For example, Compute + Engine returns NO_RESULTS_ON_PAGE if there are no results in the + response. + + Values: + UNDEFINED_CODE (0): + A value indicating that the enum field is not + set. + CLEANUP_FAILED (150308440): + Warning about failed cleanup of transient + changes made by a failed operation. + DEPRECATED_RESOURCE_USED (391835586): + A link to a deprecated resource was created. + DEPRECATED_TYPE_USED (346526230): + When deploying and at least one of the + resources has a type marked as deprecated + DISK_SIZE_LARGER_THAN_IMAGE_SIZE (369442967): + The user created a boot disk that is larger + than image size. + EXPERIMENTAL_TYPE_USED (451954443): + When deploying and at least one of the + resources has a type marked as experimental + EXTERNAL_API_WARNING (175546307): + Warning that is present in an external api + call + FIELD_VALUE_OVERRIDEN (329669423): + Warning that value of a field has been + overridden. Deprecated unused field. + INJECTED_KERNELS_DEPRECATED (417377419): + The operation involved use of an injected + kernel, which is deprecated. + INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB (401542606): + A WEIGHTED_MAGLEV backend service is associated with a + health check that is not of type HTTP/HTTPS/HTTP2. + LARGE_DEPLOYMENT_WARNING (481440678): + When deploying a deployment with a + exceedingly large number of resources + LIST_OVERHEAD_QUOTA_EXCEED (47618117): + Resource can't be retrieved due to list + overhead quota exceed which captures the amount + of resources filtered out by user-defined list + filter. + MISSING_TYPE_DEPENDENCY (344505463): + A resource depends on a missing type + NEXT_HOP_ADDRESS_NOT_ASSIGNED (324964999): + The route's nextHopIp address is not assigned + to an instance on the network. + NEXT_HOP_CANNOT_IP_FORWARD (383382887): + The route's next hop instance cannot ip + forward. + NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE (146748434): + The route's nextHopInstance URL refers to an + instance that does not have an ipv6 interface on + the same network as the route. + NEXT_HOP_INSTANCE_NOT_FOUND (464250446): + The route's nextHopInstance URL refers to an + instance that does not exist. + NEXT_HOP_INSTANCE_NOT_ON_NETWORK (243758146): + The route's nextHopInstance URL refers to an + instance that is not on the same network as the + route. + NEXT_HOP_NOT_RUNNING (417081265): + The route's next hop instance does not have a + status of RUNNING. + NOT_CRITICAL_ERROR (105763924): + Error which is not critical. We decided to + continue the process despite the mentioned + error. + NO_RESULTS_ON_PAGE (30036744): + No results are present on a particular list + page. + PARTIAL_SUCCESS (39966469): + Success is reported, but some results may be + missing due to errors + QUOTA_INFO_UNAVAILABLE (304294182): + Quota information is not available to client + requests (e.g: regions.list). + REQUIRED_TOS_AGREEMENT (3745539): + The user attempted to use a resource that + requires a TOS they have not accepted. + RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING (496728641): + Warning that a resource is in use. + RESOURCE_NOT_DELETED (168598460): + One or more of the resources set to + auto-delete could not be deleted because they + were in use. + SCHEMA_VALIDATION_IGNORED (275245642): + When a resource schema validation is ignored. + SINGLE_INSTANCE_PROPERTY_TEMPLATE (268305617): + Instance template used in instance group + manager is valid as such, but its application + does not make a lot of sense, because it allows + only single instance in instance group. + UNDECLARED_PROPERTIES (390513439): + When undeclared properties in the schema are + present + UNREACHABLE (13328052): + A given scope cannot be reached. + """ + UNDEFINED_CODE = 0 + CLEANUP_FAILED = 150308440 + DEPRECATED_RESOURCE_USED = 391835586 + DEPRECATED_TYPE_USED = 346526230 + DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 369442967 + EXPERIMENTAL_TYPE_USED = 451954443 + EXTERNAL_API_WARNING = 175546307 + FIELD_VALUE_OVERRIDEN = 329669423 + INJECTED_KERNELS_DEPRECATED = 417377419 + INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB = 401542606 + LARGE_DEPLOYMENT_WARNING = 481440678 + LIST_OVERHEAD_QUOTA_EXCEED = 47618117 + MISSING_TYPE_DEPENDENCY = 344505463 + NEXT_HOP_ADDRESS_NOT_ASSIGNED = 324964999 + NEXT_HOP_CANNOT_IP_FORWARD = 383382887 + NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE = 146748434 + NEXT_HOP_INSTANCE_NOT_FOUND = 464250446 + NEXT_HOP_INSTANCE_NOT_ON_NETWORK = 243758146 + NEXT_HOP_NOT_RUNNING = 417081265 + NOT_CRITICAL_ERROR = 105763924 + NO_RESULTS_ON_PAGE = 30036744 + PARTIAL_SUCCESS = 39966469 + QUOTA_INFO_UNAVAILABLE = 304294182 + REQUIRED_TOS_AGREEMENT = 3745539 + RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING = 496728641 + RESOURCE_NOT_DELETED = 168598460 + SCHEMA_VALIDATION_IGNORED = 275245642 + SINGLE_INSTANCE_PROPERTY_TEMPLATE = 268305617 + UNDECLARED_PROPERTIES = 390513439 + UNREACHABLE = 13328052 + + code: str = proto.Field( + proto.STRING, + number=3059181, + optional=True, + ) + data: MutableSequence["Data"] = proto.RepeatedField( + proto.MESSAGE, + number=3076010, + message="Data", + ) + message: str = proto.Field( + proto.STRING, + number=418054151, + optional=True, + ) + + +class RawDisk(proto.Message): + r"""The parameters of the raw disk image. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + container_type (str): + The format used to encode and transmit the + block device, which should beTAR. This is just a + container and transmission format and not a + runtime format. Provided by the client when the + disk image is created. Check the ContainerType + enum for the list of possible values. + + This field is a member of `oneof`_ ``_container_type``. + sha1_checksum (str): + [Deprecated] This field is deprecated. An optional SHA1 + checksum of the disk image before unpackaging provided by + the client when the disk image is created. + + This field is a member of `oneof`_ ``_sha1_checksum``. + source (str): + The full Google Cloud Storage URL where the raw disk image + archive is stored. The following are valid formats for the + URL: + + :: + + - https://storage.googleapis.com/bucket_name/image_archive_name + - https://storage.googleapis.com/bucket_name/folder_name/image_archive_name + + In order to create an image, you must provide the full or + partial URL of one of the following: + + :: + + - The rawDisk.source URL + - The sourceDisk URL + - The sourceImage URL + - The sourceSnapshot URL + + This field is a member of `oneof`_ ``_source``. + """ + + class ContainerType(proto.Enum): + r"""The format used to encode and transmit the block device, + which should beTAR. This is just a container and transmission + format and not a runtime format. Provided by the client when the + disk image is created. + + Values: + UNDEFINED_CONTAINER_TYPE (0): + A value indicating that the enum field is not + set. + TAR (82821): + No description available. + """ + UNDEFINED_CONTAINER_TYPE = 0 + TAR = 82821 + + container_type: str = proto.Field( + proto.STRING, + number=318809144, + optional=True, + ) + sha1_checksum: str = proto.Field( + proto.STRING, + number=314444349, + optional=True, + ) + source: str = proto.Field( + proto.STRING, + number=177235995, + optional=True, + ) + + +class RecreateInstancesInstanceGroupManagerRequest(proto.Message): + r"""A request message for + InstanceGroupManagers.RecreateInstances. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_group_manager (str): + The name of the managed instance group. + instance_group_managers_recreate_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersRecreateInstancesRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of thezone where the managed + instance group is located. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + instance_group_managers_recreate_instances_request_resource: "InstanceGroupManagersRecreateInstancesRequest" = proto.Field( + proto.MESSAGE, + number=21405952, + message="InstanceGroupManagersRecreateInstancesRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + +class RecreateInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.RecreateInstances. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_group_manager (str): + Name of the managed instance group. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + region_instance_group_managers_recreate_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + instance_group_manager: str = proto.Field( + proto.STRING, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_group_managers_recreate_request_resource: "RegionInstanceGroupManagersRecreateRequest" = proto.Field( + proto.MESSAGE, + number=170999316, + message="RegionInstanceGroupManagersRecreateRequest", + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + +class Reference(proto.Message): + r"""Represents a reference to a resource. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#reference for references. + + This field is a member of `oneof`_ ``_kind``. + reference_type (str): + A description of the reference type with no implied + semantics. Possible values include: + + :: + + 1. MEMBER_OF + + This field is a member of `oneof`_ ``_reference_type``. + referrer (str): + URL of the resource which refers to the + target. + + This field is a member of `oneof`_ ``_referrer``. + target (str): + URL of the resource to which this reference + points. + + This field is a member of `oneof`_ ``_target``. + """ + + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - metric: str = proto.Field( + reference_type: str = proto.Field( proto.STRING, - number=533067184, + number=247521198, optional=True, ) - owner: str = proto.Field( + referrer: str = proto.Field( proto.STRING, - number=106164915, + number=351173663, optional=True, ) - usage: float = proto.Field( - proto.DOUBLE, - number=111574433, + target: str = proto.Field( + proto.STRING, + number=192835985, optional=True, ) -class QuotaExceededInfo(proto.Message): - r"""Additional details for quota exceeded error for resource - quota. +class Region(proto.Message): + r"""Represents a Region resource. + + A region is a geographical area where a resource is located. For + more information, readRegions + and Zones. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - dimensions (MutableMapping[str, str]): - The map holding related quota dimensions. - future_limit (float): - Future quota limit being rolled out. The - limit's unit depends on the quota type or - metric. + creation_timestamp (str): + [Output Only] Creation timestamp inRFC3339 text format. - This field is a member of `oneof`_ ``_future_limit``. - limit (float): - Current effective quota limit. The limit's - unit depends on the quota type or metric. + This field is a member of `oneof`_ ``_creation_timestamp``. + deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): + [Output Only] The deprecation status associated with this + region. - This field is a member of `oneof`_ ``_limit``. - limit_name (str): - The name of the quota limit. + This field is a member of `oneof`_ ``_deprecated``. + description (str): + [Output Only] Textual description of the resource. - This field is a member of `oneof`_ ``_limit_name``. - metric_name (str): - The Compute Engine quota metric name. + This field is a member of `oneof`_ ``_description``. + id (int): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - This field is a member of `oneof`_ ``_metric_name``. - rollout_status (str): - Rollout status of the future quota limit. - Check the RolloutStatus enum for the list of - possible values. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#region for regions. - This field is a member of `oneof`_ ``_rollout_status``. + This field is a member of `oneof`_ ``_kind``. + name (str): + [Output Only] Name of the resource. + + This field is a member of `oneof`_ ``_name``. + quota_status_warning (google.cloud.compute_v1beta.types.QuotaStatusWarning): + Output only. [Output Only] Warning of fetching the + ``quotas`` field for this region. This field is populated + only if fetching of the ``quotas`` field fails. + + This field is a member of `oneof`_ ``_quota_status_warning``. + quotas (MutableSequence[google.cloud.compute_v1beta.types.Quota]): + [Output Only] Quotas assigned to this region. + self_link (str): + [Output Only] Server-defined URL for the resource. + + This field is a member of `oneof`_ ``_self_link``. + status (str): + [Output Only] Status of the region, either UP orDOWN. Check + the Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. + supports_pzs (bool): + Output only. [Output Only] Reserved for future use. + + This field is a member of `oneof`_ ``_supports_pzs``. + zones (MutableSequence[str]): + [Output Only] A list of zones available in this region, in + the form of resource URLs. """ - class RolloutStatus(proto.Enum): - r"""Rollout status of the future quota limit. + class Status(proto.Enum): + r"""[Output Only] Status of the region, either UP orDOWN. Values: - UNDEFINED_ROLLOUT_STATUS (0): + UNDEFINED_STATUS (0): A value indicating that the enum field is not set. - IN_PROGRESS (469193735): - IN_PROGRESS - A rollout is in process which will change the - limit value to future limit. - ROLLOUT_STATUS_UNSPECIFIED (26864568): - ROLLOUT_STATUS_UNSPECIFIED - Rollout status is not - specified. The default value. + DOWN (2104482): + No description available. + UP (2715): + No description available. """ - UNDEFINED_ROLLOUT_STATUS = 0 - IN_PROGRESS = 469193735 - ROLLOUT_STATUS_UNSPECIFIED = 26864568 + UNDEFINED_STATUS = 0 + DOWN = 2104482 + UP = 2715 - dimensions: MutableMapping[str, str] = proto.MapField( + creation_timestamp: str = proto.Field( proto.STRING, + number=30525366, + optional=True, + ) + deprecated: "DeprecationStatus" = proto.Field( + proto.MESSAGE, + number=515138995, + optional=True, + message="DeprecationStatus", + ) + description: str = proto.Field( proto.STRING, - number=414334925, + number=422937596, + optional=True, ) - future_limit: float = proto.Field( - proto.DOUBLE, - number=456564287, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - limit: float = proto.Field( - proto.DOUBLE, - number=102976443, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - limit_name: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=398197903, + number=3373707, optional=True, ) - metric_name: str = proto.Field( + quota_status_warning: "QuotaStatusWarning" = proto.Field( + proto.MESSAGE, + number=302941430, + optional=True, + message="QuotaStatusWarning", + ) + quotas: MutableSequence["Quota"] = proto.RepeatedField( + proto.MESSAGE, + number=125341947, + message="Quota", + ) + self_link: str = proto.Field( proto.STRING, - number=409881530, + number=456214797, optional=True, ) - rollout_status: str = proto.Field( + status: str = proto.Field( proto.STRING, - number=476426816, + number=181260274, optional=True, ) + supports_pzs: bool = proto.Field( + proto.BOOL, + number=83983214, + optional=True, + ) + zones: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=116085319, + ) -class QuotaStatusWarning(proto.Message): - r"""[Output Only] Warning of fetching the ``quotas`` field for this - region. This field is populated only if fetching of the ``quotas`` - field fails. +class RegionAddressesMoveRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + description (str): + An optional destination address description + if intended to be different from the source. + + This field is a member of `oneof`_ ``_description``. + destination_address (str): + The URL of the destination address to move + to. This can be a full or partial URL. For + example, the following are all valid URLs to a + address: + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address + - + projects/project/regions/region/addresses/address + + Note that destination project must be different + from the source project. + So/regions/region/addresses/address is not valid + partial url. + + This field is a member of `oneof`_ ``_destination_address``. + """ + + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + destination_address: str = proto.Field( + proto.STRING, + number=371693763, + optional=True, + ) + +class RegionAutoscalerList(proto.Message): + r"""Contains a list of autoscalers. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - code (str): - [Output Only] A warning code, if applicable. For example, - Compute Engine returns NO_RESULTS_ON_PAGE if there are no - results in the response. Check the Code enum for the list of - possible values. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_code``. - data (MutableSequence[google.cloud.compute_v1beta.types.Data]): - [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } - message (str): - [Output Only] A human-readable description of the warning - code. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): + A list of Autoscaler resources. + kind (str): + Output only. Type of resource. - This field is a member of `oneof`_ ``_message``. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - class Code(proto.Enum): - r"""[Output Only] A warning code, if applicable. For example, Compute - Engine returns NO_RESULTS_ON_PAGE if there are no results in the - response. + @property + def raw_page(self): + return self - Values: - UNDEFINED_CODE (0): - A value indicating that the enum field is not - set. - CLEANUP_FAILED (150308440): - Warning about failed cleanup of transient - changes made by a failed operation. - DEPRECATED_RESOURCE_USED (391835586): - A link to a deprecated resource was created. - DEPRECATED_TYPE_USED (346526230): - When deploying and at least one of the - resources has a type marked as deprecated - DISK_SIZE_LARGER_THAN_IMAGE_SIZE (369442967): - The user created a boot disk that is larger - than image size. - EXPERIMENTAL_TYPE_USED (451954443): - When deploying and at least one of the - resources has a type marked as experimental - EXTERNAL_API_WARNING (175546307): - Warning that is present in an external api - call - FIELD_VALUE_OVERRIDEN (329669423): - Warning that value of a field has been - overridden. Deprecated unused field. - INJECTED_KERNELS_DEPRECATED (417377419): - The operation involved use of an injected - kernel, which is deprecated. - INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB (401542606): - A WEIGHTED_MAGLEV backend service is associated with a - health check that is not of type HTTP/HTTPS/HTTP2. - LARGE_DEPLOYMENT_WARNING (481440678): - When deploying a deployment with a - exceedingly large number of resources - LIST_OVERHEAD_QUOTA_EXCEED (47618117): - Resource can't be retrieved due to list - overhead quota exceed which captures the amount - of resources filtered out by user-defined list - filter. - MISSING_TYPE_DEPENDENCY (344505463): - A resource depends on a missing type - NEXT_HOP_ADDRESS_NOT_ASSIGNED (324964999): - The route's nextHopIp address is not assigned - to an instance on the network. - NEXT_HOP_CANNOT_IP_FORWARD (383382887): - The route's next hop instance cannot ip - forward. - NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE (146748434): - The route's nextHopInstance URL refers to an - instance that does not have an ipv6 interface on - the same network as the route. - NEXT_HOP_INSTANCE_NOT_FOUND (464250446): - The route's nextHopInstance URL refers to an - instance that does not exist. - NEXT_HOP_INSTANCE_NOT_ON_NETWORK (243758146): - The route's nextHopInstance URL refers to an - instance that is not on the same network as the - route. - NEXT_HOP_NOT_RUNNING (417081265): - The route's next hop instance does not have a - status of RUNNING. - NOT_CRITICAL_ERROR (105763924): - Error which is not critical. We decided to - continue the process despite the mentioned - error. - NO_RESULTS_ON_PAGE (30036744): - No results are present on a particular list - page. - PARTIAL_SUCCESS (39966469): - Success is reported, but some results may be - missing due to errors - QUOTA_INFO_UNAVAILABLE (304294182): - Quota information is not available to client - requests (e.g: regions.list). - REQUIRED_TOS_AGREEMENT (3745539): - The user attempted to use a resource that - requires a TOS they have not accepted. - RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING (496728641): - Warning that a resource is in use. - RESOURCE_NOT_DELETED (168598460): - One or more of the resources set to - auto-delete could not be deleted because they - were in use. - SCHEMA_VALIDATION_IGNORED (275245642): - When a resource schema validation is ignored. - SINGLE_INSTANCE_PROPERTY_TEMPLATE (268305617): - Instance template used in instance group - manager is valid as such, but its application - does not make a lot of sense, because it allows - only single instance in instance group. - UNDECLARED_PROPERTIES (390513439): - When undeclared properties in the schema are - present - UNREACHABLE (13328052): - A given scope cannot be reached. - """ - UNDEFINED_CODE = 0 - CLEANUP_FAILED = 150308440 - DEPRECATED_RESOURCE_USED = 391835586 - DEPRECATED_TYPE_USED = 346526230 - DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 369442967 - EXPERIMENTAL_TYPE_USED = 451954443 - EXTERNAL_API_WARNING = 175546307 - FIELD_VALUE_OVERRIDEN = 329669423 - INJECTED_KERNELS_DEPRECATED = 417377419 - INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB = 401542606 - LARGE_DEPLOYMENT_WARNING = 481440678 - LIST_OVERHEAD_QUOTA_EXCEED = 47618117 - MISSING_TYPE_DEPENDENCY = 344505463 - NEXT_HOP_ADDRESS_NOT_ASSIGNED = 324964999 - NEXT_HOP_CANNOT_IP_FORWARD = 383382887 - NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE = 146748434 - NEXT_HOP_INSTANCE_NOT_FOUND = 464250446 - NEXT_HOP_INSTANCE_NOT_ON_NETWORK = 243758146 - NEXT_HOP_NOT_RUNNING = 417081265 - NOT_CRITICAL_ERROR = 105763924 - NO_RESULTS_ON_PAGE = 30036744 - PARTIAL_SUCCESS = 39966469 - QUOTA_INFO_UNAVAILABLE = 304294182 - REQUIRED_TOS_AGREEMENT = 3745539 - RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING = 496728641 - RESOURCE_NOT_DELETED = 168598460 - SCHEMA_VALIDATION_IGNORED = 275245642 - SINGLE_INSTANCE_PROPERTY_TEMPLATE = 268305617 - UNDECLARED_PROPERTIES = 390513439 - UNREACHABLE = 13328052 + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["Autoscaler"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="Autoscaler", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) - code: str = proto.Field( + +class RegionCommitmentsUpdateReservationsRequest(proto.Message): + r""" + + Attributes: + reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): + A list of two reservations to transfer GPUs + and Local SSD disks between. + """ + + reservations: MutableSequence["Reservation"] = proto.RepeatedField( + proto.MESSAGE, + number=399717927, + message="Reservation", + ) + + +class RegionDiskTypeList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): + A list of DiskType resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#regionDiskTypeList for region disk types. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=3059181, + number=3355, + optional=True, + ) + items: MutableSequence["DiskType"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="DiskType", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) - data: MutableSequence["Data"] = proto.RepeatedField( - proto.MESSAGE, - number=3076010, - message="Data", + + +class RegionDisksAddResourcePoliciesRequest(proto.Message): + r""" + + Attributes: + resource_policies (MutableSequence[str]): + Resource policies to be added to this disk. + """ + + resource_policies: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=22220385, ) - message: str = proto.Field( + + +class RegionDisksRemoveResourcePoliciesRequest(proto.Message): + r""" + + Attributes: + resource_policies (MutableSequence[str]): + Resource policies to be removed from this + disk. + """ + + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=418054151, + number=22220385, + ) + + +class RegionDisksResizeRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + size_gb (int): + The new size of the regional persistent disk, + which is specified in GB. + + This field is a member of `oneof`_ ``_size_gb``. + """ + + size_gb: int = proto.Field( + proto.INT64, + number=494929369, optional=True, ) -class RawDisk(proto.Message): - r"""The parameters of the raw disk image. +class RegionDisksStartAsyncReplicationRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - container_type (str): - The format used to encode and transmit the - block device, which should be TAR. This is just - a container and transmission format and not a - runtime format. Provided by the client when the - disk image is created. Check the ContainerType - enum for the list of possible values. + async_secondary_disk (str): + The secondary disk to start asynchronous + replication to. You can provide this as a + partial or full URL to the resource. For + example, the following are valid values: - This field is a member of `oneof`_ ``_container_type``. - sha1_checksum (str): - [Deprecated] This field is deprecated. An optional SHA1 - checksum of the disk image before unpackaging provided by - the client when the disk image is created. - This field is a member of `oneof`_ ``_sha1_checksum``. - source (str): - The full Google Cloud Storage URL where the raw disk image - archive is stored. The following are valid formats for the - URL: - - https://storage.googleapis.com/bucket_name/image_archive_name - - https://storage.googleapis.com/bucket_name/folder_name/ - image_archive_name In order to create an image, you must - provide the full or partial URL of one of the following: - - The rawDisk.source URL - The sourceDisk URL - The - sourceImage URL - The sourceSnapshot URL + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - This field is a member of `oneof`_ ``_source``. - """ + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - class ContainerType(proto.Enum): - r"""The format used to encode and transmit the block device, - which should be TAR. This is just a container and transmission - format and not a runtime format. Provided by the client when the - disk image is created. + - + projects/project/zones/zone/disks/disk - Values: - UNDEFINED_CONTAINER_TYPE (0): - A value indicating that the enum field is not - set. - TAR (82821): - No description available. - """ - UNDEFINED_CONTAINER_TYPE = 0 - TAR = 82821 + - + projects/project/regions/region/disks/disk - container_type: str = proto.Field( - proto.STRING, - number=318809144, - optional=True, - ) - sha1_checksum: str = proto.Field( - proto.STRING, - number=314444349, - optional=True, - ) - source: str = proto.Field( + - + zones/zone/disks/disk + + - + regions/region/disks/disk + + This field is a member of `oneof`_ ``_async_secondary_disk``. + """ + + async_secondary_disk: str = proto.Field( proto.STRING, - number=177235995, + number=131645867, optional=True, ) -class RecreateInstancesInstanceGroupManagerRequest(proto.Message): - r"""A request message for - InstanceGroupManagers.RecreateInstances. See the method - description for details. - +class RegionInstanceGroupList(proto.Message): + r"""Contains a list of InstanceGroup resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. - instance_group_managers_recreate_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersRecreateInstancesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): + A list of InstanceGroup resources. + kind (str): + Output only. The resource type. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=249363395, + number=3355, + optional=True, ) - instance_group_managers_recreate_instances_request_resource: "InstanceGroupManagersRecreateInstancesRequest" = proto.Field( + items: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, - number=21405952, - message="InstanceGroupManagersRecreateInstancesRequest", + number=100526016, + message="InstanceGroup", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class RecreateInstancesRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.RecreateInstances. See the method - description for details. +class RegionInstanceGroupManagerDeleteInstanceConfigReq(proto.Message): + r"""RegionInstanceGroupManagers.deletePerInstanceConfigs + + Attributes: + names (MutableSequence[str]): + The list of instance names for which we want + to delete per-instance configs on this managed + instance group. + """ + + names: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=104585032, + ) + +class RegionInstanceGroupManagerList(proto.Message): + r"""Contains a list of managed instance groups. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - region_instance_group_managers_recreate_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): + A list of InstanceGroupManager resources. + kind (str): + Output only. [Output Only] The resource type, which is + always compute#instanceGroupManagerList for a list of + managed instance groups that exist in th regional scope. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=249363395, + number=3355, + optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, + items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceGroupManager", ) - region: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=138946292, + number=3292052, + optional=True, ) - region_instance_group_managers_recreate_request_resource: "RegionInstanceGroupManagersRecreateRequest" = proto.Field( - proto.MESSAGE, - number=170999316, - message="RegionInstanceGroupManagersRecreateRequest", + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, ) - request_id: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=37109963, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class Reference(proto.Message): - r"""Represents a reference to a resource. +class RegionInstanceGroupManagerPatchInstanceConfigReq(proto.Message): + r"""RegionInstanceGroupManagers.patchPerInstanceConfigs + + Attributes: + per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The list of per-instance configurations to + insert or patch on this managed instance group. + """ + + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=526265001, + message="PerInstanceConfig", + ) + + +class RegionInstanceGroupManagerResizeRequestsListResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): + A list of Resize Request resources. kind (str): - [Output Only] Type of the resource. Always compute#reference - for references. + Output only. [Output Only] Type of the resource. + Alwayscompute#regionInstanceGroupManagerResizeRequestList + for a list of Resize Requests. This field is a member of `oneof`_ ``_kind``. - reference_type (str): - A description of the reference type with no implied - semantics. Possible values include: 1. MEMBER_OF + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - This field is a member of `oneof`_ ``_reference_type``. - referrer (str): - URL of the resource which refers to the - target. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_referrer``. - target (str): - URL of the resource to which this reference - points. + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_target``. + This field is a member of `oneof`_ ``_warning``. """ + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["InstanceGroupManagerResizeRequest"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceGroupManagerResizeRequest", + ) kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - reference_type: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=247521198, + number=79797525, optional=True, ) - referrer: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=351173663, + number=456214797, optional=True, ) - target: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=192835985, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class Region(proto.Message): - r"""Represents a Region resource. A region is a geographical area - where a resource is located. For more information, read Regions - and Zones. +class RegionInstanceGroupManagerUpdateInstanceConfigReq(proto.Message): + r"""RegionInstanceGroupManagers.updatePerInstanceConfigs + + Attributes: + per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The list of per-instance configurations to + insert or patch on this managed instance group. + """ + + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=526265001, + message="PerInstanceConfig", + ) - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class RegionInstanceGroupManagersAbandonInstancesRequest(proto.Message): + r""" Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + instances (MutableSequence[str]): + The URLs of one or more instances to abandon. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + """ - This field is a member of `oneof`_ ``_creation_timestamp``. - deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): - [Output Only] The deprecation status associated with this - region. + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) - This field is a member of `oneof`_ ``_deprecated``. - description (str): - [Output Only] Textual description of the resource. - This field is a member of `oneof`_ ``_description``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. +class RegionInstanceGroupManagersAdoptInstancesRequest(proto.Message): + r""" - This field is a member of `oneof`_ ``_id``. - kind (str): - [Output Only] Type of the resource. Always compute#region - for regions. + Attributes: + instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + The list of per-instance configs specifying + instances to adopt. + """ - This field is a member of `oneof`_ ``_kind``. - name (str): - [Output Only] Name of the resource. + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=29097598, + message="PerInstanceConfig", + ) - This field is a member of `oneof`_ ``_name``. - quota_status_warning (google.cloud.compute_v1beta.types.QuotaStatusWarning): - [Output Only] Warning of fetching the ``quotas`` field for - this region. This field is populated only if fetching of the - ``quotas`` field fails. - This field is a member of `oneof`_ ``_quota_status_warning``. - quotas (MutableSequence[google.cloud.compute_v1beta.types.Quota]): - [Output Only] Quotas assigned to this region. - self_link (str): - [Output Only] Server-defined URL for the resource. +class RegionInstanceGroupManagersApplyUpdatesRequest(proto.Message): + r"""RegionInstanceGroupManagers.applyUpdatesToInstances - This field is a member of `oneof`_ ``_self_link``. - status (str): - [Output Only] Status of the region, either UP or DOWN. Check - the Status enum for the list of possible values. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_status``. - supports_pzs (bool): - [Output Only] Reserved for future use. + Attributes: + all_instances (bool): + Flag to update all instances instead of + specified list of “instances”. If the flag is + set to true then the instances may not be + specified in the request. - This field is a member of `oneof`_ ``_supports_pzs``. - zones (MutableSequence[str]): - [Output Only] A list of zones available in this region, in - the form of resource URLs. + This field is a member of `oneof`_ ``_all_instances``. + instances (MutableSequence[str]): + The list of URLs of one or more instances for which you want + to apply updates. Each URL can be a full URL or a partial + URL, such aszones/[ZONE]/instances/[INSTANCE_NAME]. + minimal_action (str): + The minimal action that you want to perform + on each instance during the update: + + + - REPLACE: At minimum, delete the instance + and create it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + + By default, the minimum action is NONE. If your + update requires a more disruptive action than + you set with this flag, the necessary action is + performed to execute the update. Check the + MinimalAction enum for the list of possible + values. + + This field is a member of `oneof`_ ``_minimal_action``. + most_disruptive_allowed_action (str): + The most disruptive action that you want to + perform on each instance during the update: + + + - REPLACE: Delete the instance and create + it again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and + limit disruption as much as possible. + - NONE: Do not disrupt the + instance at all. + + By default, the most disruptive allowed action + is REPLACE. If your update requires a more + disruptive action than you set with this flag, + the update request will fail. + Check the MostDisruptiveAllowedAction enum for + the list of possible values. + + This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. """ - class Status(proto.Enum): - r"""[Output Only] Status of the region, either UP or DOWN. + class MinimalAction(proto.Enum): + r"""The minimal action that you want to perform on each instance + during the update: + + + - REPLACE: At minimum, delete the instance and create it + again. + - RESTART: Stop the instance and start it + again. + - REFRESH: Do not stop the instance and limit + disruption as much as possible. + - NONE: Do not + disrupt the instance at all. + + By default, the minimum action is NONE. If your update requires + a more disruptive action than you set with this flag, the + necessary action is performed to execute the update. Additional + supported values which may be not listed in the enum directly + due to technical reasons: + + NONE + REFRESH + REPLACE + RESTART Values: - UNDEFINED_STATUS (0): + UNDEFINED_MINIMAL_ACTION (0): A value indicating that the enum field is not set. - DOWN (2104482): - No description available. - UP (2715): - No description available. """ - UNDEFINED_STATUS = 0 - DOWN = 2104482 - UP = 2715 + UNDEFINED_MINIMAL_ACTION = 0 - creation_timestamp: str = proto.Field( - proto.STRING, - number=30525366, - optional=True, - ) - deprecated: "DeprecationStatus" = proto.Field( - proto.MESSAGE, - number=515138995, + class MostDisruptiveAllowedAction(proto.Enum): + r"""The most disruptive action that you want to perform on each + instance during the update: + + + - REPLACE: Delete the instance and create it again. + - RESTART: Stop the instance and start it again. + - REFRESH: Do not stop the instance and limit disruption + as much as possible. + - NONE: Do not disrupt the + instance at all. + + By default, the most disruptive allowed action is REPLACE. If + your update requires a more disruptive action than you set with + this flag, the update request will fail. + Additional supported values which may be not listed in the enum + directly due to technical reasons: + + NONE + REFRESH + REPLACE + RESTART + + Values: + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): + A value indicating that the enum field is not + set. + """ + UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 + + all_instances: bool = proto.Field( + proto.BOOL, + number=403676512, optional=True, - message="DeprecationStatus", ) - description: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=422937596, - optional=True, - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, + number=29097598, ) - kind: str = proto.Field( + minimal_action: str = proto.Field( proto.STRING, - number=3292052, + number=270567060, optional=True, ) - name: str = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, - number=3373707, - optional=True, - ) - quota_status_warning: "QuotaStatusWarning" = proto.Field( - proto.MESSAGE, - number=302941430, + number=66103053, optional=True, - message="QuotaStatusWarning", ) - quotas: MutableSequence["Quota"] = proto.RepeatedField( + + +class RegionInstanceGroupManagersCreateInstancesRequest(proto.Message): + r"""RegionInstanceGroupManagers.createInstances + + Attributes: + instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + [Required] List of specifications of per-instance configs. + """ + + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, - number=125341947, - message="Quota", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + number=29097598, + message="PerInstanceConfig", ) - status: str = proto.Field( + + +class RegionInstanceGroupManagersDeleteInstancesRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to delete. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + skip_instances_on_validation_error (bool): + Specifies whether the request should proceed despite the + inclusion of instances that are not members of the group or + that are already in the process of being deleted or + abandoned. If this field is set to ``false`` and such an + instance is specified in the request, the operation fails. + The operation always fails if the request contains a + malformed instance URL or a reference to an instance that + exists in a zone or region other than the group's zone or + region. + + This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. + """ + + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=181260274, - optional=True, + number=29097598, ) - supports_pzs: bool = proto.Field( + skip_instances_on_validation_error: bool = proto.Field( proto.BOOL, - number=83983214, + number=40631073, optional=True, ) - zones: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=116085319, - ) -class RegionAddressesMoveRequest(proto.Message): +class RegionInstanceGroupManagersListErrorsResponse(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - description (str): - An optional destination address description - if intended to be different from the source. - - This field is a member of `oneof`_ ``_description``. - destination_address (str): - The URL of the destination address to move - to. This can be a full or partial URL. For - example, the following are all valid URLs to a - address: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /addresses/address - - projects/project/regions/region/addresses/address - Note that destination project must be different - from the source project. So - /regions/region/addresses/address is not valid - partial url. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceManagedByIgmError]): + [Output Only] The list of errors of the managed instance + group. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. - This field is a member of `oneof`_ ``_destination_address``. + This field is a member of `oneof`_ ``_next_page_token``. """ - description: str = proto.Field( - proto.STRING, - number=422937596, - optional=True, + @property + def raw_page(self): + return self + + items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="InstanceManagedByIgmError", ) - destination_address: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=371693763, + number=79797525, optional=True, ) -class RegionAutoscalerList(proto.Message): - r"""Contains a list of autoscalers. +class RegionInstanceGroupManagersListInstanceConfigsResp(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Autoscaler]): - A list of Autoscaler resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. + items (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): + Output only. [Output Only] The list of PerInstanceConfig. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Output only. [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -102556,31 +119090,16 @@ class RegionAutoscalerList(proto.Message): def raw_page(self): return self - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Autoscaler"] = proto.RepeatedField( + items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="Autoscaler", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, + message="PerInstanceConfig", ) next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -102589,207 +119108,306 @@ def raw_page(self): ) -class RegionCommitmentsUpdateReservationsRequest(proto.Message): +class RegionInstanceGroupManagersListInstancesResponse(proto.Message): r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): - A list of two reservations to transfer GPUs - and Local SSD disks between. + managed_instances (MutableSequence[google.cloud.compute_v1beta.types.ManagedInstance]): + A list of managed instances. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. """ - reservations: MutableSequence["Reservation"] = proto.RepeatedField( + @property + def raw_page(self): + return self + + managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( proto.MESSAGE, - number=399717927, - message="Reservation", + number=336219614, + message="ManagedInstance", + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, ) -class RegionDiskTypeList(proto.Message): +class RegionInstanceGroupManagersRecreateRequest(proto.Message): + r""" + + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to recreate. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) + + +class RegionInstanceGroupManagersResizeAdvancedRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + no_creation_retries (bool): + If this flag is true, the managed instance + group attempts to create all instances initiated + by this resize request only once. If there is an + error during creation, the managed instance + group does not retry create this instance, and + we will decrease the targetSize of the request + instead. If the flag is false, the group + attempts to recreate each instance continuously + until it succeeds. + + This flag matters only in the first attempt of + creation of an instance. After an instance is + successfully created while this flag is enabled, + the instance behaves the same way as all the + other instances created with a regular resize + request. In particular, if a running instance + dies unexpectedly at a later time and needs to + be recreated, this mode does not affect the + recreation behavior in that scenario. + + This flag is applicable only to the current + resize request. It does not influence other + resize requests in any way. + + You can see which instances ar being created in + which mode by calling the get or + listManagedInstances API. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.DiskType]): - A list of DiskType resources. - kind (str): - [Output Only] Type of resource. Always - compute#regionDiskTypeList for region disk types. + This field is a member of `oneof`_ ``_no_creation_retries``. + target_size (int): + The number of running instances that the + managed instance group should maintain at any + given time. The group automatically adds or + removes instances to maintain the number of + instances specified by this parameter. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_target_size``. + """ - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + no_creation_retries: bool = proto.Field( + proto.BOOL, + number=39329444, + optional=True, + ) + target_size: int = proto.Field( + proto.INT32, + number=62880239, + optional=True, + ) - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_warning``. - """ +class RegionInstanceGroupManagersResumeInstancesRequest(proto.Message): + r""" - @property - def raw_page(self): - return self + Attributes: + instances (MutableSequence[str]): + The URLs of one or more instances to resume. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. + """ - id: str = proto.Field( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3355, - optional=True, + number=29097598, ) - items: MutableSequence["DiskType"] = proto.RepeatedField( + + +class RegionInstanceGroupManagersSetAutoHealingRequest(proto.Message): + r""" + + Attributes: + auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): + + """ + + auto_healing_policies: MutableSequence[ + "InstanceGroupManagerAutoHealingPolicy" + ] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="DiskType", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, + number=456799109, + message="InstanceGroupManagerAutoHealingPolicy", ) - next_page_token: str = proto.Field( + + +class RegionInstanceGroupManagersSetTargetPoolsRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + fingerprint (str): + Fingerprint of the target pools information, + which is a hash of the contents. This field is + used for optimistic locking when you update the + target pool entries. This field is optional. + + This field is a member of `oneof`_ ``_fingerprint``. + target_pools (MutableSequence[str]): + The URL of all TargetPool resources to which + instances in theinstanceGroup field are added. + The target pools automatically apply to all of + the instances in the managed instance group. + """ + + fingerprint: str = proto.Field( proto.STRING, - number=79797525, + number=234678500, optional=True, ) - self_link: str = proto.Field( + target_pools: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=336072617, ) -class RegionDisksAddResourcePoliciesRequest(proto.Message): +class RegionInstanceGroupManagersSetTemplateRequest(proto.Message): r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: - resource_policies (MutableSequence[str]): - Resource policies to be added to this disk. + instance_template (str): + URL of the InstanceTemplate resource from + which all new instances will be created. + + This field is a member of `oneof`_ ``_instance_template``. """ - resource_policies: MutableSequence[str] = proto.RepeatedField( + instance_template: str = proto.Field( proto.STRING, - number=22220385, + number=309248228, + optional=True, ) -class RegionDisksRemoveResourcePoliciesRequest(proto.Message): +class RegionInstanceGroupManagersStartInstancesRequest(proto.Message): r""" Attributes: - resource_policies (MutableSequence[str]): - Resource policies to be removed from this - disk. + instances (MutableSequence[str]): + The URLs of one or more instances to start. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - resource_policies: MutableSequence[str] = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=22220385, + number=29097598, ) -class RegionDisksResizeRequest(proto.Message): +class RegionInstanceGroupManagersStopInstancesRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - size_gb (int): - The new size of the regional persistent disk, - which is specified in GB. + force_stop (bool): + If this flag is set to true, the Instance + Group Manager will proceed to stop the + instances, skipping initialization on them. - This field is a member of `oneof`_ ``_size_gb``. + This field is a member of `oneof`_ ``_force_stop``. + instances (MutableSequence[str]): + The URLs of one or more instances to stop. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - size_gb: int = proto.Field( - proto.INT64, - number=494929369, + force_stop: bool = proto.Field( + proto.BOOL, + number=134762710, optional=True, ) + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) -class RegionDisksStartAsyncReplicationRequest(proto.Message): +class RegionInstanceGroupManagersSuspendInstancesRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - async_secondary_disk (str): - The secondary disk to start asynchronous - replication to. You can provide this as a - partial or full URL to the resource. For - example, the following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /disks/disk - - projects/project/zones/zone/disks/disk - - projects/project/regions/region/disks/disk - - zones/zone/disks/disk - - regions/region/disks/disk + force_suspend (bool): + If this flag is set to true, the Instance + Group Manager will proceed to suspend the + instances, skipping initialization on them. - This field is a member of `oneof`_ ``_async_secondary_disk``. + This field is a member of `oneof`_ ``_force_suspend``. + instances (MutableSequence[str]): + The URLs of one or more instances to suspend. This can be a + full URL or a partial URL, such as + zones/[ZONE]/instances/[INSTANCE_NAME]. """ - async_secondary_disk: str = proto.Field( - proto.STRING, - number=131645867, + force_suspend: bool = proto.Field( + proto.BOOL, + number=27637480, optional=True, ) + instances: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29097598, + ) -class RegionInstanceGroupList(proto.Message): - r"""Contains a list of InstanceGroup resources. +class RegionInstanceGroupsListInstances(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + Output only. [Output Only] Unique identifier for the + resource; defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroup]): - A list of InstanceGroup resources. + items (MutableSequence[google.cloud.compute_v1beta.types.InstanceWithNamedPorts]): + A list of InstanceWithNamedPorts resources. kind (str): - The resource type. + Output only. The resource type. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Output only. [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -102803,10 +119421,10 @@ def raw_page(self): number=3355, optional=True, ) - items: MutableSequence["InstanceGroup"] = proto.RepeatedField( + items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InstanceGroup", + message="InstanceWithNamedPorts", ) kind: str = proto.Field( proto.STRING, @@ -102831,151 +119449,127 @@ def raw_page(self): ) -class RegionInstanceGroupManagerDeleteInstanceConfigReq(proto.Message): - r"""RegionInstanceGroupManagers.deletePerInstanceConfigs - - Attributes: - names (MutableSequence[str]): - The list of instance names for which we want - to delete per-instance configs on this managed - instance group. - """ - - names: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=104585032, - ) - - -class RegionInstanceGroupManagerList(proto.Message): - r"""Contains a list of managed instance groups. +class RegionInstanceGroupsListInstancesRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManager]): - A list of InstanceGroupManager resources. - kind (str): - [Output Only] The resource type, which is always - compute#instanceGroupManagerList for a list of managed - instance groups that exist in th regional scope. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + instance_state (str): + Instances in which state should be returned. + Valid options are: 'ALL', 'RUNNING'. By default, + it lists all instances. Check the InstanceState + enum for the list of possible values. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_instance_state``. + port_name (str): + Name of port user is interested in. It is + optional. If it is set, only information about + this ports will be returned. If it is not set, + all the named ports will be returned. + Always lists all instances. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_port_name``. """ - @property - def raw_page(self): - return self + class InstanceState(proto.Enum): + r"""Instances in which state should be returned. Valid options + are: 'ALL', 'RUNNING'. By default, it lists all instances. + + Values: + UNDEFINED_INSTANCE_STATE (0): + A value indicating that the enum field is not + set. + ALL (64897): + Matches any status of the instances, running, + non-running and others. + RUNNING (121282975): + Instance is in RUNNING state if it is + running. + """ + UNDEFINED_INSTANCE_STATE = 0 + ALL = 64897 + RUNNING = 121282975 - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InstanceGroupManager", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( + instance_state: str = proto.Field( proto.STRING, - number=79797525, + number=92223591, optional=True, ) - self_link: str = proto.Field( + port_name: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=41534345, optional=True, - message="Warning", ) -class RegionInstanceGroupManagerPatchInstanceConfigReq(proto.Message): - r"""RegionInstanceGroupManagers.patchPerInstanceConfigs +class RegionInstanceGroupsSetNamedPortsRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - The list of per-instance configurations to - insert or patch on this managed instance group. + fingerprint (str): + The fingerprint of the named ports + information for this instance group. Use this + optional property to prevent conflicts when + multiple users change the named ports settings + concurrently. Obtain the fingerprint with + theinstanceGroups.get method. Then, include the + fingerprint in your request to ensure that you + do not overwrite changes that were applied from + another concurrent request. + + This field is a member of `oneof`_ ``_fingerprint``. + named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): + The list of named ports to set for this + instance group. """ - per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + fingerprint: str = proto.Field( + proto.STRING, + number=234678500, + optional=True, + ) + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, - number=526265001, - message="PerInstanceConfig", + number=427598732, + message="NamedPort", ) -class RegionInstanceGroupManagerResizeRequestsListResponse(proto.Message): - r""" +class RegionList(proto.Message): + r"""Contains a list of region resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. id (str): [Output Only] Unique identifier for the resource; defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest]): - A list of Resize Request resources. + items (MutableSequence[google.cloud.compute_v1beta.types.Region]): + A list of Region resources. kind (str): - [Output Only] Type of the resource. Always - compute#regionInstanceGroupManagerResizeRequestList for a - list of Resize Requests. + Output only. [Output Only] Type of resource. Always + compute#regionList for lists of regions. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -102986,20 +119580,15 @@ class RegionInstanceGroupManagerResizeRequestsListResponse(proto.Message): def raw_page(self): return self - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items: MutableSequence["InstanceGroupManagerResizeRequest"] = proto.RepeatedField( + items: MutableSequence["Region"] = proto.RepeatedField( proto.MESSAGE, number=100526016, - message="InstanceGroupManagerResizeRequest", + message="Region", ) kind: str = proto.Field( proto.STRING, @@ -103016,10 +119605,6 @@ def raw_page(self): number=456214797, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, - ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -103028,1152 +119613,1525 @@ def raw_page(self): ) -class RegionInstanceGroupManagerUpdateInstanceConfigReq(proto.Message): - r"""RegionInstanceGroupManagers.updatePerInstanceConfigs +class RegionNetworkEndpointGroupsAttachEndpointsRequest(proto.Message): + r""" Attributes: - per_instance_configs (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - The list of per-instance configurations to - insert or patch on this managed instance group. + network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): + The list of network endpoints to be attached. """ - per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, - number=526265001, - message="PerInstanceConfig", + number=149850285, + message="NetworkEndpoint", ) -class RegionInstanceGroupManagersAbandonInstancesRequest(proto.Message): +class RegionNetworkEndpointGroupsDetachEndpointsRequest(proto.Message): r""" Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to abandon. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. + network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): + The list of network endpoints to be detached. """ - instances: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=29097598, + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( + proto.MESSAGE, + number=149850285, + message="NetworkEndpoint", ) -class RegionInstanceGroupManagersApplyUpdatesRequest(proto.Message): - r"""RegionInstanceGroupManagers.applyUpdatesToInstances - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse(proto.Message): + r""" Attributes: - all_instances (bool): - Flag to update all instances instead of - specified list of “instances”. If the flag is - set to true then the instances may not be - specified in the request. + firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): + Output only. [Output only] Effective firewalls from firewall + policy. It applies to Regional Network Firewall Policies in + the specified region, Global Network Firewall Policies and + Hierachial Firewall Policies which are associated with the + network. + firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): + Effective firewalls on the network. + """ - This field is a member of `oneof`_ ``_all_instances``. - instances (MutableSequence[str]): - The list of URLs of one or more instances for which you want - to apply updates. Each URL can be a full URL or a partial - URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - minimal_action (str): - The minimal action that you want to perform - on each instance during the update: - REPLACE: - At minimum, delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - minimum action is NONE. If your update requires - a more disruptive action than you set with this - flag, the necessary action is performed to - execute the update. Check the MinimalAction enum - for the list of possible values. + firewall_policys: MutableSequence[ + "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + ] = proto.RepeatedField( + proto.MESSAGE, + number=410985794, + message="RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", + ) + firewalls: MutableSequence["Firewall"] = proto.RepeatedField( + proto.MESSAGE, + number=272245619, + message="Firewall", + ) - This field is a member of `oneof`_ ``_minimal_action``. - most_disruptive_allowed_action (str): - The most disruptive action that you want to - perform on each instance during the update: - - REPLACE: Delete the instance and create it - again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and - limit disruption as much as possible. - NONE: Do - not disrupt the instance at all. By default, the - most disruptive allowed action is REPLACE. If - your update requires a more disruptive action - than you set with this flag, the update request - will fail. Check the MostDisruptiveAllowedAction - enum for the list of possible values. - This field is a member of `oneof`_ ``_most_disruptive_allowed_action``. - """ +class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( + proto.Message +): + r""" - class MinimalAction(proto.Enum): - r"""The minimal action that you want to perform on each instance - during the update: - REPLACE: At minimum, delete the instance - and create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. - By default, the minimum action is NONE. If your update requires - a more disruptive action than you set with this flag, the - necessary action is performed to execute the update. Additional - supported values which may be not listed in the enum directly - due to technical reasons: + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - NONE - REFRESH - REPLACE - RESTART + Attributes: + display_name (str): + Output only. [Output Only] The display name of the firewall + policy. - Values: - UNDEFINED_MINIMAL_ACTION (0): - A value indicating that the enum field is not - set. - """ - UNDEFINED_MINIMAL_ACTION = 0 + This field is a member of `oneof`_ ``_display_name``. + name (str): + Output only. [Output Only] The name of the firewall policy. - class MostDisruptiveAllowedAction(proto.Enum): - r"""The most disruptive action that you want to perform on each - instance during the update: - REPLACE: Delete the instance and - create it again. - RESTART: Stop the instance and start it - again. - REFRESH: Do not stop the instance and limit disruption - as much as possible. - NONE: Do not disrupt the instance at all. - By default, the most disruptive allowed action is REPLACE. If - your update requires a more disruptive action than you set with - this flag, the update request will fail. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + This field is a member of `oneof`_ ``_name``. + packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + Output only. [Output only] The packet mirroring rules that + apply to the network. + priority (int): + Output only. [Output only] Priority of firewall policy + association. Not applicable for type=HIERARCHY. - NONE - REFRESH - REPLACE - RESTART + This field is a member of `oneof`_ ``_priority``. + rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): + Output only. [Output only] The rules that apply to the + network. + type_ (str): + Output only. [Output Only] The type of the firewall policy. + Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, + SYSTEM_GLOBAL, SYSTEM_REGIONAL. Check the Type enum for the + list of possible values. + + This field is a member of `oneof`_ ``_type``. + """ + + class Type(proto.Enum): + r"""Output only. [Output Only] The type of the firewall policy. Can be + one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, + SYSTEM_REGIONAL. Values: - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION (0): + UNDEFINED_TYPE (0): A value indicating that the enum field is not set. + HIERARCHY (69902869): + No description available. + NETWORK (413984270): + No description available. + NETWORK_REGIONAL (190804272): + No description available. + SYSTEM_GLOBAL (60099507): + No description available. + SYSTEM_REGIONAL (161777199): + No description available. + UNSPECIFIED (526786327): + No description available. """ - UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 + UNDEFINED_TYPE = 0 + HIERARCHY = 69902869 + NETWORK = 413984270 + NETWORK_REGIONAL = 190804272 + SYSTEM_GLOBAL = 60099507 + SYSTEM_REGIONAL = 161777199 + UNSPECIFIED = 526786327 - all_instances: bool = proto.Field( - proto.BOOL, - number=403676512, + display_name: str = proto.Field( + proto.STRING, + number=4473832, optional=True, ) - instances: MutableSequence[str] = proto.RepeatedField( + name: str = proto.Field( proto.STRING, - number=29097598, + number=3373707, + optional=True, ) - minimal_action: str = proto.Field( - proto.STRING, - number=270567060, + packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=531644356, + message="FirewallPolicyRule", + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - most_disruptive_allowed_action: str = proto.Field( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( + proto.MESSAGE, + number=108873975, + message="FirewallPolicyRule", + ) + type_: str = proto.Field( proto.STRING, - number=66103053, + number=3575610, optional=True, ) -class RegionInstanceGroupManagersCreateInstancesRequest(proto.Message): - r"""RegionInstanceGroupManagers.createInstances +class RegionSetLabelsRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instances (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - [Required] List of specifications of per-instance configs. + label_fingerprint (str): + The fingerprint of the previous set of labels + for this resource, used to detect conflicts. The + fingerprint is initially generated by Compute + Engine and changes after every request to modify + or update labels. You must always provide an + up-to-date fingerprint hash in order to update + or change labels. Make a get() request to the + resource to get the latest fingerprint. + + This field is a member of `oneof`_ ``_label_fingerprint``. + labels (MutableMapping[str, str]): + The labels to set for this resource. """ - instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=29097598, - message="PerInstanceConfig", + label_fingerprint: str = proto.Field( + proto.STRING, + number=178124825, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=500195327, ) -class RegionInstanceGroupManagersDeleteInstancesRequest(proto.Message): +class RegionSetPolicyRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to delete. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - skip_instances_on_validation_error (bool): - Specifies whether the request should proceed despite the - inclusion of instances that are not members of the group or - that are already in the process of being deleted or - abandoned. If this field is set to ``false`` and such an - instance is specified in the request, the operation fails. - The operation always fails if the request contains a - malformed instance URL or a reference to an instance that - exists in a zone or region other than the group's zone or - region. + bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): + Flatten Policy to create a backwacd + compatible wire-format. Deprecated. Use 'policy' + to specify bindings. + etag (str): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify the etag. - This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. + This field is a member of `oneof`_ ``_etag``. + policy (google.cloud.compute_v1beta.types.Policy): + REQUIRED: The complete policy to be applied + to the 'resource'. The size of the policy is + limited to a few 10s of KB. An empty policy is + in general a valid policy but certain services + (like Projects) might reject them. + + This field is a member of `oneof`_ ``_policy``. """ - instances: MutableSequence[str] = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( + proto.MESSAGE, + number=403251854, + message="Binding", + ) + etag: str = proto.Field( proto.STRING, - number=29097598, + number=3123477, + optional=True, ) - skip_instances_on_validation_error: bool = proto.Field( - proto.BOOL, - number=40631073, + policy: "Policy" = proto.Field( + proto.MESSAGE, + number=91071794, optional=True, + message="Policy", ) -class RegionInstanceGroupManagersListErrorsResponse(proto.Message): +class RegionTargetHttpsProxiesSetSslCertificatesRequest(proto.Message): + r""" + + Attributes: + ssl_certificates (MutableSequence[str]): + New set of SslCertificate resources to + associate with this TargetHttpsProxy resource. + """ + + ssl_certificates: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=366006543, + ) + + +class RegionUrlMapsValidateRequest(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceManagedByIgmError]): - [Output Only] The list of errors of the managed instance - group. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + resource (google.cloud.compute_v1beta.types.UrlMap): + Content of the UrlMap to be validated. - This field is a member of `oneof`_ ``_next_page_token``. + This field is a member of `oneof`_ ``_resource``. """ - @property - def raw_page(self): - return self - - items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( + resource: "UrlMap" = proto.Field( proto.MESSAGE, - number=100526016, - message="InstanceManagedByIgmError", - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, + number=195806222, optional=True, + message="UrlMap", ) -class RegionInstanceGroupManagersListInstanceConfigsResp(proto.Message): - r""" +class RemoveAssociationFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.RemoveAssociation. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - items (MutableSequence[google.cloud.compute_v1beta.types.PerInstanceConfig]): - [Output Only] The list of PerInstanceConfig. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + firewall_policy (str): + Name of the firewall policy to update. + name (str): + Name for the attachment that will be removed. - This field is a member of `oneof`_ ``_next_page_token``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_name``. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="PerInstanceConfig", + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, ) - next_page_token: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=79797525, + number=3373707, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="Warning", ) -class RegionInstanceGroupManagersListInstancesResponse(proto.Message): - r""" +class RemoveAssociationNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + NetworkFirewallPolicies.RemoveAssociation. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - managed_instances (MutableSequence[google.cloud.compute_v1beta.types.ManagedInstance]): - A list of managed instances. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + firewall_policy (str): + Name of the firewall policy to update. + name (str): + Name for the attachment that will be removed. - This field is a member of `oneof`_ ``_next_page_token``. - """ + This field is a member of `oneof`_ ``_name``. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_request_id``. + """ - managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( - proto.MESSAGE, - number=336219614, - message="ManagedInstance", + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, ) - next_page_token: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=79797525, + number=3373707, optional=True, ) - - -class RegionInstanceGroupManagersRecreateRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to recreate. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - instances: MutableSequence[str] = proto.RepeatedField( + project: str = proto.Field( proto.STRING, - number=29097598, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class RegionInstanceGroupManagersResizeAdvancedRequest(proto.Message): - r""" +class RemoveAssociationOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.RemoveAssociation. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - no_creation_retries (bool): - If this flag is true, the managed instance - group attempts to create all instances initiated - by this resize request only once. If there is an - error during creation, the managed instance - group does not retry create this instance, and - we will decrease the targetSize of the request - instead. If the flag is false, the group - attempts to recreate each instance continuously - until it succeeds. This flag matters only in the - first attempt of creation of an instance. After - an instance is successfully created while this - flag is enabled, the instance behaves the same - way as all the other instances created with a - regular resize request. In particular, if a - running instance dies unexpectedly at a later - time and needs to be recreated, this mode does - not affect the recreation behavior in that - scenario. This flag is applicable only to the - current resize request. It does not influence - other resize requests in any way. You can see - which instances ar being created in which mode - by calling the get or listManagedInstances API. + name (str): + Name for the attachment that will be removed. - This field is a member of `oneof`_ ``_no_creation_retries``. - target_size (int): - The number of running instances that the - managed instance group should maintain at any - given time. The group automatically adds or - removes instances to maintain the number of - instances specified by this parameter. + This field is a member of `oneof`_ ``_name``. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_target_size``. + This field is a member of `oneof`_ ``_request_id``. + security_policy (str): + Name of the security policy to update. """ - no_creation_retries: bool = proto.Field( - proto.BOOL, - number=39329444, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - target_size: int = proto.Field( - proto.INT32, - number=62880239, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) - - -class RegionInstanceGroupManagersResumeInstancesRequest(proto.Message): - r""" - - Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to resume. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. - """ - - instances: MutableSequence[str] = proto.RepeatedField( + security_policy: str = proto.Field( proto.STRING, - number=29097598, + number=171082513, ) -class RegionInstanceGroupManagersSetAutoHealingRequest(proto.Message): - r""" +class RemoveAssociationRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.RemoveAssociation. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - auto_healing_policies (MutableSequence[google.cloud.compute_v1beta.types.InstanceGroupManagerAutoHealingPolicy]): + firewall_policy (str): + Name of the firewall policy to update. + name (str): + Name for the association that will be + removed. + + This field is a member of `oneof`_ ``_name``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_request_id``. """ - auto_healing_policies: MutableSequence[ - "InstanceGroupManagerAutoHealingPolicy" - ] = proto.RepeatedField( - proto.MESSAGE, - number=456799109, - message="InstanceGroupManagerAutoHealingPolicy", + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class RegionInstanceGroupManagersSetTargetPoolsRequest(proto.Message): - r""" +class RemoveAssociationRegionNetworkPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkPolicies.RemoveAssociation. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fingerprint (str): - Fingerprint of the target pools information, - which is a hash of the contents. This field is - used for optimistic locking when you update the - target pool entries. This field is optional. + name (str): + Name for the association that will be + removed. - This field is a member of `oneof`_ ``_fingerprint``. - target_pools (MutableSequence[str]): - The URL of all TargetPool resources to which - instances in the instanceGroup field are added. - The target pools automatically apply to all of - the instances in the managed instance group. + This field is a member of `oneof`_ ``_name``. + network_policy (str): + Name of the network policy resource to + update. + project (str): + Project ID for this request. + region (str): + Name of the region of this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - fingerprint: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=234678500, + number=3373707, optional=True, ) - target_pools: MutableSequence[str] = proto.RepeatedField( + network_policy: str = proto.Field( proto.STRING, - number=336072617, + number=504961123, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class RegionInstanceGroupManagersSetTemplateRequest(proto.Message): - r""" +class RemoveHealthCheckTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.RemoveHealthCheck. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_template (str): - URL of the InstanceTemplate resource from - which all new instances will be created. + project (str): + Project ID for this request. + region (str): + Name of the region for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_instance_template``. + This field is a member of `oneof`_ ``_request_id``. + target_pool (str): + Name of the target pool to remove health + checks from. + target_pools_remove_health_check_request_resource (google.cloud.compute_v1beta.types.TargetPoolsRemoveHealthCheckRequest): + The body resource for this request """ - instance_template: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=309248228, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + target_pool: str = proto.Field( + proto.STRING, + number=62796298, + ) + target_pools_remove_health_check_request_resource: "TargetPoolsRemoveHealthCheckRequest" = proto.Field( + proto.MESSAGE, + number=304985011, + message="TargetPoolsRemoveHealthCheckRequest", + ) -class RegionInstanceGroupManagersStartInstancesRequest(proto.Message): - r""" +class RemoveInstanceTargetPoolRequest(proto.Message): + r"""A request message for TargetPools.RemoveInstance. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instances (MutableSequence[str]): - The URLs of one or more instances to start. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + target_pool (str): + Name of the TargetPool resource to remove + instances from. + target_pools_remove_instance_request_resource (google.cloud.compute_v1beta.types.TargetPoolsRemoveInstanceRequest): + The body resource for this request """ - instances: MutableSequence[str] = proto.RepeatedField( + project: str = proto.Field( proto.STRING, - number=29097598, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + target_pool: str = proto.Field( + proto.STRING, + number=62796298, + ) + target_pools_remove_instance_request_resource: "TargetPoolsRemoveInstanceRequest" = proto.Field( + proto.MESSAGE, + number=29548547, + message="TargetPoolsRemoveInstanceRequest", ) -class RegionInstanceGroupManagersStopInstancesRequest(proto.Message): - r""" +class RemoveInstancesInstanceGroupRequest(proto.Message): + r"""A request message for InstanceGroups.RemoveInstances. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - force_stop (bool): - If this flag is set to true, the Instance - Group Manager will proceed to stop the - instances, skipping initialization on them. + instance_group (str): + The name of the instance group where the + specified instances will be removed. + instance_groups_remove_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsRemoveInstancesRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_force_stop``. - instances (MutableSequence[str]): - The URLs of one or more instances to stop. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone + where the instance group is located. """ - force_stop: bool = proto.Field( - proto.BOOL, - number=134762710, + instance_group: str = proto.Field( + proto.STRING, + number=81095253, + ) + instance_groups_remove_instances_request_resource: "InstanceGroupsRemoveInstancesRequest" = proto.Field( + proto.MESSAGE, + number=390981817, + message="InstanceGroupsRemoveInstancesRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) - instances: MutableSequence[str] = proto.RepeatedField( + zone: str = proto.Field( proto.STRING, - number=29097598, + number=3744684, ) -class RegionInstanceGroupManagersSuspendInstancesRequest(proto.Message): - r""" +class RemovePacketMirroringRuleFirewallPolicyRequest(proto.Message): + r"""A request message for + FirewallPolicies.RemovePacketMirroringRule. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - force_suspend (bool): - If this flag is set to true, the Instance - Group Manager will proceed to suspend the - instances, skipping initialization on them. + firewall_policy (str): + Name of the firewall policy to update. + priority (int): + The priority of the rule to remove from the + firewall policy. - This field is a member of `oneof`_ ``_force_suspend``. - instances (MutableSequence[str]): - The URLs of one or more instances to suspend. This can be a - full URL or a partial URL, such as - zones/[ZONE]/instances/[INSTANCE_NAME]. + This field is a member of `oneof`_ ``_priority``. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - force_suspend: bool = proto.Field( - proto.BOOL, - number=27637480, + firewall_policy: str = proto.Field( + proto.STRING, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - instances: MutableSequence[str] = proto.RepeatedField( + request_id: str = proto.Field( proto.STRING, - number=29097598, + number=37109963, + optional=True, ) -class RegionInstanceGroupsListInstances(proto.Message): - r""" +class RemovePacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + NetworkFirewallPolicies.RemovePacketMirroringRule. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.InstanceWithNamedPorts]): - A list of InstanceWithNamedPorts resources. - kind (str): - The resource type. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + firewall_policy (str): + Name of the firewall policy to update. + priority (int): + The priority of the rule to remove from the + firewall policy. - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="InstanceWithNamedPorts", + number=498173265, ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - next_page_token: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=79797525, - optional=True, + number=227560217, ) - self_link: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=37109963, optional=True, - message="Warning", ) -class RegionInstanceGroupsListInstancesRequest(proto.Message): - r""" +class RemovePeeringNetworkRequest(proto.Message): + r"""A request message for Networks.RemovePeering. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_state (str): - Instances in which state should be returned. - Valid options are: 'ALL', 'RUNNING'. By default, - it lists all instances. Check the InstanceState - enum for the list of possible values. - - This field is a member of `oneof`_ ``_instance_state``. - port_name (str): - Name of port user is interested in. It is - optional. If it is set, only information about - this ports will be returned. If it is not set, - all the named ports will be returned. Always - lists all instances. + network (str): + Name of the network resource to remove + peering from. + networks_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksRemovePeeringRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_port_name``. + This field is a member of `oneof`_ ``_request_id``. """ - class InstanceState(proto.Enum): - r"""Instances in which state should be returned. Valid options - are: 'ALL', 'RUNNING'. By default, it lists all instances. - - Values: - UNDEFINED_INSTANCE_STATE (0): - A value indicating that the enum field is not - set. - ALL (64897): - Matches any status of the instances, running, - non-running and others. - RUNNING (121282975): - Instance is in RUNNING state if it is - running. - """ - UNDEFINED_INSTANCE_STATE = 0 - ALL = 64897 - RUNNING = 121282975 - - instance_state: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=92223591, - optional=True, + number=232872494, ) - port_name: str = proto.Field( + networks_remove_peering_request_resource: "NetworksRemovePeeringRequest" = ( + proto.Field( + proto.MESSAGE, + number=421162494, + message="NetworksRemovePeeringRequest", + ) + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( proto.STRING, - number=41534345, + number=37109963, optional=True, ) -class RegionInstanceGroupsSetNamedPortsRequest(proto.Message): - r""" +class RemoveResourcePoliciesDiskRequest(proto.Message): + r"""A request message for Disks.RemoveResourcePolicies. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - fingerprint (str): - The fingerprint of the named ports - information for this instance group. Use this - optional property to prevent conflicts when - multiple users change the named ports settings - concurrently. Obtain the fingerprint with the - instanceGroups.get method. Then, include the - fingerprint in your request to ensure that you - do not overwrite changes that were applied from - another concurrent request. + disk (str): + The disk name for this request. + disks_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.DisksRemoveResourcePoliciesRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_fingerprint``. - named_ports (MutableSequence[google.cloud.compute_v1beta.types.NamedPort]): - The list of named ports to set for this - instance group. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - fingerprint: str = proto.Field( + disk: str = proto.Field( proto.STRING, - number=234678500, - optional=True, + number=3083677, ) - named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( + disks_remove_resource_policies_request_resource: "DisksRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, - number=427598732, - message="NamedPort", + number=436756718, + message="DisksRemoveResourcePoliciesRequest", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class RegionList(proto.Message): - r"""Contains a list of region resources. +class RemoveResourcePoliciesInstanceRequest(proto.Message): + r"""A request message for Instances.RemoveResourcePolicies. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Region]): - A list of Region resources. - kind (str): - [Output Only] Type of resource. Always compute#regionList - for lists of regions. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. - - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + instance (str): + The instance name for this request. + instances_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.InstancesRemoveResourcePoliciesRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=3355, - optional=True, + number=18257045, ) - items: MutableSequence["Region"] = proto.RepeatedField( + instances_remove_resource_policies_request_resource: "InstancesRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, - number=100526016, - message="Region", + number=49229558, + message="InstancesRemoveResourcePoliciesRequest", ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - next_page_token: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=79797525, + number=37109963, optional=True, ) - self_link: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, - optional=True, - message="Warning", + number=3744684, ) -class RegionNetworkEndpointGroupsAttachEndpointsRequest(proto.Message): - r""" - - Attributes: - network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): - The list of network endpoints to be attached. - """ - - network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( - proto.MESSAGE, - number=149850285, - message="NetworkEndpoint", - ) +class RemoveResourcePoliciesRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.RemoveResourcePolicies. See + the method description for details. -class RegionNetworkEndpointGroupsDetachEndpointsRequest(proto.Message): - r""" + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network_endpoints (MutableSequence[google.cloud.compute_v1beta.types.NetworkEndpoint]): - The list of network endpoints to be detached. - """ - - network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( - proto.MESSAGE, - number=149850285, - message="NetworkEndpoint", - ) - - -class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse(proto.Message): - r""" + disk (str): + The disk name for this request. + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + region_disks_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - Attributes: - firewall_policys (MutableSequence[google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): - [Output only] Effective firewalls from firewall policy. It - applies to Regional Network Firewall Policies in the - specified region, Global Network Firewall Policies and - Hierachial Firewall Policies which are associated with the - network. - firewalls (MutableSequence[google.cloud.compute_v1beta.types.Firewall]): - Effective firewalls on the network. + This field is a member of `oneof`_ ``_request_id``. """ - firewall_policys: MutableSequence[ - "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - ] = proto.RepeatedField( - proto.MESSAGE, - number=410985794, - message="RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", + disk: str = proto.Field( + proto.STRING, + number=3083677, ) - firewalls: MutableSequence["Firewall"] = proto.RepeatedField( + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_disks_remove_resource_policies_request_resource: "RegionDisksRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, - number=272245619, - message="Firewall", + number=8741283, + message="RegionDisksRemoveResourcePoliciesRequest", + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - proto.Message -): - r""" +class RemoveRuleFirewallPolicyRequest(proto.Message): + r"""A request message for FirewallPolicies.RemoveRule. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - display_name (str): - [Output Only] The display name of the firewall policy. - - This field is a member of `oneof`_ ``_display_name``. - name (str): - [Output Only] The name of the firewall policy. - - This field is a member of `oneof`_ ``_name``. - packet_mirroring_rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - [Output only] The packet mirroring rules that apply to the - network. + firewall_policy (str): + Name of the firewall policy to update. priority (int): - [Output only] Priority of firewall policy association. Not - applicable for type=HIERARCHY. + The priority of the rule to remove from the + firewall policy. This field is a member of `oneof`_ ``_priority``. - rules (MutableSequence[google.cloud.compute_v1beta.types.FirewallPolicyRule]): - [Output only] The rules that apply to the network. - type_ (str): - [Output Only] The type of the firewall policy. Can be one of - HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, - SYSTEM_REGIONAL. Check the Type enum for the list of - possible values. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_type``. + This field is a member of `oneof`_ ``_request_id``. """ - class Type(proto.Enum): - r"""[Output Only] The type of the firewall policy. Can be one of - HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, - SYSTEM_REGIONAL. - - Values: - UNDEFINED_TYPE (0): - A value indicating that the enum field is not - set. - HIERARCHY (69902869): - No description available. - NETWORK (413984270): - No description available. - NETWORK_REGIONAL (190804272): - No description available. - SYSTEM_GLOBAL (60099507): - No description available. - SYSTEM_REGIONAL (161777199): - No description available. - UNSPECIFIED (526786327): - No description available. - """ - UNDEFINED_TYPE = 0 - HIERARCHY = 69902869 - NETWORK = 413984270 - NETWORK_REGIONAL = 190804272 - SYSTEM_GLOBAL = 60099507 - SYSTEM_REGIONAL = 161777199 - UNSPECIFIED = 526786327 - - display_name: str = proto.Field( - proto.STRING, - number=4473832, - optional=True, - ) - name: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=3373707, - optional=True, - ) - packet_mirroring_rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( - proto.MESSAGE, - number=531644356, - message="FirewallPolicyRule", + number=498173265, ) priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( - proto.MESSAGE, - number=108873975, - message="FirewallPolicyRule", - ) - type_: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3575610, + number=37109963, optional=True, ) -class RegionSetLabelsRequest(proto.Message): - r""" +class RemoveRuleNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for NetworkFirewallPolicies.RemoveRule. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - label_fingerprint (str): - The fingerprint of the previous set of labels - for this resource, used to detect conflicts. The - fingerprint is initially generated by Compute - Engine and changes after every request to modify - or update labels. You must always provide an - up-to-date fingerprint hash in order to update - or change labels. Make a get() request to the - resource to get the latest fingerprint. + firewall_policy (str): + Name of the firewall policy to update. + priority (int): + The priority of the rule to remove from the + firewall policy. - This field is a member of `oneof`_ ``_label_fingerprint``. - labels (MutableMapping[str, str]): - The labels to set for this resource. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - label_fingerprint: str = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, - number=178124825, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( + project: str = proto.Field( proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( proto.STRING, - number=500195327, + number=37109963, + optional=True, ) -class RegionSetPolicyRequest(proto.Message): - r""" +class RemoveRuleOrganizationSecurityPolicyRequest(proto.Message): + r"""A request message for + OrganizationSecurityPolicies.RemoveRule. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): - Flatten Policy to create a backwacd - compatible wire-format. Deprecated. Use 'policy' - to specify bindings. - etag (str): - Flatten Policy to create a backward - compatible wire-format. Deprecated. Use 'policy' - to specify the etag. + priority (int): + The priority of the rule to remove from the + security policy. - This field is a member of `oneof`_ ``_etag``. - policy (google.cloud.compute_v1beta.types.Policy): - REQUIRED: The complete policy to be applied - to the 'resource'. The size of the policy is - limited to a few 10s of KB. An empty policy is - in general a valid policy but certain services - (like Projects) might reject them. + This field is a member of `oneof`_ ``_priority``. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_policy``. + This field is a member of `oneof`_ ``_request_id``. + security_policy (str): + Name of the security policy to update. """ - bindings: MutableSequence["Binding"] = proto.RepeatedField( - proto.MESSAGE, - number=403251854, - message="Binding", + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, ) - etag: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3123477, + number=37109963, optional=True, ) - policy: "Policy" = proto.Field( - proto.MESSAGE, - number=91071794, - optional=True, - message="Policy", + security_policy: str = proto.Field( + proto.STRING, + number=171082513, ) -class RegionTargetHttpsProxiesSetSslCertificatesRequest(proto.Message): - r""" +class RemoveRuleRegionNetworkFirewallPolicyRequest(proto.Message): + r"""A request message for + RegionNetworkFirewallPolicies.RemoveRule. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - ssl_certificates (MutableSequence[str]): - New set of SslCertificate resources to - associate with this TargetHttpsProxy resource. + firewall_policy (str): + Name of the firewall policy to update. + priority (int): + The priority of the rule to remove from the + firewall policy. + + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. """ - ssl_certificates: MutableSequence[str] = proto.RepeatedField( + firewall_policy: str = proto.Field( proto.STRING, - number=366006543, + number=498173265, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, ) -class RegionUrlMapsValidateRequest(proto.Message): - r""" +class RemoveRuleRegionSecurityPolicyRequest(proto.Message): + r"""A request message for RegionSecurityPolicies.RemoveRule. See + the method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - resource (google.cloud.compute_v1beta.types.UrlMap): - Content of the UrlMap to be validated. + priority (int): + The priority of the rule to remove from the + security policy. - This field is a member of `oneof`_ ``_resource``. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + security_policy (str): + Name of the security policy to update. """ - resource: "UrlMap" = proto.Field( - proto.MESSAGE, - number=195806222, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, - message="UrlMap", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + security_policy: str = proto.Field( + proto.STRING, + number=171082513, ) -class RemoveAssociationFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.RemoveAssociation. See - the method description for details. +class RemoveRuleSecurityPolicyRequest(proto.Message): + r"""A request message for SecurityPolicies.RemoveRule. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to update. - name (str): - Name for the attachment that will be removed. - - This field is a member of `oneof`_ ``_name``. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + priority (int): + The priority of the rule to remove from the + security policy. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_priority``. + project (str): + Project ID for this request. + security_policy (str): + Name of the security policy to update. """ - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, ) - name: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=227560217, ) - request_id: str = proto.Field( + security_policy: str = proto.Field( proto.STRING, - number=37109963, - optional=True, + number=171082513, ) -class RemoveAssociationNetworkFirewallPolicyRequest(proto.Message): +class RemoveTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): r"""A request message for - NetworkFirewallPolicies.RemoveAssociation. See the method - description for details. + RegionNetworkPolicies.RemoveTrafficClassificationRule. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to update. - name (str): - Name for the attachment that will be removed. + network_policy (str): + Name of the network policy resource to + update. + priority (int): + The priority of the rule to remove from the + network policy. - This field is a member of `oneof`_ ``_name``. + This field is a member of `oneof`_ ``_priority``. project (str): Project ID for this request. + region (str): + Name of the region of this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy: str = proto.Field( + network_policy: str = proto.Field( proto.STRING, - number=498173265, + number=504961123, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + priority: int = proto.Field( + proto.INT32, + number=445151652, optional=True, ) project: str = proto.Field( proto.STRING, number=227560217, ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -104181,179 +121139,240 @@ class RemoveAssociationNetworkFirewallPolicyRequest(proto.Message): ) -class RemoveAssociationOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.RemoveAssociation. See the method - description for details. +class ReportFaultyReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.ReportFaulty. See + the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Name for the attachment that will be removed. - - This field is a member of `oneof`_ ``_name``. + parent_name (str): + The name of the parent reservation and parent block. In the + format of + reservations/{reservation_name}/reservationBlocks/{reservation_block_name} + project (str): + Project ID for this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to update. + reservation_sub_block (str): + The name of the reservation subBlock. + Name should conform to RFC1035 or be a resource + ID. + reservation_sub_blocks_report_faulty_request_resource (google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequest): + The body resource for this request + zone (str): + Name of the zone for this request. Zone name + should conform to RFC1035. """ - name: str = proto.Field( + parent_name: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=478151936, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy: str = proto.Field( + reservation_sub_block: str = proto.Field( proto.STRING, - number=171082513, + number=22750491, + ) + reservation_sub_blocks_report_faulty_request_resource: "ReservationSubBlocksReportFaultyRequest" = proto.Field( + proto.MESSAGE, + number=450847938, + message="ReservationSubBlocksReportFaultyRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class RemoveAssociationRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.RemoveAssociation. See the method - description for details. +class ReportHostAsFaultyInstanceRequest(proto.Message): + r"""A request message for Instances.ReportHostAsFaulty. See the + method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to update. - name (str): - Name for the association that will be - removed. - - This field is a member of `oneof`_ ``_name``. + instance (str): + Name of the instance scoping this request. + instances_report_host_as_faulty_request_resource (google.cloud.compute_v1beta.types.InstancesReportHostAsFaultyRequest): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region scoping this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - firewall_policy: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=498173265, + number=18257045, ) - name: str = proto.Field( - proto.STRING, - number=3373707, - optional=True, + instances_report_host_as_faulty_request_resource: "InstancesReportHostAsFaultyRequest" = proto.Field( + proto.MESSAGE, + number=494094886, + message="InstancesReportHostAsFaultyRequest", ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class RemoveAssociationRegionNetworkPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkPolicies.RemoveAssociation. See the method - description for details. +class RequestMirrorPolicy(proto.Message): + r"""A policy that specifies how requests intended for the route's + backends are shadowed to a separate mirrored backend service. + The load balancer doesn't wait for responses from the shadow + service. Before sending traffic to the shadow service, the host + or authority header is suffixed with-shadow. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - name (str): - Name for the association that will be - removed. + backend_service (str): + The full or partial URL to the BackendService + resource being mirrored to. - This field is a member of `oneof`_ ``_name``. - network_policy (str): - Name of the network policy resource to - update. + The backend service configured for a mirroring + policy must reference backends that are of the + same type as the original backend service + matched in the URL map. + + Serverless NEG backends are not currently + supported as a mirrored backend service. + + This field is a member of `oneof`_ ``_backend_service``. + mirror_percent (float): + The percentage of requests to be mirrored to + ``backend_service``. + + This field is a member of `oneof`_ ``_mirror_percent``. + """ + + backend_service: str = proto.Field( + proto.STRING, + number=306946058, + optional=True, + ) + mirror_percent: float = proto.Field( + proto.DOUBLE, + number=277432261, + optional=True, + ) + + +class RequestRemovePeeringNetworkRequest(proto.Message): + r"""A request message for Networks.RequestRemovePeering. See the + method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + network (str): + Name of the network resource to remove + peering from. + networks_request_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksRequestRemovePeeringRequest): + The body resource for this request project (str): Project ID for this request. - region (str): - Name of the region of this request. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ - name: str = proto.Field( + network: str = proto.Field( proto.STRING, - number=3373707, - optional=True, + number=232872494, ) - network_policy: str = proto.Field( - proto.STRING, - number=504961123, + networks_request_remove_peering_request_resource: "NetworksRequestRemovePeeringRequest" = proto.Field( + proto.MESSAGE, + number=150860366, + message="NetworksRequestRemovePeeringRequest", ) project: str = proto.Field( proto.STRING, number=227560217, ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) request_id: str = proto.Field( proto.STRING, number=37109963, @@ -104361,1528 +121380,1606 @@ class RemoveAssociationRegionNetworkPolicyRequest(proto.Message): ) -class RemoveHealthCheckTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.RemoveHealthCheck. See the - method description for details. +class Reservation(proto.Message): + r"""Represents a reservation resource. A reservation ensures + that capacity is held in a specific zone even if the reserved + VMs are not running. For more information, read Reserving zonal + resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - region (str): - Name of the region for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + advanced_deployment_control (google.cloud.compute_v1beta.types.ReservationAdvancedDeploymentControl): + Advanced control for cluster management, + applicable only to DENSE deployment type + reservations. - This field is a member of `oneof`_ ``_request_id``. - target_pool (str): - Name of the target pool to remove health - checks from. - target_pools_remove_health_check_request_resource (google.cloud.compute_v1beta.types.TargetPoolsRemoveHealthCheckRequest): - The body resource for this request + This field is a member of `oneof`_ ``_advanced_deployment_control``. + aggregate_reservation (google.cloud.compute_v1beta.types.AllocationAggregateReservation): + Reservation for aggregated resources, + providing shape flexibility. + + This field is a member of `oneof`_ ``_aggregate_reservation``. + commitment (str): + Output only. [Output Only] Full or partial URL to a parent + commitment. This field displays for reservations that are + tied to a commitment. + + This field is a member of `oneof`_ ``_commitment``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + delete_after_duration (google.cloud.compute_v1beta.types.Duration): + Duration time relative to reservation + creation when Compute Engine will automatically + delete this resource. + + This field is a member of `oneof`_ ``_delete_after_duration``. + delete_at_time (str): + Absolute time in future when the reservation + will be auto-deleted by Compute Engine. + Timestamp is represented inRFC3339 text format. + + This field is a member of `oneof`_ ``_delete_at_time``. + deployment_type (str): + Specifies the deployment strategy for this + reservation. Check the DeploymentType enum for + the list of possible values. + + This field is a member of `oneof`_ ``_deployment_type``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. + enable_emergent_maintenance (bool): + Indicates whether Compute Engine allows + unplanned maintenance for your VMs; for example, + to fix hardware errors. + + This field is a member of `oneof`_ ``_enable_emergent_maintenance``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#reservations for reservations. + + This field is a member of `oneof`_ ``_kind``. + linked_commitments (MutableSequence[str]): + Output only. [Output Only] Full or partial URL to parent + commitments. This field displays for reservations that are + tied to multiple commitments. + name (str): + The name of the resource, provided by the client when + initially creating the resource. The resource name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + protection_tier (str): + Protection tier for the workload which + specifies the workload expectations in the event + of infrastructure failures at data center (e.g. + power and/or cooling failures). + Check the ProtectionTier enum for the list of + possible values. + + This field is a member of `oneof`_ ``_protection_tier``. + reservation_mode (str): + Output only. [Output only] Indicates the reservation mode of + the reservation. Check the ReservationMode enum for the list + of possible values. + + This field is a member of `oneof`_ ``_reservation_mode``. + reservation_sharing_policy (google.cloud.compute_v1beta.types.AllocationReservationSharingPolicy): + Specify the reservation sharing policy. If + unspecified, the reservation will not be shared + with Google Cloud managed services. + + This field is a member of `oneof`_ ``_reservation_sharing_policy``. + resource_policies (MutableMapping[str, str]): + Resource policies to be added to this + reservation. The key is defined by user, and the + value is resource policy url. This is to define + placement policy with reservation. + resource_status (google.cloud.compute_v1beta.types.AllocationResourceStatus): + Output only. [Output Only] Status information for + Reservation resource. + + This field is a member of `oneof`_ ``_resource_status``. + satisfies_pzs (bool): + Output only. [Output Only] Reserved for future use. + + This field is a member of `oneof`_ ``_satisfies_pzs``. + scheduling_type (str): + The type of maintenance for the reservation. + Check the SchedulingType enum for the list of + possible values. + + This field is a member of `oneof`_ ``_scheduling_type``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + share_settings (google.cloud.compute_v1beta.types.ShareSettings): + Specify share-settings to create a shared + reservation. This property is optional. For more + information about the syntax and options for + this field and its subfields, see the guide for + creating a shared reservation. + + This field is a member of `oneof`_ ``_share_settings``. + specific_reservation (google.cloud.compute_v1beta.types.AllocationSpecificSKUReservation): + Reservation for instances with specific + machine shapes. + + This field is a member of `oneof`_ ``_specific_reservation``. + specific_reservation_required (bool): + Indicates whether the reservation can be + consumed by VMs with affinity for "any" + reservation. If the field is set, then only VMs + that target the reservation by name can consume + from this reservation. + + This field is a member of `oneof`_ ``_specific_reservation_required``. + status (str): + Output only. [Output Only] The status of the reservation. + + :: + + - CREATING: Reservation resources are being + allocated. + - READY: Reservation resources have been allocated, + and the reservation is ready for use. + - DELETING: Reservation deletion is in progress. + - UPDATING: Reservation update is in progress. + + Check the Status enum for the list of possible values. + + This field is a member of `oneof`_ ``_status``. + zone (str): + Zone in which the reservation resides. A zone + must be provided if the reservation is created + within a commitment. + + This field is a member of `oneof`_ ``_zone``. """ - project: str = proto.Field( - proto.STRING, - number=227560217, + class DeploymentType(proto.Enum): + r"""Specifies the deployment strategy for this reservation. + + Values: + UNDEFINED_DEPLOYMENT_TYPE (0): + A value indicating that the enum field is not + set. + DENSE (64932607): + The reserved capacity is made up of densely + deployed reservation blocks. + DEPLOYMENT_TYPE_UNSPECIFIED (234847180): + No description available. + FLEXIBLE (379880395): + The reserved capacity is made up of highly + flexible, logical reservation blocks. + """ + UNDEFINED_DEPLOYMENT_TYPE = 0 + DENSE = 64932607 + DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 + FLEXIBLE = 379880395 + + class ProtectionTier(proto.Enum): + r"""Protection tier for the workload which specifies the workload + expectations in the event of infrastructure failures at data + center (e.g. power and/or cooling failures). + + Values: + UNDEFINED_PROTECTION_TIER (0): + A value indicating that the enum field is not + set. + CAPACITY_OPTIMIZED (17430466): + CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. + power, cooling) at the data center during normal operating + conditions. In the event of infrastructure failures at data + center (e.g. power and/or cooling failures), this workload + may be disrupted. As a consequence, it has a weaker + availability SLO than STANDARD. + PROTECTION_TIER_UNSPECIFIED (262261984): + Unspecified protection tier. + STANDARD (484642493): + STANDARD protection for workload that should + be protected by redundancies (e.g. power, + cooling) at the data center level. In the event + of infrastructure failures at data center (e.g. + power and/or cooling failures), this workload is + expected to continue as normal using the + redundancies. + """ + UNDEFINED_PROTECTION_TIER = 0 + CAPACITY_OPTIMIZED = 17430466 + PROTECTION_TIER_UNSPECIFIED = 262261984 + STANDARD = 484642493 + + class ReservationMode(proto.Enum): + r"""Output only. [Output only] Indicates the reservation mode of the + reservation. + + Values: + UNDEFINED_RESERVATION_MODE (0): + A value indicating that the enum field is not + set. + CALENDAR (67431230): + The delivered reservations terminate at + specified endtime along with terminating VMs + running on it. The price for this reservation is + different from on-demand. Currently offered for + A3+ GPUs and TPUs only. + DEFAULT (115302945): + The delivered reservations do not terminate + VMs at the end of reservations. On-demand + pricing and available for all VM families. This + is default mode. + RESERVATION_MODE_UNSPECIFIED (233810606): + No description available. + """ + UNDEFINED_RESERVATION_MODE = 0 + CALENDAR = 67431230 + DEFAULT = 115302945 + RESERVATION_MODE_UNSPECIFIED = 233810606 + + class SchedulingType(proto.Enum): + r"""The type of maintenance for the reservation. + + Values: + UNDEFINED_SCHEDULING_TYPE (0): + A value indicating that the enum field is not + set. + GROUPED (474540862): + Maintenance on all reserved instances in the + reservation is synchronized. + GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): + Unknown maintenance type. + INDEPENDENT (127011674): + Maintenance is not synchronized for this + reservation. Instead, each instance has its own + maintenance window. + """ + UNDEFINED_SCHEDULING_TYPE = 0 + GROUPED = 474540862 + GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 + INDEPENDENT = 127011674 + + class Status(proto.Enum): + r"""Output only. [Output Only] The status of the reservation. + + :: + + - CREATING: Reservation resources are being + allocated. + - READY: Reservation resources have been allocated, + and the reservation is ready for use. + - DELETING: Reservation deletion is in progress. + - UPDATING: Reservation update is in progress. + + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + CREATING (455564985): + Reservation resources are being allocated. + DELETING (528602024): + Reservation deletion is in progress. + INVALID (530283991): + No description available. + READY (77848963): + Reservation resources have been allocated, + and the reservation is ready for use. + UPDATING (494614342): + Reservation update is in progress. + """ + UNDEFINED_STATUS = 0 + CREATING = 455564985 + DELETING = 528602024 + INVALID = 530283991 + READY = 77848963 + UPDATING = 494614342 + + advanced_deployment_control: "ReservationAdvancedDeploymentControl" = proto.Field( + proto.MESSAGE, + number=410618144, + optional=True, + message="ReservationAdvancedDeploymentControl", ) - region: str = proto.Field( - proto.STRING, - number=138946292, + aggregate_reservation: "AllocationAggregateReservation" = proto.Field( + proto.MESSAGE, + number=291567948, + optional=True, + message="AllocationAggregateReservation", ) - request_id: str = proto.Field( + commitment: str = proto.Field( proto.STRING, - number=37109963, + number=482134805, optional=True, ) - target_pool: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=62796298, + number=30525366, + optional=True, ) - target_pools_remove_health_check_request_resource: "TargetPoolsRemoveHealthCheckRequest" = proto.Field( + delete_after_duration: "Duration" = proto.Field( proto.MESSAGE, - number=304985011, - message="TargetPoolsRemoveHealthCheckRequest", + number=323997099, + optional=True, + message="Duration", ) - - -class RemoveInstanceTargetPoolRequest(proto.Message): - r"""A request message for TargetPools.RemoveInstance. 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. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - target_pool (str): - Name of the TargetPool resource to remove - instances from. - target_pools_remove_instance_request_resource (google.cloud.compute_v1beta.types.TargetPoolsRemoveInstanceRequest): - The body resource for this request - """ - - project: str = proto.Field( + delete_at_time: str = proto.Field( proto.STRING, - number=227560217, + number=83294405, + optional=True, ) - region: str = proto.Field( + deployment_type: str = proto.Field( proto.STRING, - number=138946292, + number=396722292, + optional=True, ) - request_id: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=37109963, + number=422937596, optional=True, ) - target_pool: str = proto.Field( - proto.STRING, - number=62796298, + enable_emergent_maintenance: bool = proto.Field( + proto.BOOL, + number=353759497, + optional=True, ) - target_pools_remove_instance_request_resource: "TargetPoolsRemoveInstanceRequest" = proto.Field( - proto.MESSAGE, - number=29548547, - message="TargetPoolsRemoveInstanceRequest", + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, ) - - -class RemoveInstancesInstanceGroupRequest(proto.Message): - r"""A request message for InstanceGroups.RemoveInstances. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_group (str): - The name of the instance group where the - specified instances will be removed. - instance_groups_remove_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupsRemoveInstancesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the instance group - is located. - """ - - instance_group: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=81095253, - ) - instance_groups_remove_instances_request_resource: "InstanceGroupsRemoveInstancesRequest" = proto.Field( - proto.MESSAGE, - number=390981817, - message="InstanceGroupsRemoveInstancesRequest", + number=3292052, + optional=True, ) - project: str = proto.Field( + linked_commitments: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=470957784, ) - request_id: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=37109963, + number=3373707, optional=True, ) - zone: str = proto.Field( + protection_tier: str = proto.Field( proto.STRING, - number=3744684, + number=503959432, + optional=True, ) - - -class RemovePacketMirroringRuleFirewallPolicyRequest(proto.Message): - r"""A request message for - FirewallPolicies.RemovePacketMirroringRule. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - priority (int): - The priority of the rule to remove from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - firewall_policy: str = proto.Field( + reservation_mode: str = proto.Field( proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + number=277294646, optional=True, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + reservation_sharing_policy: "AllocationReservationSharingPolicy" = proto.Field( + proto.MESSAGE, + number=205970120, optional=True, + message="AllocationReservationSharingPolicy", ) - - -class RemovePacketMirroringRuleNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - NetworkFirewallPolicies.RemovePacketMirroringRule. See the - method description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - priority (int): - The priority of the rule to remove from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - firewall_policy: str = proto.Field( + resource_policies: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=498173265, + proto.STRING, + number=22220385, ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + resource_status: "AllocationResourceStatus" = proto.Field( + proto.MESSAGE, + number=249429315, optional=True, + message="AllocationResourceStatus", ) - project: str = proto.Field( - proto.STRING, - number=227560217, + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=480964267, + optional=True, ) - request_id: str = proto.Field( + scheduling_type: str = proto.Field( proto.STRING, - number=37109963, + number=199835397, optional=True, ) - - -class RemovePeeringNetworkRequest(proto.Message): - r"""A request message for Networks.RemovePeering. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - network (str): - Name of the network resource to remove - peering from. - networks_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksRemovePeeringRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - network: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=232872494, + number=456214797, + optional=True, ) - networks_remove_peering_request_resource: "NetworksRemovePeeringRequest" = ( - proto.Field( - proto.MESSAGE, - number=421162494, - message="NetworksRemovePeeringRequest", - ) + share_settings: "ShareSettings" = proto.Field( + proto.MESSAGE, + number=266668163, + optional=True, + message="ShareSettings", ) - project: str = proto.Field( + specific_reservation: "AllocationSpecificSKUReservation" = proto.Field( + proto.MESSAGE, + number=404901951, + optional=True, + message="AllocationSpecificSKUReservation", + ) + specific_reservation_required: bool = proto.Field( + proto.BOOL, + number=226550687, + optional=True, + ) + status: str = proto.Field( proto.STRING, - number=227560217, + number=181260274, + optional=True, ) - request_id: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=37109963, + number=3744684, optional=True, ) -class RemoveResourcePoliciesDiskRequest(proto.Message): - r"""A request message for Disks.RemoveResourcePolicies. See the - method description for details. +class ReservationAdvancedDeploymentControl(proto.Message): + r"""Advance control for cluster management, applicable only to + DENSE deployment type reservations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - The disk name for this request. - disks_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.DisksRemoveResourcePoliciesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + reservation_operational_mode (str): + Indicates chosen reservation operational mode + for the reservation. Check the + ReservationOperationalMode enum for the list of + possible values. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_reservation_operational_mode``. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, - ) - disks_remove_resource_policies_request_resource: "DisksRemoveResourcePoliciesRequest" = proto.Field( - proto.MESSAGE, - number=436756718, - message="DisksRemoveResourcePoliciesRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + class ReservationOperationalMode(proto.Enum): + r"""Indicates chosen reservation operational mode for the + reservation. + + Values: + UNDEFINED_RESERVATION_OPERATIONAL_MODE (0): + A value indicating that the enum field is not + set. + ALL_CAPACITY (500029880): + Google Cloud does not manage the failure of + machines, but provides additional capacity, + which is not guaranteed to be available. + HIGHLY_AVAILABLE_CAPACITY (110861600): + Google Cloud manages the failure of machines + to provide high availability. + RESERVATION_OPERATIONAL_MODE_UNSPECIFIED (194296603): + No description available. + """ + UNDEFINED_RESERVATION_OPERATIONAL_MODE = 0 + ALL_CAPACITY = 500029880 + HIGHLY_AVAILABLE_CAPACITY = 110861600 + RESERVATION_OPERATIONAL_MODE_UNSPECIFIED = 194296603 + + reservation_operational_mode: str = proto.Field( proto.STRING, - number=37109963, + number=499978755, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class RemoveResourcePoliciesInstanceRequest(proto.Message): - r"""A request message for Instances.RemoveResourcePolicies. See - the method description for details. +class ReservationAffinity(proto.Message): + r"""Specifies the reservations that this instance can consume + from. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - The instance name for this request. - instances_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.InstancesRemoveResourcePoliciesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + consume_reservation_type (str): + Specifies the type of reservation from which this instance + can consume resources: ANY_RESERVATION + (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See + Consuming reserved instances for examples. Check the + ConsumeReservationType enum for the list of possible values. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_consume_reservation_type``. + key (str): + Corresponds to the label key of a reservation resource. To + target aSPECIFIC_RESERVATION by name, + specifygoogleapis.com/reservation-name as the key and + specify the name of your reservation as its value. + + This field is a member of `oneof`_ ``_key``. + values (MutableSequence[str]): + Corresponds to the label values of a + reservation resource. This can be either a name + to a reservation in the same project or + "projects/different-project/reservations/some-reservation-name" + to target a shared reservation in the same zone + but in a different project. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - instances_remove_resource_policies_request_resource: "InstancesRemoveResourcePoliciesRequest" = proto.Field( - proto.MESSAGE, - number=49229558, - message="InstancesRemoveResourcePoliciesRequest", - ) - project: str = proto.Field( + class ConsumeReservationType(proto.Enum): + r"""Specifies the type of reservation from which this instance can + consume resources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, + or NO_RESERVATION. See Consuming reserved instances for examples. + + Values: + UNDEFINED_CONSUME_RESERVATION_TYPE (0): + A value indicating that the enum field is not + set. + ANY_RESERVATION (200008121): + Consume any allocation available. + NO_RESERVATION (169322030): + Do not consume from any allocated capacity. + SPECIFIC_RESERVATION (229889055): + Must consume from a specific reservation. + Must specify key value fields for specifying the + reservations. + SPECIFIC_THEN_ANY_RESERVATION (37025924): + Prefer to consume from a specific + reservation, but still consume any reservation + available if the specified reservation is not + available or exhausted. Must specify key value + fields for specifying the reservations. + SPECIFIC_THEN_NO_RESERVATION (406522371): + Prefer to consume from a specific + reservation, but still consume from the + on-demand pool if the specified reservation is + exhausted. Must specify key value fields for + specifying the reservations. + UNSPECIFIED (526786327): + No description available. + """ + UNDEFINED_CONSUME_RESERVATION_TYPE = 0 + ANY_RESERVATION = 200008121 + NO_RESERVATION = 169322030 + SPECIFIC_RESERVATION = 229889055 + SPECIFIC_THEN_ANY_RESERVATION = 37025924 + SPECIFIC_THEN_NO_RESERVATION = 406522371 + UNSPECIFIED = 526786327 + + consume_reservation_type: str = proto.Field( proto.STRING, - number=227560217, + number=300736944, + optional=True, ) - request_id: str = proto.Field( + key: str = proto.Field( proto.STRING, - number=37109963, + number=106079, optional=True, ) - zone: str = proto.Field( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=3744684, + number=249928994, ) -class RemoveResourcePoliciesRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.RemoveResourcePolicies. See - the method description for details. - +class ReservationAggregatedList(proto.Message): + r"""Contains a list of reservations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - The disk name for this request. - project (str): - Project ID for this request. - region (str): - The name of the region for this request. - region_disks_remove_resource_policies_request_resource (google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.ReservationsScopedList]): + A list of Allocation resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - disk: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "ReservationsScopedList"] = proto.MapField( proto.STRING, - number=3083677, + proto.MESSAGE, + number=100526016, + message="ReservationsScopedList", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - region: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=138946292, + number=79797525, + optional=True, ) - region_disks_remove_resource_policies_request_resource: "RegionDisksRemoveResourcePoliciesRequest" = proto.Field( - proto.MESSAGE, - number=8741283, - message="RegionDisksRemoveResourcePoliciesRequest", + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, ) - request_id: str = proto.Field( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=37109963, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class RemoveRuleFirewallPolicyRequest(proto.Message): - r"""A request message for FirewallPolicies.RemoveRule. See the - method description for details. - +class ReservationBlock(proto.Message): + r"""Represents a reservation block resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - firewall_policy (str): - Name of the firewall policy to update. - priority (int): - The priority of the rule to remove from the - firewall policy. + count (int): + Output only. [Output Only] The number of resources that are + allocated in this reservation block. - This field is a member of `oneof`_ ``_priority``. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_count``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_creation_timestamp``. + health_info (google.cloud.compute_v1beta.types.ReservationBlockHealthInfo): + Output only. [Output Only] Health information for the + reservation block. - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_health_info``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + This field is a member of `oneof`_ ``_id``. + in_use_count (int): + Output only. [Output Only] The number of instances that are + currently in use on this reservation block. -class RemoveRuleNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for NetworkFirewallPolicies.RemoveRule. See - the method description for details. + This field is a member of `oneof`_ ``_in_use_count``. + in_use_host_count (int): + Output only. Number of hosts currently in + use. If there is one or more Instances running + on the host, it is considered in use. + This field is a member of `oneof`_ ``_in_use_host_count``. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#reservationBlock for reservation blocks. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_kind``. + name (str): + Output only. [Output Only] The name of this reservation + block generated by Google Compute Engine. The name must be + 1-63 characters long, and comply with RFC1035 @pattern + `a-z `__? - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - priority (int): - The priority of the rule to remove from the - firewall policy. + This field is a member of `oneof`_ ``_name``. + physical_topology (google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopology): + Output only. [Output Only] The physical topology of the + reservation block. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_physical_topology``. + reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): + Output only. [Output Only] Maintenance information for this + reservation block. - This field is a member of `oneof`_ ``_request_id``. - """ + This field is a member of `oneof`_ ``_reservation_maintenance``. + reservation_sub_block_count (int): + Output only. [Output Only] The number of reservation + subBlocks associated with this reservation block. - firewall_policy: str = proto.Field( - proto.STRING, - number=498173265, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, - optional=True, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) + This field is a member of `oneof`_ ``_reservation_sub_block_count``. + reservation_sub_block_in_use_count (int): + Output only. [Output Only] The number of in-use reservation + subBlocks associated with this reservation block. If at + least one VM is running on a subBlock, it is considered + in-use. + This field is a member of `oneof`_ ``_reservation_sub_block_in_use_count``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. -class RemoveRuleOrganizationSecurityPolicyRequest(proto.Message): - r"""A request message for - OrganizationSecurityPolicies.RemoveRule. See the method - description for details. + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. + This field is a member of `oneof`_ ``_self_link_with_id``. + status (str): + Output only. [Output Only] Status of the reservation block. + Check the Status enum for the list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_status``. + zone (str): + Output only. [Output Only] Zone in which the reservation + block resides. - Attributes: - priority (int): - The priority of the rule to remove from the - security policy. + This field is a member of `oneof`_ ``_zone``. + """ - This field is a member of `oneof`_ ``_priority``. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + class Status(proto.Enum): + r"""Output only. [Output Only] Status of the reservation block. - This field is a member of `oneof`_ ``_request_id``. - security_policy (str): - Name of the security policy to update. - """ + Values: + UNDEFINED_STATUS (0): + A value indicating that the enum field is not + set. + CREATING (455564985): + Resources are being allocated for the + reservation block. + DELETING (528602024): + Reservation block is currently being deleted. + INVALID (530283991): + No description available. + READY (77848963): + Reservation block has allocated all its + resources. + """ + UNDEFINED_STATUS = 0 + CREATING = 455564985 + DELETING = 528602024 + INVALID = 530283991 + READY = 77848963 - priority: int = proto.Field( + count: int = proto.Field( proto.INT32, - number=445151652, + number=94851343, optional=True, ) - request_id: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=37109963, + number=30525366, optional=True, ) - security_policy: str = proto.Field( + health_info: "ReservationBlockHealthInfo" = proto.Field( + proto.MESSAGE, + number=235287729, + optional=True, + message="ReservationBlockHealthInfo", + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + in_use_count: int = proto.Field( + proto.INT32, + number=493458877, + optional=True, + ) + in_use_host_count: int = proto.Field( + proto.INT32, + number=364069834, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=171082513, + number=3292052, + optional=True, ) - - -class RemoveRuleRegionNetworkFirewallPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkFirewallPolicies.RemoveRule. See the method - description for details. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - firewall_policy (str): - Name of the firewall policy to update. - priority (int): - The priority of the rule to remove from the - firewall policy. - - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - """ - - firewall_policy: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=498173265, + number=3373707, + optional=True, ) - priority: int = proto.Field( + physical_topology: "ReservationBlockPhysicalTopology" = proto.Field( + proto.MESSAGE, + number=279778519, + optional=True, + message="ReservationBlockPhysicalTopology", + ) + reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( + proto.MESSAGE, + number=340607776, + optional=True, + message="GroupMaintenanceInfo", + ) + reservation_sub_block_count: int = proto.Field( proto.INT32, - number=445151652, + number=330782955, optional=True, ) - project: str = proto.Field( + reservation_sub_block_in_use_count: int = proto.Field( + proto.INT32, + number=186007137, + optional=True, + ) + self_link: str = proto.Field( proto.STRING, - number=227560217, + number=456214797, + optional=True, ) - region: str = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, - number=138946292, + number=44520962, + optional=True, ) - request_id: str = proto.Field( + status: str = proto.Field( proto.STRING, - number=37109963, + number=181260274, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, optional=True, ) -class RemoveRuleRegionSecurityPolicyRequest(proto.Message): - r"""A request message for RegionSecurityPolicies.RemoveRule. See - the method description for details. - +class ReservationBlockHealthInfo(proto.Message): + r"""Health information for the reservation block. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - priority (int): - The priority of the rule to remove from the - security policy. + degraded_sub_block_count (int): + The number of subBlocks that are degraded. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - security_policy (str): - Name of the security policy to update. + This field is a member of `oneof`_ ``_degraded_sub_block_count``. + health_status (str): + The health status of the reservation block. + Check the HealthStatus enum for the list of + possible values. + + This field is a member of `oneof`_ ``_health_status``. + healthy_sub_block_count (int): + The number of subBlocks that are healthy. + + This field is a member of `oneof`_ ``_healthy_sub_block_count``. """ - priority: int = proto.Field( + class HealthStatus(proto.Enum): + r"""The health status of the reservation block. + + Values: + UNDEFINED_HEALTH_STATUS (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + The reservation block is degraded. + HEALTHY (439801213): + The reservation block is healthy. + HEALTH_STATUS_UNSPECIFIED (482246925): + The health status of the reservation block is + unspecified. + """ + UNDEFINED_HEALTH_STATUS = 0 + DEGRADED = 396890926 + HEALTHY = 439801213 + HEALTH_STATUS_UNSPECIFIED = 482246925 + + degraded_sub_block_count: int = proto.Field( proto.INT32, - number=445151652, + number=458044493, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( + health_status: str = proto.Field( proto.STRING, - number=138946292, + number=380545845, + optional=True, ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, + healthy_sub_block_count: int = proto.Field( + proto.INT32, + number=5348540, + optional=True, ) -class RemoveRuleSecurityPolicyRequest(proto.Message): - r"""A request message for SecurityPolicies.RemoveRule. See the - method description for details. - +class ReservationBlockPhysicalTopology(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - priority (int): - The priority of the rule to remove from the - security policy. + block (str): + The hash of the capacity block within the + cluster. - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - security_policy (str): - Name of the security policy to update. + This field is a member of `oneof`_ ``_block``. + cluster (str): + The cluster name of the reservation block. + + This field is a member of `oneof`_ ``_cluster``. + instances (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopologyInstance]): + Output only. The detailed instances + information for a given Block """ - priority: int = proto.Field( - proto.INT32, - number=445151652, + block: str = proto.Field( + proto.STRING, + number=93832333, optional=True, ) - project: str = proto.Field( + cluster: str = proto.Field( proto.STRING, - number=227560217, + number=335221242, + optional=True, ) - security_policy: str = proto.Field( - proto.STRING, - number=171082513, + instances: MutableSequence[ + "ReservationBlockPhysicalTopologyInstance" + ] = proto.RepeatedField( + proto.MESSAGE, + number=29097598, + message="ReservationBlockPhysicalTopologyInstance", ) -class RemoveTrafficClassificationRuleRegionNetworkPolicyRequest(proto.Message): - r"""A request message for - RegionNetworkPolicies.RemoveTrafficClassificationRule. See the - method description for details. - +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: - network_policy (str): - Name of the network policy resource to - update. - priority (int): - The priority of the rule to remove from the - network policy. + instance_id (int): + The InstanceId of the instance - This field is a member of `oneof`_ ``_priority``. - project (str): - Project ID for this request. - region (str): - Name of the region of this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_instance_id``. + physical_host_topology (google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopologyInstancePhysicalHostTopology): + Output only. The PhysicalHostTopology of + instances within a Block resource. - This field is a member of `oneof`_ ``_request_id``. + 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``. """ - network_policy: str = proto.Field( - proto.STRING, - number=504961123, - ) - priority: int = proto.Field( - proto.INT32, - number=445151652, + instance_id: int = proto.Field( + proto.UINT64, + number=45488389, optional=True, ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + physical_host_topology: "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology" = proto.Field( + proto.MESSAGE, + number=390842814, + optional=True, + message="ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + project_id: int = proto.Field( + proto.UINT64, + number=177513473, optional=True, ) -class ReportFaultyReservationSubBlockRequest(proto.Message): - r"""A request message for ReservationSubBlocks.ReportFaulty. See - the method description for details. +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: - parent_name (str): - The name of the parent reservation and parent block. In the - format of - reservations/{reservation_name}/reservationBlocks/{reservation_block_name} - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + host (str): + Host hash for a given instance - This field is a member of `oneof`_ ``_request_id``. - reservation_sub_block (str): - The name of the reservation subBlock. Name - should conform to RFC1035 or be a resource ID. - reservation_sub_blocks_report_faulty_request_resource (google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequest): - The body resource for this request - zone (str): - Name of the zone for this request. Zone name - should conform to RFC1035. - """ + This field is a member of `oneof`_ ``_host``. + sub_block (str): + Sub block hash for a given instance - parent_name: str = proto.Field( - proto.STRING, - number=478151936, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - reservation_sub_block: str = proto.Field( - proto.STRING, - number=22750491, - ) - reservation_sub_blocks_report_faulty_request_resource: "ReservationSubBlocksReportFaultyRequest" = proto.Field( - proto.MESSAGE, - number=450847938, - message="ReservationSubBlocksReportFaultyRequest", + This field is a member of `oneof`_ ``_sub_block``. + """ + + host: str = proto.Field( + proto.STRING, + number=3208616, + optional=True, ) - zone: str = proto.Field( + sub_block: str = proto.Field( proto.STRING, - number=3744684, + number=478033358, + optional=True, ) -class ReportHostAsFaultyInstanceRequest(proto.Message): - r"""A request message for Instances.ReportHostAsFaulty. See the - method description for details. - +class ReservationBlocksGetResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance scoping this request. - instances_report_host_as_faulty_request_resource (google.cloud.compute_v1beta.types.InstancesReportHostAsFaultyRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + resource (google.cloud.compute_v1beta.types.ReservationBlock): - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_resource``. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - instances_report_host_as_faulty_request_resource: "InstancesReportHostAsFaultyRequest" = proto.Field( + resource: "ReservationBlock" = proto.Field( proto.MESSAGE, - number=494094886, - message="InstancesReportHostAsFaultyRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + number=195806222, optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + message="ReservationBlock", ) -class RequestMirrorPolicy(proto.Message): - r"""A policy that specifies how requests intended for the route's - backends are shadowed to a separate mirrored backend service. - The load balancer doesn't wait for responses from the shadow - service. Before sending traffic to the shadow service, the host - or authority header is suffixed with -shadow. - +class ReservationBlocksListResponse(proto.Message): + r"""A list of reservation blocks under a single reservation. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - backend_service (str): - The full or partial URL to the BackendService - resource being mirrored to. The backend service - configured for a mirroring policy must reference - backends that are of the same type as the - original backend service matched in the URL map. - Serverless NEG backends are not currently - supported as a mirrored backend service. + id (str): + Unique identifier for the resource; defined + by the server. - This field is a member of `oneof`_ ``_backend_service``. - mirror_percent (float): - The percentage of requests to be mirrored to - ``backend_service``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlock]): + A list of reservation block resources. + kind (str): + Type of the resource. + Alwayscompute#reservationBlock for a list of + reservation blocks. - This field is a member of `oneof`_ ``_mirror_percent``. + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + This token allows you to get the next page of + results for list requests. If the number of + results is larger thanmaxResults, use the + nextPageToken as a value for the query parameter + pageToken in the next list request. Subsequent + list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - backend_service: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=306946058, + number=3355, optional=True, ) - mirror_percent: float = proto.Field( - proto.DOUBLE, - number=277432261, + items: MutableSequence["ReservationBlock"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="ReservationBlock", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class RequestRemovePeeringNetworkRequest(proto.Message): - r"""A request message for Networks.RequestRemovePeering. See the - method description for details. - +class ReservationList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - network (str): - Name of the network resource to remove - peering from. - networks_request_remove_peering_request_resource (google.cloud.compute_v1beta.types.NetworksRequestRemovePeeringRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + id (str): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): + [Output Only] A list of Allocation resources. + kind (str): + Output only. [Output Only] Type of resource.Always + compute#reservationsList for listsof reservations + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - network: str = proto.Field( + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=232872494, + number=3355, + optional=True, ) - networks_request_remove_peering_request_resource: "NetworksRequestRemovePeeringRequest" = proto.Field( + items: MutableSequence["Reservation"] = proto.RepeatedField( proto.MESSAGE, - number=150860366, - message="NetworksRequestRemovePeeringRequest", + number=100526016, + message="Reservation", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) -class Reservation(proto.Message): - r"""Represents a reservation resource. A reservation ensures that - capacity is held in a specific zone even if the reserved VMs are - not running. For more information, read Reserving zonal - resources. - +class ReservationSubBlock(proto.Message): + r"""Represents a reservation subBlock resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - advanced_deployment_control (google.cloud.compute_v1beta.types.ReservationAdvancedDeploymentControl): - Advanced control for cluster management, - applicable only to DENSE deployment type - reservations. - - This field is a member of `oneof`_ ``_advanced_deployment_control``. - aggregate_reservation (google.cloud.compute_v1beta.types.AllocationAggregateReservation): - Reservation for aggregated resources, - providing shape flexibility. + accelerator_topologies_info (google.cloud.compute_v1beta.types.AcceleratorTopologiesInfo): + Output only. [Output Only] Slice info for the reservation + subBlock. - This field is a member of `oneof`_ ``_aggregate_reservation``. - commitment (str): - [Output Only] Full or partial URL to a parent commitment. - This field displays for reservations that are tied to a - commitment. + This field is a member of `oneof`_ ``_accelerator_topologies_info``. + count (int): + Output only. [Output Only] The number of hosts that are + allocated in this reservation subBlock. - This field is a member of `oneof`_ ``_commitment``. + This field is a member of `oneof`_ ``_count``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. - delete_after_duration (google.cloud.compute_v1beta.types.Duration): - Duration time relative to reservation - creation when Compute Engine will automatically - delete this resource. - - This field is a member of `oneof`_ ``_delete_after_duration``. - delete_at_time (str): - Absolute time in future when the reservation - will be auto-deleted by Compute Engine. - Timestamp is represented in RFC3339 text format. - - This field is a member of `oneof`_ ``_delete_at_time``. - deployment_type (str): - Specifies the deployment strategy for this - reservation. Check the DeploymentType enum for - the list of possible values. - - This field is a member of `oneof`_ ``_deployment_type``. - description (str): - An optional description of this resource. - Provide this property when you create the - resource. - - This field is a member of `oneof`_ ``_description``. - enable_emergent_maintenance (bool): - Indicates whether Compute Engine allows - unplanned maintenance for your VMs; for example, - to fix hardware errors. + health_info (google.cloud.compute_v1beta.types.ReservationSubBlockHealthInfo): + Output only. [Output Only] Health information for the + reservation subBlock. - This field is a member of `oneof`_ ``_enable_emergent_maintenance``. + This field is a member of `oneof`_ ``_health_info``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. + in_use_count (int): + Output only. [Output Only] The number of instances that are + currently in use on this reservation subBlock. + + This field is a member of `oneof`_ ``_in_use_count``. + in_use_host_count (int): + Output only. Number of hosts currently in + use. If there is one or more Instances running + on the host, it is considered in use. + + This field is a member of `oneof`_ ``_in_use_host_count``. kind (str): - [Output Only] Type of the resource. Always - compute#reservations for reservations. + Output only. [Output Only] Type of the resource. + Alwayscompute#reservationSubBlock for reservation subBlocks. This field is a member of `oneof`_ ``_kind``. - linked_commitments (MutableSequence[str]): - [Output Only] Full or partial URL to parent commitments. - This field displays for reservations that are tied to - multiple commitments. name (str): - The name of the resource, provided by the client when - initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. + Output only. [Output Only] The name of this reservation + subBlock generated by Google Compute Engine. The name must + be 1-63 characters long, and comply with RFC1035 @pattern + `a-z `__? This field is a member of `oneof`_ ``_name``. - protection_tier (str): - Protection tier for the workload which - specifies the workload expectations in the event - of infrastructure failures at data center (e.g. - power and/or cooling failures). Check the - ProtectionTier enum for the list of possible - values. - - This field is a member of `oneof`_ ``_protection_tier``. - reservation_mode (str): - [Output only] Indicates the reservation mode of the - reservation. Check the ReservationMode enum for the list of - possible values. - - This field is a member of `oneof`_ ``_reservation_mode``. - reservation_sharing_policy (google.cloud.compute_v1beta.types.AllocationReservationSharingPolicy): - Specify the reservation sharing policy. If - unspecified, the reservation will not be shared - with Google Cloud managed services. - - This field is a member of `oneof`_ ``_reservation_sharing_policy``. - resource_policies (MutableMapping[str, str]): - Resource policies to be added to this - reservation. The key is defined by user, and the - value is resource policy url. This is to define - placement policy with reservation. - resource_status (google.cloud.compute_v1beta.types.AllocationResourceStatus): - [Output Only] Status information for Reservation resource. - - This field is a member of `oneof`_ ``_resource_status``. - satisfies_pzs (bool): - [Output Only] Reserved for future use. + physical_topology (google.cloud.compute_v1beta.types.ReservationSubBlockPhysicalTopology): + Output only. [Output Only] The physical topology of the + reservation subBlock. - This field is a member of `oneof`_ ``_satisfies_pzs``. - scheduling_type (str): - The type of maintenance for the reservation. - Check the SchedulingType enum for the list of - possible values. + This field is a member of `oneof`_ ``_physical_topology``. + reservation_sub_block_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): + Output only. Maintenance information for this + reservation subBlock. - This field is a member of `oneof`_ ``_scheduling_type``. + This field is a member of `oneof`_ ``_reservation_sub_block_maintenance``. self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. This field is a member of `oneof`_ ``_self_link``. - share_settings (google.cloud.compute_v1beta.types.ShareSettings): - Specify share-settings to create a shared - reservation. This property is optional. For more - information about the syntax and options for - this field and its subfields, see the guide for - creating a shared reservation. - - This field is a member of `oneof`_ ``_share_settings``. - specific_reservation (google.cloud.compute_v1beta.types.AllocationSpecificSKUReservation): - Reservation for instances with specific - machine shapes. - - This field is a member of `oneof`_ ``_specific_reservation``. - specific_reservation_required (bool): - Indicates whether the reservation can be - consumed by VMs with affinity for "any" - reservation. If the field is set, then only VMs - that target the reservation by name can consume - from this reservation. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource with the resource id. - This field is a member of `oneof`_ ``_specific_reservation_required``. + This field is a member of `oneof`_ ``_self_link_with_id``. status (str): - [Output Only] The status of the reservation. - CREATING: - Reservation resources are being allocated. - READY: - Reservation resources have been allocated, and the - reservation is ready for use. - DELETING: Reservation - deletion is in progress. - UPDATING: Reservation update is - in progress. Check the Status enum for the list of possible + Output only. [Output Only] Status of the reservation + subBlock. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. zone (str): - Zone in which the reservation resides. A zone - must be provided if the reservation is created - within a commitment. + Output only. [Output Only] Zone in which the reservation + subBlock resides. This field is a member of `oneof`_ ``_zone``. """ - class DeploymentType(proto.Enum): - r"""Specifies the deployment strategy for this reservation. - - Values: - UNDEFINED_DEPLOYMENT_TYPE (0): - A value indicating that the enum field is not - set. - DENSE (64932607): - The reserved capacity is made up of densely - deployed reservation blocks. - DEPLOYMENT_TYPE_UNSPECIFIED (234847180): - No description available. - FLEXIBLE (379880395): - The reserved capacity is made up of highly - flexible, logical reservation blocks. - """ - UNDEFINED_DEPLOYMENT_TYPE = 0 - DENSE = 64932607 - DEPLOYMENT_TYPE_UNSPECIFIED = 234847180 - FLEXIBLE = 379880395 - - class ProtectionTier(proto.Enum): - r"""Protection tier for the workload which specifies the workload - expectations in the event of infrastructure failures at data - center (e.g. power and/or cooling failures). - - Values: - UNDEFINED_PROTECTION_TIER (0): - A value indicating that the enum field is not - set. - CAPACITY_OPTIMIZED (17430466): - CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. - power, cooling) at the data center during normal operating - conditions. In the event of infrastructure failures at data - center (e.g. power and/or cooling failures), this workload - may be disrupted. As a consequence, it has a weaker - availability SLO than STANDARD. - PROTECTION_TIER_UNSPECIFIED (262261984): - Unspecified protection tier. - STANDARD (484642493): - STANDARD protection for workload that should - be protected by redundancies (e.g. power, - cooling) at the data center level. In the event - of infrastructure failures at data center (e.g. - power and/or cooling failures), this workload is - expected to continue as normal using the - redundancies. - """ - UNDEFINED_PROTECTION_TIER = 0 - CAPACITY_OPTIMIZED = 17430466 - PROTECTION_TIER_UNSPECIFIED = 262261984 - STANDARD = 484642493 - - class ReservationMode(proto.Enum): - r"""[Output only] Indicates the reservation mode of the reservation. - - Values: - UNDEFINED_RESERVATION_MODE (0): - A value indicating that the enum field is not - set. - CALENDAR (67431230): - The delivered reservations terminate at - specified endtime along with terminating VMs - running on it. The price for this reservation is - different from on-demand. Currently offered for - A3+ GPUs and TPUs only. - DEFAULT (115302945): - The delivered reservations do not terminate - VMs at the end of reservations. On-demand - pricing and available for all VM families. This - is default mode. - RESERVATION_MODE_UNSPECIFIED (233810606): - No description available. - """ - UNDEFINED_RESERVATION_MODE = 0 - CALENDAR = 67431230 - DEFAULT = 115302945 - RESERVATION_MODE_UNSPECIFIED = 233810606 - - class SchedulingType(proto.Enum): - r"""The type of maintenance for the reservation. - - Values: - UNDEFINED_SCHEDULING_TYPE (0): - A value indicating that the enum field is not - set. - GROUPED (474540862): - Maintenance on all reserved instances in the - reservation is synchronized. - GROUP_MAINTENANCE_TYPE_UNSPECIFIED (447183678): - Unknown maintenance type. - INDEPENDENT (127011674): - Maintenance is not synchronized for this - reservation. Instead, each instance has its own - maintenance window. - """ - UNDEFINED_SCHEDULING_TYPE = 0 - GROUPED = 474540862 - GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678 - INDEPENDENT = 127011674 - class Status(proto.Enum): - r"""[Output Only] The status of the reservation. - CREATING: Reservation - resources are being allocated. - READY: Reservation resources have - been allocated, and the reservation is ready for use. - DELETING: - Reservation deletion is in progress. - UPDATING: Reservation update - is in progress. + r"""Output only. [Output Only] Status of the reservation subBlock. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. CREATING (455564985): - Reservation resources are being allocated. + Resources are being allocated for the + reservation subBlock. DELETING (528602024): - Reservation deletion is in progress. + Reservation subBlock is currently being + deleted. INVALID (530283991): No description available. READY (77848963): - Reservation resources have been allocated, - and the reservation is ready for use. - UPDATING (494614342): - Reservation update is in progress. + Reservation subBlock has allocated all its + resources. """ UNDEFINED_STATUS = 0 CREATING = 455564985 DELETING = 528602024 INVALID = 530283991 READY = 77848963 - UPDATING = 494614342 - advanced_deployment_control: "ReservationAdvancedDeploymentControl" = proto.Field( + accelerator_topologies_info: "AcceleratorTopologiesInfo" = proto.Field( proto.MESSAGE, - number=410618144, + number=84833420, optional=True, - message="ReservationAdvancedDeploymentControl", + message="AcceleratorTopologiesInfo", ) - aggregate_reservation: "AllocationAggregateReservation" = proto.Field( + count: int = proto.Field( + proto.INT32, + number=94851343, + optional=True, + ) + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + health_info: "ReservationSubBlockHealthInfo" = proto.Field( proto.MESSAGE, - number=291567948, + number=235287729, optional=True, - message="AllocationAggregateReservation", + message="ReservationSubBlockHealthInfo", ) - commitment: str = proto.Field( + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + in_use_count: int = proto.Field( + proto.INT32, + number=493458877, + optional=True, + ) + in_use_host_count: int = proto.Field( + proto.INT32, + number=364069834, + optional=True, + ) + kind: str = proto.Field( proto.STRING, - number=482134805, + number=3292052, optional=True, ) - creation_timestamp: str = proto.Field( + name: str = proto.Field( proto.STRING, - number=30525366, + number=3373707, + optional=True, + ) + physical_topology: "ReservationSubBlockPhysicalTopology" = proto.Field( + proto.MESSAGE, + number=279778519, + optional=True, + message="ReservationSubBlockPhysicalTopology", + ) + reservation_sub_block_maintenance: "GroupMaintenanceInfo" = proto.Field( + proto.MESSAGE, + number=377005551, optional=True, + message="GroupMaintenanceInfo", ) - delete_after_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=323997099, + self_link: str = proto.Field( + proto.STRING, + number=456214797, optional=True, - message="Duration", ) - delete_at_time: str = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, - number=83294405, + number=44520962, optional=True, ) - deployment_type: str = proto.Field( + status: str = proto.Field( proto.STRING, - number=396722292, + number=181260274, optional=True, ) - description: str = proto.Field( + zone: str = proto.Field( proto.STRING, - number=422937596, + number=3744684, optional=True, ) - enable_emergent_maintenance: bool = proto.Field( - proto.BOOL, - number=353759497, + + +class ReservationSubBlockHealthInfo(proto.Message): + r"""Health information for the reservation subBlock. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + degraded_host_count (int): + The number of degraded hosts in the + reservation subBlock. + + This field is a member of `oneof`_ ``_degraded_host_count``. + degraded_infra_count (int): + The number of degraded infrastructure (e.g NV + link domain) in the reservation subblock. + + This field is a member of `oneof`_ ``_degraded_infra_count``. + health_status (str): + The health status of the reservation + subBlock. Check the HealthStatus enum for the + list of possible values. + + This field is a member of `oneof`_ ``_health_status``. + healthy_host_count (int): + The number of healthy hosts in the + reservation subBlock. + + This field is a member of `oneof`_ ``_healthy_host_count``. + healthy_infra_count (int): + The number of healthy infrastructure (e.g NV + link domain) in the reservation subblock. + + This field is a member of `oneof`_ ``_healthy_infra_count``. + """ + + class HealthStatus(proto.Enum): + r"""The health status of the reservation subBlock. + + Values: + UNDEFINED_HEALTH_STATUS (0): + A value indicating that the enum field is not + set. + DEGRADED (396890926): + The reservation subBlock is degraded. + HEALTHY (439801213): + The reservation subBlock is healthy. + HEALTH_STATUS_UNSPECIFIED (482246925): + The health status of the reservation subBlock + is unspecified. + """ + UNDEFINED_HEALTH_STATUS = 0 + DEGRADED = 396890926 + HEALTHY = 439801213 + HEALTH_STATUS_UNSPECIFIED = 482246925 + + degraded_host_count: int = proto.Field( + proto.INT32, + number=535025001, optional=True, ) - id: int = proto.Field( - proto.UINT64, - number=3355, + degraded_infra_count: int = proto.Field( + proto.INT32, + number=138638927, optional=True, ) - kind: str = proto.Field( + health_status: str = proto.Field( proto.STRING, - number=3292052, + number=380545845, optional=True, ) - linked_commitments: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=470957784, + healthy_host_count: int = proto.Field( + proto.INT32, + number=40739738, + optional=True, ) - name: str = proto.Field( + healthy_infra_count: int = proto.Field( + proto.INT32, + number=385052222, + optional=True, + ) + + +class ReservationSubBlockPhysicalTopology(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + block (str): + The hash of the capacity block within the + cluster. + + This field is a member of `oneof`_ ``_block``. + cluster (str): + The cluster name of the reservation subBlock. + + This field is a member of `oneof`_ ``_cluster``. + sub_block (str): + The hash of the capacity sub-block within the + capacity block. + + This field is a member of `oneof`_ ``_sub_block``. + """ + + block: str = proto.Field( proto.STRING, - number=3373707, + number=93832333, optional=True, ) - protection_tier: str = proto.Field( + cluster: str = proto.Field( proto.STRING, - number=503959432, + number=335221242, optional=True, ) - reservation_mode: str = proto.Field( + sub_block: str = proto.Field( proto.STRING, - number=277294646, + number=478033358, optional=True, ) - reservation_sharing_policy: "AllocationReservationSharingPolicy" = proto.Field( + + +class ReservationSubBlocksGetResponse(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + resource (google.cloud.compute_v1beta.types.ReservationSubBlock): + + This field is a member of `oneof`_ ``_resource``. + """ + + resource: "ReservationSubBlock" = proto.Field( proto.MESSAGE, - number=205970120, + number=195806222, optional=True, - message="AllocationReservationSharingPolicy", + message="ReservationSubBlock", ) - resource_policies: MutableMapping[str, str] = proto.MapField( - proto.STRING, + + +class ReservationSubBlocksListResponse(proto.Message): + r"""A list of reservation subBlocks under a single reservation. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + id (str): + Unique identifier for the resource; defined + by the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ReservationSubBlock]): + A list of reservation subBlock resources. + kind (str): + Type of the resource. + Alwayscompute#reservationSubBlock for a list of + reservation subBlocks. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + This token allows you to get the next page of + results for list requests. If the number of + results is larger thanmaxResults, use the + nextPageToken as a value for the query parameter + pageToken in the next list request. Subsequent + list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Server-defined URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + id: str = proto.Field( proto.STRING, - number=22220385, + number=3355, + optional=True, ) - resource_status: "AllocationResourceStatus" = proto.Field( + items: MutableSequence["ReservationSubBlock"] = proto.RepeatedField( proto.MESSAGE, - number=249429315, - optional=True, - message="AllocationResourceStatus", + number=100526016, + message="ReservationSubBlock", ) - satisfies_pzs: bool = proto.Field( - proto.BOOL, - number=480964267, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, ) - scheduling_type: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=199835397, + number=79797525, optional=True, ) self_link: str = proto.Field( @@ -105890,241 +122987,292 @@ class Status(proto.Enum): number=456214797, optional=True, ) - share_settings: "ShareSettings" = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, - number=266668163, + number=50704284, optional=True, - message="ShareSettings", + message="Warning", ) - specific_reservation: "AllocationSpecificSKUReservation" = proto.Field( - proto.MESSAGE, - number=404901951, + + +class ReservationSubBlocksReportFaultyRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + disruption_schedule (str): + The disruption schedule for the subBlock. + Check the DisruptionSchedule enum for the list + of possible values. + + This field is a member of `oneof`_ ``_disruption_schedule``. + failure_component (str): + The component that experienced the fault. + Check the FailureComponent enum for the list of + possible values. + + This field is a member of `oneof`_ ``_failure_component``. + fault_reasons (MutableSequence[google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequestFaultReason]): + The reasons for the fault experienced with + the subBlock. + """ + + class DisruptionSchedule(proto.Enum): + r"""The disruption schedule for the subBlock. + + Values: + UNDEFINED_DISRUPTION_SCHEDULE (0): + A value indicating that the enum field is not + set. + DISRUPTION_SCHEDULE_UNSPECIFIED (332543835): + No description available. + IMMEDIATE (152881041): + All VMs will be disrupted immediately. + """ + UNDEFINED_DISRUPTION_SCHEDULE = 0 + DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835 + IMMEDIATE = 152881041 + + class FailureComponent(proto.Enum): + r"""The component that experienced the fault. + + Values: + UNDEFINED_FAILURE_COMPONENT (0): + A value indicating that the enum field is not + set. + FAILURE_COMPONENT_UNSPECIFIED (332003744): + No description available. + MULTIPLE_FAULTY_HOSTS (423545298): + Multiple hosts experienced the fault. + NVLINK_SWITCH (239107153): + The NVLink switch experienced the fault. + """ + UNDEFINED_FAILURE_COMPONENT = 0 + FAILURE_COMPONENT_UNSPECIFIED = 332003744 + MULTIPLE_FAULTY_HOSTS = 423545298 + NVLINK_SWITCH = 239107153 + + disruption_schedule: str = proto.Field( + proto.STRING, + number=95871619, optional=True, - message="AllocationSpecificSKUReservation", ) - specific_reservation_required: bool = proto.Field( - proto.BOOL, - number=226550687, + failure_component: str = proto.Field( + proto.STRING, + number=25912456, optional=True, ) - status: str = proto.Field( + fault_reasons: MutableSequence[ + "ReservationSubBlocksReportFaultyRequestFaultReason" + ] = proto.RepeatedField( + proto.MESSAGE, + number=168056210, + message="ReservationSubBlocksReportFaultyRequestFaultReason", + ) + + +class ReservationSubBlocksReportFaultyRequestFaultReason(proto.Message): + r"""The reason for the fault experienced with the subBlock. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + behavior (str): + The behavior of the fault experienced with + the subBlock. Check the Behavior enum for the + list of possible values. + + This field is a member of `oneof`_ ``_behavior``. + description (str): + The description of the fault experienced with + the subBlock. + + This field is a member of `oneof`_ ``_description``. + """ + + class Behavior(proto.Enum): + r"""The behavior of the fault experienced with the subBlock. + + Values: + UNDEFINED_BEHAVIOR (0): + A value indicating that the enum field is not + set. + FAULT_BEHAVIOR_UNSPECIFIED (447660743): + No description available. + GPU_ERROR (198817909): + The subBlock experienced a GPU error. + PERFORMANCE (135701520): + The subBlock experienced performance issues. + SILENT_DATA_CORRUPTION (111360678): + The subBlock experienced silent data + corruption. + SWITCH_FAILURE (254909279): + The subBlock experienced a switch failure. + """ + UNDEFINED_BEHAVIOR = 0 + FAULT_BEHAVIOR_UNSPECIFIED = 447660743 + GPU_ERROR = 198817909 + PERFORMANCE = 135701520 + SILENT_DATA_CORRUPTION = 111360678 + SWITCH_FAILURE = 254909279 + + behavior: str = proto.Field( proto.STRING, - number=181260274, + number=437170770, optional=True, ) - zone: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=3744684, + number=422937596, optional=True, ) -class ReservationAdvancedDeploymentControl(proto.Message): - r"""Advance control for cluster management, applicable only to - DENSE deployment type reservations. - +class ReservationsBlocksPerformMaintenanceRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - reservation_operational_mode (str): - Indicates chosen reservation operational mode - for the reservation. Check the - ReservationOperationalMode enum for the list of - possible values. + maintenance_scope (str): + Specifies if all, running or unused hosts are + in scope for this request. Check the + MaintenanceScope enum for the list of possible + values. - This field is a member of `oneof`_ ``_reservation_operational_mode``. + This field is a member of `oneof`_ ``_maintenance_scope``. """ - class ReservationOperationalMode(proto.Enum): - r"""Indicates chosen reservation operational mode for the - reservation. + class MaintenanceScope(proto.Enum): + r"""Specifies if all, running or unused hosts are in scope for + this request. Values: - UNDEFINED_RESERVATION_OPERATIONAL_MODE (0): + UNDEFINED_MAINTENANCE_SCOPE (0): A value indicating that the enum field is not set. - ALL_CAPACITY (500029880): - Google Cloud does not manage the failure of - machines, but provides additional capacity, - which is not guaranteed to be available. - HIGHLY_AVAILABLE_CAPACITY (110861600): - Google Cloud manages the failure of machines - to provide high availability. - RESERVATION_OPERATIONAL_MODE_UNSPECIFIED (194296603): - No description available. + ALL (64897): + Trigger maintenance for all hosts belonging + to this reservation irrespective of whether VMs + are running on them or not. + MAINTENANCE_SCOPE_UNSPECIFIED (78827328): + Internal only + RUNNING_VMS (535770588): + Trigger maintenance only on the hosts + belonging to this reservation which have VMs + running on them. + UNUSED_CAPACITY (212724995): + Trigger maintenance only on the hosts + belonging to this reservation which do not have + any VMs running on them. This is not allowed for + Standard ExR """ - UNDEFINED_RESERVATION_OPERATIONAL_MODE = 0 - ALL_CAPACITY = 500029880 - HIGHLY_AVAILABLE_CAPACITY = 110861600 - RESERVATION_OPERATIONAL_MODE_UNSPECIFIED = 194296603 + UNDEFINED_MAINTENANCE_SCOPE = 0 + ALL = 64897 + MAINTENANCE_SCOPE_UNSPECIFIED = 78827328 + RUNNING_VMS = 535770588 + UNUSED_CAPACITY = 212724995 - reservation_operational_mode: str = proto.Field( + maintenance_scope: str = proto.Field( proto.STRING, - number=499978755, + number=140687912, optional=True, ) -class ReservationAffinity(proto.Message): - r"""Specifies the reservations that this instance can consume - from. - +class ReservationsPerformMaintenanceRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - consume_reservation_type (str): - Specifies the type of reservation from which this instance - can consume resources: ANY_RESERVATION (default), - SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming - reserved instances for examples. Check the - ConsumeReservationType enum for the list of possible values. - - This field is a member of `oneof`_ ``_consume_reservation_type``. - key (str): - Corresponds to the label key of a reservation resource. To - target a SPECIFIC_RESERVATION by name, specify - googleapis.com/reservation-name as the key and specify the - name of your reservation as its value. + maintenance_scope (str): + Specifies if all, running or unused hosts are + in scope for this request. Check the + MaintenanceScope enum for the list of possible + values. - This field is a member of `oneof`_ ``_key``. - values (MutableSequence[str]): - Corresponds to the label values of a - reservation resource. This can be either a name - to a reservation in the same project or - "projects/different-project/reservations/some-reservation-name" - to target a shared reservation in the same zone - but in a different project. + This field is a member of `oneof`_ ``_maintenance_scope``. """ - class ConsumeReservationType(proto.Enum): - r"""Specifies the type of reservation from which this instance can - consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, - or NO_RESERVATION. See Consuming reserved instances for examples. + class MaintenanceScope(proto.Enum): + r"""Specifies if all, running or unused hosts are in scope for + this request. Values: - UNDEFINED_CONSUME_RESERVATION_TYPE (0): + UNDEFINED_MAINTENANCE_SCOPE (0): A value indicating that the enum field is not set. - ANY_RESERVATION (200008121): - Consume any allocation available. - NO_RESERVATION (169322030): - Do not consume from any allocated capacity. - SPECIFIC_RESERVATION (229889055): - Must consume from a specific reservation. - Must specify key value fields for specifying the - reservations. - SPECIFIC_THEN_ANY_RESERVATION (37025924): - Prefer to consume from a specific - reservation, but still consume any reservation - available if the specified reservation is not - available or exhausted. Must specify key value - fields for specifying the reservations. - SPECIFIC_THEN_NO_RESERVATION (406522371): - Prefer to consume from a specific - reservation, but still consume from the - on-demand pool if the specified reservation is - exhausted. Must specify key value fields for - specifying the reservations. - UNSPECIFIED (526786327): - No description available. + ALL (64897): + Trigger maintenance for all hosts belonging + to this reservation irrespective of whether VMs + are running on them or not. + MAINTENANCE_SCOPE_UNSPECIFIED (78827328): + Internal only + RUNNING_VMS (535770588): + Trigger maintenance only on the hosts + belonging to this reservation which have VMs + running on them. + UNUSED_CAPACITY (212724995): + Trigger maintenance only on the hosts + belonging to this reservation which do not have + any VMs running on them. This is not allowed for + Standard ExR """ - UNDEFINED_CONSUME_RESERVATION_TYPE = 0 - ANY_RESERVATION = 200008121 - NO_RESERVATION = 169322030 - SPECIFIC_RESERVATION = 229889055 - SPECIFIC_THEN_ANY_RESERVATION = 37025924 - SPECIFIC_THEN_NO_RESERVATION = 406522371 - UNSPECIFIED = 526786327 + UNDEFINED_MAINTENANCE_SCOPE = 0 + ALL = 64897 + MAINTENANCE_SCOPE_UNSPECIFIED = 78827328 + RUNNING_VMS = 535770588 + UNUSED_CAPACITY = 212724995 - consume_reservation_type: str = proto.Field( - proto.STRING, - number=300736944, - optional=True, - ) - key: str = proto.Field( + maintenance_scope: str = proto.Field( proto.STRING, - number=106079, + number=140687912, optional=True, ) - values: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=249928994, - ) -class ReservationAggregatedList(proto.Message): - r"""Contains a list of reservations. +class ReservationsResizeRequest(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + specific_sku_count (int): + Number of allocated resources can be resized + with minimum = 1 and maximum = 1000. - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.ReservationsScopedList]): - A list of Allocation resources. - kind (str): - Type of resource. + This field is a member of `oneof`_ ``_specific_sku_count``. + """ - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + specific_sku_count: int = proto.Field( + proto.INT64, + number=13890720, + optional=True, + ) - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. +class ReservationsScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): + A list of reservations contained in this + scope. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Informational warning which replaces the list + of reservations when the list is empty. This field is a member of `oneof`_ ``_warning``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableMapping[str, "ReservationsScopedList"] = proto.MapField( - proto.STRING, + reservations: MutableSequence["Reservation"] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="ReservationsScopedList", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - unreachables: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=243372063, + number=399717927, + message="Reservation", ) warning: "Warning" = proto.Field( proto.MESSAGE, @@ -106134,531 +123282,665 @@ def raw_page(self): ) -class ReservationBlock(proto.Message): - r"""Represents a reservation block resource. +class ResetInstanceRequest(proto.Message): + r"""A request message for Instances.Reset. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - count (int): - [Output Only] The number of resources that are allocated in - this reservation block. - - This field is a member of `oneof`_ ``_count``. - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - health_info (google.cloud.compute_v1beta.types.ReservationBlockHealthInfo): - [Output Only] Health information for the reservation block. - - This field is a member of `oneof`_ ``_health_info``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - in_use_count (int): - [Output Only] The number of instances that are currently in - use on this reservation block. - - This field is a member of `oneof`_ ``_in_use_count``. - in_use_host_count (int): - Number of hosts currently in use. If there is - one or more Instances running on the host, it is - considered in use. - - This field is a member of `oneof`_ ``_in_use_host_count``. - kind (str): - [Output Only] Type of the resource. Always - compute#reservationBlock for reservation blocks. - - This field is a member of `oneof`_ ``_kind``. - name (str): - [Output Only] The name of this reservation block generated - by Google Compute Engine. The name must be 1-63 characters - long, and comply with RFC1035 @pattern - `a-z `__? + instance (str): + Name of the instance scoping this request. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_name``. - physical_topology (google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopology): - [Output Only] The physical topology of the reservation - block. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. + """ - This field is a member of `oneof`_ ``_physical_topology``. - reservation_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): - [Output Only] Maintenance information for this reservation - block. + instance: str = proto.Field( + proto.STRING, + number=18257045, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) - This field is a member of `oneof`_ ``_reservation_maintenance``. - reservation_sub_block_count (int): - [Output Only] The number of reservation subBlocks associated - with this reservation block. - This field is a member of `oneof`_ ``_reservation_sub_block_count``. - reservation_sub_block_in_use_count (int): - [Output Only] The number of in-use reservation subBlocks - associated with this reservation block. If at least one VM - is running on a subBlock, it is considered in-use. +class ResizeAdvancedInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.ResizeAdvanced. + See the method description for details. - This field is a member of `oneof`_ ``_reservation_sub_block_in_use_count``. - self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. - This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - This field is a member of `oneof`_ ``_self_link_with_id``. - status (str): - [Output Only] Status of the reservation block. Check the - Status enum for the list of possible values. + Attributes: + instance_group_manager (str): + The name of the managed instance group. + instance_group_managers_resize_advanced_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersResizeAdvancedRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_status``. + This field is a member of `oneof`_ ``_request_id``. zone (str): - [Output Only] Zone in which the reservation block resides. - - This field is a member of `oneof`_ ``_zone``. + The name of thezone where the managed + instance group is located. """ - class Status(proto.Enum): - r"""[Output Only] Status of the reservation block. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - CREATING (455564985): - Resources are being allocated for the - reservation block. - DELETING (528602024): - Reservation block is currently being deleted. - INVALID (530283991): - No description available. - READY (77848963): - Reservation block has allocated all its - resources. - """ - UNDEFINED_STATUS = 0 - CREATING = 455564985 - DELETING = 528602024 - INVALID = 530283991 - READY = 77848963 - - count: int = proto.Field( - proto.INT32, - number=94851343, - optional=True, - ) - creation_timestamp: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=30525366, - optional=True, + number=249363395, ) - health_info: "ReservationBlockHealthInfo" = proto.Field( + instance_group_managers_resize_advanced_request_resource: "InstanceGroupManagersResizeAdvancedRequest" = proto.Field( proto.MESSAGE, - number=235287729, - optional=True, - message="ReservationBlockHealthInfo", - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - in_use_count: int = proto.Field( - proto.INT32, - number=493458877, - optional=True, - ) - in_use_host_count: int = proto.Field( - proto.INT32, - number=364069834, - optional=True, + number=95148991, + message="InstanceGroupManagersResizeAdvancedRequest", ) - kind: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=3292052, - optional=True, + number=227560217, ) - name: str = proto.Field( + request_id: str = proto.Field( proto.STRING, - number=3373707, - optional=True, - ) - physical_topology: "ReservationBlockPhysicalTopology" = proto.Field( - proto.MESSAGE, - number=279778519, - optional=True, - message="ReservationBlockPhysicalTopology", - ) - reservation_maintenance: "GroupMaintenanceInfo" = proto.Field( - proto.MESSAGE, - number=340607776, - optional=True, - message="GroupMaintenanceInfo", - ) - reservation_sub_block_count: int = proto.Field( - proto.INT32, - number=330782955, + number=37109963, optional=True, ) - reservation_sub_block_in_use_count: int = proto.Field( - proto.INT32, - number=186007137, - optional=True, + zone: str = proto.Field( + proto.STRING, + number=3744684, ) - self_link: str = proto.Field( + + +class ResizeAdvancedRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ResizeAdvanced. See the method + description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_group_manager (str): + The name of the managed instance group. + It must be a string that meets the requirements + in RFC1035. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + It must be a string that meets the requirements + in RFC1035. + region_instance_group_managers_resize_advanced_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + instance_group_manager: str = proto.Field( proto.STRING, - number=456214797, - optional=True, + number=249363395, ) - self_link_with_id: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=44520962, - optional=True, + number=227560217, ) - status: str = proto.Field( + region: str = proto.Field( proto.STRING, - number=181260274, - optional=True, + number=138946292, ) - zone: str = proto.Field( + region_instance_group_managers_resize_advanced_request_resource: "RegionInstanceGroupManagersResizeAdvancedRequest" = proto.Field( + proto.MESSAGE, + number=331077290, + message="RegionInstanceGroupManagersResizeAdvancedRequest", + ) + request_id: str = proto.Field( proto.STRING, - number=3744684, + number=37109963, optional=True, ) -class ReservationBlockHealthInfo(proto.Message): - r"""Health information for the reservation block. +class ResizeDiskRequest(proto.Message): + r"""A request message for Disks.Resize. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - degraded_sub_block_count (int): - The number of subBlocks that are degraded. - - This field is a member of `oneof`_ ``_degraded_sub_block_count``. - health_status (str): - The health status of the reservation block. - Check the HealthStatus enum for the list of - possible values. - - This field is a member of `oneof`_ ``_health_status``. - healthy_sub_block_count (int): - The number of subBlocks that are healthy. + disk (str): + The name of the persistent disk. + disks_resize_request_resource (google.cloud.compute_v1beta.types.DisksResizeRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_healthy_sub_block_count``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - class HealthStatus(proto.Enum): - r"""The health status of the reservation block. - - Values: - UNDEFINED_HEALTH_STATUS (0): - A value indicating that the enum field is not - set. - DEGRADED (396890926): - The reservation block is degraded. - HEALTHY (439801213): - The reservation block is healthy. - HEALTH_STATUS_UNSPECIFIED (482246925): - The health status of the reservation block is - unspecified. - """ - UNDEFINED_HEALTH_STATUS = 0 - DEGRADED = 396890926 - HEALTHY = 439801213 - HEALTH_STATUS_UNSPECIFIED = 482246925 - - degraded_sub_block_count: int = proto.Field( - proto.INT32, - number=458044493, - optional=True, + disk: str = proto.Field( + proto.STRING, + number=3083677, ) - health_status: str = proto.Field( + disks_resize_request_resource: "DisksResizeRequest" = proto.Field( + proto.MESSAGE, + number=78307616, + message="DisksResizeRequest", + ) + project: str = proto.Field( proto.STRING, - number=380545845, - optional=True, + number=227560217, ) - healthy_sub_block_count: int = proto.Field( - proto.INT32, - number=5348540, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ReservationBlockPhysicalTopology(proto.Message): - r""" +class ResizeInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.Resize. See the + method description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - block (str): - The hash of the capacity block within the - cluster. - - This field is a member of `oneof`_ ``_block``. - cluster (str): - The cluster name of the reservation block. + instance_group_manager (str): + The name of the managed instance group. + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_cluster``. - instances (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopologyInstance]): - The detailed instances information for a - given Block + This field is a member of `oneof`_ ``_request_id``. + size (int): + The number of running instances that the + managed instance group should maintain at any + given time. The group automatically adds or + removes instances to maintain the number of + instances specified by this parameter. + zone (str): + The name of thezone where the managed + instance group is located. """ - block: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=93832333, - optional=True, + number=249363395, ) - cluster: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=335221242, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) - instances: MutableSequence[ - "ReservationBlockPhysicalTopologyInstance" - ] = proto.RepeatedField( - proto.MESSAGE, - number=29097598, - message="ReservationBlockPhysicalTopologyInstance", + size: int = proto.Field( + proto.INT32, + number=3530753, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class ReservationBlockPhysicalTopologyInstance(proto.Message): - r"""The instances information for a given Block +class ResizeRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.Resize. See the method + description for details. + .. _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 + disk (str): + Name of the regional persistent disk. + project (str): + The project ID for this request. + region (str): + Name of the region for this request. + region_disks_resize_request_resource (google.cloud.compute_v1beta.types.RegionDisksResizeRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_project_id``. + This field is a member of `oneof`_ ``_request_id``. """ - instance_id: int = proto.Field( - proto.UINT64, - number=45488389, - optional=True, + disk: str = proto.Field( + proto.STRING, + number=3083677, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, ) - physical_host_topology: "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology" = proto.Field( + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_disks_resize_request_resource: "RegionDisksResizeRequest" = proto.Field( proto.MESSAGE, - number=390842814, - optional=True, - message="ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", + number=446633237, + message="RegionDisksResizeRequest", ) - project_id: int = proto.Field( - proto.UINT64, - number=177513473, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class ReservationBlockPhysicalTopologyInstancePhysicalHostTopology(proto.Message): - r"""The PhysicalHostTopology of the instance within a Block - resource. +class ResizeRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for RegionInstanceGroupManagers.Resize. See + the method description for details. .. _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 + instance_group_manager (str): + Name of the managed instance group. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_sub_block``. + This field is a member of `oneof`_ ``_request_id``. + size (int): + Number of instances that should exist in this + instance group manager. """ - host: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=3208616, - optional=True, + number=249363395, ) - sub_block: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=478033358, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + size: int = proto.Field( + proto.INT32, + number=3530753, + ) -class ReservationBlocksGetResponse(proto.Message): - r""" +class ResizeReservationRequest(proto.Message): + r"""A request message for Reservations.Resize. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - resource (google.cloud.compute_v1beta.types.ReservationBlock): + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_resource``. + This field is a member of `oneof`_ ``_request_id``. + reservation (str): + Name of the reservation to update. + reservations_resize_request_resource (google.cloud.compute_v1beta.types.ReservationsResizeRequest): + The body resource for this request + zone (str): + Name of the zone for this request. """ - resource: "ReservationBlock" = proto.Field( - proto.MESSAGE, - number=195806222, + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="ReservationBlock", + ) + reservation: str = proto.Field( + proto.STRING, + number=47530956, + ) + reservations_resize_request_resource: "ReservationsResizeRequest" = proto.Field( + proto.MESSAGE, + number=389262801, + message="ReservationsResizeRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class ReservationBlocksListResponse(proto.Message): - r"""A list of reservation blocks under a single reservation. +class ResourceCommitment(proto.Message): + r"""Commitment for a particular hardware resource (a commitment + is composed of one or more of these). + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - Unique identifier for the resource; defined - by the server. + accelerator_type (str): + Name of the accelerator type or GPU resource. + Specify this field only when the type of + hardware resource is ACCELERATOR. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlock]): - A list of reservation block resources. - kind (str): - Type of the resource. Always - compute#reservationBlock for a list of - reservation blocks. + This field is a member of `oneof`_ ``_accelerator_type``. + amount (int): + The quantity of the hardware resource that + you want to commit to purchasing (in a + type-dependent unit). + + - For vCPUs, you must specify an integer + value. + - For memory, you specify the amount of MB + that you want. The value you specify must + be a multiple of 256 MB, with up to 6.5 GB of + memory per every vCPU. + - For GPUs, you must specify an integer + value. + - For Local SSD disks, you must specify the + amount in GB. The size of a single Local + SSD disk is 375 GB. - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - This token allows you to get the next page of - results for list requests. If the number of - results is larger than maxResults, use the - nextPageToken as a value for the query parameter - pageToken in the next list request. Subsequent - list requests will have their own nextPageToken - to continue paging through the results. + This field is a member of `oneof`_ ``_amount``. + type_ (str): + The type of hardware resource that you want to specify. You + can specify any of the following values: - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - Server-defined URL for this resource. + :: - This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning message. + - VCPU + - MEMORY + - LOCAL_SSD + - ACCELERATOR - This field is a member of `oneof`_ ``_warning``. + Specify as a separate entry in the list for each individual + resource type. Check the Type enum for the list of possible + values. + + This field is a member of `oneof`_ ``_type``. """ - @property - def raw_page(self): - return self + class Type(proto.Enum): + r"""The type of hardware resource that you want to specify. You can + specify any of the following values: - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["ReservationBlock"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="ReservationBlock", - ) - kind: str = proto.Field( + :: + + - VCPU + - MEMORY + - LOCAL_SSD + - ACCELERATOR + + Specify as a separate entry in the list for each individual resource + type. + + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + ACCELERATOR (429815371): + No description available. + LOCAL_SSD (508934896): + No description available. + MEMORY (123056385): + No description available. + UNSPECIFIED (526786327): + No description available. + VCPU (2628978): + No description available. + """ + UNDEFINED_TYPE = 0 + ACCELERATOR = 429815371 + LOCAL_SSD = 508934896 + MEMORY = 123056385 + UNSPECIFIED = 526786327 + VCPU = 2628978 + + accelerator_type: str = proto.Field( proto.STRING, - number=3292052, + number=138031246, optional=True, ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, + amount: int = proto.Field( + proto.INT64, + number=196759640, optional=True, ) - self_link: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=456214797, - optional=True, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=3575610, optional=True, - message="Warning", ) -class ReservationList(proto.Message): +class ResourceGroupReference(proto.Message): r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - id (str): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + group (str): + A URI referencing one of the instance groups + or network endpoint groups listed in the backend + service. - This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): - [Output Only] A list of Allocation resources. - kind (str): - [Output Only] Type of resource.Always - compute#reservationsList for listsof reservations + This field is a member of `oneof`_ ``_group``. + """ - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + group: str = proto.Field( + proto.STRING, + number=98629247, + optional=True, + ) - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. - This field is a member of `oneof`_ ``_self_link``. +class ResourcePoliciesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + resource_policies (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicy]): + A list of resourcePolicies contained in this + scope. warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Informational warning which replaces the list + of resourcePolicies when the list is empty. This field is a member of `oneof`_ ``_warning``. """ - @property - def raw_page(self): - return self - - id: str = proto.Field( - proto.STRING, - number=3355, - optional=True, - ) - items: MutableSequence["Reservation"] = proto.RepeatedField( + resource_policies: MutableSequence["ResourcePolicy"] = proto.RepeatedField( proto.MESSAGE, - number=100526016, - message="Reservation", - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - next_page_token: str = proto.Field( - proto.STRING, - number=79797525, - optional=True, - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, + number=22220385, + message="ResourcePolicy", ) warning: "Warning" = proto.Field( proto.MESSAGE, @@ -106668,360 +123950,234 @@ def raw_page(self): ) -class ReservationSubBlock(proto.Message): - r"""Represents a reservation subBlock resource. +class ResourcePolicy(proto.Message): + r"""Represents a Resource Policy resource. You can use resource + policies to schedule actions for some Compute Engine resources. + For example, you can use them toschedule persistent disk + snapshots. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - count (int): - [Output Only] The number of hosts that are allocated in this - reservation subBlock. - - This field is a member of `oneof`_ ``_count``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. - health_info (google.cloud.compute_v1beta.types.ReservationSubBlockHealthInfo): - [Output Only] Health information for the reservation - subBlock. + description (str): - This field is a member of `oneof`_ ``_health_info``. + This field is a member of `oneof`_ ``_description``. + disk_consistency_group_policy (google.cloud.compute_v1beta.types.ResourcePolicyDiskConsistencyGroupPolicy): + Resource policy for disk consistency groups. + + This field is a member of `oneof`_ ``_disk_consistency_group_policy``. + group_placement_policy (google.cloud.compute_v1beta.types.ResourcePolicyGroupPlacementPolicy): + Resource policy for instances for placement + configuration. + + This field is a member of `oneof`_ ``_group_placement_policy``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - in_use_count (int): - [Output Only] The number of instances that are currently in - use on this reservation subBlock. - - This field is a member of `oneof`_ ``_in_use_count``. - in_use_host_count (int): - Number of hosts currently in use. If there is - one or more Instances running on the host, it is - considered in use. + instance_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicy): + Resource policy for scheduling instance + operations. - This field is a member of `oneof`_ ``_in_use_host_count``. + This field is a member of `oneof`_ ``_instance_schedule_policy``. kind (str): - [Output Only] Type of the resource. Always - compute#reservationSubBlock for reservation subBlocks. + Output only. [Output Only] Type of the resource. + Alwayscompute#resource_policies for resource policies. This field is a member of `oneof`_ ``_kind``. name (str): - [Output Only] The name of this reservation subBlock - generated by Google Compute Engine. The name must be 1-63 - characters long, and comply with RFC1035 @pattern - `a-z `__? + The name of the resource, provided by the client when + initially creating the resource. The resource name must be + 1-63 characters long, and comply withRFC1035. Specifically, + the name must be 1-63 characters long and match the regular + expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the + first character must be a lowercase letter, and all + following characters must be a dash, lowercase letter, or + digit, except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - physical_topology (google.cloud.compute_v1beta.types.ReservationSubBlockPhysicalTopology): - [Output Only] The physical topology of the reservation - subBlock. + region (str): - This field is a member of `oneof`_ ``_physical_topology``. - reservation_sub_block_maintenance (google.cloud.compute_v1beta.types.GroupMaintenanceInfo): - Maintenance information for this reservation - subBlock. + This field is a member of `oneof`_ ``_region``. + resource_status (google.cloud.compute_v1beta.types.ResourcePolicyResourceStatus): + Output only. [Output Only] The system status of the resource + policy. - This field is a member of `oneof`_ ``_reservation_sub_block_maintenance``. + This field is a member of `oneof`_ ``_resource_status``. self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. This field is a member of `oneof`_ ``_self_link``. - self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + snapshot_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicy): + Resource policy for persistent disks for + creating snapshots. - This field is a member of `oneof`_ ``_self_link_with_id``. + This field is a member of `oneof`_ ``_snapshot_schedule_policy``. status (str): - [Output Only] Status of the reservation subBlock. Check the - Status enum for the list of possible values. + Output only. [Output Only] The status of resource policy + creation. Check the Status enum for the list of possible + values. This field is a member of `oneof`_ ``_status``. - zone (str): - [Output Only] Zone in which the reservation subBlock - resides. + workload_policy (google.cloud.compute_v1beta.types.ResourcePolicyWorkloadPolicy): + Resource policy for defining instance + placement for MIGs. - This field is a member of `oneof`_ ``_zone``. + This field is a member of `oneof`_ ``_workload_policy``. """ class Status(proto.Enum): - r"""[Output Only] Status of the reservation subBlock. + r"""Output only. [Output Only] The status of resource policy creation. Values: UNDEFINED_STATUS (0): A value indicating that the enum field is not set. CREATING (455564985): - Resources are being allocated for the - reservation subBlock. + Resource policy is being created. DELETING (528602024): - Reservation subBlock is currently being - deleted. + Resource policy is being deleted. + EXPIRED (482489093): + Resource policy is expired and will not run + again. INVALID (530283991): No description available. READY (77848963): - Reservation subBlock has allocated all its - resources. + Resource policy is ready to be used. """ UNDEFINED_STATUS = 0 CREATING = 455564985 DELETING = 528602024 + EXPIRED = 482489093 INVALID = 530283991 READY = 77848963 - count: int = proto.Field( - proto.INT32, - number=94851343, - optional=True, - ) creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - health_info: "ReservationSubBlockHealthInfo" = proto.Field( - proto.MESSAGE, - number=235287729, - optional=True, - message="ReservationSubBlockHealthInfo", - ) - id: int = proto.Field( - proto.UINT64, - number=3355, - optional=True, - ) - in_use_count: int = proto.Field( - proto.INT32, - number=493458877, - optional=True, - ) - in_use_host_count: int = proto.Field( - proto.INT32, - number=364069834, - optional=True, - ) - kind: str = proto.Field( - proto.STRING, - number=3292052, - optional=True, - ) - name: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=3373707, + number=422937596, optional=True, ) - physical_topology: "ReservationSubBlockPhysicalTopology" = proto.Field( - proto.MESSAGE, - number=279778519, - optional=True, - message="ReservationSubBlockPhysicalTopology", + disk_consistency_group_policy: "ResourcePolicyDiskConsistencyGroupPolicy" = ( + proto.Field( + proto.MESSAGE, + number=473727515, + optional=True, + message="ResourcePolicyDiskConsistencyGroupPolicy", + ) ) - reservation_sub_block_maintenance: "GroupMaintenanceInfo" = proto.Field( + group_placement_policy: "ResourcePolicyGroupPlacementPolicy" = proto.Field( proto.MESSAGE, - number=377005551, - optional=True, - message="GroupMaintenanceInfo", - ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, - optional=True, - ) - self_link_with_id: str = proto.Field( - proto.STRING, - number=44520962, - optional=True, - ) - status: str = proto.Field( - proto.STRING, - number=181260274, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + number=10931596, optional=True, + message="ResourcePolicyGroupPlacementPolicy", ) - - -class ReservationSubBlockHealthInfo(proto.Message): - r"""Health information for the reservation subBlock. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - degraded_host_count (int): - The number of degraded hosts in the - reservation subBlock. - - This field is a member of `oneof`_ ``_degraded_host_count``. - degraded_infra_count (int): - The number of degraded infrastructure (e.g NV - link domain) in the reservation subblock. - - This field is a member of `oneof`_ ``_degraded_infra_count``. - health_status (str): - The health status of the reservation - subBlock. Check the HealthStatus enum for the - list of possible values. - - This field is a member of `oneof`_ ``_health_status``. - healthy_host_count (int): - The number of healthy hosts in the - reservation subBlock. - - This field is a member of `oneof`_ ``_healthy_host_count``. - healthy_infra_count (int): - The number of healthy infrastructure (e.g NV - link domain) in the reservation subblock. - - This field is a member of `oneof`_ ``_healthy_infra_count``. - """ - - class HealthStatus(proto.Enum): - r"""The health status of the reservation subBlock. - - Values: - UNDEFINED_HEALTH_STATUS (0): - A value indicating that the enum field is not - set. - DEGRADED (396890926): - The reservation subBlock is degraded. - HEALTHY (439801213): - The reservation subBlock is healthy. - HEALTH_STATUS_UNSPECIFIED (482246925): - The health status of the reservation subBlock - is unspecified. - """ - UNDEFINED_HEALTH_STATUS = 0 - DEGRADED = 396890926 - HEALTHY = 439801213 - HEALTH_STATUS_UNSPECIFIED = 482246925 - - degraded_host_count: int = proto.Field( - proto.INT32, - number=535025001, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, ) - degraded_infra_count: int = proto.Field( - proto.INT32, - number=138638927, + instance_schedule_policy: "ResourcePolicyInstanceSchedulePolicy" = proto.Field( + proto.MESSAGE, + number=344877104, optional=True, + message="ResourcePolicyInstanceSchedulePolicy", ) - health_status: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=380545845, + number=3292052, optional=True, ) - healthy_host_count: int = proto.Field( - proto.INT32, - number=40739738, + name: str = proto.Field( + proto.STRING, + number=3373707, optional=True, ) - healthy_infra_count: int = proto.Field( - proto.INT32, - number=385052222, + region: str = proto.Field( + proto.STRING, + number=138946292, optional=True, ) - - -class ReservationSubBlockPhysicalTopology(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - block (str): - The hash of the capacity block within the - cluster. - - This field is a member of `oneof`_ ``_block``. - cluster (str): - The cluster name of the reservation subBlock. - - This field is a member of `oneof`_ ``_cluster``. - sub_block (str): - The hash of the capacity sub-block within the - capacity block. - - This field is a member of `oneof`_ ``_sub_block``. - """ - - block: str = proto.Field( - proto.STRING, - number=93832333, + resource_status: "ResourcePolicyResourceStatus" = proto.Field( + proto.MESSAGE, + number=249429315, optional=True, + message="ResourcePolicyResourceStatus", ) - cluster: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=335221242, + number=456214797, optional=True, ) - sub_block: str = proto.Field( + snapshot_schedule_policy: "ResourcePolicySnapshotSchedulePolicy" = proto.Field( + proto.MESSAGE, + number=218131295, + optional=True, + message="ResourcePolicySnapshotSchedulePolicy", + ) + status: str = proto.Field( proto.STRING, - number=478033358, + number=181260274, optional=True, ) - - -class ReservationSubBlocksGetResponse(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - resource (google.cloud.compute_v1beta.types.ReservationSubBlock): - - This field is a member of `oneof`_ ``_resource``. - """ - - resource: "ReservationSubBlock" = proto.Field( + workload_policy: "ResourcePolicyWorkloadPolicy" = proto.Field( proto.MESSAGE, - number=195806222, + number=114721530, optional=True, - message="ReservationSubBlock", + message="ResourcePolicyWorkloadPolicy", ) -class ReservationSubBlocksListResponse(proto.Message): - r"""A list of reservation subBlocks under a single reservation. +class ResourcePolicyAggregatedList(proto.Message): + r"""Contains a list of resourcePolicies. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. id (str): - Unique identifier for the resource; defined - by the server. + [Output Only] Unique identifier for the resource; defined by + the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ReservationSubBlock]): - A list of reservation subBlock resources. + items (MutableMapping[str, google.cloud.compute_v1beta.types.ResourcePoliciesScopedList]): + A list of ResourcePolicy resources. kind (str): - Type of the resource. Always - compute#reservationSubBlock for a list of - reservation subBlocks. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - This token allows you to get the next page of - results for list requests. If the number of - results is larger than maxResults, use the - nextPageToken as a value for the query parameter - pageToken in the next list request. Subsequent - list requests will have their own nextPageToken + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): - Informational warning message. + [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -107030,15 +124186,21 @@ class ReservationSubBlocksListResponse(proto.Message): def raw_page(self): return self + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items: MutableSequence["ReservationSubBlock"] = proto.RepeatedField( + items: MutableMapping[str, "ResourcePoliciesScopedList"] = proto.MapField( + proto.STRING, proto.MESSAGE, number=100526016, - message="ReservationSubBlock", + message="ResourcePoliciesScopedList", ) kind: str = proto.Field( proto.STRING, @@ -107055,6 +124217,10 @@ def raw_page(self): number=456214797, optional=True, ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, @@ -107063,1964 +124229,2041 @@ def raw_page(self): ) -class ReservationSubBlocksReportFaultyRequest(proto.Message): - r""" +class ResourcePolicyDailyCycle(proto.Message): + r"""Time window specified for daily operations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disruption_schedule (str): - The disruption schedule for the subBlock. - Check the DisruptionSchedule enum for the list - of possible values. - - This field is a member of `oneof`_ ``_disruption_schedule``. - failure_component (str): - The component that experienced the fault. - Check the FailureComponent enum for the list of - possible values. - - This field is a member of `oneof`_ ``_failure_component``. - fault_reasons (MutableSequence[google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequestFaultReason]): - The reasons for the fault experienced with - the subBlock. - """ - - class DisruptionSchedule(proto.Enum): - r"""The disruption schedule for the subBlock. + days_in_cycle (int): + Defines a schedule with units measured in + days. The value determines how many days pass + between the start of each cycle. - Values: - UNDEFINED_DISRUPTION_SCHEDULE (0): - A value indicating that the enum field is not - set. - DISRUPTION_SCHEDULE_UNSPECIFIED (332543835): - No description available. - IMMEDIATE (152881041): - All VMs will be disrupted immediately. - """ - UNDEFINED_DISRUPTION_SCHEDULE = 0 - DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835 - IMMEDIATE = 152881041 + This field is a member of `oneof`_ ``_days_in_cycle``. + duration (str): + Output only. [Output only] A predetermined duration for the + window, automatically chosen to be the smallest possible in + the given scenario. - class FailureComponent(proto.Enum): - r"""The component that experienced the fault. + This field is a member of `oneof`_ ``_duration``. + start_time (str): + Start time of the window. This must be in UTC + format that resolves to one of 00:00, 04:00, + 08:00,12:00, 16:00, or 20:00. For example, both + 13:00-5 and 08:00 are valid. - Values: - UNDEFINED_FAILURE_COMPONENT (0): - A value indicating that the enum field is not - set. - FAILURE_COMPONENT_UNSPECIFIED (332003744): - No description available. - MULTIPLE_FAULTY_HOSTS (423545298): - Multiple hosts experienced the fault. - NVLINK_SWITCH (239107153): - The NVLink switch experienced the fault. - """ - UNDEFINED_FAILURE_COMPONENT = 0 - FAILURE_COMPONENT_UNSPECIFIED = 332003744 - MULTIPLE_FAULTY_HOSTS = 423545298 - NVLINK_SWITCH = 239107153 + This field is a member of `oneof`_ ``_start_time``. + """ - disruption_schedule: str = proto.Field( - proto.STRING, - number=95871619, + days_in_cycle: int = proto.Field( + proto.INT32, + number=369790004, optional=True, ) - failure_component: str = proto.Field( + duration: str = proto.Field( proto.STRING, - number=25912456, + number=155471252, optional=True, ) - fault_reasons: MutableSequence[ - "ReservationSubBlocksReportFaultyRequestFaultReason" - ] = proto.RepeatedField( - proto.MESSAGE, - number=168056210, - message="ReservationSubBlocksReportFaultyRequestFaultReason", + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, ) -class ReservationSubBlocksReportFaultyRequestFaultReason(proto.Message): - r"""The reason for the fault experienced with the subBlock. +class ResourcePolicyDiskConsistencyGroupPolicy(proto.Message): + r"""Resource policy for disk consistency groups.""" + + +class ResourcePolicyGroupPlacementPolicy(proto.Message): + r"""A GroupPlacementPolicy specifies resource placement + configuration. It specifies the failure bucket separation + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - behavior (str): - The behavior of the fault experienced with - the subBlock. Check the Behavior enum for the - list of possible values. + accelerator_topology_mode (str): + Specifies the connection mode for the accelerator topology. + If not specified, the default is AUTO_CONNECT. Check the + AcceleratorTopologyMode enum for the list of possible + values. - This field is a member of `oneof`_ ``_behavior``. - description (str): - The description of the fault experienced with - the subBlock. + This field is a member of `oneof`_ ``_accelerator_topology_mode``. + availability_domain_count (int): + The number of availability domains to spread + instances across. If two instances are in + different availability domain, they are not in + the same low latency network. - This field is a member of `oneof`_ ``_description``. + This field is a member of `oneof`_ ``_availability_domain_count``. + collocation (str): + Specifies network collocation + Check the Collocation enum for the list of + possible values. + + This field is a member of `oneof`_ ``_collocation``. + gpu_topology (str): + Specifies the shape of the GPU slice, in + slice based GPU families eg. A4X. + + This field is a member of `oneof`_ ``_gpu_topology``. + max_distance (int): + Specifies the number of max logical switches. + + This field is a member of `oneof`_ ``_max_distance``. + slice_count (int): + Specifies the number of slices in a + multislice workload. + + This field is a member of `oneof`_ ``_slice_count``. + tpu_topology (str): + Specifies the shape of the TPU slice + + This field is a member of `oneof`_ ``_tpu_topology``. + vm_count (int): + Number of VMs in this placement group. Google + does not recommend that you use this field + unless you use a compact policy and you want + your policy to work only if it contains this + exact number of VMs. + + This field is a member of `oneof`_ ``_vm_count``. """ - class Behavior(proto.Enum): - r"""The behavior of the fault experienced with the subBlock. + class AcceleratorTopologyMode(proto.Enum): + r"""Specifies the connection mode for the accelerator topology. If not + specified, the default is AUTO_CONNECT. Values: - UNDEFINED_BEHAVIOR (0): + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE (0): A value indicating that the enum field is not set. - FAULT_BEHAVIOR_UNSPECIFIED (447660743): + AUTO_CONNECT (491872826): + The interconnected chips are pre-configured + at the time of VM creation. + PROVISION_ONLY (399134966): + The interconnected chips are connected on + demand. At the time of VM creation, the chips + are not connected. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE = 0 + AUTO_CONNECT = 491872826 + PROVISION_ONLY = 399134966 + + class Collocation(proto.Enum): + r"""Specifies network collocation + + Values: + UNDEFINED_COLLOCATION (0): + A value indicating that the enum field is not + set. + COLLOCATED (103257554): + No description available. + UNSPECIFIED_COLLOCATION (464308205): No description available. - GPU_ERROR (198817909): - The subBlock experienced a GPU error. - PERFORMANCE (135701520): - The subBlock experienced performance issues. - SWITCH_FAILURE (254909279): - The subBlock experienced a switch failure. """ - UNDEFINED_BEHAVIOR = 0 - FAULT_BEHAVIOR_UNSPECIFIED = 447660743 - GPU_ERROR = 198817909 - PERFORMANCE = 135701520 - SWITCH_FAILURE = 254909279 + UNDEFINED_COLLOCATION = 0 + COLLOCATED = 103257554 + UNSPECIFIED_COLLOCATION = 464308205 - behavior: str = proto.Field( + accelerator_topology_mode: str = proto.Field( proto.STRING, - number=437170770, + number=284293791, optional=True, ) - description: str = proto.Field( + availability_domain_count: int = proto.Field( + proto.INT32, + number=12453432, + optional=True, + ) + collocation: str = proto.Field( proto.STRING, - number=422937596, + number=511156533, + optional=True, + ) + gpu_topology: str = proto.Field( + proto.STRING, + number=247948450, + optional=True, + ) + max_distance: int = proto.Field( + proto.INT32, + number=172943472, + optional=True, + ) + slice_count: int = proto.Field( + proto.INT32, + number=343342114, + optional=True, + ) + tpu_topology: str = proto.Field( + proto.STRING, + number=315411061, + optional=True, + ) + vm_count: int = proto.Field( + proto.INT32, + number=261463431, optional=True, ) -class ReservationsBlocksPerformMaintenanceRequest(proto.Message): - r""" +class ResourcePolicyHourlyCycle(proto.Message): + r"""Time window specified for hourly operations. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - maintenance_scope (str): - Specifies if all, running or unused hosts are - in scope for this request. Check the - MaintenanceScope enum for the list of possible - values. + duration (str): + Output only. [Output only] Duration of the time window, + automatically chosen to be smallest possible in the given + scenario. - This field is a member of `oneof`_ ``_maintenance_scope``. - """ + This field is a member of `oneof`_ ``_duration``. + hours_in_cycle (int): + Defines a schedule with units measured in + hours. The value determines how many hours pass + between the start of each cycle. - class MaintenanceScope(proto.Enum): - r"""Specifies if all, running or unused hosts are in scope for - this request. + This field is a member of `oneof`_ ``_hours_in_cycle``. + start_time (str): + Time within the window to start the operations. It must be + in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - Values: - UNDEFINED_MAINTENANCE_SCOPE (0): - A value indicating that the enum field is not - set. - ALL (64897): - Trigger maintenance for all hosts belonging - to this reservation irrespective of whether VMs - are running on them or not. - MAINTENANCE_SCOPE_UNSPECIFIED (78827328): - Internal only - RUNNING_VMS (535770588): - Trigger maintenance only on the hosts - belonging to this reservation which have VMs - running on them. - UNUSED_CAPACITY (212724995): - Trigger maintenance only on the hosts - belonging to this reservation which do not have - any VMs running on them. This is not allowed for - Standard ExR - """ - UNDEFINED_MAINTENANCE_SCOPE = 0 - ALL = 64897 - MAINTENANCE_SCOPE_UNSPECIFIED = 78827328 - RUNNING_VMS = 535770588 - UNUSED_CAPACITY = 212724995 + This field is a member of `oneof`_ ``_start_time``. + """ - maintenance_scope: str = proto.Field( + duration: str = proto.Field( proto.STRING, - number=140687912, + number=155471252, + optional=True, + ) + hours_in_cycle: int = proto.Field( + proto.INT32, + number=526763132, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, optional=True, ) -class ReservationsPerformMaintenanceRequest(proto.Message): - r""" +class ResourcePolicyInstanceSchedulePolicy(proto.Message): + r"""An InstanceSchedulePolicy specifies when and how frequent + certain operations are performed on the instance. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - maintenance_scope (str): - Specifies if all, running or unused hosts are - in scope for this request. Check the - MaintenanceScope enum for the list of possible - values. - - This field is a member of `oneof`_ ``_maintenance_scope``. - """ - - class MaintenanceScope(proto.Enum): - r"""Specifies if all, running or unused hosts are in scope for - this request. - - Values: - UNDEFINED_MAINTENANCE_SCOPE (0): - A value indicating that the enum field is not - set. - ALL (64897): - Trigger maintenance for all hosts belonging - to this reservation irrespective of whether VMs - are running on them or not. - MAINTENANCE_SCOPE_UNSPECIFIED (78827328): - Internal only - RUNNING_VMS (535770588): - Trigger maintenance only on the hosts - belonging to this reservation which have VMs - running on them. - UNUSED_CAPACITY (212724995): - Trigger maintenance only on the hosts - belonging to this reservation which do not have - any VMs running on them. This is not allowed for - Standard ExR - """ - UNDEFINED_MAINTENANCE_SCOPE = 0 - ALL = 64897 - MAINTENANCE_SCOPE_UNSPECIFIED = 78827328 - RUNNING_VMS = 535770588 - UNUSED_CAPACITY = 212724995 - - maintenance_scope: str = proto.Field( - proto.STRING, - number=140687912, - optional=True, - ) + expiration_time (str): + The expiration time of the schedule. The + timestamp is an RFC3339 string. + This field is a member of `oneof`_ ``_expiration_time``. + start_time (str): + The start time of the schedule. The timestamp + is an RFC3339 string. -class ReservationsResizeRequest(proto.Message): - r""" + This field is a member of `oneof`_ ``_start_time``. + time_zone (str): + Specifies the time zone to be used in interpreting + Schedule.schedule. The value of this field must be a time + zone name from the tz database: + https://wikipedia.org/wiki/Tz_database. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_time_zone``. + vm_start_schedule (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicySchedule): + Specifies the schedule for starting + instances. - Attributes: - specific_sku_count (int): - Number of allocated resources can be resized - with minimum = 1 and maximum = 1000. + This field is a member of `oneof`_ ``_vm_start_schedule``. + vm_stop_schedule (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicySchedule): + Specifies the schedule for stopping + instances. - This field is a member of `oneof`_ ``_specific_sku_count``. + This field is a member of `oneof`_ ``_vm_stop_schedule``. """ - specific_sku_count: int = proto.Field( - proto.INT64, - number=13890720, + expiration_time: str = proto.Field( + proto.STRING, + number=230299229, + optional=True, + ) + start_time: str = proto.Field( + proto.STRING, + number=37467274, + optional=True, + ) + time_zone: str = proto.Field( + proto.STRING, + number=36848094, + optional=True, + ) + vm_start_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( + proto.MESSAGE, + number=17762396, + optional=True, + message="ResourcePolicyInstanceSchedulePolicySchedule", + ) + vm_stop_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( + proto.MESSAGE, + number=426242732, optional=True, + message="ResourcePolicyInstanceSchedulePolicySchedule", ) -class ReservationsScopedList(proto.Message): - r""" +class ResourcePolicyInstanceSchedulePolicySchedule(proto.Message): + r"""Schedule for an instance operation. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - reservations (MutableSequence[google.cloud.compute_v1beta.types.Reservation]): - A list of reservations contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of reservations when the list is empty. + schedule (str): + Specifies the frequency for the operation, + using the unix-cron format. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_schedule``. """ - reservations: MutableSequence["Reservation"] = proto.RepeatedField( - proto.MESSAGE, - number=399717927, - message="Reservation", - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + schedule: str = proto.Field( + proto.STRING, + number=375820951, optional=True, - message="Warning", ) -class ResetInstanceRequest(proto.Message): - r"""A request message for Instances.Reset. See the method - description for details. - +class ResourcePolicyList(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance scoping this request. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). - - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. - """ - - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, - optional=True, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) + etag (str): + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] The unique identifier for the resource. This + identifier is defined by the server. -class ResizeAdvancedInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.ResizeAdvanced. - See the method description for details. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicy]): + [Output Only] A list of ResourcePolicy resources. + kind (str): + Output only. [Output Only] Type of + resource.Alwayscompute#resourcePoliciesList for listsof + resourcePolicies + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - Attributes: - instance_group_manager (str): - The name of the managed instance group. - instance_group_managers_resize_advanced_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersResizeAdvancedRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + This field is a member of `oneof`_ ``_self_link``. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=249363395, + number=3123477, + optional=True, ) - instance_group_managers_resize_advanced_request_resource: "InstanceGroupManagersResizeAdvancedRequest" = proto.Field( + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["ResourcePolicy"] = proto.RepeatedField( proto.MESSAGE, - number=95148991, - message="InstanceGroupManagersResizeAdvancedRequest", + number=100526016, + message="ResourcePolicy", ) - project: str = proto.Field( + kind: str = proto.Field( proto.STRING, - number=227560217, + number=3292052, + optional=True, ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - zone: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=3744684, + number=456214797, + optional=True, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) -class ResizeAdvancedRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ResizeAdvanced. See the method - description for details. +class ResourcePolicyResourceStatus(proto.Message): + r"""Contains output only fields. + Use this sub-message for all output fields set on + ResourcePolicy. The internal structure of this "status" field + should mimic the structure of ResourcePolicy proto + specification. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. It - must be a string that meets the requirements in - RFC1035. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. It - must be a string that meets the requirements in - RFC1035. - region_instance_group_managers_resize_advanced_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + instance_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus): + Output only. [Output Only] Specifies a set of output values + reffering to the instance_schedule_policy system status. + This field should have the same name as corresponding policy + field. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_instance_schedule_policy``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - region_instance_group_managers_resize_advanced_request_resource: "RegionInstanceGroupManagersResizeAdvancedRequest" = proto.Field( + instance_schedule_policy: "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus" = proto.Field( proto.MESSAGE, - number=331077290, - message="RegionInstanceGroupManagersResizeAdvancedRequest", - ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + number=344877104, optional=True, + message="ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", ) -class ResizeDiskRequest(proto.Message): - r"""A request message for Disks.Resize. See the method - description for details. - +class ResourcePolicyResourceStatusInstanceSchedulePolicyStatus(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - The name of the persistent disk. - disks_resize_request_resource (google.cloud.compute_v1beta.types.DisksResizeRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + last_run_start_time (str): + Output only. [Output Only] The last time the schedule + successfully ran. The timestamp is an RFC3339 string. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_last_run_start_time``. + next_run_start_time (str): + Output only. [Output Only] The next time the schedule is + planned to run. The actual time might be slightly different. + The timestamp is an RFC3339 string. + + This field is a member of `oneof`_ ``_next_run_start_time``. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, - ) - disks_resize_request_resource: "DisksResizeRequest" = proto.Field( - proto.MESSAGE, - number=78307616, - message="DisksResizeRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - request_id: str = proto.Field( + last_run_start_time: str = proto.Field( proto.STRING, - number=37109963, + number=303069063, optional=True, ) - zone: str = proto.Field( + next_run_start_time: str = proto.Field( proto.STRING, - number=3744684, + number=318642570, + optional=True, ) -class ResizeInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.Resize. See the - method description for details. +class ResourcePolicySnapshotSchedulePolicy(proto.Message): + r"""A snapshot schedule policy specifies when and how frequently + snapshots are to be created for the target disk. Also specifies + how many and how long these scheduled snapshots should be + retained. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + retention_policy (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicyRetentionPolicy): + Retention policy applied to snapshots created + by this resource policy. - This field is a member of `oneof`_ ``_request_id``. - size (int): - The number of running instances that the - managed instance group should maintain at any - given time. The group automatically adds or - removes instances to maintain the number of - instances specified by this parameter. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_retention_policy``. + schedule (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicySchedule): + A Vm Maintenance Policy specifies what kind + of infrastructure maintenance we are allowed to + perform on this VM and when. Schedule that is + applied to disks covered by this policy. + + This field is a member of `oneof`_ ``_schedule``. + snapshot_properties (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicySnapshotProperties): + Properties with which snapshots are created + such as labels, encryption keys. + + This field is a member of `oneof`_ ``_snapshot_properties``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + retention_policy: "ResourcePolicySnapshotSchedulePolicyRetentionPolicy" = ( + proto.Field( + proto.MESSAGE, + number=68625779, + optional=True, + message="ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + ) ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + schedule: "ResourcePolicySnapshotSchedulePolicySchedule" = proto.Field( + proto.MESSAGE, + number=375820951, optional=True, + message="ResourcePolicySnapshotSchedulePolicySchedule", ) - size: int = proto.Field( - proto.INT32, - number=3530753, - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + snapshot_properties: "ResourcePolicySnapshotSchedulePolicySnapshotProperties" = ( + proto.Field( + proto.MESSAGE, + number=185371278, + optional=True, + message="ResourcePolicySnapshotSchedulePolicySnapshotProperties", + ) ) -class ResizeRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.Resize. See the method - description for details. - +class ResourcePolicySnapshotSchedulePolicyRetentionPolicy(proto.Message): + r"""Policy for retention of scheduled snapshots. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - disk (str): - Name of the regional persistent disk. - project (str): - The project ID for this request. - region (str): - Name of the region for this request. - region_disks_resize_request_resource (google.cloud.compute_v1beta.types.RegionDisksResizeRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + max_retention_days (int): + Maximum age of the snapshot that is allowed + to be kept. - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_max_retention_days``. + on_source_disk_delete (str): + Specifies the behavior to apply to scheduled + snapshots when the source disk is deleted. + Check the OnSourceDiskDelete enum for the list + of possible values. + + This field is a member of `oneof`_ ``_on_source_disk_delete``. """ - disk: str = proto.Field( - proto.STRING, - number=3083677, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, - ) - region_disks_resize_request_resource: "RegionDisksResizeRequest" = proto.Field( - proto.MESSAGE, - number=446633237, - message="RegionDisksResizeRequest", + class OnSourceDiskDelete(proto.Enum): + r"""Specifies the behavior to apply to scheduled snapshots when + the source disk is deleted. + + Values: + UNDEFINED_ON_SOURCE_DISK_DELETE (0): + A value indicating that the enum field is not + set. + APPLY_RETENTION_POLICY (535071332): + No description available. + KEEP_AUTO_SNAPSHOTS (258925689): + No description available. + UNSPECIFIED_ON_SOURCE_DISK_DELETE (239140769): + No description available. + """ + UNDEFINED_ON_SOURCE_DISK_DELETE = 0 + APPLY_RETENTION_POLICY = 535071332 + KEEP_AUTO_SNAPSHOTS = 258925689 + UNSPECIFIED_ON_SOURCE_DISK_DELETE = 239140769 + + max_retention_days: int = proto.Field( + proto.INT32, + number=324296979, + optional=True, ) - request_id: str = proto.Field( + on_source_disk_delete: str = proto.Field( proto.STRING, - number=37109963, + number=321955529, optional=True, ) -class ResizeRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for RegionInstanceGroupManagers.Resize. See - the method description for details. +class ResourcePolicySnapshotSchedulePolicySchedule(proto.Message): + r"""A schedule for disks where the schedueled operations are + performed. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + daily_schedule (google.cloud.compute_v1beta.types.ResourcePolicyDailyCycle): - This field is a member of `oneof`_ ``_request_id``. - size (int): - Number of instances that should exist in this - instance group manager. + This field is a member of `oneof`_ ``_daily_schedule``. + hourly_schedule (google.cloud.compute_v1beta.types.ResourcePolicyHourlyCycle): + + This field is a member of `oneof`_ ``_hourly_schedule``. + weekly_schedule (google.cloud.compute_v1beta.types.ResourcePolicyWeeklyCycle): + + This field is a member of `oneof`_ ``_weekly_schedule``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( - proto.STRING, - number=227560217, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + daily_schedule: "ResourcePolicyDailyCycle" = proto.Field( + proto.MESSAGE, + number=86159869, + optional=True, + message="ResourcePolicyDailyCycle", ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + hourly_schedule: "ResourcePolicyHourlyCycle" = proto.Field( + proto.MESSAGE, + number=38328485, optional=True, + message="ResourcePolicyHourlyCycle", ) - size: int = proto.Field( - proto.INT32, - number=3530753, + weekly_schedule: "ResourcePolicyWeeklyCycle" = proto.Field( + proto.MESSAGE, + number=359548053, + optional=True, + message="ResourcePolicyWeeklyCycle", ) -class ResizeReservationRequest(proto.Message): - r"""A request message for Reservations.Resize. See the method - description for details. +class ResourcePolicySnapshotSchedulePolicySnapshotProperties(proto.Message): + r"""Specified snapshot properties for scheduled snapshots created + by this policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + chain_name (str): + Chain name that the snapshot is created in. - This field is a member of `oneof`_ ``_request_id``. - reservation (str): - Name of the reservation to update. - reservations_resize_request_resource (google.cloud.compute_v1beta.types.ReservationsResizeRequest): - The body resource for this request - zone (str): - Name of the zone for this request. + This field is a member of `oneof`_ ``_chain_name``. + guest_flush (bool): + Indication to perform a 'guest aware' + snapshot. + + This field is a member of `oneof`_ ``_guest_flush``. + labels (MutableMapping[str, str]): + Labels to apply to scheduled snapshots. These + can be later modified by the setLabels method. + Label values may be empty. + region (str): + Region where the snapshot is scoped to. + + This field is a member of `oneof`_ ``_region``. + storage_locations (MutableSequence[str]): + Cloud Storage bucket storage location of the + auto snapshot (regional or multi-regional). """ - project: str = proto.Field( + chain_name: str = proto.Field( proto.STRING, - number=227560217, + number=68644169, + optional=True, ) - request_id: str = proto.Field( + guest_flush: bool = proto.Field( + proto.BOOL, + number=385550813, + optional=True, + ) + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=37109963, + proto.STRING, + number=500195327, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, optional=True, ) - reservation: str = proto.Field( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=47530956, + number=328005274, ) - reservations_resize_request_resource: "ReservationsResizeRequest" = proto.Field( + + +class ResourcePolicyWeeklyCycle(proto.Message): + r"""Time window specified for weekly operations. + + Attributes: + day_of_weeks (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicyWeeklyCycleDayOfWeek]): + Up to 7 intervals/windows, one for each day + of the week. + """ + + day_of_weeks: MutableSequence[ + "ResourcePolicyWeeklyCycleDayOfWeek" + ] = proto.RepeatedField( proto.MESSAGE, - number=389262801, - message="ReservationsResizeRequest", - ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + number=257871834, + message="ResourcePolicyWeeklyCycleDayOfWeek", ) -class ResourceCommitment(proto.Message): - r"""Commitment for a particular hardware resource (a commitment - is composed of one or more of these). - +class ResourcePolicyWeeklyCycleDayOfWeek(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - accelerator_type (str): - Name of the accelerator type or GPU resource. - Specify this field only when the type of - hardware resource is ACCELERATOR. + day (str): + Defines a schedule that runs on specific days + of the week. Specify one or more days. The + following options are available: - This field is a member of `oneof`_ ``_accelerator_type``. - amount (int): - The quantity of the hardware resource that - you want to commit to purchasing (in a - type-dependent unit). - For vCPUs, you must - specify an integer value. - For memory, you - specify the amount of MB that you want. The - value you specify must be a multiple of 256 MB, - with up to 6.5 GB of memory per every vCPU. - - For GPUs, you must specify an integer value. - - For Local SSD disks, you must specify the amount - in GB. The size of a single Local SSD disk is - 375 GB. + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, + SATURDAY, SUNDAY. Check the Day enum for the + list of possible values. - This field is a member of `oneof`_ ``_amount``. - type_ (str): - The type of hardware resource that you want to specify. You - can specify any of the following values: - VCPU - MEMORY - - LOCAL_SSD - ACCELERATOR Specify as a separate entry in the - list for each individual resource type. Check the Type enum - for the list of possible values. + This field is a member of `oneof`_ ``_day``. + duration (str): + Output only. [Output only] Duration of the time window, + automatically chosen to be smallest possible in the given + scenario. - This field is a member of `oneof`_ ``_type``. + This field is a member of `oneof`_ ``_duration``. + start_time (str): + Time within the window to start the operations. It must be + in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + + This field is a member of `oneof`_ ``_start_time``. """ - class Type(proto.Enum): - r"""The type of hardware resource that you want to specify. You can - specify any of the following values: - VCPU - MEMORY - LOCAL_SSD - - ACCELERATOR Specify as a separate entry in the list for each - individual resource type. + class Day(proto.Enum): + r"""Defines a schedule that runs on specific days of the week. + Specify one or more days. The following options are available: + + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. Values: - UNDEFINED_TYPE (0): + UNDEFINED_DAY (0): A value indicating that the enum field is not set. - ACCELERATOR (429815371): + FRIDAY (471398751): No description available. - LOCAL_SSD (508934896): + INVALID (530283991): No description available. - MEMORY (123056385): + MONDAY (132310288): No description available. - UNSPECIFIED (526786327): + SATURDAY (279037881): No description available. - VCPU (2628978): + SUNDAY (309626320): + No description available. + THURSDAY (207198682): + No description available. + TUESDAY (277509677): + No description available. + WEDNESDAY (422029110): No description available. """ - UNDEFINED_TYPE = 0 - ACCELERATOR = 429815371 - LOCAL_SSD = 508934896 - MEMORY = 123056385 - UNSPECIFIED = 526786327 - VCPU = 2628978 + UNDEFINED_DAY = 0 + FRIDAY = 471398751 + INVALID = 530283991 + MONDAY = 132310288 + SATURDAY = 279037881 + SUNDAY = 309626320 + THURSDAY = 207198682 + TUESDAY = 277509677 + WEDNESDAY = 422029110 - accelerator_type: str = proto.Field( + day: str = proto.Field( proto.STRING, - number=138031246, + number=99228, optional=True, ) - amount: int = proto.Field( - proto.INT64, - number=196759640, + duration: str = proto.Field( + proto.STRING, + number=155471252, optional=True, ) - type_: str = proto.Field( + start_time: str = proto.Field( proto.STRING, - number=3575610, + number=37467274, optional=True, ) -class ResourceGroupReference(proto.Message): - r""" +class ResourcePolicyWorkloadPolicy(proto.Message): + r"""Represents the workload policy. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - group (str): - A URI referencing one of the instance groups - or network endpoint groups listed in the backend - service. + accelerator_topology (str): + Specifies the topology required to create a + partition for VMs that have interconnected GPUs. - This field is a member of `oneof`_ ``_group``. + This field is a member of `oneof`_ ``_accelerator_topology``. + accelerator_topology_mode (str): + Specifies the connection mode for the accelerator topology. + If not specified, the default is AUTO_CONNECT. Check the + AcceleratorTopologyMode enum for the list of possible + values. + + This field is a member of `oneof`_ ``_accelerator_topology_mode``. + max_topology_distance (str): + Specifies the maximum distance between + instances. Check the MaxTopologyDistance enum + for the list of possible values. + + This field is a member of `oneof`_ ``_max_topology_distance``. + type_ (str): + Specifies the intent of the instance + placement in the MIG. Check the Type enum for + the list of possible values. + + This field is a member of `oneof`_ ``_type``. """ - group: str = proto.Field( - proto.STRING, - number=98629247, - optional=True, - ) + class AcceleratorTopologyMode(proto.Enum): + r"""Specifies the connection mode for the accelerator topology. If not + specified, the default is AUTO_CONNECT. + Values: + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE (0): + A value indicating that the enum field is not + set. + AUTO_CONNECT (491872826): + The interconnected chips are pre-configured + at the time of VM creation. + PROVISION_ONLY (399134966): + The interconnected chips are connected on + demand. At the time of VM creation, the chips + are not connected. + """ + UNDEFINED_ACCELERATOR_TOPOLOGY_MODE = 0 + AUTO_CONNECT = 491872826 + PROVISION_ONLY = 399134966 -class ResourcePoliciesScopedList(proto.Message): - r""" + class MaxTopologyDistance(proto.Enum): + r"""Specifies the maximum distance between instances. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Values: + UNDEFINED_MAX_TOPOLOGY_DISTANCE (0): + A value indicating that the enum field is not + set. + BLOCK (63294573): + VMs must be provisioned in the same block. + CLUSTER (516333018): + VMs must be provisioned in the same cluster. + SUBBLOCK (316202573): + VMs must be provisioned in the same subblock. + """ + UNDEFINED_MAX_TOPOLOGY_DISTANCE = 0 + BLOCK = 63294573 + CLUSTER = 516333018 + SUBBLOCK = 316202573 - Attributes: - resource_policies (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicy]): - A list of resourcePolicies contained in this - scope. - warning (google.cloud.compute_v1beta.types.Warning): - Informational warning which replaces the list - of resourcePolicies when the list is empty. + class Type(proto.Enum): + r"""Specifies the intent of the instance placement in the MIG. - This field is a member of `oneof`_ ``_warning``. - """ + Values: + UNDEFINED_TYPE (0): + A value indicating that the enum field is not + set. + HIGH_AVAILABILITY (409487576): + MIG spreads out the instances as much as + possible for high availability. + HIGH_THROUGHPUT (146499815): + MIG provisions instances as close to each + other as possible for high throughput. + """ + UNDEFINED_TYPE = 0 + HIGH_AVAILABILITY = 409487576 + HIGH_THROUGHPUT = 146499815 - resource_policies: MutableSequence["ResourcePolicy"] = proto.RepeatedField( - proto.MESSAGE, - number=22220385, - message="ResourcePolicy", + accelerator_topology: str = proto.Field( + proto.STRING, + number=389323203, + optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + accelerator_topology_mode: str = proto.Field( + proto.STRING, + number=284293791, + optional=True, + ) + max_topology_distance: str = proto.Field( + proto.STRING, + number=7521706, + optional=True, + ) + type_: str = proto.Field( + proto.STRING, + number=3575610, optional=True, - message="Warning", ) -class ResourcePolicy(proto.Message): - r"""Represents a Resource Policy resource. You can use resource - policies to schedule actions for some Compute Engine resources. - For example, you can use them to schedule persistent disk - snapshots. +class ResourceStatus(proto.Message): + r"""Contains output only fields. + Use this sub-message for actual values set on Instance + attributes as compared to the value requested by the user + (intent) in their instance CRUD calls. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. - - This field is a member of `oneof`_ ``_creation_timestamp``. - description (str): - - This field is a member of `oneof`_ ``_description``. - disk_consistency_group_policy (google.cloud.compute_v1beta.types.ResourcePolicyDiskConsistencyGroupPolicy): - Resource policy for disk consistency groups. - - This field is a member of `oneof`_ ``_disk_consistency_group_policy``. - group_placement_policy (google.cloud.compute_v1beta.types.ResourcePolicyGroupPlacementPolicy): - Resource policy for instances for placement - configuration. - - This field is a member of `oneof`_ ``_group_placement_policy``. - id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. - - This field is a member of `oneof`_ ``_id``. - instance_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicy): - Resource policy for scheduling instance - operations. - - This field is a member of `oneof`_ ``_instance_schedule_policy``. - kind (str): - [Output Only] Type of the resource. Always - compute#resource_policies for resource policies. - - This field is a member of `oneof`_ ``_kind``. - name (str): - The name of the resource, provided by the client when - initially creating the resource. The resource name must be - 1-63 characters long, and comply with RFC1035. Specifically, - the name must be 1-63 characters long and match the regular - expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the - first character must be a lowercase letter, and all - following characters must be a dash, lowercase letter, or - digit, except the last character, which cannot be a dash. + effective_instance_metadata (google.cloud.compute_v1beta.types.ResourceStatusEffectiveInstanceMetadata): + Output only. [Output Only] Effective metadata is a field + that consolidates project, zonal instance settings, and + instance-level predefined metadata keys to provide the + overridden value for those metadata keys at the instance + level. - This field is a member of `oneof`_ ``_name``. - region (str): + This field is a member of `oneof`_ ``_effective_instance_metadata``. + physical_host (str): + Output only. [Output Only] The precise location of your + instance within the zone's data center, including the block, + sub-block, and host. The field is formatted as follows: + blockId/subBlockId/hostId. - This field is a member of `oneof`_ ``_region``. - resource_status (google.cloud.compute_v1beta.types.ResourcePolicyResourceStatus): - [Output Only] The system status of the resource policy. + This field is a member of `oneof`_ ``_physical_host``. + physical_host_topology (google.cloud.compute_v1beta.types.ResourceStatusPhysicalHostTopology): + Output only. [Output Only] A series of fields containing the + global name of the Compute Engine cluster, as well as the ID + of the block, sub-block, and host on which the running + instance is located. - This field is a member of `oneof`_ ``_resource_status``. - self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. + This field is a member of `oneof`_ ``_physical_host_topology``. + reservation_consumption_info (google.cloud.compute_v1beta.types.ResourceStatusReservationConsumptionInfo): + Output only. [Output Only] Reservation information that the + instance is consuming from. - This field is a member of `oneof`_ ``_self_link``. - snapshot_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicy): - Resource policy for persistent disks for - creating snapshots. + This field is a member of `oneof`_ ``_reservation_consumption_info``. + scheduling (google.cloud.compute_v1beta.types.ResourceStatusScheduling): - This field is a member of `oneof`_ ``_snapshot_schedule_policy``. - status (str): - [Output Only] The status of resource policy creation. Check - the Status enum for the list of possible values. + This field is a member of `oneof`_ ``_scheduling``. + shutdown_details (google.cloud.compute_v1beta.types.ResourceStatusShutdownDetails): + Output only. [Output Only] Details about the instance + stopping state. - This field is a member of `oneof`_ ``_status``. - workload_policy (google.cloud.compute_v1beta.types.ResourcePolicyWorkloadPolicy): - Resource policy for defining instance - placement for MIGs. + This field is a member of `oneof`_ ``_shutdown_details``. + upcoming_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): - This field is a member of `oneof`_ ``_workload_policy``. + This field is a member of `oneof`_ ``_upcoming_maintenance``. """ - class Status(proto.Enum): - r"""[Output Only] The status of resource policy creation. - - Values: - UNDEFINED_STATUS (0): - A value indicating that the enum field is not - set. - CREATING (455564985): - Resource policy is being created. - DELETING (528602024): - Resource policy is being deleted. - EXPIRED (482489093): - Resource policy is expired and will not run - again. - INVALID (530283991): - No description available. - READY (77848963): - Resource policy is ready to be used. - """ - UNDEFINED_STATUS = 0 - CREATING = 455564985 - DELETING = 528602024 - EXPIRED = 482489093 - INVALID = 530283991 - READY = 77848963 - - creation_timestamp: str = proto.Field( + effective_instance_metadata: "ResourceStatusEffectiveInstanceMetadata" = ( + proto.Field( + proto.MESSAGE, + number=55052033, + optional=True, + message="ResourceStatusEffectiveInstanceMetadata", + ) + ) + physical_host: str = proto.Field( proto.STRING, - number=30525366, + number=464370704, optional=True, ) - description: str = proto.Field( - proto.STRING, - number=422937596, + physical_host_topology: "ResourceStatusPhysicalHostTopology" = proto.Field( + proto.MESSAGE, + number=390842814, optional=True, + message="ResourceStatusPhysicalHostTopology", ) - disk_consistency_group_policy: "ResourcePolicyDiskConsistencyGroupPolicy" = ( + reservation_consumption_info: "ResourceStatusReservationConsumptionInfo" = ( proto.Field( proto.MESSAGE, - number=473727515, + number=201056997, optional=True, - message="ResourcePolicyDiskConsistencyGroupPolicy", + message="ResourceStatusReservationConsumptionInfo", ) ) - group_placement_policy: "ResourcePolicyGroupPlacementPolicy" = proto.Field( + scheduling: "ResourceStatusScheduling" = proto.Field( proto.MESSAGE, - number=10931596, + number=386688404, optional=True, - message="ResourcePolicyGroupPlacementPolicy", + message="ResourceStatusScheduling", ) - id: int = proto.Field( - proto.UINT64, - number=3355, + shutdown_details: "ResourceStatusShutdownDetails" = proto.Field( + proto.MESSAGE, + number=15198553, optional=True, + message="ResourceStatusShutdownDetails", ) - instance_schedule_policy: "ResourcePolicyInstanceSchedulePolicy" = proto.Field( + upcoming_maintenance: "UpcomingMaintenance" = proto.Field( proto.MESSAGE, - number=344877104, + number=227348592, optional=True, - message="ResourcePolicyInstanceSchedulePolicy", + message="UpcomingMaintenance", ) - kind: str = proto.Field( - proto.STRING, - number=3292052, + + +class ResourceStatusEffectiveInstanceMetadata(proto.Message): + r"""Effective values of predefined metadata keys for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + block_project_ssh_keys_metadata_value (bool): + Effective block-project-ssh-keys value at + Instance level. + + This field is a member of `oneof`_ ``_block_project_ssh_keys_metadata_value``. + enable_guest_attributes_metadata_value (bool): + Effective enable-guest-attributes value at + Instance level. + + This field is a member of `oneof`_ ``_enable_guest_attributes_metadata_value``. + enable_os_inventory_metadata_value (bool): + Effective enable-os-inventory value at + Instance level. + + This field is a member of `oneof`_ ``_enable_os_inventory_metadata_value``. + enable_osconfig_metadata_value (bool): + Effective enable-osconfig value at Instance + level. + + This field is a member of `oneof`_ ``_enable_osconfig_metadata_value``. + enable_oslogin_metadata_value (bool): + Effective enable-oslogin value at Instance + level. + + This field is a member of `oneof`_ ``_enable_oslogin_metadata_value``. + serial_port_enable_metadata_value (bool): + Effective serial-port-enable value at + Instance level. + + This field is a member of `oneof`_ ``_serial_port_enable_metadata_value``. + serial_port_logging_enable_metadata_value (bool): + Effective serial-port-logging-enable value at + Instance level. + + This field is a member of `oneof`_ ``_serial_port_logging_enable_metadata_value``. + vm_dns_setting_metadata_value (str): + Effective VM DNS setting at Instance level. + + This field is a member of `oneof`_ ``_vm_dns_setting_metadata_value``. + """ + + block_project_ssh_keys_metadata_value: bool = proto.Field( + proto.BOOL, + number=338623101, optional=True, ) - name: str = proto.Field( - proto.STRING, - number=3373707, + enable_guest_attributes_metadata_value: bool = proto.Field( + proto.BOOL, + number=420155878, optional=True, ) - region: str = proto.Field( - proto.STRING, - number=138946292, + enable_os_inventory_metadata_value: bool = proto.Field( + proto.BOOL, + number=371752675, optional=True, ) - resource_status: "ResourcePolicyResourceStatus" = proto.Field( - proto.MESSAGE, - number=249429315, + enable_osconfig_metadata_value: bool = proto.Field( + proto.BOOL, + number=502966494, optional=True, - message="ResourcePolicyResourceStatus", ) - self_link: str = proto.Field( - proto.STRING, - number=456214797, + enable_oslogin_metadata_value: bool = proto.Field( + proto.BOOL, + number=216603159, optional=True, ) - snapshot_schedule_policy: "ResourcePolicySnapshotSchedulePolicy" = proto.Field( - proto.MESSAGE, - number=218131295, + serial_port_enable_metadata_value: bool = proto.Field( + proto.BOOL, + number=430536330, optional=True, - message="ResourcePolicySnapshotSchedulePolicy", ) - status: str = proto.Field( - proto.STRING, - number=181260274, + serial_port_logging_enable_metadata_value: bool = proto.Field( + proto.BOOL, + number=311813290, optional=True, ) - workload_policy: "ResourcePolicyWorkloadPolicy" = proto.Field( - proto.MESSAGE, - number=114721530, + vm_dns_setting_metadata_value: str = proto.Field( + proto.STRING, + number=411127950, optional=True, - message="ResourcePolicyWorkloadPolicy", ) -class ResourcePolicyAggregatedList(proto.Message): - r"""Contains a list of resourcePolicies. +class ResourceStatusPhysicalHostTopology(proto.Message): + r"""Represents the physical host topology of the host on which + the VM is running. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - etag (str): - - This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] Unique identifier for the resource; defined by - the server. - - This field is a member of `oneof`_ ``_id``. - items (MutableMapping[str, google.cloud.compute_v1beta.types.ResourcePoliciesScopedList]): - A list of ResourcePolicy resources. - kind (str): - Type of resource. - - This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + block (str): + [Output Only] The ID of the block in which the running + instance is located. Instances within the same block + experience low network latency. - This field is a member of `oneof`_ ``_next_page_token``. - self_link (str): - [Output Only] Server-defined URL for this resource. + This field is a member of `oneof`_ ``_block``. + cluster (str): + [Output Only] The global name of the Compute Engine cluster + where the running instance is located. - This field is a member of `oneof`_ ``_self_link``. - unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + This field is a member of `oneof`_ ``_cluster``. + host (str): + [Output Only] The ID of the host on which the running + instance is located. Instances on the same host experience + the lowest possible network latency. - This field is a member of `oneof`_ ``_warning``. - """ + This field is a member of `oneof`_ ``_host``. + subblock (str): + [Output Only] The ID of the sub-block in which the running + instance is located. Instances in the same sub-block + experience lower network latency than instances in the same + block. - @property - def raw_page(self): - return self + This field is a member of `oneof`_ ``_subblock``. + """ - etag: str = proto.Field( - proto.STRING, - number=3123477, - optional=True, - ) - id: str = proto.Field( + block: str = proto.Field( proto.STRING, - number=3355, + number=93832333, optional=True, ) - items: MutableMapping[str, "ResourcePoliciesScopedList"] = proto.MapField( - proto.STRING, - proto.MESSAGE, - number=100526016, - message="ResourcePoliciesScopedList", - ) - kind: str = proto.Field( + cluster: str = proto.Field( proto.STRING, - number=3292052, + number=335221242, optional=True, ) - next_page_token: str = proto.Field( + host: str = proto.Field( proto.STRING, - number=79797525, + number=3208616, optional=True, ) - self_link: str = proto.Field( + subblock: str = proto.Field( proto.STRING, - number=456214797, + number=70446669, optional=True, ) - unreachables: MutableSequence[str] = proto.RepeatedField( + + +class ResourceStatusReservationConsumptionInfo(proto.Message): + r"""Reservation consumption information that the instance is + consuming from. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + consumed_reservation (str): + Output only. [Output Only] The full resource name of the + reservation that this instance is consuming from. + + This field is a member of `oneof`_ ``_consumed_reservation``. + """ + + consumed_reservation: str = proto.Field( proto.STRING, - number=243372063, - ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + number=318474741, optional=True, - message="Warning", ) -class ResourcePolicyDailyCycle(proto.Message): - r"""Time window specified for daily operations. +class ResourceStatusScheduling(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - days_in_cycle (int): - Defines a schedule with units measured in - days. The value determines how many days pass - between the start of each cycle. - - This field is a member of `oneof`_ ``_days_in_cycle``. - duration (str): - [Output only] A predetermined duration for the window, - automatically chosen to be the smallest possible in the - given scenario. + availability_domain (int): + Specifies the availability domain to place + the instance in. The value must be a number + between 1 and the number of availability domains + specified in the spread placement policy + attached to the instance. - This field is a member of `oneof`_ ``_duration``. - start_time (str): - Start time of the window. This must be in UTC - format that resolves to one of 00:00, 04:00, - 08:00, 12:00, 16:00, or 20:00. For example, both - 13:00-5 and 08:00 are valid. + This field is a member of `oneof`_ ``_availability_domain``. + termination_timestamp (str): + Time in future when the instance will be + terminated inRFC3339 text format. - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_termination_timestamp``. """ - days_in_cycle: int = proto.Field( + availability_domain: int = proto.Field( proto.INT32, - number=369790004, - optional=True, - ) - duration: str = proto.Field( - proto.STRING, - number=155471252, + number=252514344, optional=True, ) - start_time: str = proto.Field( + termination_timestamp: str = proto.Field( proto.STRING, - number=37467274, + number=364180891, optional=True, ) -class ResourcePolicyDiskConsistencyGroupPolicy(proto.Message): - r"""Resource policy for disk consistency groups.""" - - -class ResourcePolicyGroupPlacementPolicy(proto.Message): - r"""A GroupPlacementPolicy specifies resource placement - configuration. It specifies the failure bucket separation +class ResourceStatusShutdownDetails(proto.Message): + r"""Specifies if the instance is in ``PENDING_STOP`` state or there is a + programmed stop scheduled. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - availability_domain_count (int): - The number of availability domains to spread - instances across. If two instances are in - different availability domain, they are not in - the same low latency network. - - This field is a member of `oneof`_ ``_availability_domain_count``. - collocation (str): - Specifies network collocation - Check the Collocation enum for the list of - possible values. + max_duration (google.cloud.compute_v1beta.types.Duration): + The duration for graceful shutdown. Only applicable when + ``stop_state=PENDING_STOP``. - This field is a member of `oneof`_ ``_collocation``. - gpu_topology (str): - Specifies the shape of the GPU slice, in - slice based GPU families eg. A4X. + This field is a member of `oneof`_ ``_max_duration``. + request_timestamp (str): + Past timestamp indicating the beginning of current + ``stopState`` in RFC3339 text format. - This field is a member of `oneof`_ ``_gpu_topology``. - max_distance (int): - Specifies the number of max logical switches. + This field is a member of `oneof`_ ``_request_timestamp``. + stop_state (str): + Current stopping state of the instance. + Check the StopState enum for the list of + possible values. - This field is a member of `oneof`_ ``_max_distance``. - slice_count (int): - Specifies the number of slices in a - multislice workload. + This field is a member of `oneof`_ ``_stop_state``. + target_state (str): + Target instance state. + Check the TargetState enum for the list of + possible values. - This field is a member of `oneof`_ ``_slice_count``. - tpu_topology (str): - Specifies the shape of the TPU slice + This field is a member of `oneof`_ ``_target_state``. + """ - This field is a member of `oneof`_ ``_tpu_topology``. - vm_count (int): - Number of VMs in this placement group. Google - does not recommend that you use this field - unless you use a compact policy and you want - your policy to work only if it contains this - exact number of VMs. + class StopState(proto.Enum): + r"""Current stopping state of the instance. - This field is a member of `oneof`_ ``_vm_count``. - """ + Values: + UNDEFINED_STOP_STATE (0): + A value indicating that the enum field is not + set. + PENDING_STOP (362509770): + The instance is gracefully shutting down. + STOPPING (350791796): + The instance is stopping. + """ + UNDEFINED_STOP_STATE = 0 + PENDING_STOP = 362509770 + STOPPING = 350791796 - class Collocation(proto.Enum): - r"""Specifies network collocation + class TargetState(proto.Enum): + r"""Target instance state. Values: - UNDEFINED_COLLOCATION (0): + UNDEFINED_TARGET_STATE (0): A value indicating that the enum field is not set. - COLLOCATED (103257554): - No description available. - UNSPECIFIED_COLLOCATION (464308205): - No description available. + DELETED (120962041): + The instance will be deleted. + STOPPED (444276141): + The instance will be stopped. """ - UNDEFINED_COLLOCATION = 0 - COLLOCATED = 103257554 - UNSPECIFIED_COLLOCATION = 464308205 + UNDEFINED_TARGET_STATE = 0 + DELETED = 120962041 + STOPPED = 444276141 - availability_domain_count: int = proto.Field( - proto.INT32, - number=12453432, + max_duration: "Duration" = proto.Field( + proto.MESSAGE, + number=39954959, optional=True, + message="Duration", ) - collocation: str = proto.Field( + request_timestamp: str = proto.Field( proto.STRING, - number=511156533, + number=521301862, optional=True, ) - gpu_topology: str = proto.Field( + stop_state: str = proto.Field( proto.STRING, - number=247948450, - optional=True, - ) - max_distance: int = proto.Field( - proto.INT32, - number=172943472, - optional=True, - ) - slice_count: int = proto.Field( - proto.INT32, - number=343342114, + number=67347988, optional=True, ) - tpu_topology: str = proto.Field( + target_state: str = proto.Field( proto.STRING, - number=315411061, - optional=True, - ) - vm_count: int = proto.Field( - proto.INT32, - number=261463431, + number=338978915, optional=True, ) -class ResourcePolicyHourlyCycle(proto.Message): - r"""Time window specified for hourly operations. +class ResumeInstanceRequest(proto.Message): + r"""A request message for Instances.Resume. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - duration (str): - [Output only] Duration of the time window, automatically - chosen to be smallest possible in the given scenario. - - This field is a member of `oneof`_ ``_duration``. - hours_in_cycle (int): - Defines a schedule with units measured in - hours. The value determines how many hours pass - between the start of each cycle. - - This field is a member of `oneof`_ ``_hours_in_cycle``. - start_time (str): - Time within the window to start the operations. It must be - in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + instance (str): + Name of the instance resource to resume. + instances_resume_request_resource (google.cloud.compute_v1beta.types.InstancesResumeRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of the zone for this request. """ - duration: str = proto.Field( + instance: str = proto.Field( proto.STRING, - number=155471252, - optional=True, + number=18257045, ) - hours_in_cycle: int = proto.Field( - proto.INT32, - number=526763132, - optional=True, + instances_resume_request_resource: "InstancesResumeRequest" = proto.Field( + proto.MESSAGE, + number=463320783, + message="InstancesResumeRequest", ) - start_time: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=37467274, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) -class ResourcePolicyInstanceSchedulePolicy(proto.Message): - r"""An InstanceSchedulePolicy specifies when and how frequent - certain operations are performed on the instance. +class ResumeInstancesInstanceGroupManagerRequest(proto.Message): + r"""A request message for InstanceGroupManagers.ResumeInstances. + See the method description for details. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - expiration_time (str): - The expiration time of the schedule. The - timestamp is an RFC3339 string. - - This field is a member of `oneof`_ ``_expiration_time``. - start_time (str): - The start time of the schedule. The timestamp - is an RFC3339 string. - - This field is a member of `oneof`_ ``_start_time``. - time_zone (str): - Specifies the time zone to be used in interpreting - Schedule.schedule. The value of this field must be a time - zone name from the tz database: - https://wikipedia.org/wiki/Tz_database. - - This field is a member of `oneof`_ ``_time_zone``. - vm_start_schedule (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicySchedule): - Specifies the schedule for starting - instances. - - This field is a member of `oneof`_ ``_vm_start_schedule``. - vm_stop_schedule (google.cloud.compute_v1beta.types.ResourcePolicyInstanceSchedulePolicySchedule): - Specifies the schedule for stopping - instances. + instance_group_manager (str): + The name of the managed instance group. + instance_group_managers_resume_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersResumeInstancesRequest): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_vm_stop_schedule``. + This field is a member of `oneof`_ ``_request_id``. + zone (str): + The name of thezone where the managed + instance group is located. """ - expiration_time: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=230299229, - optional=True, + number=249363395, ) - start_time: str = proto.Field( - proto.STRING, - number=37467274, - optional=True, + instance_group_managers_resume_instances_request_resource: "InstanceGroupManagersResumeInstancesRequest" = proto.Field( + proto.MESSAGE, + number=129015618, + message="InstanceGroupManagersResumeInstancesRequest", ) - time_zone: str = proto.Field( + project: str = proto.Field( proto.STRING, - number=36848094, - optional=True, + number=227560217, ) - vm_start_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( - proto.MESSAGE, - number=17762396, + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, - message="ResourcePolicyInstanceSchedulePolicySchedule", ) - vm_stop_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( - proto.MESSAGE, - number=426242732, - optional=True, - message="ResourcePolicyInstanceSchedulePolicySchedule", + zone: str = proto.Field( + proto.STRING, + number=3744684, ) -class ResourcePolicyInstanceSchedulePolicySchedule(proto.Message): - r"""Schedule for an instance operation. +class ResumeInstancesRegionInstanceGroupManagerRequest(proto.Message): + r"""A request message for + RegionInstanceGroupManagers.ResumeInstances. See the method + description for details. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - schedule (str): - Specifies the frequency for the operation, - using the unix-cron format. + instance_group_manager (str): + Name of the managed instance group. + project (str): + Project ID for this request. + region (str): + Name of the region scoping this request. + region_instance_group_managers_resume_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest): + The body resource for this request + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). - This field is a member of `oneof`_ ``_schedule``. + This field is a member of `oneof`_ ``_request_id``. """ - schedule: str = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, - number=375820951, + number=249363395, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_instance_group_managers_resume_instances_request_resource: "RegionInstanceGroupManagersResumeInstancesRequest" = proto.Field( + proto.MESSAGE, + number=463471031, + message="RegionInstanceGroupManagersResumeInstancesRequest", + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, optional=True, ) -class ResourcePolicyList(proto.Message): - r""" +class Rollout(proto.Message): + r"""Rollout resource. + + A Rollout is a specific instance of a RolloutPlan. It represents + a single execution of a strategy to roll out a specific + resource. It also provides APIs to interact with the rollout. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + cancellation_time (str): + Output only. The timestamp at which the + Rollout was cancelled. + + This field is a member of `oneof`_ ``_cancellation_time``. + completion_time (str): + Output only. The timestamp at which the + Rollout was completed. + + This field is a member of `oneof`_ ``_completion_time``. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + current_wave_number (int): + Output only. The number of the currently + running wave. Ex. 1 + + This field is a member of `oneof`_ ``_current_wave_number``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. + + This field is a member of `oneof`_ ``_description``. etag (str): + Output only. etag of the Rollout + Ex. abc1234 This field is a member of `oneof`_ ``_etag``. - id (str): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicy]): - [Output Only] A list of ResourcePolicy resources. kind (str): - [Output Only] Type of resource.Always - compute#resourcePoliciesList for listsof resourcePolicies + Output only. [Output Only] Type of the resource. Always + compute#rollout for rollouts. This field is a member of `oneof`_ ``_kind``. - next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - This field is a member of `oneof`_ ``_next_page_token``. + This field is a member of `oneof`_ ``_name``. + rollout_entity (google.cloud.compute_v1beta.types.RolloutRolloutEntity): + Required. The resource being rolled out. + + This field is a member of `oneof`_ ``_rollout_entity``. + rollout_plan (str): + Required. Rollout Plan used to model the + Rollout. Ex. + compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1 + + This field is a member of `oneof`_ ``_rollout_plan``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. This field is a member of `oneof`_ ``_self_link``. - warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource's resource id. - This field is a member of `oneof`_ ``_warning``. + This field is a member of `oneof`_ ``_self_link_with_id``. + state (str): + Output only. The current state of the + Rollout. Check the State enum for the list of + possible values. + + This field is a member of `oneof`_ ``_state``. + wave_details (MutableSequence[google.cloud.compute_v1beta.types.RolloutWaveDetails]): + Output only. Details about each wave of the + rollout. """ - @property - def raw_page(self): - return self + class State(proto.Enum): + r"""Output only. The current state of the Rollout. - etag: str = proto.Field( + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + CANCELLED (41957681): + The rollout is in a failure terminal state. + CANCELLING (226950512): + The rollout is being cancelled. + CANCEL_FAILED (389121442): + An attempted cancel operation was + unsuccessful. + COMPLETED (309921323): + The rollout is in a successful terminal + state. + COMPLETE_FAILED (188367363): + An attempted complete operation was + unsuccessful. + COMPLETING (480759734): + The rollout is being marked as completed. + FAILED (455706685): + The rollout completed with failures. + PAUSED (205491502): + The rollout is paused. + PAUSE_FAILED (7486150): + An attempted pause operation was + unsuccessful. + PAUSING (464660755): + The rollout is being paused. + PROCESSING (370416403): + A wave is being processed by the product. + READY (77848963): + The rollout has been successfully initialized + and is ready to start. + RESUMING (446856618): + The rollout is being resumed after being + paused. + ROLLBACK_WAVE_FAILED (326793064): + An attempted rollback operation failed to + complete successfully. + ROLLING_BACK (259411649): + A wave rollback is in progress for this + rollout. + STATE_UNSPECIFIED (470755401): + Undefined default state. Should never be + exposed to users. + UNINITIALIZED (327337595): + The rollout has been created but is not yet + ready to be started. + WAVE_FAILED (195452995): + The product failed to process the wave. + """ + UNDEFINED_STATE = 0 + CANCELLED = 41957681 + CANCELLING = 226950512 + CANCEL_FAILED = 389121442 + COMPLETED = 309921323 + COMPLETE_FAILED = 188367363 + COMPLETING = 480759734 + FAILED = 455706685 + PAUSED = 205491502 + PAUSE_FAILED = 7486150 + PAUSING = 464660755 + PROCESSING = 370416403 + READY = 77848963 + RESUMING = 446856618 + ROLLBACK_WAVE_FAILED = 326793064 + ROLLING_BACK = 259411649 + STATE_UNSPECIFIED = 470755401 + UNINITIALIZED = 327337595 + WAVE_FAILED = 195452995 + + cancellation_time: str = proto.Field( proto.STRING, - number=3123477, + number=323792009, optional=True, ) - id: str = proto.Field( + completion_time: str = proto.Field( proto.STRING, - number=3355, + number=122892624, optional=True, ) - items: MutableSequence["ResourcePolicy"] = proto.RepeatedField( - proto.MESSAGE, - number=100526016, - message="ResourcePolicy", - ) - kind: str = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, - number=3292052, + number=30525366, optional=True, ) - next_page_token: str = proto.Field( + current_wave_number: int = proto.Field( + proto.INT64, + number=178280841, + optional=True, + ) + description: str = proto.Field( proto.STRING, - number=79797525, + number=422937596, optional=True, ) - self_link: str = proto.Field( + etag: str = proto.Field( proto.STRING, - number=456214797, + number=3123477, optional=True, ) - warning: "Warning" = proto.Field( - proto.MESSAGE, - number=50704284, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, - message="Warning", ) - - -class ResourcePolicyResourceStatus(proto.Message): - r"""Contains output only fields. Use this sub-message for all - output fields set on ResourcePolicy. The internal structure of - this "status" field should mimic the structure of ResourcePolicy - proto specification. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - instance_schedule_policy (google.cloud.compute_v1beta.types.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus): - [Output Only] Specifies a set of output values reffering to - the instance_schedule_policy system status. This field - should have the same name as corresponding policy field. - - This field is a member of `oneof`_ ``_instance_schedule_policy``. - """ - - instance_schedule_policy: "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus" = proto.Field( + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + rollout_entity: "RolloutRolloutEntity" = proto.Field( proto.MESSAGE, - number=344877104, + number=70633009, optional=True, - message="ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", + message="RolloutRolloutEntity", ) - - -class ResourcePolicyResourceStatusInstanceSchedulePolicyStatus(proto.Message): - r""" - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - last_run_start_time (str): - [Output Only] The last time the schedule successfully ran. - The timestamp is an RFC3339 string. - - This field is a member of `oneof`_ ``_last_run_start_time``. - next_run_start_time (str): - [Output Only] The next time the schedule is planned to run. - The actual time might be slightly different. The timestamp - is an RFC3339 string. - - This field is a member of `oneof`_ ``_next_run_start_time``. - """ - - last_run_start_time: str = proto.Field( + rollout_plan: str = proto.Field( proto.STRING, - number=303069063, + number=459057399, optional=True, ) - next_run_start_time: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=318642570, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, optional=True, ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + wave_details: MutableSequence["RolloutWaveDetails"] = proto.RepeatedField( + proto.MESSAGE, + number=8266492, + message="RolloutWaveDetails", + ) -class ResourcePolicySnapshotSchedulePolicy(proto.Message): - r"""A snapshot schedule policy specifies when and how frequently - snapshots are to be created for the target disk. Also specifies - how many and how long these scheduled snapshots should be - retained. +class RolloutPlan(proto.Message): + r"""RolloutPlan resource. + + A RolloutPlan is the customer-defined strategy to divide a + large-scale change into smaller increments, referred to as + "waves". Each wave targets a specific portion of the overall + affected area and defines criteria that must be met before + progressing to the subsequent wave. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - retention_policy (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicyRetentionPolicy): - Retention policy applied to snapshots created - by this resource policy. - - This field is a member of `oneof`_ ``_retention_policy``. - schedule (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicySchedule): - A Vm Maintenance Policy specifies what kind - of infrastructure maintenance we are allowed to - perform on this VM and when. Schedule that is - applied to disks covered by this policy. - - This field is a member of `oneof`_ ``_schedule``. - snapshot_properties (google.cloud.compute_v1beta.types.ResourcePolicySnapshotSchedulePolicySnapshotProperties): - Properties with which snapshots are created - such as labels, encryption keys. + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. - This field is a member of `oneof`_ ``_snapshot_properties``. - """ + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + Provide this property when you create the + resource. - retention_policy: "ResourcePolicySnapshotSchedulePolicyRetentionPolicy" = ( - proto.Field( - proto.MESSAGE, - number=68625779, - optional=True, - message="ResourcePolicySnapshotSchedulePolicyRetentionPolicy", - ) - ) - schedule: "ResourcePolicySnapshotSchedulePolicySchedule" = proto.Field( - proto.MESSAGE, - number=375820951, - optional=True, - message="ResourcePolicySnapshotSchedulePolicySchedule", - ) - snapshot_properties: "ResourcePolicySnapshotSchedulePolicySnapshotProperties" = ( - proto.Field( - proto.MESSAGE, - number=185371278, - optional=True, - message="ResourcePolicySnapshotSchedulePolicySnapshotProperties", - ) - ) + This field is a member of `oneof`_ ``_description``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + This field is a member of `oneof`_ ``_id``. + kind (str): + Output only. [Output Only] Type of the resource. Always + compute#rolloutPlan for rolloutPlans. -class ResourcePolicySnapshotSchedulePolicyRetentionPolicy(proto.Message): - r"""Policy for retention of scheduled snapshots. + This field is a member of `oneof`_ ``_kind``. + location_scope (str): + The location scope of the rollout plan. If + not specified, the location scope is considered + as ZONAL. Check the LocationScope enum for the + list of possible values. - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + This field is a member of `oneof`_ ``_location_scope``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. - Attributes: - max_retention_days (int): - Maximum age of the snapshot that is allowed - to be kept. + This field is a member of `oneof`_ ``_name``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. - This field is a member of `oneof`_ ``_max_retention_days``. - on_source_disk_delete (str): - Specifies the behavior to apply to scheduled - snapshots when the source disk is deleted. Check - the OnSourceDiskDelete enum for the list of - possible values. + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource's resource id. - This field is a member of `oneof`_ ``_on_source_disk_delete``. + This field is a member of `oneof`_ ``_self_link_with_id``. + waves (MutableSequence[google.cloud.compute_v1beta.types.RolloutPlanWave]): + Required. The waves included in this rollout + plan. """ - class OnSourceDiskDelete(proto.Enum): - r"""Specifies the behavior to apply to scheduled snapshots when - the source disk is deleted. + class LocationScope(proto.Enum): + r"""The location scope of the rollout plan. If not specified, the + location scope is considered as ZONAL. Values: - UNDEFINED_ON_SOURCE_DISK_DELETE (0): + UNDEFINED_LOCATION_SCOPE (0): A value indicating that the enum field is not set. - APPLY_RETENTION_POLICY (535071332): - No description available. - KEEP_AUTO_SNAPSHOTS (258925689): - No description available. - UNSPECIFIED_ON_SOURCE_DISK_DELETE (239140769): - No description available. + LOCATION_SCOPE_UNSPECIFIED (416410498): + Unspecified value. Considered as ZONAL. + REGIONAL (92288543): + Regional scope. + ZONAL (85547428): + Zonal scope. """ - UNDEFINED_ON_SOURCE_DISK_DELETE = 0 - APPLY_RETENTION_POLICY = 535071332 - KEEP_AUTO_SNAPSHOTS = 258925689 - UNSPECIFIED_ON_SOURCE_DISK_DELETE = 239140769 + UNDEFINED_LOCATION_SCOPE = 0 + LOCATION_SCOPE_UNSPECIFIED = 416410498 + REGIONAL = 92288543 + ZONAL = 85547428 - max_retention_days: int = proto.Field( - proto.INT32, - number=324296979, + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, optional=True, ) - on_source_disk_delete: str = proto.Field( + description: str = proto.Field( proto.STRING, - number=321955529, + number=422937596, optional=True, ) - - -class ResourcePolicySnapshotSchedulePolicySchedule(proto.Message): - r"""A schedule for disks where the schedueled operations are - performed. - - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - daily_schedule (google.cloud.compute_v1beta.types.ResourcePolicyDailyCycle): - - This field is a member of `oneof`_ ``_daily_schedule``. - hourly_schedule (google.cloud.compute_v1beta.types.ResourcePolicyHourlyCycle): - - This field is a member of `oneof`_ ``_hourly_schedule``. - weekly_schedule (google.cloud.compute_v1beta.types.ResourcePolicyWeeklyCycle): - - This field is a member of `oneof`_ ``_weekly_schedule``. - """ - - daily_schedule: "ResourcePolicyDailyCycle" = proto.Field( - proto.MESSAGE, - number=86159869, + id: int = proto.Field( + proto.UINT64, + number=3355, optional=True, - message="ResourcePolicyDailyCycle", ) - hourly_schedule: "ResourcePolicyHourlyCycle" = proto.Field( - proto.MESSAGE, - number=38328485, + kind: str = proto.Field( + proto.STRING, + number=3292052, optional=True, - message="ResourcePolicyHourlyCycle", ) - weekly_schedule: "ResourcePolicyWeeklyCycle" = proto.Field( - proto.MESSAGE, - number=359548053, + location_scope: str = proto.Field( + proto.STRING, + number=138667338, optional=True, - message="ResourcePolicyWeeklyCycle", + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + waves: MutableSequence["RolloutPlanWave"] = proto.RepeatedField( + proto.MESSAGE, + number=112905370, + message="RolloutPlanWave", ) -class ResourcePolicySnapshotSchedulePolicySnapshotProperties(proto.Message): - r"""Specified snapshot properties for scheduled snapshots created - by this policy. - +class RolloutPlanWave(proto.Message): + r"""A single wave in a rollout plan. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - chain_name (str): - Chain name that the snapshot is created in. + display_name (str): + Optional. The display name of this wave of + the rollout plan. - This field is a member of `oneof`_ ``_chain_name``. - guest_flush (bool): - Indication to perform a 'guest aware' - snapshot. + This field is a member of `oneof`_ ``_display_name``. + number (int): + Output only. The wave number. - This field is a member of `oneof`_ ``_guest_flush``. - labels (MutableMapping[str, str]): - Labels to apply to scheduled snapshots. These - can be later modified by the setLabels method. - Label values may be empty. - region (str): - Region where the snapshot is scoped to. + This field is a member of `oneof`_ ``_number``. + orchestration_options (google.cloud.compute_v1beta.types.RolloutPlanWaveOrchestrationOptions): + Optional. The orchestration options for this + wave. - This field is a member of `oneof`_ ``_region``. - storage_locations (MutableSequence[str]): - Cloud Storage bucket storage location of the - auto snapshot (regional or multi-regional). + This field is a member of `oneof`_ ``_orchestration_options``. + selectors (MutableSequence[google.cloud.compute_v1beta.types.RolloutPlanWaveSelector]): + Required. The selectors for this wave. There is a logical + AND between each selector defined in a wave, so a resource + must satisfy the criteria of *all* the specified selectors + to be in scope for the wave. + validation (google.cloud.compute_v1beta.types.RolloutPlanWaveValidation): + Required. The validation to be performed at + the end of this wave. + + This field is a member of `oneof`_ ``_validation``. """ - chain_name: str = proto.Field( + display_name: str = proto.Field( proto.STRING, - number=68644169, + number=4473832, optional=True, ) - guest_flush: bool = proto.Field( - proto.BOOL, - number=385550813, + number: int = proto.Field( + proto.INT64, + number=39377737, optional=True, ) - labels: MutableMapping[str, str] = proto.MapField( - proto.STRING, - proto.STRING, - number=500195327, - ) - region: str = proto.Field( - proto.STRING, - number=138946292, + orchestration_options: "RolloutPlanWaveOrchestrationOptions" = proto.Field( + proto.MESSAGE, + number=93218464, optional=True, + message="RolloutPlanWaveOrchestrationOptions", ) - storage_locations: MutableSequence[str] = proto.RepeatedField( - proto.STRING, - number=328005274, + selectors: MutableSequence["RolloutPlanWaveSelector"] = proto.RepeatedField( + proto.MESSAGE, + number=431523956, + message="RolloutPlanWaveSelector", ) - - -class ResourcePolicyWeeklyCycle(proto.Message): - r"""Time window specified for weekly operations. - - Attributes: - day_of_weeks (MutableSequence[google.cloud.compute_v1beta.types.ResourcePolicyWeeklyCycleDayOfWeek]): - Up to 7 intervals/windows, one for each day - of the week. - """ - - day_of_weeks: MutableSequence[ - "ResourcePolicyWeeklyCycleDayOfWeek" - ] = proto.RepeatedField( + validation: "RolloutPlanWaveValidation" = proto.Field( proto.MESSAGE, - number=257871834, - message="ResourcePolicyWeeklyCycleDayOfWeek", + number=493308025, + optional=True, + message="RolloutPlanWaveValidation", ) -class ResourcePolicyWeeklyCycleDayOfWeek(proto.Message): - r""" +class RolloutPlanWaveOrchestrationOptions(proto.Message): + r"""Options to control the pace of orchestration of a wave. These + options are required only if the resource being rolled out + follows the Orchestrated pattern. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - day (str): - Defines a schedule that runs on specific days - of the week. Specify one or more days. The - following options are available: MONDAY, - TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, - SUNDAY. Check the Day enum for the list of - possible values. - - This field is a member of `oneof`_ ``_day``. - duration (str): - [Output only] Duration of the time window, automatically - chosen to be smallest possible in the given scenario. + delays (MutableSequence[google.cloud.compute_v1beta.types.RolloutPlanWaveOrchestrationOptionsDelay]): + Optional. Delays, if any, to be added between + batches of projects. We allow multiple Delays to + be specified, letting users set separate delays + between batches of projects corresponding to + different locations and batches of projects + corresponding to the same location. + max_concurrent_locations (int): + Optional. Maximum number of locations to be + orchestrated in parallel. - This field is a member of `oneof`_ ``_duration``. - start_time (str): - Time within the window to start the operations. It must be - in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + This field is a member of `oneof`_ ``_max_concurrent_locations``. + max_concurrent_resources_per_location (int): + Optional. Maximum number of resources to be + orchestrated per location in parallel. - This field is a member of `oneof`_ ``_start_time``. + This field is a member of `oneof`_ ``_max_concurrent_resources_per_location``. """ - class Day(proto.Enum): - r"""Defines a schedule that runs on specific days of the week. - Specify one or more days. The following options are available: - MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. - - Values: - UNDEFINED_DAY (0): - A value indicating that the enum field is not - set. - FRIDAY (471398751): - No description available. - INVALID (530283991): - No description available. - MONDAY (132310288): - No description available. - SATURDAY (279037881): - No description available. - SUNDAY (309626320): - No description available. - THURSDAY (207198682): - No description available. - TUESDAY (277509677): - No description available. - WEDNESDAY (422029110): - No description available. - """ - UNDEFINED_DAY = 0 - FRIDAY = 471398751 - INVALID = 530283991 - MONDAY = 132310288 - SATURDAY = 279037881 - SUNDAY = 309626320 - THURSDAY = 207198682 - TUESDAY = 277509677 - WEDNESDAY = 422029110 - - day: str = proto.Field( - proto.STRING, - number=99228, - optional=True, + delays: MutableSequence[ + "RolloutPlanWaveOrchestrationOptionsDelay" + ] = proto.RepeatedField( + proto.MESSAGE, + number=275150672, + message="RolloutPlanWaveOrchestrationOptionsDelay", ) - duration: str = proto.Field( - proto.STRING, - number=155471252, + max_concurrent_locations: int = proto.Field( + proto.INT64, + number=493763281, optional=True, ) - start_time: str = proto.Field( - proto.STRING, - number=37467274, + max_concurrent_resources_per_location: int = proto.Field( + proto.INT64, + number=178401246, optional=True, ) -class ResourcePolicyWorkloadPolicy(proto.Message): - r"""Represents the workload policy. +class RolloutPlanWaveOrchestrationOptionsDelay(proto.Message): + r"""Options to control the delay, if any, between batches of + projects. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - accelerator_topology (str): - Specifies the topology required to create a - partition for VMs that have interconnected GPUs. + delimiter (str): + Optional. Controls whether the delay should only be added + between batches of projects corresponding to different + locations, or also between batches of projects corresponding + to the same location. - This field is a member of `oneof`_ ``_accelerator_topology``. - max_topology_distance (str): - Specifies the maximum distance between - instances. Check the MaxTopologyDistance enum - for the list of possible values. + Must be set to DELIMITER_UNSPECIFIED if no delay is to be + added. Check the Delimiter enum for the list of possible + values. - This field is a member of `oneof`_ ``_max_topology_distance``. + This field is a member of `oneof`_ ``_delimiter``. + duration (str): + Optional. The duration of the delay, if any, + to be added between batches of projects. A zero + duration corresponds to no delay. + + This field is a member of `oneof`_ ``_duration``. type_ (str): - Specifies the intent of the instance - placement in the MIG. Check the Type enum for - the list of possible values. + Optional. Controls whether the specified duration is to be + added at the end of each batch, or if the total processing + time for each batch will be padded if needed to meet the + specified duration. + + Must be set to TYPE_UNSPECIFIED if no delay is to be added. + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ - class MaxTopologyDistance(proto.Enum): - r"""Specifies the maximum distance between instances. + class Delimiter(proto.Enum): + r"""Optional. Controls whether the delay should only be added between + batches of projects corresponding to different locations, or also + between batches of projects corresponding to the same location. + + Must be set to DELIMITER_UNSPECIFIED if no delay is to be added. Values: - UNDEFINED_MAX_TOPOLOGY_DISTANCE (0): + UNDEFINED_DELIMITER (0): A value indicating that the enum field is not set. - BLOCK (63294573): - VMs must be provisioned in the same block. - CLUSTER (516333018): - VMs must be provisioned in the same cluster. - SUBBLOCK (316202573): - VMs must be provisioned in the same subblock. + DELIMITER_BATCH (253390530): + The delay will also be added between batches + of projects corresponding to the same location. + DELIMITER_LOCATION (189398797): + The delay will only be added between batches + of projects corresponding to different + locations. + DELIMITER_UNSPECIFIED (372199615): + No delay will be added between batches of + projects. Processing will continue with the next + batch as soon as the previous batch of LROs is + done. """ - UNDEFINED_MAX_TOPOLOGY_DISTANCE = 0 - BLOCK = 63294573 - CLUSTER = 516333018 - SUBBLOCK = 316202573 + UNDEFINED_DELIMITER = 0 + DELIMITER_BATCH = 253390530 + DELIMITER_LOCATION = 189398797 + DELIMITER_UNSPECIFIED = 372199615 class Type(proto.Enum): - r"""Specifies the intent of the instance placement in the MIG. + r"""Optional. Controls whether the specified duration is to be added at + the end of each batch, or if the total processing time for each + batch will be padded if needed to meet the specified duration. + + Must be set to TYPE_UNSPECIFIED if no delay is to be added. Values: UNDEFINED_TYPE (0): A value indicating that the enum field is not set. - HIGH_AVAILABILITY (409487576): - MIG spreads out the instances as much as - possible for high availability. - HIGH_THROUGHPUT (146499815): - MIG provisions instances as close to each - other as possible for high throughput. + TYPE_MINIMUM (234909673): + The total processing time for each batch of + projects will be padded if needed to meet the + specified delay duration. + TYPE_OFFSET (165747000): + The specified delay will directly be added + after each batch of projects as specified by the + delimiter. + TYPE_UNSPECIFIED (437714322): + No delay will be added between batches of + projects. Processing will continue with the next + batch as soon as the previous batch of LROs is + done. """ UNDEFINED_TYPE = 0 - HIGH_AVAILABILITY = 409487576 - HIGH_THROUGHPUT = 146499815 + TYPE_MINIMUM = 234909673 + TYPE_OFFSET = 165747000 + TYPE_UNSPECIFIED = 437714322 - accelerator_topology: str = proto.Field( + delimiter: str = proto.Field( proto.STRING, - number=389323203, + number=286352903, optional=True, ) - max_topology_distance: str = proto.Field( + duration: str = proto.Field( proto.STRING, - number=7521706, + number=155471252, optional=True, ) type_: str = proto.Field( @@ -109030,575 +126273,540 @@ class Type(proto.Enum): ) -class ResourceStatus(proto.Message): - r"""Contains output only fields. Use this sub-message for actual - values set on Instance attributes as compared to the value - requested by the user (intent) in their instance CRUD calls. +class RolloutPlanWaveSelector(proto.Message): + r"""A selector which specifies what resource(s) are included in a + given wave. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - effective_instance_metadata (google.cloud.compute_v1beta.types.ResourceStatusEffectiveInstanceMetadata): - [Output Only] Effective metadata is a field that - consolidates project, zonal instance settings, and - instance-level predefined metadata keys to provide the - overridden value for those metadata keys at the instance - level. - - This field is a member of `oneof`_ ``_effective_instance_metadata``. - physical_host (str): - [Output Only] The precise location of your instance within - the zone's data center, including the block, sub-block, and - host. The field is formatted as follows: - blockId/subBlockId/hostId. - - This field is a member of `oneof`_ ``_physical_host``. - physical_host_topology (google.cloud.compute_v1beta.types.ResourceStatusPhysicalHostTopology): - [Output Only] A series of fields containing the global name - of the Compute Engine cluster, as well as the ID of the - block, sub-block, and host on which the running instance is - located. - - This field is a member of `oneof`_ ``_physical_host_topology``. - scheduling (google.cloud.compute_v1beta.types.ResourceStatusScheduling): - - This field is a member of `oneof`_ ``_scheduling``. - shutdown_details (google.cloud.compute_v1beta.types.ResourceStatusShutdownDetails): - [Output Only] Details about the instance stopping state. + location_selector (google.cloud.compute_v1beta.types.RolloutPlanWaveSelectorLocationSelector): + Optional. Roll out to resources by Cloud + locations. - This field is a member of `oneof`_ ``_shutdown_details``. - upcoming_maintenance (google.cloud.compute_v1beta.types.UpcomingMaintenance): + This field is a member of `oneof`_ ``_location_selector``. + resource_hierarchy_selector (google.cloud.compute_v1beta.types.RolloutPlanWaveSelectorResourceHierarchySelector): + Optional. Roll out to resources by Cloud + Resource Manager resource hierarchy. - This field is a member of `oneof`_ ``_upcoming_maintenance``. + This field is a member of `oneof`_ ``_resource_hierarchy_selector``. """ - effective_instance_metadata: "ResourceStatusEffectiveInstanceMetadata" = ( + location_selector: "RolloutPlanWaveSelectorLocationSelector" = proto.Field( + proto.MESSAGE, + number=422273321, + optional=True, + message="RolloutPlanWaveSelectorLocationSelector", + ) + resource_hierarchy_selector: "RolloutPlanWaveSelectorResourceHierarchySelector" = ( proto.Field( proto.MESSAGE, - number=55052033, + number=66779770, optional=True, - message="ResourceStatusEffectiveInstanceMetadata", + message="RolloutPlanWaveSelectorResourceHierarchySelector", ) ) - physical_host: str = proto.Field( - proto.STRING, - number=464370704, - optional=True, - ) - physical_host_topology: "ResourceStatusPhysicalHostTopology" = proto.Field( - proto.MESSAGE, - number=390842814, - optional=True, - message="ResourceStatusPhysicalHostTopology", - ) - scheduling: "ResourceStatusScheduling" = proto.Field( - proto.MESSAGE, - number=386688404, - optional=True, - message="ResourceStatusScheduling", - ) - shutdown_details: "ResourceStatusShutdownDetails" = proto.Field( - proto.MESSAGE, - number=15198553, - optional=True, - message="ResourceStatusShutdownDetails", - ) - upcoming_maintenance: "UpcomingMaintenance" = proto.Field( - proto.MESSAGE, - number=227348592, - optional=True, - message="UpcomingMaintenance", - ) -class ResourceStatusEffectiveInstanceMetadata(proto.Message): - r"""Effective values of predefined metadata keys for an instance. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields +class RolloutPlanWaveSelectorLocationSelector(proto.Message): + r"""Roll out to resources by location. Attributes: - block_project_ssh_keys_metadata_value (bool): - Effective block-project-ssh-keys value at - Instance level. - - This field is a member of `oneof`_ ``_block_project_ssh_keys_metadata_value``. - enable_guest_attributes_metadata_value (bool): - Effective enable-guest-attributes value at - Instance level. - - This field is a member of `oneof`_ ``_enable_guest_attributes_metadata_value``. - enable_os_inventory_metadata_value (bool): - Effective enable-os-inventory value at - Instance level. - - This field is a member of `oneof`_ ``_enable_os_inventory_metadata_value``. - enable_osconfig_metadata_value (bool): - Effective enable-osconfig value at Instance - level. - - This field is a member of `oneof`_ ``_enable_osconfig_metadata_value``. - enable_oslogin_metadata_value (bool): - Effective enable-oslogin value at Instance - level. + included_locations (MutableSequence[str]): + Optional. Example: "us-central1-a". + """ - This field is a member of `oneof`_ ``_enable_oslogin_metadata_value``. - serial_port_enable_metadata_value (bool): - Effective serial-port-enable value at - Instance level. + included_locations: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=78239643, + ) - This field is a member of `oneof`_ ``_serial_port_enable_metadata_value``. - serial_port_logging_enable_metadata_value (bool): - Effective serial-port-logging-enable value at - Instance level. - This field is a member of `oneof`_ ``_serial_port_logging_enable_metadata_value``. - vm_dns_setting_metadata_value (str): - Effective VM DNS setting at Instance level. +class RolloutPlanWaveSelectorResourceHierarchySelector(proto.Message): + r"""Roll out to resources by Cloud Resource Manager resource + hierarchy nodes such as projects, folders, orgs. - This field is a member of `oneof`_ ``_vm_dns_setting_metadata_value``. + Attributes: + included_folders (MutableSequence[str]): + Optional. Format: "folders/{folder_id}". + included_organizations (MutableSequence[str]): + Optional. Format: "organizations/{organization_id}". + included_projects (MutableSequence[str]): + Optional. Format: "projects/{project_id}". """ - block_project_ssh_keys_metadata_value: bool = proto.Field( - proto.BOOL, - number=338623101, - optional=True, - ) - enable_guest_attributes_metadata_value: bool = proto.Field( - proto.BOOL, - number=420155878, - optional=True, - ) - enable_os_inventory_metadata_value: bool = proto.Field( - proto.BOOL, - number=371752675, - optional=True, - ) - enable_osconfig_metadata_value: bool = proto.Field( - proto.BOOL, - number=502966494, - optional=True, + included_folders: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=372825410, ) - enable_oslogin_metadata_value: bool = proto.Field( - proto.BOOL, - number=216603159, - optional=True, + included_organizations: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=318362461, ) - serial_port_enable_metadata_value: bool = proto.Field( - proto.BOOL, - number=430536330, - optional=True, + included_projects: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=64232605, ) - serial_port_logging_enable_metadata_value: bool = proto.Field( - proto.BOOL, - number=311813290, + + +class RolloutPlanWaveValidation(proto.Message): + r"""The validation to be performed before progressing to the next + wave. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + time_based_validation_metadata (google.cloud.compute_v1beta.types.RolloutPlanWaveValidationTimeBasedValidationMetadata): + Optional. Metadata required if type = "time". + + This field is a member of `oneof`_ ``_time_based_validation_metadata``. + type_ (str): + Required. The type of the validation. If a + type of validation is associated with a metadata + object, the appropriate metadata field mapping + to the validation type must be provided in the + validation message. Possible values are in + quotes below alongside an explanation: + + "manual": The system waits for an end-user + approval API before progressing to the next + wave. + "time": The system waits for a user specified + duration before progressing to the next + wave. TimeBasedValidation must be provided. + + This field is a member of `oneof`_ ``_type``. + """ + + time_based_validation_metadata: "RolloutPlanWaveValidationTimeBasedValidationMetadata" = proto.Field( + proto.MESSAGE, + number=69499575, optional=True, + message="RolloutPlanWaveValidationTimeBasedValidationMetadata", ) - vm_dns_setting_metadata_value: str = proto.Field( + type_: str = proto.Field( proto.STRING, - number=411127950, + number=3575610, optional=True, ) -class ResourceStatusPhysicalHostTopology(proto.Message): - r"""Represents the physical host topology of the host on which - the VM is running. +class RolloutPlanWaveValidationTimeBasedValidationMetadata(proto.Message): + r"""Metadata required if type = "time". + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + wait_duration (str): + Optional. The duration that the system waits + in between waves. This wait starts after all + changes in the wave are rolled out. + + This field is a member of `oneof`_ ``_wait_duration``. + """ + + wait_duration: str = proto.Field( + proto.STRING, + number=452313374, + optional=True, + ) + +class RolloutPlansListResponse(proto.Message): + r"""Contains a list of RolloutPlan resources. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - block (str): - [Output Only] The ID of the block in which the running - instance is located. Instances within the same block - experience low network latency. + etag (str): - This field is a member of `oneof`_ ``_block``. - cluster (str): - [Output Only] The global name of the Compute Engine cluster - where the running instance is located. + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. - This field is a member of `oneof`_ ``_cluster``. - host (str): - [Output Only] The ID of the host on which the running - instance is located. Instances on the same host experience - the lowest possible network latency. + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.RolloutPlan]): + A list of RolloutPlan resources. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. - This field is a member of `oneof`_ ``_host``. - subblock (str): - [Output Only] The ID of the sub-block in which the running - instance is located. Instances in the same sub-block - experience lower network latency than instances in the same - block. + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. - This field is a member of `oneof`_ ``_subblock``. + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - block: str = proto.Field( + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=93832333, + number=3123477, optional=True, ) - cluster: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=335221242, + number=3355, optional=True, ) - host: str = proto.Field( + items: MutableSequence["RolloutPlan"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="RolloutPlan", + ) + next_page_token: str = proto.Field( proto.STRING, - number=3208616, + number=79797525, optional=True, ) - subblock: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=70446669, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, optional=True, + message="Warning", ) -class ResourceStatusScheduling(proto.Message): - r""" +class RolloutPolicy(proto.Message): + r"""A rollout policy configuration. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - availability_domain (int): - Specifies the availability domain to place - the instance in. The value must be a number - between 1 and the number of availability domains - specified in the spread placement policy - attached to the instance. + default_rollout_time (str): + An optional RFC3339 timestamp on or after + which the update is considered rolled out to any + zone that is not explicitly stated. - This field is a member of `oneof`_ ``_availability_domain``. - termination_timestamp (str): - Time in future when the instance will be - terminated in RFC3339 text format. + This field is a member of `oneof`_ ``_default_rollout_time``. + location_rollout_policies (MutableMapping[str, str]): + Location based rollout policies to apply to + the resource. + Currently only zone names are supported and must + be represented as valid URLs, like: + zones/us-central1-a. - This field is a member of `oneof`_ ``_termination_timestamp``. + The value expects an RFC3339 timestamp on or + after which the update is considered rolled out + to the specified location. """ - availability_domain: int = proto.Field( - proto.INT32, - number=252514344, + default_rollout_time: str = proto.Field( + proto.STRING, + number=413529561, optional=True, ) - termination_timestamp: str = proto.Field( + location_rollout_policies: MutableMapping[str, str] = proto.MapField( proto.STRING, - number=364180891, - optional=True, + proto.STRING, + number=133299048, ) -class ResourceStatusShutdownDetails(proto.Message): - r""" +class RolloutRolloutEntity(proto.Message): + r"""Specifications of the resource to roll out. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - max_duration (google.cloud.compute_v1beta.types.Duration): + orchestrated_entity (google.cloud.compute_v1beta.types.RolloutRolloutEntityOrchestratedEntity): + Optional. Entity details for products using + the Orchestrated Integration model. - This field is a member of `oneof`_ ``_max_duration``. - request_timestamp (str): + This field is a member of `oneof`_ ``_orchestrated_entity``. + """ - This field is a member of `oneof`_ ``_request_timestamp``. - stop_state (str): - Check the StopState enum for the list of - possible values. + orchestrated_entity: "RolloutRolloutEntityOrchestratedEntity" = proto.Field( + proto.MESSAGE, + number=409556732, + optional=True, + message="RolloutRolloutEntityOrchestratedEntity", + ) - This field is a member of `oneof`_ ``_stop_state``. - target_state (str): - Check the TargetState enum for the list of - possible values. - This field is a member of `oneof`_ ``_target_state``. - """ +class RolloutRolloutEntityOrchestratedEntity(proto.Message): + r"""This message is used if the resource type follows the + Orchestrated integration model with ProgressiveRollout. - class StopState(proto.Enum): - r""" - Values: - UNDEFINED_STOP_STATE (0): - A value indicating that the enum field is not - set. - PENDING_STOP (362509770): - No description available. - STOPPING (350791796): - No description available. - """ - UNDEFINED_STOP_STATE = 0 - PENDING_STOP = 362509770 - STOPPING = 350791796 + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - class TargetState(proto.Enum): - r""" + Attributes: + conflict_behavior (str): + Required. Specifies the behavior of the Rollout if an out of + band update is detected in a project during a Rollout. It + can be one of the following values: - Values: - UNDEFINED_TARGET_STATE (0): - A value indicating that the enum field is not - set. - DELETED (120962041): - No description available. - STOPPED (444276141): - No description available. - """ - UNDEFINED_TARGET_STATE = 0 - DELETED = 120962041 - STOPPED = 444276141 + 1) overwrite : Overwrite the local value with the rollout + value. + 2) no_overwrite : Do not overwrite the local value with the + rollout value. - max_duration: "Duration" = proto.Field( - proto.MESSAGE, - number=39954959, - optional=True, - message="Duration", - ) - request_timestamp: str = proto.Field( + This field is a member of `oneof`_ ``_conflict_behavior``. + orchestration_action (str): + Required. Orchestration action during the + Rollout. It can be one of the following values: + + 1) "update": Resources will be updated by the + rollout. 2) "delete": Resources will be deleted + by the rollout. + + This field is a member of `oneof`_ ``_orchestration_action``. + orchestration_source (str): + Required. Fully qualified resource name of + the resource which contains the source of truth + of the configuration being rolled out across + locations/projects. For example, in the case of + a global Rollout which is applied across + regions, this contains the name of the global + resource created by the user which contains a + payload for a resource that is orchestrated + across regions. This follows the following + format: + + //.googleapis.com/projects//locations/global// + e.g. + //osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1 + + This field is a member of `oneof`_ ``_orchestration_source``. + """ + + conflict_behavior: str = proto.Field( proto.STRING, - number=521301862, + number=115729439, optional=True, ) - stop_state: str = proto.Field( + orchestration_action: str = proto.Field( proto.STRING, - number=67347988, + number=109745652, optional=True, ) - target_state: str = proto.Field( + orchestration_source: str = proto.Field( proto.STRING, - number=338978915, + number=99319769, optional=True, ) -class ResumeInstanceRequest(proto.Message): - r"""A request message for Instances.Resume. See the method - description for details. +class RolloutWaveDetails(proto.Message): + r"""Additional metadata about the status of each wave provided by + the server. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance (str): - Name of the instance resource to resume. - instances_resume_request_resource (google.cloud.compute_v1beta.types.InstancesResumeRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + orchestrated_wave_details (google.cloud.compute_v1beta.types.RolloutWaveDetailsOrchestratedWaveDetails): + Output only. Additional details of the wave + for products using the Orchestrated Integration + model. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone for this request. + This field is a member of `oneof`_ ``_orchestrated_wave_details``. + wave_display_name (str): + Output only. Wave name. + Ex. wave1 + + This field is a member of `oneof`_ ``_wave_display_name``. + wave_number (int): + Output only. System generated number for the + wave. + + This field is a member of `oneof`_ ``_wave_number``. """ - instance: str = proto.Field( - proto.STRING, - number=18257045, - ) - instances_resume_request_resource: "InstancesResumeRequest" = proto.Field( - proto.MESSAGE, - number=463320783, - message="InstancesResumeRequest", - ) - project: str = proto.Field( - proto.STRING, - number=227560217, + orchestrated_wave_details: "RolloutWaveDetailsOrchestratedWaveDetails" = ( + proto.Field( + proto.MESSAGE, + number=421732181, + optional=True, + message="RolloutWaveDetailsOrchestratedWaveDetails", + ) ) - request_id: str = proto.Field( + wave_display_name: str = proto.Field( proto.STRING, - number=37109963, + number=29521774, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, + wave_number: int = proto.Field( + proto.INT64, + number=491629391, + optional=True, ) -class ResumeInstancesInstanceGroupManagerRequest(proto.Message): - r"""A request message for InstanceGroupManagers.ResumeInstances. - See the method description for details. +class RolloutWaveDetailsOrchestratedWaveDetails(proto.Message): + r"""Details of the wave for products using the Orchestrated + integration model. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - The name of the managed instance group. - instance_group_managers_resume_instances_request_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersResumeInstancesRequest): - The body resource for this request - project (str): - Project ID for this request. - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed_resources_count (int): + Output only. Resource completed so far. - This field is a member of `oneof`_ ``_request_id``. - zone (str): - The name of the zone where the managed - instance group is located. + This field is a member of `oneof`_ ``_completed_resources_count``. + estimated_total_resources_count (int): + Output only. Estimated total count of + resources. + + This field is a member of `oneof`_ ``_estimated_total_resources_count``. + failed_locations (MutableSequence[str]): + Output only. Locations that failed during + orchestration, and ProgressiveRollout stopped + retrying. There may be some successful resources + rolled out in the wave as the location may have + failed later in the Rollout. + failed_resources_count (int): + Output only. Resources failed. + + This field is a member of `oneof`_ ``_failed_resources_count``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, + completed_resources_count: int = proto.Field( + proto.INT64, + number=208328833, + optional=True, ) - instance_group_managers_resume_instances_request_resource: "InstanceGroupManagersResumeInstancesRequest" = proto.Field( - proto.MESSAGE, - number=129015618, - message="InstanceGroupManagersResumeInstancesRequest", + estimated_total_resources_count: int = proto.Field( + proto.INT64, + number=457594807, + optional=True, ) - project: str = proto.Field( + failed_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=227560217, + number=30506460, ) - request_id: str = proto.Field( - proto.STRING, - number=37109963, + failed_resources_count: int = proto.Field( + proto.INT64, + number=391795315, optional=True, ) - zone: str = proto.Field( - proto.STRING, - number=3744684, - ) -class ResumeInstancesRegionInstanceGroupManagerRequest(proto.Message): - r"""A request message for - RegionInstanceGroupManagers.ResumeInstances. See the method - description for details. - +class RolloutsListResponse(proto.Message): + r""" .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - instance_group_manager (str): - Name of the managed instance group. - project (str): - Project ID for this request. - region (str): - Name of the region scoping this request. - region_instance_group_managers_resume_instances_request_resource (google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest): - The body resource for this request - request_id (str): - An optional request ID to identify requests. - Specify a unique request ID so that if you must - retry your request, the server will know to - ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + etag (str): - This field is a member of `oneof`_ ``_request_id``. + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.Rollout]): + A list of Rollout resources. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. """ - instance_group_manager: str = proto.Field( - proto.STRING, - number=249363395, - ) - project: str = proto.Field( + @property + def raw_page(self): + return self + + etag: str = proto.Field( proto.STRING, - number=227560217, + number=3123477, + optional=True, ) - region: str = proto.Field( + id: str = proto.Field( proto.STRING, - number=138946292, + number=3355, + optional=True, ) - region_instance_group_managers_resume_instances_request_resource: "RegionInstanceGroupManagersResumeInstancesRequest" = proto.Field( + items: MutableSequence["Rollout"] = proto.RepeatedField( proto.MESSAGE, - number=463471031, - message="RegionInstanceGroupManagersResumeInstancesRequest", + number=100526016, + message="Rollout", ) - request_id: str = proto.Field( + next_page_token: str = proto.Field( proto.STRING, - number=37109963, + number=79797525, optional=True, ) - - -class RolloutPolicy(proto.Message): - r"""A rollout policy configuration. - - .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields - - Attributes: - default_rollout_time (str): - An optional RFC3339 timestamp on or after - which the update is considered rolled out to any - zone that is not explicitly stated. - - This field is a member of `oneof`_ ``_default_rollout_time``. - location_rollout_policies (MutableMapping[str, str]): - Location based rollout policies to apply to - the resource. Currently only zone names are - supported and must be represented as valid URLs, - like: zones/us-central1-a. The value expects an - RFC3339 timestamp on or after which the update - is considered rolled out to the specified - location. - """ - - default_rollout_time: str = proto.Field( + self_link: str = proto.Field( proto.STRING, - number=413529561, + number=456214797, optional=True, ) - location_rollout_policies: MutableMapping[str, str] = proto.MapField( - proto.STRING, + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, - number=133299048, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", ) class Route(proto.Message): - r"""Represents a Route resource. A route defines a path from VM - instances in the VPC network to a specific destination. This - destination can be inside or outside the VPC network. For more - information, read the Routes overview. + r"""Represents a Route resource. + + A route defines a path from VM instances in the VPC network to a + specific destination. This destination can be inside or outside + the VPC network. For more information, read theRoutes overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: as_paths (MutableSequence[google.cloud.compute_v1beta.types.RouteAsPath]): - [Output Only] AS path. + Output only. [Output Only] AS path. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -109616,19 +126824,19 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_dest_range``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of this resource. Always compute#routes - for Route resources. + Output only. [Output Only] Type of this resource. Always + compute#routes for Route resources. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?``. The first character must be a lowercase letter, and all following characters (except for @@ -109646,55 +126854,66 @@ class Route(proto.Message): The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid - URL: projects/ - project/global/gateways/default-internet-gateway + URL: + projects/project/global/gateways/default-internet-gateway This field is a member of `oneof`_ ``_next_hop_gateway``. next_hop_hub (str): - [Output Only] The full resource name of the Network - Connectivity Center hub that will handle matching packets. + Output only. [Output Only] The full resource name of the + Network Connectivity Center hub that will handle matching + packets. This field is a member of `oneof`_ ``_next_hop_hub``. next_hop_ilb (str): - The URL to a forwarding rule of type - loadBalancingScheme=INTERNAL that should handle - matching packets or the IP address of the + The URL to a forwarding rule of + typeloadBalancingScheme=INTERNAL that should + handle matching packets or the IP address of the forwarding Rule. For example, the following are - all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/regions/region - /forwardingRules/forwardingRule - - regions/region/forwardingRules/forwardingRule If - an IP address is provided, must specify an IPv4 - address in dot-decimal notation or an IPv6 + all valid URLs: + + + - + https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule + - + regions/region/forwardingRules/forwardingRule + + If an IP address is provided, must specify an + IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. For example, the - following are all valid IP addresses: - - 10.128.0.56 - 2001:db8::2d9:51:0:0 - - 2001:db8:0:0:2d9:51:0:0 IPv6 addresses will be - displayed using RFC 5952 compressed format (e.g. - 2001:db8::2d9:51:0:0). Should never be an - IPv4-mapped IPv6 address. + following are all valid IP addresses: + + + - 10.128.0.56 + - 2001:db8::2d9:51:0:0 + - 2001:db8:0:0:2d9:51:0:0 + + IPv6 addresses will be displayed using RFC 5952 + compressed format (e.g. 2001:db8::2d9:51:0:0). + Should never be an IPv4-mapped IPv6 address. This field is a member of `oneof`_ ``_next_hop_ilb``. next_hop_instance (str): The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ This field is a member of `oneof`_ ``_next_hop_instance``. next_hop_inter_region_cost (int): - [Output only] Internal fixed region-to-region cost that - Google Cloud calculates based on factors such as network - performance, distance, and available bandwidth between - regions. + Output only. [Output only] Internal fixed region-to-region + cost that Google Cloud calculates based on factors such as + network performance, distance, and available bandwidth + between regions. This field is a member of `oneof`_ ``_next_hop_inter_region_cost``. next_hop_interconnect_attachment (str): - [Output Only] The URL to an InterconnectAttachment which is - the next hop for the route. This field will only be - populated for dynamic routes generated by Cloud Router with - a linked interconnectAttachment or the static route - generated by each L2 Interconnect Attachment. + Output only. [Output Only] The URL to an + InterconnectAttachment which is the next hop for the route. + This field will only be populated for dynamic routes + generated by Cloud Router with a linked + interconnectAttachment or the static route generated by each + L2 Interconnect Attachment. This field is a member of `oneof`_ ``_next_hop_interconnect_attachment``. next_hop_ip (str): @@ -109711,9 +126930,9 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_next_hop_ip``. next_hop_med (int): - [Output Only] Multi-Exit Discriminator, a BGP route metric - that indicates the desirability of a particular route in a - network. + Output only. [Output Only] Multi-Exit Discriminator, a BGP + route metric that indicates the desirability of a particular + route in a network. This field is a member of `oneof`_ ``_next_hop_med``. next_hop_network (str): @@ -109722,15 +126941,16 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_next_hop_network``. next_hop_origin (str): - [Output Only] Indicates the origin of the route. Can be IGP - (Interior Gateway Protocol), EGP (Exterior Gateway - Protocol), or INCOMPLETE. Check the NextHopOrigin enum for - the list of possible values. + Output only. [Output Only] Indicates the origin of the + route. Can be IGP (Interior Gateway Protocol), EGP (Exterior + Gateway Protocol), or INCOMPLETE. Check the NextHopOrigin + enum for the list of possible values. This field is a member of `oneof`_ ``_next_hop_origin``. next_hop_peering (str): - [Output Only] The network peering name that should handle - matching packets, which should conform to RFC1035. + Output only. [Output Only] The network peering name that + should handle matching packets, which should conform to + RFC1035. This field is a member of `oneof`_ ``_next_hop_peering``. next_hop_vpn_tunnel (str): @@ -109753,18 +126973,23 @@ class Route(proto.Message): This field is a member of `oneof`_ ``_priority``. route_status (str): - [Output only] The status of the route. Check the RouteStatus - enum for the list of possible values. + [Output only] The status of the route. This status applies + to dynamic routes learned by Cloud Routers. It is also + applicable to routes undergoing migration. Check the + RouteStatus enum for the list of possible values. This field is a member of `oneof`_ ``_route_status``. route_type (str): - [Output Only] The type of this route, which can be one of - the following values: - 'TRANSIT' for a transit route that - this router learned from another Cloud Router and will - readvertise to one of its BGP peers - 'SUBNET' for a route - from a subnet of the VPC - 'BGP' for a route learned from a - BGP peer of this router - 'STATIC' for a static route Check - the RouteType enum for the list of possible values. + Output only. [Output Only] The type of this route, which can + be one of the following values: + + - 'TRANSIT' for a transit route that this router learned + from another Cloud Router and will readvertise to one of + its BGP peers + - 'SUBNET' for a route from a subnet of the VPC + - 'BGP' for a route learned from a BGP peer of this router + - 'STATIC' for a static route Check the RouteType enum for + the list of possible values. This field is a member of `oneof`_ ``_route_type``. self_link (str): @@ -109776,14 +127001,14 @@ class Route(proto.Message): A list of instance tags to which this route applies. warnings (MutableSequence[google.cloud.compute_v1beta.types.Warnings]): - [Output Only] If potential misconfigurations are detected - for this route, this field will be populated with warning - messages. + Output only. [Output Only] If potential misconfigurations + are detected for this route, this field will be populated + with warning messages. """ class NextHopOrigin(proto.Enum): - r"""[Output Only] Indicates the origin of the route. Can be IGP - (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or + r"""Output only. [Output Only] Indicates the origin of the route. Can be + IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE. Values: @@ -109803,7 +127028,9 @@ class NextHopOrigin(proto.Enum): INCOMPLETE = 11941214 class RouteStatus(proto.Enum): - r"""[Output only] The status of the route. + r"""[Output only] The status of the route. This status applies to + dynamic routes learned by Cloud Routers. It is also applicable to + routes undergoing migration. Values: UNDEFINED_ROUTE_STATUS (0): @@ -109813,7 +127040,7 @@ class RouteStatus(proto.Enum): This route is processed and active. DROPPED (496235424): The route is dropped due to the VPC exceeding - the dynamic route limit. For dynamic route + the dynamic route limit. For dynamic route limit, please refer to the Learned route example INACTIVE (270421099): This route is processed but inactive due to @@ -109830,12 +127057,14 @@ class RouteStatus(proto.Enum): PENDING = 35394935 class RouteType(proto.Enum): - r"""[Output Only] The type of this route, which can be one of the - following values: - 'TRANSIT' for a transit route that this router - learned from another Cloud Router and will readvertise to one of its - BGP peers - 'SUBNET' for a route from a subnet of the VPC - 'BGP' - for a route learned from a BGP peer of this router - 'STATIC' for a - static route + r"""Output only. [Output Only] The type of this route, which can be one + of the following values: + + - 'TRANSIT' for a transit route that this router learned from + another Cloud Router and will readvertise to one of its BGP peers + - 'SUBNET' for a route from a subnet of the VPC + - 'BGP' for a route learned from a BGP peer of this router + - 'STATIC' for a static route Values: UNDEFINED_ROUTE_TYPE (0): @@ -110003,28 +127232,35 @@ class RouteAsPath(proto.Message): [Output Only] The AS numbers of the AS Path. path_segment_type (str): [Output Only] The type of the AS Path, which can be one of - the following values: - 'AS_SET': unordered set of - autonomous systems that the route in has traversed - - 'AS_SEQUENCE': ordered set of autonomous systems that the - route has traversed - 'AS_CONFED_SEQUENCE': ordered set of - Member Autonomous Systems in the local confederation that - the route has traversed - 'AS_CONFED_SET': unordered set of - Member Autonomous Systems in the local confederation that - the route has traversed Check the PathSegmentType enum for - the list of possible values. + the following values: + + - 'AS_SET': unordered set of autonomous systems that the + route in has traversed + - 'AS_SEQUENCE': ordered set of autonomous systems that the + route has traversed + - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous + Systems in the local confederation that the route has + traversed + - 'AS_CONFED_SET': unordered set of Member Autonomous + Systems in the local confederation that the route has + traversed Check the PathSegmentType enum for the list of + possible values. This field is a member of `oneof`_ ``_path_segment_type``. """ class PathSegmentType(proto.Enum): r"""[Output Only] The type of the AS Path, which can be one of the - following values: - 'AS_SET': unordered set of autonomous systems - that the route in has traversed - 'AS_SEQUENCE': ordered set of - autonomous systems that the route has traversed - - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in - the local confederation that the route has traversed - - 'AS_CONFED_SET': unordered set of Member Autonomous Systems in the - local confederation that the route has traversed + following values: + + - 'AS_SET': unordered set of autonomous systems that the route in + has traversed + - 'AS_SEQUENCE': ordered set of autonomous systems that the route + has traversed + - 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in + the local confederation that the route has traversed + - 'AS_CONFED_SET': unordered set of Member Autonomous Systems in the + local confederation that the route has traversed Values: UNDEFINED_PATH_SEGMENT_TYPE (0): @@ -110070,20 +127306,21 @@ class RouteList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Route]): A list of Route resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -110139,11 +127376,15 @@ class RouteParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -110171,9 +127412,11 @@ class RoutePolicy(proto.Message): by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint - hash in order to update or change labels. To see - the latest fingerprint, make a getRoutePolicy() - request to retrieve a Route Policy. + hash in order to update or change labels. + + To see the latest fingerprint, make a + getRoutePolicy() request to retrieve a Route + Policy. This field is a member of `oneof`_ ``_fingerprint``. name (str): @@ -110279,8 +127522,10 @@ class RoutePolicyPolicyTerm(proto.Message): class Router(proto.Message): - r"""Represents a Cloud Router resource. For more information - about Cloud Router, read the Cloud Router overview. + r"""Represents a Cloud Router resource. + + For more information about Cloud Router, read theCloud Router + overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -110295,9 +127540,10 @@ class Router(proto.Message): the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP - address. Please refer to RFC4273. + address. Please refer toRFC4273. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -110318,17 +127564,21 @@ class Router(proto.Message): This field is a member of `oneof`_ ``_id``. interfaces (MutableSequence[google.cloud.compute_v1beta.types.RouterInterface]): - Router interfaces. To create a BGP peer that - uses a router interface, the interface must have - one of the following fields specified: - - linkedVpnTunnel - linkedInterconnectAttachment - - subnetwork You can create a router interface - without any of these fields specified. However, - you cannot create a BGP peer that uses that - interface. + Router interfaces. + To create a BGP peer that uses a router + interface, the interface must have one of the + following fields specified: + + - linkedVpnTunnel + - linkedInterconnectAttachment + - subnetwork + + You can create a router interface without any of + these fields specified. However, you cannot + create a BGP peer that uses that interface. kind (str): - [Output Only] Type of resource. Always compute#router for - routers. + Output only. [Output Only] Type of resource. Always + compute#router for routers. This field is a member of `oneof`_ ``_kind``. md5_authentication_keys (MutableSequence[google.cloud.compute_v1beta.types.RouterMd5AuthenticationKey]): @@ -110336,7 +127586,7 @@ class Router(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -110502,24 +127752,25 @@ class RouterAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.RoutersScopedList]): A list of Router resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -110598,7 +127849,7 @@ class RouterBgp(proto.Message): no custom IP ranges. asn (int): Local BGP Autonomous System Number (ASN). - Must be an RFC6996 private ASN, either 16-bit or + Must be anRFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. @@ -110610,23 +127861,28 @@ class RouterBgp(proto.Message): link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP - session ranges. Other vendors commonly call this - "router ID". + session ranges. + + Other vendors commonly call this "router ID". This field is a member of `oneof`_ ``_identifier_range``. keepalive_interval (int): The interval in seconds between BGP keepalive - messages that are sent to the peer. Hold time is - three times the interval at which keepalive - messages are sent, and the hold time is the - maximum number of seconds allowed to elapse - between successive keepalive messages that BGP - receives from a peer. BGP will use the smaller - of either the local hold time value or the - peer's hold time value as the hold time for the - BGP connection between the two peers. If set, - this value must be between 20 and 60. The - default is 20. + messages that are sent to the peer. + + Hold time is three times the interval at which + keepalive messages are sent, and the hold time + is the maximum number of seconds allowed to + elapse between successive keepalive messages + that BGP receives from a peer. + + BGP will use the smaller of either the local + hold time value or the peer's hold time value as + the hold time for the BGP connection between the + two peers. + + If set, this value must be between 20 and 60. + The default is 20. This field is a member of `oneof`_ ``_keepalive_interval``. """ @@ -110709,15 +127965,20 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_advertise_mode``. advertised_groups (MutableSequence[str]): User-specified list of prefix groups to advertise in custom - mode, which currently supports the following option: - - ALL_SUBNETS: Advertises all of the router's own VPC subnets. - This excludes any routes learned for subnets that use VPC - Network Peering. Note that this field can only be populated - if advertise_mode is CUSTOM and overrides the list defined - for the router (in the "bgp" message). These groups are - advertised in addition to any specified prefixes. Leave this - field blank to advertise no custom groups. Check the - AdvertisedGroups enum for the list of possible values. + mode, which currently supports the following option: + + :: + + - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This + excludes any routes learned for subnets that use + VPC Network Peering. + + Note that this field can only be populated if advertise_mode + is CUSTOM and overrides the list defined for the router (in + the "bgp" message). These groups are advertised in addition + to any specified prefixes. Leave this field blank to + advertise no custom groups. Check the AdvertisedGroups enum + for the list of possible values. advertised_ip_ranges (MutableSequence[google.cloud.compute_v1beta.types.RouterAdvertisedIpRange]): User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if @@ -110748,13 +128009,15 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_custom_learned_route_priority``. enable (str): - The status of the BGP peer connection. If set - to FALSE, any active session with the peer is - terminated and all associated routing + The status of the BGP peer connection. + + If set to FALSE, any active session with the + peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing - information. The default is TRUE. Check the - Enable enum for the list of possible values. + information. The default is TRUE. + Check the Enable enum for the list of possible + values. This field is a member of `oneof`_ ``_enable``. enable_ipv4 (bool): @@ -110798,14 +128061,19 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_ipv6_nexthop_address``. management_type (str): - [Output Only] The resource that configures and manages this - BGP peer. - MANAGED_BY_USER is the default value and can be - managed by you or other users - MANAGED_BY_ATTACHMENT is a - BGP peer that is configured and managed by Cloud - Interconnect, specifically by an InterconnectAttachment of - type PARTNER. Google automatically creates, updates, and - deletes this type of BGP peer when the PARTNER - InterconnectAttachment is created, updated, or deleted. + Output only. [Output Only] The resource that configures and + manages this BGP peer. + + :: + + - MANAGED_BY_USER is the default value and can be managed by you + or other users + - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + by Cloud Interconnect, specifically by an InterconnectAttachment of type + PARTNER. Google automatically creates, updates, and deletes this type of + BGP peer when the PARTNER InterconnectAttachment is created, updated, + or deleted. + Check the ManagementType enum for the list of possible values. @@ -110819,8 +128087,8 @@ class RouterBgpPeer(proto.Message): This field is a member of `oneof`_ ``_md5_authentication_key_name``. name (str): Name of this BGP peer. The name must be 1-63 characters - long, and comply with RFC1035. Specifically, the name must - be 1-63 characters long and match the regular expression + long, and comply withRFC1035. Specifically, the name must be + 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, @@ -110853,8 +128121,9 @@ class RouterBgpPeer(proto.Message): Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud - Router. The VM instance is the peer side of the - BGP session. + Router. + The VM instance is the peer side of the BGP + session. This field is a member of `oneof`_ ``_router_appliance_instance``. """ @@ -110891,11 +128160,12 @@ class AdvertisedGroups(proto.Enum): ALL_SUBNETS = 3622872 class Enable(proto.Enum): - r"""The status of the BGP peer connection. If set to FALSE, any - active session with the peer is terminated and all associated - routing information is removed. If set to TRUE, the peer - connection can be established with routing information. The - default is TRUE. + r"""The status of the BGP peer connection. + + If set to FALSE, any active session with the peer is terminated + and all associated routing information is removed. If set to + TRUE, the peer connection can be established with routing + information. The default is TRUE. Values: UNDEFINED_ENABLE (0): @@ -110911,13 +128181,18 @@ class Enable(proto.Enum): TRUE = 2583950 class ManagementType(proto.Enum): - r"""[Output Only] The resource that configures and manages this BGP - peer. - MANAGED_BY_USER is the default value and can be managed by - you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is - configured and managed by Cloud Interconnect, specifically by an - InterconnectAttachment of type PARTNER. Google automatically - creates, updates, and deletes this type of BGP peer when the PARTNER - InterconnectAttachment is created, updated, or deleted. + r"""Output only. [Output Only] The resource that configures and manages + this BGP peer. + + :: + + - MANAGED_BY_USER is the default value and can be managed by you + or other users + - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + by Cloud Interconnect, specifically by an InterconnectAttachment of type + PARTNER. Google automatically creates, updates, and deletes this type of + BGP peer when the PARTNER InterconnectAttachment is created, updated, + or deleted. Values: UNDEFINED_MANAGEMENT_TYPE (0): @@ -111078,8 +128353,12 @@ class RouterBgpPeerBfd(proto.Message): peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval - of the other router. If set, this value must be - between 1000 and 30000. The default is 1000. + of the other router. + + If set, this value must be between 1000 and + 30000. + + The default is 1000. This field is a member of `oneof`_ ``_min_receive_interval``. min_transmit_interval (int): @@ -111088,38 +128367,48 @@ class RouterBgpPeerBfd(proto.Message): peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding - receive interval of the other router. If set, - this value must be between 1000 and 30000. The - default is 1000. + receive interval of the other router. + + If set, this value must be between 1000 and + 30000. + + The default is 1000. This field is a member of `oneof`_ ``_min_transmit_interval``. multiplier (int): The number of consecutive BFD packets that must be missed before BFD declares that a peer - is unavailable. If set, the value must be a - value between 5 and 16. The default is 5. + is unavailable. + + If set, the value must be a value between 5 and + 16. + + The default is 5. This field is a member of `oneof`_ ``_multiplier``. session_initialization_mode (str): The BFD session initialization mode for this - BGP peer. If set to ACTIVE, the Cloud Router - will initiate the BFD session for this BGP peer. - If set to PASSIVE, the Cloud Router will wait - for the peer router to initiate the BFD session - for this BGP peer. If set to DISABLED, BFD is - disabled for this BGP peer. The default is - DISABLED. Check the SessionInitializationMode - enum for the list of possible values. + BGP peer. + + If set to ACTIVE, the Cloud Router will initiate + the BFD session for this BGP peer. If set to + PASSIVE, the Cloud Router will wait for the peer + router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for + this BGP peer. The default is DISABLED. Check + the SessionInitializationMode enum for the list + of possible values. This field is a member of `oneof`_ ``_session_initialization_mode``. """ class SessionInitializationMode(proto.Enum): - r"""The BFD session initialization mode for this BGP peer. If set - to ACTIVE, the Cloud Router will initiate the BFD session for - this BGP peer. If set to PASSIVE, the Cloud Router will wait for - the peer router to initiate the BFD session for this BGP peer. - If set to DISABLED, BFD is disabled for this BGP peer. The + r"""The BFD session initialization mode for this BGP peer. + + If set to ACTIVE, the Cloud Router will initiate the BFD session + for this BGP peer. If set to PASSIVE, the Cloud Router will wait + for the peer router to initiate the BFD session for this BGP + peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is DISABLED. Values: @@ -111189,21 +128478,24 @@ class RouterInterface(proto.Message): Attributes: ip_range (str): - IP address and range of the interface. - For - Internet Protocol version 4 (IPv4), the IP range - must be in the RFC3927 link-local IP address - space. The value must be a CIDR-formatted - string, for example, 169.254.0.1/30. Note: Do - not truncate the IP address, as it represents - the IP address of the interface. - For Internet - Protocol version 6 (IPv6), the value must be a - unique local address (ULA) range from - fdff:1::/64 with a mask length of 126 or less. - This value should be a CIDR-formatted string, - for example, fdff:1::1/112. Within the router's - VPC, this IPv6 prefix will be reserved - exclusively for this connection and cannot be - used for any other purpose. + IP address and range of the interface. + + - For Internet Protocol version 4 (IPv4), the IP + range must be in theRFC3927 link-local IP + address space. The value must be a + CIDR-formatted string, for example, + 169.254.0.1/30. Note: Do not truncate the + IP address, as it represents the IP address of + the interface. + - For Internet Protocol version 6 (IPv6), the + value must be a unique local address (ULA) + range from fdff:1::/64 with a mask length + of 126 or less. This value should be a + CIDR-formatted string, for example, + fdff:1::1/112. Within the router's VPC, + this IPv6 prefix will be reserved exclusively + for this connection and cannot be used for + any other purpose. This field is a member of `oneof`_ ``_ip_range``. ip_version (str): @@ -111229,21 +128521,26 @@ class RouterInterface(proto.Message): This field is a member of `oneof`_ ``_linked_vpn_tunnel``. management_type (str): - [Output Only] The resource that configures and manages this - interface. - MANAGED_BY_USER is the default value and can be - managed directly by users. - MANAGED_BY_ATTACHMENT is an - interface that is configured and managed by Cloud - Interconnect, specifically, by an InterconnectAttachment of - type PARTNER. Google automatically creates, updates, and - deletes this type of interface when the PARTNER - InterconnectAttachment is created, updated, or deleted. + Output only. [Output Only] The resource that configures and + manages this interface. + + :: + + - MANAGED_BY_USER is the default value and can be managed directly + by users. + - MANAGED_BY_ATTACHMENT is an interface that is configured and + managed by Cloud Interconnect, specifically, by an InterconnectAttachment + of type PARTNER. Google automatically creates, updates, and deletes + this type of interface when the PARTNER InterconnectAttachment is + created, updated, or deleted. + Check the ManagementType enum for the list of possible values. This field is a member of `oneof`_ ``_management_type``. name (str): Name of this interface entry. The name must be 1-63 - characters long, and comply with RFC1035. Specifically, the + characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -111267,7 +128564,7 @@ class RouterInterface(proto.Message): must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters - long, and comply with RFC1035. Specifically, the + long, and comply withRFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and @@ -111304,13 +128601,18 @@ class IpVersion(proto.Enum): IPV6 = 2254343 class ManagementType(proto.Enum): - r"""[Output Only] The resource that configures and manages this - interface. - MANAGED_BY_USER is the default value and can be managed - directly by users. - MANAGED_BY_ATTACHMENT is an interface that is - configured and managed by Cloud Interconnect, specifically, by an - InterconnectAttachment of type PARTNER. Google automatically - creates, updates, and deletes this type of interface when the - PARTNER InterconnectAttachment is created, updated, or deleted. + r"""Output only. [Output Only] The resource that configures and manages + this interface. + + :: + + - MANAGED_BY_USER is the default value and can be managed directly + by users. + - MANAGED_BY_ATTACHMENT is an interface that is configured and + managed by Cloud Interconnect, specifically, by an InterconnectAttachment + of type PARTNER. Google automatically creates, updates, and deletes + this type of interface when the PARTNER InterconnectAttachment is + created, updated, or deleted. Values: UNDEFINED_MANAGEMENT_TYPE (0): @@ -111322,8 +128624,9 @@ class ManagementType(proto.Enum): automatically create/update/delete this interface when the PARTNER InterconnectAttachment is - created/provisioned/deleted. This type of - interface cannot be manually managed by user. + created/provisioned/deleted. + This type of interface cannot be manually + managed by user. MANAGED_BY_USER (317294067): Default value, the interface is manually created and managed by user. @@ -111393,21 +128696,22 @@ class RouterList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Router]): A list of Router resources. kind (str): - [Output Only] Type of resource. Always compute#router for - routers. + Output only. [Output Only] Type of resource. Always + compute#router for routers. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -111460,17 +128764,21 @@ class RouterMd5AuthenticationKey(proto.Message): Attributes: key (str): - [Input only] Value of the key. For patch and update calls, - it can be skipped to copy the value from the previous - configuration. This is allowed if the key with the same name - existed before the operation. Maximum length is 80 - characters. Can only contain printable ASCII characters. + [Input only] Value of the key. + + For patch and update calls, it can be skipped to copy the + value from the previous configuration. This is allowed if + the key with the same name existed before the operation. + Maximum length is 80 characters. Can only contain printable + ASCII characters. This field is a member of `oneof`_ ``_key``. name (str): - Name used to identify the key. Must be unique - within a router. Must be referenced by exactly - one bgpPeer. Must comply with RFC1035. + Name used to identify the key. + + Must be unique within a router. Must be + referenced by exactly one bgpPeer. Must comply + withRFC1035. This field is a member of `oneof`_ ``_name``. """ @@ -111503,7 +128811,8 @@ class RouterNat(proto.Message): The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the - current project-level default tier is used. + current + project-level default tier is used. Check the AutoNetworkTier enum for the list of possible values. @@ -111515,16 +128824,21 @@ class RouterNat(proto.Message): IPs should be used for updating/patching a NAT only. enable_dynamic_port_allocation (bool): - Enable Dynamic Port Allocation. If not - specified, it is disabled by default. If set to - true, - Dynamic Port Allocation will be enabled - on this NAT config. - - enableEndpointIndependentMapping cannot be set - to true. - If minPorts is set, minPortsPerVm - must be set to a power of two greater than or - equal to 32. If minPortsPerVm is not set, a - minimum of 32 ports will be allocated to a VM - from this NAT config. + Enable Dynamic Port Allocation. + + If not specified, it is disabled by default. + + If set to true, + + - Dynamic Port Allocation will be enabled on + this NAT config. + - enableEndpointIndependentMapping cannot be + set to true. + - If minPorts is set, minPortsPerVm must be + set to a power of two greater than or equal + to 32. If minPortsPerVm is not set, a + minimum of 32 ports will be allocated to a VM + from this NAT config. This field is a member of `oneof`_ ``_enable_dynamic_port_allocation``. enable_endpoint_independent_mapping (bool): @@ -111547,15 +128861,19 @@ class RouterNat(proto.Message): max_ports_per_vm (int): Maximum number of ports allocated to a VM from this NAT config when Dynamic Port - Allocation is enabled. If Dynamic Port - Allocation is not enabled, this field has no - effect. If Dynamic Port Allocation is enabled, - and this field is set, it must be set to a power - of two greater than minPortsPerVm, or 64 if - minPortsPerVm is not set. If Dynamic Port - Allocation is enabled and this field is not set, - a maximum of 65536 ports will be allocated to a - VM from this NAT config. + Allocation is enabled. + + If Dynamic Port Allocation is not enabled, this + field has no effect. + + If Dynamic Port Allocation is enabled, and this + field is set, it must be set to a power of two + greater than minPortsPerVm, or 64 if + minPortsPerVm is not set. + + If Dynamic Port Allocation is enabled and this + field is not set, a maximum of 65536 ports will + be allocated to a VM from this NAT config. This field is a member of `oneof`_ ``_max_ports_per_vm``. min_ports_per_vm (int): @@ -111568,9 +128886,9 @@ class RouterNat(proto.Message): This field is a member of `oneof`_ ``_min_ports_per_vm``. name (str): - Unique name of this Nat service. The name - must be 1-63 characters long and comply with - RFC1035. + Unique name of this Nat service. + The name must be 1-63 characters long and comply + withRFC1035. This field is a member of `oneof`_ ``_name``. nat64_subnetworks (MutableSequence[google.cloud.compute_v1beta.types.RouterNatSubnetworkToNat64]): @@ -111580,13 +128898,19 @@ class RouterNat(proto.Message): SubnetworkIpRangeToNat64Option above. nat_ip_allocate_option (str): Specify the NatIpAllocateOption, which can take one of the - following values: - MANUAL_ONLY: Uses only Nat IP addresses - provided by customers. When there are not enough specified - Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat - IPs are allocated by Google Cloud Platform; customers can't - specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip - should be empty. Check the NatIpAllocateOption enum for the - list of possible values. + following values: + + :: + + - MANUAL_ONLY: Uses only Nat IP addresses provided by + customers. When there are not enough specified Nat IPs, the Nat service + fails for new VMs. + - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers + can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should + be empty. + + Check the NatIpAllocateOption enum for the list of possible + values. This field is a member of `oneof`_ ``_nat_ip_allocate_option``. nat_ips (MutableSequence[str]): @@ -111598,12 +128922,18 @@ class RouterNat(proto.Message): A list of rules associated with this NAT. source_subnetwork_ip_ranges_to_nat (str): Specify the Nat option, which can take one of the following - values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP - ranges in every Subnetwork are allowed to Nat. - - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP - ranges in every Subnetwork are allowed to Nat. - - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to - Nat (specified in the field subnetwork below) The default is + values: + + :: + + - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every + Subnetwork are allowed to Nat. + - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges + in every Subnetwork are allowed to Nat. + - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field subnetwork below) + + The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for @@ -111614,12 +128944,17 @@ class RouterNat(proto.Message): This field is a member of `oneof`_ ``_source_subnetwork_ip_ranges_to_nat``. source_subnetwork_ip_ranges_to_nat64 (str): Specify the Nat option for NAT64, which can take one of the - following values: - ALL_IPV6_SUBNETWORKS: All of the IP - ranges in every Subnetwork are allowed to Nat. - - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed - to Nat (specified in the field nat64_subnetwork below) The - default is NAT64_OPTION_UNSPECIFIED. Note that if this field - contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat + following values: + + :: + + - ALL_IPV6_SUBNETWORKS: All of the IP ranges in + every Subnetwork are allowed to Nat. + - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field nat64_subnetwork below) + + The default is NAT64_OPTION_UNSPECIFIED. Note that if this + field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in this region can also enable NAT64 for any Subnetworks in this network. Other Router.Nat sections can still be present to enable NAT44 only. Check the @@ -111663,8 +128998,9 @@ class RouterNat(proto.Message): class AutoNetworkTier(proto.Enum): r"""The network tier to use when automatically reserving NAT IP - addresses. Must be one of: PREMIUM, STANDARD. If not specified, - then the current project-level default tier is used. + addresses. Must be one of: PREMIUM, STANDARD. + If not specified, then the current + project-level default tier is used. Values: UNDEFINED_AUTO_NETWORK_TIER (0): @@ -111713,11 +129049,16 @@ class EndpointTypes(proto.Enum): class NatIpAllocateOption(proto.Enum): r"""Specify the NatIpAllocateOption, which can take one of the following - values: - MANUAL_ONLY: Uses only Nat IP addresses provided by - customers. When there are not enough specified Nat IPs, the Nat - service fails for new VMs. - AUTO_ONLY: Nat IPs are allocated by - Google Cloud Platform; customers can't specify any Nat IPs. When - choosing AUTO_ONLY, then nat_ip should be empty. + values: + + :: + + - MANUAL_ONLY: Uses only Nat IP addresses provided by + customers. When there are not enough specified Nat IPs, the Nat service + fails for new VMs. + - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers + can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should + be empty. Values: UNDEFINED_NAT_IP_ALLOCATE_OPTION (0): @@ -111737,16 +129078,20 @@ class NatIpAllocateOption(proto.Enum): class SourceSubnetworkIpRangesToNat(proto.Enum): r"""Specify the Nat option, which can take one of the following values: - - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every - Subnetwork are allowed to Nat. - - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges - in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A - list of Subnetworks are allowed to Nat (specified in the field - subnetwork below) The default is - SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this - field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not - be any other Router.Nat section in any Router for this network in - this region. + + :: + + - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every + Subnetwork are allowed to Nat. + - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges + in every Subnetwork are allowed to Nat. + - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field subnetwork below) + + The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note + that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there + should not be any other Router.Nat section in any Router for this + network in this region. Values: UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT (0): @@ -111769,14 +129114,20 @@ class SourceSubnetworkIpRangesToNat(proto.Enum): class SourceSubnetworkIpRangesToNat64(proto.Enum): r"""Specify the Nat option for NAT64, which can take one of the - following values: - ALL_IPV6_SUBNETWORKS: All of the IP ranges in - every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A - list of Subnetworks are allowed to Nat (specified in the field - nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. - Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no other - Router.Nat section in this region can also enable NAT64 for any - Subnetworks in this network. Other Router.Nat sections can still be - present to enable NAT44 only. + following values: + + :: + + - ALL_IPV6_SUBNETWORKS: All of the IP ranges in + every Subnetwork are allowed to Nat. + - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat + (specified in the field nat64_subnetwork below) + + The default is NAT64_OPTION_UNSPECIFIED. Note that if this field + contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in + this region can also enable NAT64 for any Subnetworks in this + network. Other Router.Nat sections can still be present to enable + NAT44 only. Values: UNDEFINED_SOURCE_SUBNETWORK_IP_RANGES_TO_NAT64 (0): @@ -111807,8 +129158,8 @@ class Type(proto.Enum): PRIVATE (403485027): NAT used for private IP translation. PUBLIC (223389289): - NAT used for public IP translation. This is - the default. + NAT used for public IP translation. + This is the default. """ UNDEFINED_TYPE = 0 PRIVATE = 403485027 @@ -111941,11 +129292,17 @@ class RouterNatLogConfig(proto.Message): Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following - values: - ERRORS_ONLY: Export logs only for connection - failures. - TRANSLATIONS_ONLY: Export logs only for - successful connections. - ALL: Export logs for all - connections, successful and unsuccessful. Check the Filter - enum for the list of possible values. + values: + + :: + + - ERRORS_ONLY: Export logs only for connection failures. + - TRANSLATIONS_ONLY: Export logs only for successful + connections. + - ALL: Export logs for all connections, successful and + unsuccessful. + + Check the Filter enum for the list of possible values. This field is a member of `oneof`_ ``_filter``. """ @@ -111953,10 +129310,15 @@ class RouterNatLogConfig(proto.Message): class Filter(proto.Enum): r"""Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This - option can take one of the following values: - ERRORS_ONLY: Export - logs only for connection failures. - TRANSLATIONS_ONLY: Export logs - only for successful connections. - ALL: Export logs for all - connections, successful and unsuccessful. + option can take one of the following values: + + :: + + - ERRORS_ONLY: Export logs only for connection failures. + - TRANSLATIONS_ONLY: Export logs only for successful + connections. + - ALL: Export logs for all connections, successful and + unsuccessful. Values: UNDEFINED_FILTER (0): @@ -112006,12 +129368,17 @@ class RouterNatRule(proto.Message): CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding ``action`` is enforced. + The following examples are valid match expressions for public NAT: + ``inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')`` + ``destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'`` + The following example is a valid match expression for private NAT: + ``nexthop.hub == '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`` This field is a member of `oneof`_ ``_match``. @@ -112055,7 +129422,8 @@ class RouterNatRuleAction(proto.Message): A list of URLs of the IP resources used for this NAT rule. These IP addresses must be valid static external IP addresses assigned to the - project. This field is used for public NAT. + project. + This field is used for public NAT. source_nat_active_ranges (MutableSequence[str]): A list of URLs of the subnetworks used as source ranges for this NAT Rule. These subnetworks must have purpose set to @@ -112071,8 +129439,8 @@ class RouterNatRuleAction(proto.Message): source ranges to be drained. This is only supported on patch/update, and these subnetworks must have previously been used as active ranges - in this NAT Rule. This field is used for private - NAT. + in this NAT Rule. + This field is used for private NAT. """ source_nat_active_ips: MutableSequence[str] = proto.RepeatedField( @@ -112184,14 +129552,18 @@ class RouterParams(proto.Message): is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid - inputs: \* {"tagKeys/333" : "tagValues/444", "tagKeys/123" : - "tagValues/456"} \* {"123/environment" : "production", - "345/abc" : "xyz"} Note: \* Invalid combinations of ID & - namespaced format is not supported. For instance: - {"123/environment" : "tagValues/444"} is invalid. \* - Inconsistent format is not supported. For instance: - {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is - invalid. + inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. + - Inconsistent format is not supported. For instance: + {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is + invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -112211,19 +129583,22 @@ class RouterStatus(proto.Message): A list of the best dynamic routes for this Cloud Router's Virtual Private Cloud (VPC) network in the same region as this Cloud Router. + Lists all of the best routes per prefix that are programmed into this region's VPC data plane. + When global dynamic routing mode is turned on in the VPC network, this list can include cross-region dynamic routes from Cloud Routers in other regions. best_routes_for_router (MutableSequence[google.cloud.compute_v1beta.types.Route]): A list of the best BGP routes learned by this - Cloud Router. It is possible that routes listed - might not be programmed into the data plane, if - the Google Cloud control plane finds a more - optimal route for a prefix than a route learned - by this Cloud Router. + Cloud Router. + It is possible that routes listed might not be + programmed into the data plane, if the Google + Cloud control plane finds a more optimal route + for a prefix than a route learned by this Cloud + Router. bgp_peer_status (MutableSequence[google.cloud.compute_v1beta.types.RouterStatusBgpPeerStatus]): nat_status (MutableSequence[google.cloud.compute_v1beta.types.RouterStatusNatStatus]): @@ -112284,32 +129659,35 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_bfd_status``. enable_ipv4 (bool): - Enable IPv4 traffic over BGP Peer. It is - enabled by default if the peerIpAddress is - version 4. + Output only. Enable IPv4 traffic over BGP + Peer. It is enabled by default if the + peerIpAddress is version 4. This field is a member of `oneof`_ ``_enable_ipv4``. enable_ipv6 (bool): - Enable IPv6 traffic over BGP Peer. It is - enabled by default if the peerIpAddress is - version 6. + Output only. Enable IPv6 traffic over BGP + Peer. It is enabled by default if the + peerIpAddress is version 6. This field is a member of `oneof`_ ``_enable_ipv6``. ip_address (str): - IP address of the local BGP interface. + Output only. IP address of the local BGP + interface. This field is a member of `oneof`_ ``_ip_address``. ipv4_nexthop_address (str): - IPv4 address of the local BGP interface. + Output only. IPv4 address of the local BGP + interface. This field is a member of `oneof`_ ``_ipv4_nexthop_address``. ipv6_nexthop_address (str): - IPv6 address of the local BGP interface. + Output only. IPv6 address of the local BGP + interface. This field is a member of `oneof`_ ``_ipv6_nexthop_address``. linked_vpn_tunnel (str): - URL of the VPN tunnel that this BGP peer - controls. + Output only. URL of the VPN tunnel that this + BGP peer controls. This field is a member of `oneof`_ ``_linked_vpn_tunnel``. md5_auth_enabled (bool): @@ -112318,44 +129696,47 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_md5_auth_enabled``. name (str): - Name of this BGP peer. Unique within the - Routers resource. + Output only. Name of this BGP peer. Unique + within the Routers resource. This field is a member of `oneof`_ ``_name``. num_learned_routes (int): - Number of routes learned from the remote BGP - Peer. + Output only. Number of routes learned from + the remote BGP Peer. This field is a member of `oneof`_ ``_num_learned_routes``. peer_ip_address (str): - IP address of the remote BGP interface. + Output only. IP address of the remote BGP + interface. This field is a member of `oneof`_ ``_peer_ip_address``. peer_ipv4_nexthop_address (str): - IPv4 address of the remote BGP interface. + Output only. IPv4 address of the remote BGP + interface. This field is a member of `oneof`_ ``_peer_ipv4_nexthop_address``. peer_ipv6_nexthop_address (str): - IPv6 address of the remote BGP interface. + Output only. IPv6 address of the remote BGP + interface. This field is a member of `oneof`_ ``_peer_ipv6_nexthop_address``. router_appliance_instance (str): - [Output only] URI of the VM instance that is used as - third-party router appliances such as Next Gen Firewalls, - Virtual Routers, or Router Appliances. The VM instance is - the peer side of the BGP session. + Output only. [Output only] URI of the VM instance that is + used as third-party router appliances such as Next Gen + Firewalls, Virtual Routers, or Router Appliances. The VM + instance is the peer side of the BGP session. This field is a member of `oneof`_ ``_router_appliance_instance``. state (str): - The state of the BGP session. For a list of - possible values for this field, see BGP session - states. + Output only. The state of the BGP session. + For a list of possible values for this field, + seeBGP session states. This field is a member of `oneof`_ ``_state``. status (str): - Status of the BGP peer: {UP, DOWN} - Check the Status enum for the list of possible - values. + Output only. Status of the BGP peer: {UP, + DOWN} Check the Status enum for the list of + possible values. This field is a member of `oneof`_ ``_status``. status_reason (str): @@ -112365,20 +129746,24 @@ class RouterStatusBgpPeerStatus(proto.Message): This field is a member of `oneof`_ ``_status_reason``. uptime (str): - Time this session has been up. Format: 14 - years, 51 weeks, 6 days, 23 hours, 59 minutes, - 59 seconds + Output only. Time this session has been up. + Format: + + 14 years, 51 weeks, 6 days, 23 hours, 59 + minutes, 59 seconds This field is a member of `oneof`_ ``_uptime``. uptime_seconds (str): - Time this session has been up, in seconds. - Format: 145 + Output only. Time this session has been up, + in seconds. Format: + + 145 This field is a member of `oneof`_ ``_uptime_seconds``. """ class Status(proto.Enum): - r"""Status of the BGP peer: {UP, DOWN} + r"""Output only. Status of the BGP peer: {UP, DOWN} Values: UNDEFINED_STATUS (0): @@ -112533,38 +129918,40 @@ class RouterStatusNatStatus(proto.Message): Attributes: auto_allocated_nat_ips (MutableSequence[str]): - A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", - "129.2.16.89"] + Output only. A list of IPs auto-allocated for NAT. Example: + ["1.1.1.1", "129.2.16.89"] drain_auto_allocated_nat_ips (MutableSequence[str]): - A list of IPs auto-allocated for NAT that are in drain mode. - Example: ["1.1.1.1", "179.12.26.133"]. + Output only. A list of IPs auto-allocated for NAT that are + in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. drain_user_allocated_nat_ips (MutableSequence[str]): - A list of IPs user-allocated for NAT that are in drain mode. - Example: ["1.1.1.1", "179.12.26.133"]. + Output only. A list of IPs user-allocated for NAT that are + in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. min_extra_nat_ips_needed (int): - The number of extra IPs to allocate. This will be greater - than 0 only if user-specified IPs are NOT enough to allow - all configured VMs to use NAT. This value is meaningful only - when auto-allocation of NAT IPs is *not* used. + Output only. The number of extra IPs to allocate. This will + be greater than 0 only if user-specified IPs are NOT enough + to allow all configured VMs to use NAT. This value is + meaningful only when auto-allocation of NAT IPs is *not* + used. This field is a member of `oneof`_ ``_min_extra_nat_ips_needed``. name (str): - Unique name of this NAT. + Output only. Unique name of this NAT. This field is a member of `oneof`_ ``_name``. num_vm_endpoints_with_nat_mappings (int): - Number of VM endpoints (i.e., Nics) that can - use NAT. + Output only. Number of VM endpoints (i.e., + Nics) that can use NAT. This field is a member of `oneof`_ ``_num_vm_endpoints_with_nat_mappings``. rule_status (MutableSequence[google.cloud.compute_v1beta.types.RouterStatusNatStatusNatRuleStatus]): Status of rules in this NAT. user_allocated_nat_ip_resources (MutableSequence[str]): - A list of fully qualified URLs of reserved IP - address resources. + Output only. A list of fully qualified URLs + of reserved IP address resources. user_allocated_nat_ips (MutableSequence[str]): - A list of IPs user-allocated for NAT. They - will be raw IP strings like "179.12.26.133". + Output only. A list of IPs user-allocated for + NAT. They will be raw IP strings like + "179.12.26.133". """ auto_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( @@ -112618,25 +130005,25 @@ class RouterStatusNatStatusNatRuleStatus(proto.Message): Attributes: active_nat_ips (MutableSequence[str]): - A list of active IPs for NAT. Example: ["1.1.1.1", - "179.12.26.133"]. - drain_nat_ips (MutableSequence[str]): - A list of IPs for NAT that are in drain mode. Example: + Output only. A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"]. + drain_nat_ips (MutableSequence[str]): + Output only. A list of IPs for NAT that are in drain mode. + Example: ["1.1.1.1", "179.12.26.133"]. min_extra_ips_needed (int): - The number of extra IPs to allocate. This - will be greater than 0 only if the existing IPs - in this NAT Rule are NOT enough to allow all - configured VMs to use NAT. + Output only. The number of extra IPs to + allocate. This will be greater than 0 only if + the existing IPs in this NAT Rule are NOT enough + to allow all configured VMs to use NAT. This field is a member of `oneof`_ ``_min_extra_ips_needed``. num_vm_endpoints_with_nat_mappings (int): - Number of VM endpoints (i.e., NICs) that have - NAT Mappings from this NAT Rule. + Output only. Number of VM endpoints (i.e., + NICs) that have NAT Mappings from this NAT Rule. This field is a member of `oneof`_ ``_num_vm_endpoints_with_nat_mappings``. rule_number (int): - Rule number of the rule. + Output only. Rule number of the rule. This field is a member of `oneof`_ ``_rule_number``. """ @@ -112673,7 +130060,7 @@ class RouterStatusResponse(proto.Message): Attributes: kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. result (google.cloud.compute_v1beta.types.RouterStatus): @@ -112728,14 +130115,14 @@ class RoutersListBgpRoutes(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#routersListBgpRoutes for lists of bgp routes. + Output only. [Output Only] Type of resource. + Alwayscompute#routersListBgpRoutes for lists of bgp routes. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -112744,11 +130131,12 @@ class RoutersListBgpRoutes(proto.Message): result (MutableSequence[google.cloud.compute_v1beta.types.BgpRoute]): [Output Only] A list of bgp routes. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -112816,15 +130204,15 @@ class RoutersListRoutePolicies(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#routersListRoutePolicies for lists of route + Output only. [Output Only] Type of resource. + Alwayscompute#routersListRoutePolicies for lists of route policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -112833,11 +130221,12 @@ class RoutersListRoutePolicies(proto.Message): result (MutableSequence[google.cloud.compute_v1beta.types.RoutePolicy]): [Output Only] A list of route policies. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -112947,7 +130336,7 @@ class SSLHealthCheck(proto.Message): port (int): The TCP port number to which the health check prober sends packets. The default value is 443. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -112957,7 +130346,7 @@ class SSLHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -112970,14 +130359,16 @@ class SSLHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -113002,6 +130393,7 @@ class SSLHealthCheck(proto.Message): check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp This field is a member of `oneof`_ ``_response``. @@ -113010,7 +130402,7 @@ class SSLHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -113022,13 +130414,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -113104,8 +130497,8 @@ class ProxyHeader(proto.Enum): class SavedAttachedDisk(proto.Message): - r"""DEPRECATED: Please use compute#savedDisk instead. An - instance-attached disk resource. + r"""DEPRECATED: Please use compute#savedDisk instead. + An instance-attached disk resource. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -113138,8 +130531,10 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_disk_size_gb``. disk_type (str): - [Output Only] URL of the disk type resource. For example: - projects/project /zones/zone/diskTypes/pd-standard or pd-ssd + Output only. [Output Only] URL of the disk type resource. + For + example:projects/project/zones/zone/diskTypes/pd-standard or + pd-ssd This field is a member of `oneof`_ ``_disk_type``. guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): @@ -113148,8 +130543,9 @@ class SavedAttachedDisk(proto.Message): images. Read Enabling guest operating system features to see a list of available options. index (int): - Specifies zero-based index of the disk that - is attached to the source instance. + Output only. Specifies zero-based index of + the disk that is attached to the source + instance. This field is a member of `oneof`_ ``_index``. interface (str): @@ -113160,16 +130556,17 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_interface``. kind (str): - [Output Only] Type of the resource. Always - compute#attachedDisk for attached disks. + Output only. [Output Only] Type of the resource. + Alwayscompute#attachedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. licenses (MutableSequence[str]): - [Output Only] Any valid publicly visible licenses. + Output only. [Output Only] Any valid publicly visible + licenses. mode (str): The mode in which this disk is attached to the source - instance, either READ_WRITE or READ_ONLY. Check the Mode - enum for the list of possible values. + instance, eitherREAD_WRITE or READ_ONLY. Check the Mode enum + for the list of possible values. This field is a member of `oneof`_ ``_mode``. source (str): @@ -113178,24 +130575,24 @@ class SavedAttachedDisk(proto.Message): This field is a member of `oneof`_ ``_source``. storage_bytes (int): - [Output Only] A size of the storage used by the disk's - snapshot by this machine image. + Output only. [Output Only] A size of the storage used by the + disk's snapshot by this machine image. This field is a member of `oneof`_ ``_storage_bytes``. storage_bytes_status (str): - [Output Only] An indicator whether storageBytes is in a - stable state or it is being adjusted as a result of shared - storage reallocation. This status can either be UPDATING, - meaning the size of the snapshot is being updated, or - UP_TO_DATE, meaning the size of the snapshot is up-to-date. - Check the StorageBytesStatus enum for the list of possible - values. + Output only. [Output Only] An indicator whether storageBytes + is in a stable state or it is being adjusted as a result of + shared storage reallocation. This status can either be + UPDATING, meaning the size of the snapshot is being updated, + or UP_TO_DATE, meaning the size of the snapshot is + up-to-date. Check the StorageBytesStatus enum for the list + of possible values. This field is a member of `oneof`_ ``_storage_bytes_status``. type_ (str): Specifies the type of the attached disk, - either SCRATCH or PERSISTENT. Check the Type - enum for the list of possible values. + either SCRATCH orPERSISTENT. Check the Type enum + for the list of possible values. This field is a member of `oneof`_ ``_type``. """ @@ -113219,7 +130616,7 @@ class Interface(proto.Enum): class Mode(proto.Enum): r"""The mode in which this disk is attached to the source instance, - either READ_WRITE or READ_ONLY. + eitherREAD_WRITE or READ_ONLY. Values: UNDEFINED_MODE (0): @@ -113239,11 +130636,11 @@ class Mode(proto.Enum): READ_WRITE = 173607894 class StorageBytesStatus(proto.Enum): - r"""[Output Only] An indicator whether storageBytes is in a stable state - or it is being adjusted as a result of shared storage reallocation. - This status can either be UPDATING, meaning the size of the snapshot - is being updated, or UP_TO_DATE, meaning the size of the snapshot is - up-to-date. + r"""Output only. [Output Only] An indicator whether storageBytes is in a + stable state or it is being adjusted as a result of shared storage + reallocation. This status can either be UPDATING, meaning the size + of the snapshot is being updated, or UP_TO_DATE, meaning the size of + the snapshot is up-to-date. Values: UNDEFINED_STORAGE_BYTES_STATUS (0): @@ -113259,8 +130656,8 @@ class StorageBytesStatus(proto.Enum): UP_TO_DATE = 101306702 class Type(proto.Enum): - r"""Specifies the type of the attached disk, either SCRATCH or - PERSISTENT. + r"""Specifies the type of the attached disk, either SCRATCH + orPERSISTENT. Values: UNDEFINED_TYPE (0): @@ -113364,39 +130761,40 @@ class SavedDisk(proto.Message): Attributes: architecture (str): - [Output Only] The architecture of the attached disk. Check - the Architecture enum for the list of possible values. + Output only. [Output Only] The architecture of the attached + disk. Check the Architecture enum for the list of possible + values. This field is a member of `oneof`_ ``_architecture``. kind (str): - [Output Only] Type of the resource. Always compute#savedDisk - for attached disks. + Output only. [Output Only] Type of the resource. Always + compute#savedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. source_disk (str): - Specifies a URL of the disk attached to the - source instance. + Output only. Specifies a URL of the disk + attached to the source instance. This field is a member of `oneof`_ ``_source_disk``. storage_bytes (int): - [Output Only] Size of the individual disk snapshot used by - this machine image. + Output only. [Output Only] Size of the individual disk + snapshot used by this machine image. This field is a member of `oneof`_ ``_storage_bytes``. storage_bytes_status (str): - [Output Only] An indicator whether storageBytes is in a - stable state or it is being adjusted as a result of shared - storage reallocation. This status can either be UPDATING, - meaning the size of the snapshot is being updated, or - UP_TO_DATE, meaning the size of the snapshot is up-to-date. - Check the StorageBytesStatus enum for the list of possible - values. + Output only. [Output Only] An indicator whether storageBytes + is in a stable state or it is being adjusted as a result of + shared storage reallocation. This status can either be + UPDATING, meaning the size of the snapshot is being updated, + or UP_TO_DATE, meaning the size of the snapshot is + up-to-date. Check the StorageBytesStatus enum for the list + of possible values. This field is a member of `oneof`_ ``_storage_bytes_status``. """ class Architecture(proto.Enum): - r"""[Output Only] The architecture of the attached disk. + r"""Output only. [Output Only] The architecture of the attached disk. Values: UNDEFINED_ARCHITECTURE (0): @@ -113416,11 +130814,11 @@ class Architecture(proto.Enum): X86_64 = 425300551 class StorageBytesStatus(proto.Enum): - r"""[Output Only] An indicator whether storageBytes is in a stable state - or it is being adjusted as a result of shared storage reallocation. - This status can either be UPDATING, meaning the size of the snapshot - is being updated, or UP_TO_DATE, meaning the size of the snapshot is - up-to-date. + r"""Output only. [Output Only] An indicator whether storageBytes is in a + stable state or it is being adjusted as a result of shared storage + reallocation. This status can either be UPDATING, meaning the size + of the snapshot is being updated, or UP_TO_DATE, meaning the size of + the snapshot is up-to-date. Values: UNDEFINED_STORAGE_BYTES_STATUS (0): @@ -113543,10 +130941,12 @@ class Scheduling(proto.Message): automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for - standard instances. Preemptible instances cannot - be automatically restarted. By default, this is - set to true so an instance is automatically - restarted if it is terminated by Compute Engine. + standard instances.Preemptible instances cannot + be automatically restarted. + + By default, this is set to true so an instance + is automatically restarted if it is terminated + by Compute Engine. This field is a member of `oneof`_ ``_automatic_restart``. availability_domain (int): @@ -113583,9 +130983,9 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_local_ssd_recovery_timeout``. location_hint (str): An opaque location hint used to place the - instance close to other resources. This field is - for use by internal tools that use the public - API. + instance close to other resources. + This field is for use by internal tools that use + the public API. This field is a member of `oneof`_ ``_location_hint``. maintenance_freeze_duration_hours (int): @@ -113615,17 +131015,19 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_min_node_cpus``. node_affinities (MutableSequence[google.cloud.compute_v1beta.types.SchedulingNodeAffinity]): A set of node affinity and anti-affinity - configurations. Refer to Configuring node + configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity. on_host_maintenance (str): Defines the maintenance behavior for this instance. For standard instances, the default - behavior is MIGRATE. For preemptible instances, + behavior is MIGRATE. Forpreemptible instances, the default and only possible behavior is - TERMINATE. For more information, see Set VM host - maintenance policy. Check the OnHostMaintenance - enum for the list of possible values. + TERMINATE. For more information, see + Set + VM host maintenance policy. + Check the OnHostMaintenance enum for the list of + possible values. This field is a member of `oneof`_ ``_on_host_maintenance``. on_instance_stop_action (google.cloud.compute_v1beta.types.SchedulingOnInstanceStopAction): @@ -113633,9 +131035,9 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_on_instance_stop_action``. preemptible (bool): Defines whether the instance is preemptible. This can only - be set during instance creation or while the instance is - stopped and therefore, in a ``TERMINATED`` state. See - Instance Life Cycle for more information on the possible + be set during instance creation or while the instance + isstopped and therefore, in a ``TERMINATED`` state. + SeeInstance Life Cycle for more information on the possible instance states. This field is a member of `oneof`_ ``_preemptible``. @@ -113654,7 +131056,7 @@ class Scheduling(proto.Message): This field is a member of `oneof`_ ``_skip_guest_os_shutdown``. termination_time (str): Specifies the timestamp, when the instance - will be terminated, in RFC3339 text format. If + will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time. @@ -113694,13 +131096,13 @@ class MaintenanceInterval(proto.Enum): and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM - than the PERIODIC and RECURRENT options. + than the PERIODIC andRECURRENT options. PERIODIC (142804635): VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT (194244550): @@ -113708,7 +131110,7 @@ class MaintenanceInterval(proto.Enum): periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to - receive an update than if it was configured for AS_NEEDED. + receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. @@ -113720,10 +131122,11 @@ class MaintenanceInterval(proto.Enum): class OnHostMaintenance(proto.Enum): r"""Defines the maintenance behavior for this instance. For - standard instances, the default behavior is MIGRATE. For - preemptible instances, the default and only possible behavior is - TERMINATE. For more information, see Set VM host maintenance - policy. + standard instances, the default behavior is MIGRATE. + Forpreemptible instances, the default and only possible behavior + is TERMINATE. For more information, see + Set + VM host maintenance policy. Values: UNDEFINED_ON_HOST_MAINTENANCE (0): @@ -113901,7 +131304,7 @@ class SchedulingGracefulShutdown(proto.Message): class SchedulingNodeAffinity(proto.Message): r"""Node Affinity: the configuration of desired nodes onto which - this Instance could be scheduled. + this Instance could be scheduled. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -113913,8 +131316,8 @@ class SchedulingNodeAffinity(proto.Message): This field is a member of `oneof`_ ``_key``. operator (str): - Defines the operation of node selection. Valid operators are - IN for affinity and NOT_IN for anti-affinity. Check the + Defines the operation of node selection. Valid operators + areIN for affinity and NOT_IN for anti-affinity. Check the Operator enum for the list of possible values. This field is a member of `oneof`_ ``_operator``. @@ -113924,7 +131327,7 @@ class SchedulingNodeAffinity(proto.Message): """ class Operator(proto.Enum): - r"""Defines the operation of node selection. Valid operators are IN for + r"""Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity. Values: @@ -113963,7 +131366,7 @@ class Operator(proto.Enum): class SchedulingOnInstanceStopAction(proto.Message): r"""Defines the behaviour for instances with the - instance_termination_action STOP. + instance_termination_actionSTOP. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -113997,7 +131400,7 @@ class Screenshot(proto.Message): This field is a member of `oneof`_ ``_contents``. kind (str): - [Output Only] Type of the resource. Always + Output only. [Output Only] Type of the resource. Always compute#screenshot for the screenshots. This field is a member of `oneof`_ ``_kind``. @@ -114033,26 +131436,27 @@ class SecurityPoliciesAggregatedList(proto.Message): A list of SecurityPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#securityPolicyAggregatedList for lists of Security - Policies. + Output only. [Output Only] Type of resource. + Alwayscompute#securityPolicyAggregatedList for lists of + Security Policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -114175,6 +131579,7 @@ class SecurityPoliciesWafConfig(proto.Message): class SecurityPolicy(proto.Message): r"""Represents a Google Cloud Armor security policy resource. + Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview. @@ -114193,7 +131598,8 @@ class SecurityPolicy(proto.Message): A list of associations that belong to this policy. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. ddos_protection_config (google.cloud.compute_v1beta.types.SecurityPolicyDdosProtectionConfig): @@ -114228,19 +131634,20 @@ class SecurityPolicy(proto.Message): or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make get() request to the - security policy. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make get() + request to the security policy. This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#securityPolicyfor security policies + Output only. [Output only] Type of the resource. + Alwayscompute#securityPolicyfor security policies This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -114251,20 +131658,21 @@ class SecurityPolicy(proto.Message): by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in - order to update or change labels. To see the - latest fingerprint, make get() request to the - security policy. + order to update or change labels. + + To see the latest fingerprint, make get() + request to the security policy. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -114273,22 +131681,23 @@ class SecurityPolicy(proto.Message): This field is a member of `oneof`_ ``_name``. parent (str): - [Output Only] The parent of the security policy. + Output only. [Output Only] The parent of the security + policy. This field is a member of `oneof`_ ``_parent``. recaptcha_options_config (google.cloud.compute_v1beta.types.SecurityPolicyRecaptchaOptionsConfig): This field is a member of `oneof`_ ``_recaptcha_options_config``. region (str): - [Output Only] URL of the region where the regional security - policy resides. This field is not applicable to global - security policies. + Output only. [Output Only] URL of the region where the + regional security policy resides. This field is not + applicable to global security policies. This field is a member of `oneof`_ ``_region``. rule_tuple_count (int): - [Output Only] Total count of all security policy rule - tuples. A security policy can not exceed a set number of - tuples. + Output only. [Output Only] Total count of all security + policy rule tuples. A security policy can not exceed a set + number of tuples. This field is a member of `oneof`_ ``_rule_tuple_count``. rules (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRule]): @@ -114301,12 +131710,13 @@ class SecurityPolicy(proto.Message): security policy, a default rule with action "allow" will be added. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. short_name (str): @@ -114325,26 +131735,30 @@ class SecurityPolicy(proto.Message): This field is a member of `oneof`_ ``_short_name``. type_ (str): The type indicates the intended use of the security policy. - - CLOUD_ARMOR: Cloud Armor backend security policies can be - configured to filter incoming HTTP requests targeting - backend services. They filter requests before they hit the - origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge - security policies can be configured to filter incoming HTTP - requests targeting backend services (including Cloud - CDN-enabled) as well as backend buckets (Cloud Storage). - They filter requests before the request is served from - Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE (preview - only): Cloud Armor internal service policies can be - configured to filter HTTP requests targeting services - managed by Traffic Director in a service mesh. They filter - requests before the request is served from the application. + + :: + + - CLOUD_ARMOR: Cloud Armor backend security policies can + be configured to filter incoming HTTP requests targeting backend services. + They filter requests before they hit the origin servers. + - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can + be configured to filter incoming HTTP requests targeting backend services + (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). + They filter requests before the request is served from Google's cache. + - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor + internal service policies can be configured to filter HTTP requests + targeting services managed by Traffic Director in a service mesh. They + filter requests before the request is served from the application. + - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be - configured to filter packets targeting network load - balancing resources such as backend services, target pools, - target instances, and instances with external IPs. They - filter requests before the request is served from the - application. This field can be set only at resource creation - time. Check the Type enum for the list of possible values. + configured to filter packets targeting network load + balancing resources such as backend services, target + pools, target instances, and instances with external IPs. + They filter requests before the request is served from the + application. + + This field can be set only at resource creation time. Check + the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. user_defined_fields (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyUserDefinedField]): @@ -114353,30 +131767,40 @@ class SecurityPolicy(proto.Message): extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values - for these fields. Example: userDefinedFields: - name: - "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 mask: - "0x1fff". + for these fields. + + Example: + + userDefinedFields: + + - name: "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 + mask: "0x1fff". """ class Type(proto.Enum): - r"""The type indicates the intended use of the security policy. - - CLOUD_ARMOR: Cloud Armor backend security policies can be configured - to filter incoming HTTP requests targeting backend services. They - filter requests before they hit the origin servers. - - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be - configured to filter incoming HTTP requests targeting backend - services (including Cloud CDN-enabled) as well as backend buckets - (Cloud Storage). They filter requests before the request is served - from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): - Cloud Armor internal service policies can be configured to filter - HTTP requests targeting services managed by Traffic Director in a - service mesh. They filter requests before the request is served from - the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies - can be configured to filter packets targeting network load balancing - resources such as backend services, target pools, target instances, - and instances with external IPs. They filter requests before the - request is served from the application. This field can be set only - at resource creation time. + r"""The type indicates the intended use of the security policy. + + :: + + - CLOUD_ARMOR: Cloud Armor backend security policies can + be configured to filter incoming HTTP requests targeting backend services. + They filter requests before they hit the origin servers. + - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can + be configured to filter incoming HTTP requests targeting backend services + (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). + They filter requests before the request is served from Google's cache. + - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor + internal service policies can be configured to filter HTTP requests + targeting services managed by Traffic Director in a service mesh. They + filter requests before the request is served from the application. + + - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be + configured to filter packets targeting network load balancing + resources such as backend services, target pools, target + instances, and instances with external IPs. They filter requests + before the request is served from the application. + + This field can be set only at resource creation time. Values: UNDEFINED_TYPE (0): @@ -114696,7 +132120,7 @@ class SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConf This field is a member of `oneof`_ ``_detection_relative_to_baseline_qps``. name (str): The name must be 1-63 characters long, and - comply with RFC1035. The name must be unique + comply withRFC1035. The name must be unique within the security policy. This field is a member of `oneof`_ ``_name``. @@ -114924,11 +132348,16 @@ class SecurityPolicyAdvancedOptionsConfigJsonCustomConfig(proto.Message): Attributes: content_types (MutableSequence[str]): A list of custom Content-Type header values to apply the - JSON parsing. As per RFC 1341, a Content-Type header value - has the following format: Content-Type := type "/" subtype - \*[";" parameter] When configuring a custom Content-Type - header value, only the type/subtype needs to be specified, - and the parameters should be excluded. + JSON parsing. + + As per RFC 1341, a Content-Type header value has the + following format: + + Content-Type := type "/" subtype \*[";" parameter] + + When configuring a custom Content-Type header value, only + the type/subtype needs to be specified, and the parameters + should be excluded. """ content_types: MutableSequence[str] = proto.RepeatedField( @@ -114949,8 +132378,8 @@ class SecurityPolicyAssociation(proto.Message): This field is a member of `oneof`_ ``_attachment_id``. display_name (str): - [Output Only] The display name of the security policy of the - association. + Output only. [Output Only] The display name of the security + policy of the association. This field is a member of `oneof`_ ``_display_name``. excluded_folders (MutableSequence[str]): @@ -114964,12 +132393,13 @@ class SecurityPolicyAssociation(proto.Message): This field is a member of `oneof`_ ``_name``. security_policy_id (str): - [Output Only] The security policy ID of the association. + Output only. [Output Only] The security policy ID of the + association. This field is a member of `oneof`_ ``_security_policy_id``. short_name (str): - [Output Only] The short name of the security policy of the - association. + Output only. [Output Only] The short name of the security + policy of the association. This field is a member of `oneof`_ ``_short_name``. """ @@ -115015,6 +132445,35 @@ class SecurityPolicyDdosProtectionConfig(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + ddos_adaptive_protection (str): + Check the DdosAdaptiveProtection enum for the + list of possible values. + + This field is a member of `oneof`_ ``_ddos_adaptive_protection``. + ddos_impacted_baseline_threshold (float): + DDoS Protection for Network Load Balancers + (and VMs with public IPs) builds DDos + mitigations that minimize collateral damage. It + quantifies this as the fraction of a non-abuse + baseline that's inadvertently blocked. + + Rules whose collateral damage exceeds + ddosImpactedBaselineThreshold will not be + deployed. Using a lower value will prioritize + keeping collateral damage low, possibly at the + cost of its effectiveness in rate limiting some + or all of the attack. It should typically be + unset, so Advanced DDos (and Adaptive + Protection) uses the best mitigation it can + find. Setting the threshold is advised if there + are logs for false positive detections with high + collateral damage, and will cause Advanced DDos + to attempt to find a less aggressive rule that + satisfies the constraint; Failing that, it will + fall back to no mitigation (smaller attack) or + to broader network throttles (larger attack). + + This field is a member of `oneof`_ ``_ddos_impacted_baseline_threshold``. ddos_protection (str): Check the DdosProtection enum for the list of possible values. @@ -115022,6 +132481,25 @@ class SecurityPolicyDdosProtectionConfig(proto.Message): This field is a member of `oneof`_ ``_ddos_protection``. """ + class DdosAdaptiveProtection(proto.Enum): + r""" + + Values: + UNDEFINED_DDOS_ADAPTIVE_PROTECTION (0): + A value indicating that the enum field is not + set. + DISABLED (516696700): + No description available. + ENABLED (182130465): + No description available. + PREVIEW (399798184): + No description available. + """ + UNDEFINED_DDOS_ADAPTIVE_PROTECTION = 0 + DISABLED = 516696700 + ENABLED = 182130465 + PREVIEW = 399798184 + class DdosProtection(proto.Enum): r""" @@ -115041,6 +132519,16 @@ class DdosProtection(proto.Enum): ADVANCED_PREVIEW = 40905867 STANDARD = 484642493 + ddos_adaptive_protection: str = proto.Field( + proto.STRING, + number=96895463, + optional=True, + ) + ddos_impacted_baseline_threshold: float = proto.Field( + proto.FLOAT, + number=192689584, + optional=True, + ) ddos_protection: str = proto.Field( proto.STRING, number=275173268, @@ -115062,14 +132550,15 @@ class SecurityPolicyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicy]): A list of SecurityPolicy resources. kind (str): - [Output Only] Type of resource. Always - compute#securityPolicyList for listsof securityPolicies + Output only. [Output Only] Type of resource. + Alwayscompute#securityPolicyList for listsof + securityPolicies This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -115168,26 +132657,31 @@ class SecurityPolicyRule(proto.Message): Attributes: action (str): The Action to perform when the rule is matched. The - following are the valid actions: - allow: allow access to - target. - deny(STATUS): deny access to target, returns the - HTTP response code specified. Valid values for ``STATUS`` - are 403, 404, and 502. - rate_based_ban: limit client - traffic to the configured threshold and ban the client if - the traffic exceeds the threshold. Configure parameters for - this action in RateLimitOptions. Requires rate_limit_options - to be set. - redirect: redirect to a different target. This - can either be an internal reCAPTCHA redirect, or an external - URL-based redirect via a 302 response. Parameters for this - action can be configured via redirectOptions. This action is - only supported in Global Security Policies of type - CLOUD_ARMOR. - throttle: limit client traffic to the - configured threshold. Configure parameters for this action - in rateLimitOptions. Requires rate_limit_options to be set - for this. - fairshare (preview only): when traffic reaches - the threshold limit, requests from the clients matching this - rule begin to be rate-limited using the Fair Share - algorithm. This action is only allowed in security policies - of type ``CLOUD_ARMOR_INTERNAL_SERVICE``. + following are the valid actions: + + :: + + - allow: allow access to target. + - deny(STATUS): deny access to target, returns the + HTTP response code specified. Valid values for `STATUS` + are 403, 404, and 502. + - rate_based_ban: limit client traffic to the configured + threshold and ban the client if the traffic exceeds the threshold. + Configure parameters for this action in RateLimitOptions. Requires + rate_limit_options to be set. + - redirect: redirect to a different target. This can + either be an internal reCAPTCHA redirect, or an external URL-based + redirect via a 302 response. Parameters for this action can be configured + via redirectOptions. This action is only supported in Global Security + Policies of type CLOUD_ARMOR. + - throttle: limit + client traffic to the configured threshold. Configure parameters for this + action in rateLimitOptions. Requires rate_limit_options to be set for + this. + - fairshare (preview only): when traffic reaches the + threshold limit, requests from the clients matching this rule begin to be + rate-limited using the Fair Share algorithm. This action is only allowed + in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. This field is a member of `oneof`_ ``_action``. description (str): @@ -115207,8 +132701,10 @@ class SecurityPolicyRule(proto.Message): logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on - "goto_next" rules. This field may only be specified when the - versioned_expr is set to FIREWALL. + "goto_next" rules. + + This field may only be specified when the versioned_expr is + set to FIREWALL. This field is a member of `oneof`_ ``_enable_logging``. header_action (google.cloud.compute_v1beta.types.SecurityPolicyRuleHttpHeaderAction): @@ -115218,8 +132714,8 @@ class SecurityPolicyRule(proto.Message): This field is a member of `oneof`_ ``_header_action``. kind (str): - [Output only] Type of the resource. Always - compute#securityPolicyRule for security policy rules + Output only. [Output only] Type of the resource. + Alwayscompute#securityPolicyRule for security policy rules This field is a member of `oneof`_ ``_kind``. match (google.cloud.compute_v1beta.types.SecurityPolicyRuleMatcher): @@ -115231,31 +132727,45 @@ class SecurityPolicyRule(proto.Message): network_match (google.cloud.compute_v1beta.types.SecurityPolicyRuleNetworkMatcher): A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it - matches, the corresponding 'action' is enforced. The match - criteria for a rule consists of built-in match fields (like - 'srcIpRanges') and potentially multiple user-defined match - fields ('userDefinedFields'). Field values may be extracted - directly from the packet or derived from it (e.g. - 'srcRegionCodes'). Some fields may not be present in every - packet (e.g. 'srcPorts'). A user-defined field is only - present if the base header is found in the packet and the - entire field is in bounds. Each match field may specify - which values can match it, listing one or more ranges, - prefixes, or exact values that are considered a match for - the field. A field value must be present in order to match a - specified match field. If no match values are specified for - a match field, then any field value is considered to match - it, and it's not required to be present. For strings - specifying '\*' is also equivalent to match all. For a - packet to match a rule, all specified match fields must - match the corresponding field values derived from the - packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - - "198.51.100.0/24" userDefinedFields: - name: - "ipv4_fragment_offset" values: - "1-0x1fff" The above match - condition matches packets with a source IP in 192.0.2.0/24 - or 198.51.100.0/24 and a user-defined field named - "ipv4_fragment_offset" with a value between 1 and 0x1fff - inclusive. + matches, the corresponding 'action' is enforced. + + The match criteria for a rule consists of built-in match + fields (like 'srcIpRanges') and potentially multiple + user-defined match fields ('userDefinedFields'). + + Field values may be extracted directly from the packet or + derived from it (e.g. 'srcRegionCodes'). Some fields may not + be present in every packet (e.g. 'srcPorts'). A user-defined + field is only present if the base header is found in the + packet and the entire field is in bounds. + + Each match field may specify which values can match it, + listing one or more ranges, prefixes, or exact values that + are considered a match for the field. A field value must be + present in order to match a specified match field. If no + match values are specified for a match field, then any field + value is considered to match it, and it's not required to be + present. For strings specifying '\*' is also equivalent to + match all. + + For a packet to match a rule, all specified match fields + must match the corresponding field values derived from the + packet. + + Example: + + networkMatch: srcIpRanges: + + - "192.0.2.0/24" + - "198.51.100.0/24" userDefinedFields: + - name: "ipv4_fragment_offset" values: + + - "1-0x1fff" + + The above match condition matches packets with a source IP + in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field + named "ipv4_fragment_offset" with a value between 1 and + 0x1fff inclusive. This field is a member of `oneof`_ ``_network_match``. preconfigured_waf_config (google.cloud.compute_v1beta.types.SecurityPolicyRulePreconfiguredWafConfig): @@ -115301,16 +132811,18 @@ class SecurityPolicyRule(proto.Message): This field is a member of `oneof`_ ``_rule_number``. rule_tuple_count (int): - [Output Only] Calculation of the complexity of a single - firewall security policy rule. + Output only. [Output Only] Calculation of the complexity of + a single firewall security policy rule. This field is a member of `oneof`_ ``_rule_tuple_count``. target_resources (MutableSequence[str]): A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the - organization will receive the rule. This field may only be - specified when versioned_expr is set to FIREWALL. + organization will receive the rule. + + This field may only be specified when versioned_expr is set + to FIREWALL. target_service_accounts (MutableSequence[str]): A list of service accounts indicating the sets of instances that are applied with this @@ -115565,10 +133077,13 @@ class SecurityPolicyRuleMatcherConfig(proto.Message): Attributes: dest_ip_ranges (MutableSequence[str]): - CIDR IP address range. This field may only be specified when - versioned_expr is set to FIREWALL. + CIDR IP address range. + + This field may only be specified when versioned_expr is set + to FIREWALL. layer4_configs (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRuleMatcherConfigLayer4Config]): Pairs of IP protocols and ports that the rule should match. + This field may only be specified when versioned_expr is set to FIREWALL. src_ip_ranges (MutableSequence[str]): @@ -115603,8 +133118,8 @@ class SecurityPolicyRuleMatcherConfigLayer4Config(proto.Message): The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of - the following well known protocol strings (tcp, - udp, icmp, esp, ah, ipip, sctp), or the IP + the following well known protocol strings + (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP protocol number. This field is a member of `oneof`_ ``_ip_protocol``. @@ -115612,10 +133127,13 @@ class SecurityPolicyRuleMatcherConfigLayer4Config(proto.Message): An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this - rule applies to connections through any port. Example inputs - include: ["22"], ["80","443"], and ["12345-12349"]. This - field may only be specified when versioned_expr is set to - FIREWALL. + rule applies to connections through any port. + + Example inputs include: ["22"],["80","443"], and + ["12345-12349"]. + + This field may only be specified when versioned_expr is set + to FIREWALL. """ ip_protocol: str = proto.Field( @@ -115771,7 +133289,7 @@ class SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch(proto.Message): Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with "0x") number (e.g. "64") or range - (e.g. "0x400-0x7ff"). + (e.g. "0x400-0x7ff"). """ name: str = proto.Field( @@ -115809,6 +133327,10 @@ class SecurityPolicyRulePreconfiguredWafConfigExclusion(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + request_bodies_to_exclude (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams]): + A list of request body fields to be excluded + from inspection during preconfigured WAF + evaluation. request_cookies_to_exclude (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams]): A list of request cookie names whose value will be excluded from inspection during @@ -115841,6 +133363,13 @@ class SecurityPolicyRulePreconfiguredWafConfigExclusion(proto.Message): This field is a member of `oneof`_ ``_target_rule_set``. """ + request_bodies_to_exclude: MutableSequence[ + "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" + ] = proto.RepeatedField( + proto.MESSAGE, + number=60453445, + message="SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams", + ) request_cookies_to_exclude: MutableSequence[ "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" ] = proto.RepeatedField( @@ -115969,43 +133498,50 @@ class SecurityPolicyRuleRateLimitOptions(proto.Message): This field is a member of `oneof`_ ``_conform_action``. enforce_on_key (str): Determines the key to enforce the rate_limit_threshold on. - Possible values are: - ALL: A single rate limit threshold is - applied to all the requests matching this rule. This is the - default value if "enforceOnKey" is not configured. - IP: The - source IP address of the request is the key. Each IP has - this limit enforced separately. - HTTP_HEADER: The value of - the HTTP header whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present - in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) - specified in the list of IPs under X-Forwarded-For HTTP - header. If no such header is present or the value is not a - valid IP, the key defaults to the source IP address of the - request i.e. key type IP. - HTTP_COOKIE: The value of the - HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present - in the request, the key type defaults to ALL. - HTTP_PATH: - The URL path of the HTTP request. The key value is truncated - to the first 128 bytes. - SNI: Server name indication in the - TLS session of the HTTPS request. The key value is truncated - to the first 128 bytes. The key type defaults to ALL on a - HTTP session. - REGION_CODE: The country/region from which - the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL - fingerprint if the client connects using HTTPS, HTTP/2 or - HTTP/3. If not available, the key type defaults to ALL. - - USER_IP: The IP address of the originating client, which is - resolved based on "userIpRequestHeaders" configured with the - security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, - the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 - TLS/SSL fingerprint if the client connects using HTTPS, - HTTP/2 or HTTP/3. If not available, the key type defaults to - ALL. For "fairshare" action, this value is limited to ALL - i.e. a single rate limit threshold is enforced for all the - requests matching the rule. Check the EnforceOnKey enum for - the list of possible values. + Possible values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKey" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the value + is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of the + HTTPS request. The key value is truncated to the first 128 bytes. The + key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the request + originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration or + an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, + the key type defaults to ALL. For "fairshare" action, this + value is limited to ALL i.e. a single rate limit threshold + is enforced for all the requests matching the rule. Check + the EnforceOnKey enum for the list of possible values. This field is a member of `oneof`_ ``_enforce_on_key``. enforce_on_key_configs (MutableSequence[google.cloud.compute_v1beta.types.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig]): @@ -116049,38 +133585,49 @@ class SecurityPolicyRuleRateLimitOptions(proto.Message): class EnforceOnKey(proto.Enum): r"""Determines the key to enforce the rate_limit_threshold on. Possible - values are: - ALL: A single rate limit threshold is applied to all - the requests matching this rule. This is the default value if - "enforceOnKey" is not configured. - IP: The source IP address of the - request is the key. Each IP has this limit enforced separately. - - HTTP_HEADER: The value of the HTTP header whose name is configured - under "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present in the - request, the key type defaults to ALL. - XFF_IP: The first IP - address (i.e. the originating client IP address) specified in the - list of IPs under X-Forwarded-For HTTP header. If no such header is - present or the value is not a valid IP, the key defaults to the - source IP address of the request i.e. key type IP. - HTTP_COOKIE: - The value of the HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first 128 - bytes of the cookie value. If no such cookie is present in the - request, the key type defaults to ALL. - HTTP_PATH: The URL path of - the HTTP request. The key value is truncated to the first 128 bytes. - - SNI: Server name indication in the TLS session of the HTTPS - request. The key value is truncated to the first 128 bytes. The key - type defaults to ALL on a HTTP session. - REGION_CODE: The - country/region from which the request originates. - - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects - using HTTPS, HTTP/2 or HTTP/3. If not available, the key type - defaults to ALL. - USER_IP: The IP address of the originating - client, which is resolved based on "userIpRequestHeaders" configured - with the security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, the key - type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint - if the client connects using HTTPS, HTTP/2 or HTTP/3. If not - available, the key type defaults to ALL. For "fairshare" action, - this value is limited to ALL i.e. a single rate limit threshold is - enforced for all the requests matching the rule. + values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKey" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the value + is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of the + HTTPS request. The key value is truncated to the first 128 bytes. The + key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the request + originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration or + an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key + type defaults to ALL. For "fairshare" action, this value is + limited to ALL i.e. a single rate limit threshold is enforced for + all the requests matching the rule. Values: UNDEFINED_ENFORCE_ON_KEY (0): @@ -116192,77 +133739,95 @@ class SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig(proto.Message): This field is a member of `oneof`_ ``_enforce_on_key_name``. enforce_on_key_type (str): Determines the key to enforce the rate_limit_threshold on. - Possible values are: - ALL: A single rate limit threshold is - applied to all the requests matching this rule. This is the - default value if "enforceOnKeyConfigs" is not configured. - - IP: The source IP address of the request is the key. Each IP - has this limit enforced separately. - HTTP_HEADER: The value - of the HTTP header whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the header value. If no such header is present - in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) - specified in the list of IPs under X-Forwarded-For HTTP - header. If no such header is present or the value is not a - valid IP, the key defaults to the source IP address of the - request i.e. key type IP. - HTTP_COOKIE: The value of the - HTTP cookie whose name is configured under - "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present - in the request, the key type defaults to ALL. - HTTP_PATH: - The URL path of the HTTP request. The key value is truncated - to the first 128 bytes. - SNI: Server name indication in the - TLS session of the HTTPS request. The key value is truncated - to the first 128 bytes. The key type defaults to ALL on a - HTTP session. - REGION_CODE: The country/region from which - the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL - fingerprint if the client connects using HTTPS, HTTP/2 or - HTTP/3. If not available, the key type defaults to ALL. - - USER_IP: The IP address of the originating client, which is - resolved based on "userIpRequestHeaders" configured with the - security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, - the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 - TLS/SSL fingerprint if the client connects using HTTPS, - HTTP/2 or HTTP/3. If not available, the key type defaults to - ALL. Check the EnforceOnKeyType enum for the list of - possible values. + Possible values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKeyConfigs" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the + value is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of + the HTTPS request. The key value is truncated to the first 128 bytes. + The key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the + request originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration + or an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, + the key type defaults to ALL. Check the EnforceOnKeyType + enum for the list of possible values. This field is a member of `oneof`_ ``_enforce_on_key_type``. """ class EnforceOnKeyType(proto.Enum): r"""Determines the key to enforce the rate_limit_threshold on. Possible - values are: - ALL: A single rate limit threshold is applied to all - the requests matching this rule. This is the default value if - "enforceOnKeyConfigs" is not configured. - IP: The source IP address - of the request is the key. Each IP has this limit enforced - separately. - HTTP_HEADER: The value of the HTTP header whose name - is configured under "enforceOnKeyName". The key value is truncated - to the first 128 bytes of the header value. If no such header is - present in the request, the key type defaults to ALL. - XFF_IP: The - first IP address (i.e. the originating client IP address) specified - in the list of IPs under X-Forwarded-For HTTP header. If no such - header is present or the value is not a valid IP, the key defaults - to the source IP address of the request i.e. key type IP. - - HTTP_COOKIE: The value of the HTTP cookie whose name is configured - under "enforceOnKeyName". The key value is truncated to the first - 128 bytes of the cookie value. If no such cookie is present in the - request, the key type defaults to ALL. - HTTP_PATH: The URL path of - the HTTP request. The key value is truncated to the first 128 bytes. - - SNI: Server name indication in the TLS session of the HTTPS - request. The key value is truncated to the first 128 bytes. The key - type defaults to ALL on a HTTP session. - REGION_CODE: The - country/region from which the request originates. - - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects - using HTTPS, HTTP/2 or HTTP/3. If not available, the key type - defaults to ALL. - USER_IP: The IP address of the originating - client, which is resolved based on "userIpRequestHeaders" configured - with the security policy. If there is no "userIpRequestHeaders" - configuration or an IP address cannot be resolved from it, the key - type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint - if the client connects using HTTPS, HTTP/2 or HTTP/3. If not - available, the key type defaults to ALL. + values are: + + :: + + - ALL: A single rate limit threshold is applied to all + the requests matching this rule. This is the default value if + "enforceOnKeyConfigs" is not configured. + - IP: The source IP address of + the request is the key. Each IP has this limit enforced + separately. + - HTTP_HEADER: The value of the HTTP + header whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the header value. If no + such header is present in the request, the key type defaults toALL. + - XFF_IP: The first IP address (i.e. the + originating client IP address) specified in the list of IPs under + X-Forwarded-For HTTP header. If no such header is present or the + value is not a valid IP, the key defaults to the source IP address of + the request i.e. key type IP. + - HTTP_COOKIE: The value of the HTTP + cookie whose name is configured under "enforceOnKeyName". The key + value is truncated to the first 128 bytes of the cookie value. If no + such cookie is present in the request, the key type defaults toALL. + - HTTP_PATH: The URL path of the HTTP request. The key + value is truncated to the first 128 bytes. + - SNI: Server name indication in the TLS session of + the HTTPS request. The key value is truncated to the first 128 bytes. + The key type defaults to ALL on a HTTP session. + - REGION_CODE: The country/region from which the + request originates. + - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the + client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the + key type defaults to ALL. + - USER_IP: The IP address of the originating client, + which is resolved based on "userIpRequestHeaders" configured with the + security policy. If there is no "userIpRequestHeaders" configuration + or an IP address cannot be resolved from it, the key type defaults toIP. + + - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client + connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key + type defaults to ALL. Values: UNDEFINED_ENFORCE_ON_KEY_TYPE (0): @@ -116362,20 +133927,29 @@ class SecurityPolicyRuleRedirectOptions(proto.Message): This field is a member of `oneof`_ ``_target``. type_ (str): - Type of the redirect action. Possible values are: - - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge - assessment. - EXTERNAL_302: redirect to a different URL via - a 302 response. Check the Type enum for the list of possible - values. + Type of the redirect action. Possible values are: + + :: + + - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual + challenge assessment. + - EXTERNAL_302: redirect to a different URL via a 302 + response. + + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): - r"""Type of the redirect action. Possible values are: - - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual challenge - assessment. - EXTERNAL_302: redirect to a different URL via a 302 - response. + r"""Type of the redirect action. Possible values are: + + :: + + - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual + challenge assessment. + - EXTERNAL_302: redirect to a different URL via a 302 + response. Values: UNDEFINED_TYPE (0): @@ -116410,17 +133984,24 @@ class SecurityPolicyUserDefinedField(proto.Message): Attributes: base (str): The base relative to which 'offset' is - measured. Possible values are: - IPV4: Points to - the beginning of the IPv4 header. - IPV6: Points - to the beginning of the IPv6 header. - TCP: - Points to the beginning of the TCP header, - skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. - - UDP: Points to the beginning of the UDP header, - skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. - required Check the Base enum for the list of - possible values. + measured. Possible values are: + + - IPV4: Points to the beginning of the IPv4 + header. + - IPV6: Points to the beginning of the IPv6 + header. + - TCP: Points to the beginning of the TCP + header, skipping over any IPv4 options or + IPv6 extension headers. Not present for + non-first fragments. + - UDP: Points to the beginning of the UDP + header, skipping over any IPv4 options or + IPv6 extension headers. Not present for + non-first fragments. + + required + Check the Base enum for the list of possible + values. This field is a member of `oneof`_ ``_base``. mask (str): @@ -116451,13 +134032,18 @@ class SecurityPolicyUserDefinedField(proto.Message): class Base(proto.Enum): r"""The base relative to which 'offset' is measured. Possible - values are: - IPV4: Points to the beginning of the IPv4 header. - - IPV6: Points to the beginning of the IPv6 header. - TCP: - Points to the beginning of the TCP header, skipping over any - IPv4 options or IPv6 extension headers. Not present for - non-first fragments. - UDP: Points to the beginning of the UDP - header, skipping over any IPv4 options or IPv6 extension - headers. Not present for non-first fragments. required + values are: + + - IPV4: Points to the beginning of the IPv4 header. + - IPV6: Points to the beginning of the IPv6 header. + - TCP: Points to the beginning of the TCP header, skipping + over any IPv4 options or IPv6 extension headers. Not present + for non-first fragments. + - UDP: Points to the beginning of the UDP header, skipping + over any IPv4 options or IPv6 extension headers. Not present + for non-first fragments. + + required Values: UNDEFINED_BASE (0): @@ -116528,28 +134114,32 @@ class SecuritySettings(proto.Message): Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service's backends. - clientTlsPolicy only applies to a global BackendService with - the loadBalancingScheme set to INTERNAL_SELF_MANAGED. If - left blank, communications are not encrypted. + + clientTlsPolicy only applies to a globalBackendService with + the loadBalancingScheme set to INTERNAL_SELF_MANAGED. + + If left blank, communications are not encrypted. This field is a member of `oneof`_ ``_client_tls_policy``. subject_alt_names (MutableSequence[str]): Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an - server/endpoint for this BackendService. When the server + server/endpoint for thisBackendService. When the server presents its X.509 certificate to the client, the client - inspects the certificate's subjectAltName field. If the - field contains one of the specified values, the - communication continues. Otherwise, it fails. This - additional check enables the client to verify that the - server is authorized to run the requested service. Note that - the contents of the server certificate's subjectAltName - field are configured by the Public Key Infrastructure which - provisions server identities. Only applies to a global - BackendService with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. Only applies when BackendService has - an attached clientTlsPolicy with clientCertificate (mTLS - mode). + inspects the certificate'ssubjectAltName field. If the field + contains one of the specified values, the communication + continues. Otherwise, it fails. This additional check + enables the client to verify that the server is authorized + to run the requested service. + + Note that the contents of the server certificate's + subjectAltName field are configured by the Public Key + Infrastructure which provisions server identities. + + Only applies to a global BackendService + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. Only + applies when BackendService has an attachedclientTlsPolicy + with clientCertificate (mTLS mode). """ authentication: str = proto.Field( @@ -116619,8 +134209,8 @@ class SerialPortOutput(proto.Message): This field is a member of `oneof`_ ``_contents``. kind (str): - [Output Only] Type of the resource. Always - compute#serialPortOutput for serial port output. + Output only. [Output Only] Type of the resource. + Alwayscompute#serialPortOutput for serial port output. This field is a member of `oneof`_ ``_kind``. next_ (int): @@ -116631,7 +134221,8 @@ class SerialPortOutput(proto.Message): This field is a member of `oneof`_ ``_next``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. start (int): @@ -116741,19 +134332,20 @@ class ServiceAccount(proto.Message): class ServiceAttachment(proto.Message): - r"""Represents a ServiceAttachment resource. A service attachment - represents a service that a producer has exposed. It - encapsulates the load balancer which fronts the service runs and - a list of NAT IP ranges that the producers uses to represent the - consumers connecting to the service. + r"""Represents a ServiceAttachment resource. + + A service attachment represents a service that a producer has + exposed. It encapsulates the load balancer which fronts the + service runs and a list of NAT IP ranges that the producers uses + to represent the consumers connecting to the service. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: connected_endpoints (MutableSequence[google.cloud.compute_v1beta.types.ServiceAttachmentConnectedEndpoint]): - [Output Only] An array of connections for all the consumers - connected to this service attachment. + Output only. [Output Only] An array of connections for all + the consumers connected to this service attachment. connection_preference (str): The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service @@ -116784,7 +134376,8 @@ class ServiceAttachment(proto.Message): attachment must contain either only projects or only networks. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -116821,13 +134414,13 @@ class ServiceAttachment(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#serviceAttachment for service attachments. + Output only. [Output Only] Type of the resource. + Alwayscompute#serviceAttachment for service attachments. This field is a member of `oneof`_ ``_kind``. metadata (MutableMapping[str, str]): @@ -116835,7 +134428,7 @@ class ServiceAttachment(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -116859,45 +134452,58 @@ class ServiceAttachment(proto.Message): Connectivity Center. This limit lets the service producer limit how many propagated Private Service Connect connections can be established to this service attachment - from a single consumer. If the connection preference of the - service attachment is ACCEPT_MANUAL, the limit applies to - each project or network that is listed in the consumer - accept list. If the connection preference of the service - attachment is ACCEPT_AUTOMATIC, the limit applies to each - project that contains a connected endpoint. If unspecified, - the default propagated connection limit is 250. + from a single consumer. + + If the connection preference of the service attachment is + ACCEPT_MANUAL, the limit applies to each project or network + that is listed in the consumer accept list. If the + connection preference of the service attachment is + ACCEPT_AUTOMATIC, the limit applies to each project that + contains a connected endpoint. + + If unspecified, the default propagated connection limit is + 250. This field is a member of `oneof`_ ``_propagated_connection_limit``. psc_service_attachment_id (google.cloud.compute_v1beta.types.Uint128): - [Output Only] An 128-bit global unique ID of the PSC service - attachment. + Output only. [Output Only] An 128-bit global unique ID of + the PSC service attachment. This field is a member of `oneof`_ ``_psc_service_attachment_id``. reconcile_connections (bool): This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC - endpoints. - If false, connection policy update - will only affect existing PENDING PSC endpoints. - Existing ACCEPTED/REJECTED endpoints will remain - untouched regardless how the connection policy - is modified . - If true, update will affect both - PENDING and ACCEPTED/REJECTED PSC endpoints. For + endpoints. + + + - If false, connection policy update will + only affect existing PENDING PSC + endpoints. Existing ACCEPTED/REJECTED + endpoints will remain untouched regardless + how the connection policy is modified . + - If true, + update will affect both PENDING and + ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved - to REJECTED if its project is added to the - reject list. For newly created service - attachment, this boolean defaults to false. + to REJECTED if its project is added to the + reject list. + + For newly created service attachment, this + boolean defaults to false. This field is a member of `oneof`_ ``_reconcile_connections``. region (str): - [Output Only] URL of the region where the service attachment - resides. This field applies only to the region resource. You - must specify this field as part of the HTTP request URL. It - is not settable as a field in the request body. + Output only. [Output Only] URL of the region where the + service attachment resides. This field applies only to the + region resource. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. target_service (str): @@ -116907,10 +134513,16 @@ class ServiceAttachment(proto.Message): This field is a member of `oneof`_ ``_target_service``. tunneling_config (google.cloud.compute_v1beta.types.ServiceAttachmentTunnelingConfig): When a tunneling config is set on this service attachment it - will encapsulate traffic between consumer and producer. When - tunneling is enabled: - nat_subnets must be unset - - enable_proxy_protocol must be false - - producer_forwarding_rule must be a L4 ILB. - + will encapsulate traffic between consumer and producer. + + When tunneling is enabled: + + :: + + - nat_subnets must be unset + - enable_proxy_protocol must be false + - producer_forwarding_rule must be a L4 ILB. + - This field is a member of `oneof`_ ``_tunneling_config``. """ @@ -117067,24 +134679,25 @@ class ServiceAttachmentAggregatedList(proto.Message): A list of ServiceAttachmentsScopedList resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -117147,6 +134760,11 @@ class ServiceAttachmentConnectedEndpoint(proto.Message): The url of a connected endpoint. This field is a member of `oneof`_ ``_endpoint``. + endpoint_with_id (str): + The url of a connected endpoint with resource + id. + + This field is a member of `oneof`_ ``_endpoint_with_id``. nat_ips (MutableSequence[str]): NAT IPs of the connected PSC endpoint and those of other endpoints propagated from it. @@ -117215,6 +134833,11 @@ class Status(proto.Enum): number=130489749, optional=True, ) + endpoint_with_id: str = proto.Field( + proto.STRING, + number=444867210, + optional=True, + ) nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=117635086, @@ -117247,6 +134870,10 @@ class ServiceAttachmentConsumerProjectLimit(proto.Message): should be no more than 1. This field is a member of `oneof`_ ``_connection_limit``. + endpoint_url (str): + The URL for the PSC endpoint to accept + + This field is a member of `oneof`_ ``_endpoint_url``. network_url (str): The network URL for the network to set the limit for. @@ -117264,6 +134891,11 @@ class ServiceAttachmentConsumerProjectLimit(proto.Message): number=131403546, optional=True, ) + endpoint_url: str = proto.Field( + proto.STRING, + number=223428549, + optional=True, + ) network_url: str = proto.Field( proto.STRING, number=207194078, @@ -117290,14 +134922,14 @@ class ServiceAttachmentList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.ServiceAttachment]): A list of ServiceAttachment resources. kind (str): - [Output Only] Type of the resource. Always - compute#serviceAttachment for service attachments. + Output only. [Output Only] Type of the resource. + Alwayscompute#serviceAttachment for service attachments. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -117476,21 +135108,25 @@ class SetAutoHealingPoliciesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -117540,17 +135176,21 @@ class SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -117594,17 +135234,21 @@ class SetBackendServiceTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_backend_service_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetBackendServiceRequest): @@ -117649,17 +135293,21 @@ class SetBackendServiceTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxies_set_backend_service_request_resource (google.cloud.compute_v1beta.types.TargetTcpProxiesSetBackendServiceRequest): @@ -117710,17 +135358,21 @@ class SetBackupTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_pool (str): @@ -117774,17 +135426,21 @@ class SetCertificateMapTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_certificate_map_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetCertificateMapRequest): @@ -117830,17 +135486,21 @@ class SetCertificateMapTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_certificate_map_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetCertificateMapRequest): @@ -117888,17 +135548,21 @@ class SetCloudArmorTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118031,17 +135695,21 @@ class SetCommonInstanceMetadataProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118079,17 +135747,21 @@ class SetDefaultNetworkTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -118130,17 +135802,21 @@ class SetDeletionProtectionInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -118197,17 +135873,21 @@ class SetDiskAutoDeleteInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -118260,17 +135940,21 @@ class SetEdgeSecurityPolicyBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -118316,17 +136000,21 @@ class SetEdgeSecurityPolicyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -118832,6 +136520,40 @@ class SetIamPolicyNodeTemplateRequest(proto.Message): ) +class SetIamPolicyRegionBackendBucketRequest(proto.Message): + r"""A request message for RegionBackendBuckets.SetIamPolicy. See + the method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + region_set_policy_request_resource (google.cloud.compute_v1beta.types.RegionSetPolicyRequest): + The body resource for this request + resource (str): + Name or id of the resource for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( + proto.MESSAGE, + number=276489091, + message="RegionSetPolicyRequest", + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + + class SetIamPolicyRegionBackendServiceRequest(proto.Message): r"""A request message for RegionBackendServices.SetIamPolicy. See the method description for details. @@ -119003,6 +136725,47 @@ class SetIamPolicyRegionSnapshotRequest(proto.Message): ) +class SetIamPolicyReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.SetIamPolicy. See the + method description for details. + + Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + """ + + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + zone_set_nested_policy_request_resource: "ZoneSetNestedPolicyRequest" = proto.Field( + proto.MESSAGE, + number=266352851, + message="ZoneSetNestedPolicyRequest", + ) + + class SetIamPolicyReservationRequest(proto.Message): r"""A request message for Reservations.SetIamPolicy. See the method description for details. @@ -119037,6 +136800,47 @@ class SetIamPolicyReservationRequest(proto.Message): ) +class SetIamPolicyReservationSubBlockRequest(proto.Message): + r"""A request message for ReservationSubBlocks.SetIamPolicy. See + the method description for details. + + Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + zone (str): + The name of the zone for this request. + zone_set_nested_policy_request_resource (google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest): + The body resource for this request + """ + + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + zone_set_nested_policy_request_resource: "ZoneSetNestedPolicyRequest" = proto.Field( + proto.MESSAGE, + number=266352851, + message="ZoneSetNestedPolicyRequest", + ) + + class SetIamPolicyResourcePolicyRequest(proto.Message): r"""A request message for ResourcePolicies.SetIamPolicy. See the method description for details. @@ -119221,21 +137025,25 @@ class SetInstanceTemplateInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -119285,17 +137093,21 @@ class SetInstanceTemplateRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -119343,17 +137155,21 @@ class SetLabelsAddressRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119399,17 +137215,21 @@ class SetLabelsDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119491,17 +137311,21 @@ class SetLabelsForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119635,17 +137459,21 @@ class SetLabelsInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -119691,17 +137519,21 @@ class SetLabelsInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119755,17 +137587,21 @@ class SetLabelsInterconnectAttachmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119871,17 +137707,21 @@ class SetLabelsRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119931,17 +137771,21 @@ class SetLabelsRegionInstantSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -119991,17 +137835,21 @@ class SetLabelsRegionSecurityPolicyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120051,17 +137899,21 @@ class SetLabelsRegionSnapshotRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120167,17 +138019,21 @@ class SetLabelsTargetVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120227,17 +138083,21 @@ class SetLabelsVpnGatewayRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120287,17 +138147,21 @@ class SetLabelsVpnTunnelRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. resource (str): @@ -120347,17 +138211,21 @@ class SetMachineResourcesInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120407,17 +138275,21 @@ class SetMachineTypeInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120467,17 +138339,21 @@ class SetManagedProtectionTierProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -120517,17 +138393,21 @@ class SetMetadataInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120577,17 +138457,21 @@ class SetMinCpuPlatformInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120637,17 +138521,21 @@ class SetNameInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120698,22 +138586,26 @@ class SetNamedPortsInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the instance group - is located. + The name of the zone + where the instance group is located. """ instance_group: str = proto.Field( @@ -120762,17 +138654,21 @@ class SetNamedPortsRegionInstanceGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -120820,17 +138716,21 @@ class SetNodeTemplateNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -120878,17 +138778,21 @@ class SetPrivateIpGoogleAccessSubnetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. subnetwork (str): @@ -120936,17 +138840,21 @@ class SetProxyHeaderTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_proxy_header_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetProxyHeaderRequest): @@ -120991,17 +138899,21 @@ class SetProxyHeaderTargetTcpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_tcp_proxies_set_proxy_header_request_resource (google.cloud.compute_v1beta.types.TargetTcpProxiesSetProxyHeaderRequest): @@ -121046,17 +138958,21 @@ class SetQuicOverrideTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_quic_override_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetQuicOverrideRequest): @@ -121104,17 +139020,21 @@ class SetSchedulingInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. scheduling_resource (google.cloud.compute_v1beta.types.Scheduling): @@ -121166,17 +139086,21 @@ class SetSecurityPolicyBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121224,17 +139148,21 @@ class SetSecurityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -121287,17 +139215,21 @@ class SetSecurityPolicyRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121343,17 +139275,21 @@ class SetSecurityPolicyTargetInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121407,17 +139343,21 @@ class SetSecurityPolicyTargetPoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. security_policy_reference_resource (google.cloud.compute_v1beta.types.SecurityPolicyReference): @@ -121471,17 +139411,21 @@ class SetServiceAccountInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -121531,17 +139475,21 @@ class SetShieldedInstanceIntegrityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_instance_integrity_policy_resource (google.cloud.compute_v1beta.types.ShieldedInstanceIntegrityPolicy): @@ -121593,17 +139541,21 @@ class SetShieldedVmIntegrityPolicyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_vm_integrity_policy_resource (google.cloud.compute_v1beta.types.ShieldedVmIntegrityPolicy): @@ -121656,17 +139608,21 @@ class SetSslCertificatesRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -121713,17 +139669,21 @@ class SetSslCertificatesTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxies_set_ssl_certificates_request_resource (google.cloud.compute_v1beta.types.TargetHttpsProxiesSetSslCertificatesRequest): @@ -121768,17 +139728,21 @@ class SetSslCertificatesTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_ssl_proxies_set_ssl_certificates_request_resource (google.cloud.compute_v1beta.types.TargetSslProxiesSetSslCertificatesRequest): @@ -121823,17 +139787,21 @@ class SetSslPolicyTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_reference_resource (google.cloud.compute_v1beta.types.SslPolicyReference): @@ -121879,17 +139847,21 @@ class SetSslPolicyTargetSslProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. ssl_policy_reference_resource (google.cloud.compute_v1beta.types.SslPolicyReference): @@ -121937,17 +139909,21 @@ class SetTagsInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. tags_resource (google.cloud.compute_v1beta.types.Tags): @@ -122000,17 +139976,21 @@ class SetTargetForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_reference_resource (google.cloud.compute_v1beta.types.TargetReference): @@ -122059,17 +140039,21 @@ class SetTargetGlobalForwardingRuleRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_reference_resource (google.cloud.compute_v1beta.types.TargetReference): @@ -122115,21 +140099,25 @@ class SetTargetPoolsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -122179,17 +140167,21 @@ class SetTargetPoolsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -122235,17 +140227,21 @@ class SetUrlMapRegionTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -122296,17 +140292,21 @@ class SetUrlMapRegionTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -122355,17 +140355,21 @@ class SetUrlMapTargetHttpProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_http_proxy (str): @@ -122410,17 +140414,21 @@ class SetUrlMapTargetHttpsProxyRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. target_https_proxy (str): @@ -122465,17 +140473,21 @@ class SetUsageExportBucketProjectRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. usage_export_location_resource (google.cloud.compute_v1beta.types.UsageExportLocation): @@ -122590,17 +140602,17 @@ class ShieldedInstanceConfig(proto.Message): Attributes: enable_integrity_monitoring (bool): Defines whether the instance has integrity - monitoring enabled. Enabled by default. + monitoring enabled.Enabled by default. This field is a member of `oneof`_ ``_enable_integrity_monitoring``. enable_secure_boot (bool): Defines whether the instance has Secure Boot - enabled. Disabled by default. + enabled.Disabled by default. This field is a member of `oneof`_ ``_enable_secure_boot``. enable_vtpm (bool): Defines whether the instance has the vTPM - enabled. Enabled by default. + enabled.Enabled by default. This field is a member of `oneof`_ ``_enable_vtpm``. """ @@ -122628,6 +140640,18 @@ class ShieldedInstanceIdentity(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: + ecc_p256_encryption_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): + An Endorsement Key (EK) made by the ECC P256 + algorithm issued to the Shielded Instance's + vTPM. + + This field is a member of `oneof`_ ``_ecc_p256_encryption_key``. + ecc_p256_signing_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): + An Attestation Key (AK) made by the ECC P256 + algorithm issued to the Shielded Instance's + vTPM. + + This field is a member of `oneof`_ ``_ecc_p256_signing_key``. encryption_key (google.cloud.compute_v1beta.types.ShieldedInstanceIdentityEntry): An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's @@ -122635,8 +140659,8 @@ class ShieldedInstanceIdentity(proto.Message): This field is a member of `oneof`_ ``_encryption_key``. kind (str): - [Output Only] Type of the resource. Always - compute#shieldedInstanceIdentity for shielded Instance + Output only. [Output Only] Type of the resource. + Alwayscompute#shieldedInstanceIdentity for shielded Instance identity entry. This field is a member of `oneof`_ ``_kind``. @@ -122648,6 +140672,18 @@ class ShieldedInstanceIdentity(proto.Message): This field is a member of `oneof`_ ``_signing_key``. """ + ecc_p256_encryption_key: "ShieldedInstanceIdentityEntry" = proto.Field( + proto.MESSAGE, + number=469607365, + optional=True, + message="ShieldedInstanceIdentityEntry", + ) + ecc_p256_signing_key: "ShieldedInstanceIdentityEntry" = proto.Field( + proto.MESSAGE, + number=477678403, + optional=True, + message="ShieldedInstanceIdentityEntry", + ) encryption_key: "ShieldedInstanceIdentityEntry" = proto.Field( proto.MESSAGE, number=488268707, @@ -122697,8 +140733,8 @@ class ShieldedInstanceIdentityEntry(proto.Message): class ShieldedInstanceIntegrityPolicy(proto.Message): - r"""The policy describes the baseline against which Instance boot - integrity is measured. + r"""The policy describes the baseline against which + Instance boot integrity is measured. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -122771,8 +140807,9 @@ class ShieldedVmIdentity(proto.Message): This field is a member of `oneof`_ ``_encryption_key``. kind (str): - [Output Only] Type of the resource. Always - compute#shieldedVmIdentity for shielded VM identity entry. + Output only. [Output Only] Type of the resource. + Alwayscompute#shieldedVmIdentity for shielded VM identity + entry. This field is a member of `oneof`_ ``_kind``. signing_key (google.cloud.compute_v1beta.types.ShieldedVmIdentityEntry): @@ -122831,8 +140868,8 @@ class ShieldedVmIdentityEntry(proto.Message): class ShieldedVmIntegrityPolicy(proto.Message): - r"""The policy describes the baseline against which VM instance - boot integrity is measured. + r"""The policy describes the baseline against which + VM instance boot integrity is measured. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -122863,7 +140900,7 @@ class SignedUrlKey(proto.Message): Attributes: key_name (str): Name of the key. The name must be 1-63 characters long, and - comply with RFC1035. Specifically, the name must be 1-63 + comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -122873,7 +140910,7 @@ class SignedUrlKey(proto.Message): This field is a member of `oneof`_ ``_key_name``. key_value (str): 128-bit key value used for signing the URL. - The key value must be a valid RFC 4648 Section 5 + The key value must be a validRFC 4648 Section 5 base64url encoded string. This field is a member of `oneof`_ ``_key_value``. @@ -122908,17 +140945,21 @@ class SimulateMaintenanceEventInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. with_extended_notifications (bool): @@ -122975,17 +141016,21 @@ class SimulateMaintenanceEventNodeGroupRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -123017,23 +141062,26 @@ class SimulateMaintenanceEventNodeGroupRequest(proto.Message): class Snapshot(proto.Message): - r"""Represents a Persistent Disk Snapshot resource. You can use - snapshots to back up data on a regular interval. For more - information, read Creating persistent disk snapshots. + r"""Represents a Persistent Disk Snapshot resource. + + You can use snapshots to back up data on a regular interval. For + more information, read Creating + persistent disk snapshots. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: architecture (str): - [Output Only] The architecture of the snapshot. Valid values - are ARM64 or X86_64. Check the Architecture enum for the - list of possible values. + Output only. [Output Only] The architecture of the snapshot. + Valid values are ARM64 or X86_64. Check the Architecture + enum for the list of possible values. This field is a member of `oneof`_ ``_architecture``. auto_created (bool): - [Output Only] Set to true if snapshots are automatically - created by applying resource policy on the target disk. + Output only. [Output Only] Set to true if snapshots are + automatically created by applying resource policy on the + target disk. This field is a member of `oneof`_ ``_auto_created``. chain_name (str): @@ -123049,12 +141097,13 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_chain_name``. creation_size_bytes (int): - [Output Only] Size in bytes of the snapshot at creation - time. + Output only. [Output Only] Size in bytes of the snapshot at + creation time. This field is a member of `oneof`_ ``_creation_size_bytes``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -123064,18 +141113,19 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_description``. disk_size_gb (int): - [Output Only] Size of the source disk, specified in GB. + Output only. [Output Only] Size of the source disk, + specified in GB. This field is a member of `oneof`_ ``_disk_size_gb``. download_bytes (int): - [Output Only] Number of bytes downloaded to restore a - snapshot to a disk. + Output only. [Output Only] Number of bytes downloaded to + restore a snapshot to a disk. This field is a member of `oneof`_ ``_download_bytes``. enable_confidential_compute (bool): - Whether this snapshot is created from a confidential compute - mode disk. [Output Only]: This field is not set by user, but - from source disk. + Output only. Whether this snapshot is created from a + confidential compute mode disk. [Output Only]: This field is + not set by user, but from source disk. This field is a member of `oneof`_ ``_enable_confidential_compute``. guest_flush (bool): @@ -123085,18 +141135,18 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_guest_flush``. guest_os_features (MutableSequence[google.cloud.compute_v1beta.types.GuestOsFeature]): - [Output Only] A list of features to enable on the guest - operating system. Applicable only for bootable images. Read - Enabling guest operating system features to see a list of - available options. + Output only. [Output Only] A list of features to enable on + the guest operating system. Applicable only for bootable + images. Read Enabling guest operating system features to see + a list of available options. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always compute#snapshot - for Snapshot resources. + Output only. [Output Only] Type of the resource. Always + compute#snapshot for Snapshot resources. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -123108,33 +141158,35 @@ class Snapshot(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a snapshot. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a snapshot. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels to apply to this snapshot. These can - be later modified by the setLabels method. Label - values may be empty. + be later modified by the setLabels method. + Label values may be empty. license_codes (MutableSequence[int]): - [Output Only] Integer license codes indicating which - licenses are attached to this snapshot. + Output only. [Output Only] Integer license codes indicating + which licenses are attached to this snapshot. licenses (MutableSequence[str]): - [Output Only] A list of public visible licenses that apply - to this snapshot. This can be because the original image had - licenses attached (such as a Windows image). + Output only. [Output Only] A list of public visible licenses + that apply to this snapshot. This can be because the + original image had licenses attached (such as a Windows + image). location_hint (str): An opaque location hint used to place the - snapshot close to other resources. This field is - for use by internal tools that use the public - API. + snapshot close to other resources. + This field is for use by internal tools that use + the public API. This field is a member of `oneof`_ ``_location_hint``. name (str): Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -123148,8 +141200,8 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_params``. region (str): - [Output Only] URL of the region where the snapshot resides. - Only applicable for regional snapshots. + Output only. [Output Only] URL of the region where the + snapshot resides. Only applicable for regional snapshots. This field is a member of `oneof`_ ``_region``. satisfies_pzi (bool): @@ -123157,23 +141209,28 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_satisfies_pzi``. satisfies_pzs (bool): - [Output Only] Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzs``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - Encrypts the snapshot using a - customer-supplied encryption key. After you - encrypt a snapshot using a customer-supplied - key, you must provide the same key if you use - the snapshot later. For example, you must - provide the encryption key when you create a - disk from the encrypted snapshot in a future - request. Customer-supplied encryption keys do - not protect access to metadata of the snapshot. + Encrypts the snapshot using + acustomer-supplied encryption key. + + After you encrypt a snapshot using a + customer-supplied key, you must provide the same + key if you use the snapshot later. For example, + you must provide the encryption key when you + create a disk from the encrypted snapshot in a + future request. + + Customer-supplied encryption keys do not protect + access to metadata of the snapshot. + If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key @@ -123192,9 +141249,10 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_source_disk``. source_disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + The customer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_source_disk_encryption_key``. source_disk_for_recovery_checkpoint (str): @@ -123203,21 +141261,24 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_source_disk_for_recovery_checkpoint``. source_disk_id (str): - [Output Only] The ID value of the disk used to create this - snapshot. This value may be used to determine whether the - snapshot was taken from the current or a previous instance - of a given disk name. + Output only. [Output Only] The ID value of the disk used to + create this snapshot. This value may be used to determine + whether the snapshot was taken from the current or a + previous instance of a given disk name. This field is a member of `oneof`_ ``_source_disk_id``. source_instant_snapshot (str): The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the - following are valid values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instantSnapshots/instantSnapshot - - projects/project/zones/zone/instantSnapshots/instantSnapshot - - zones/zone/instantSnapshots/instantSnapshot + following are valid values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot + - + projects/project/zones/zone/instantSnapshots/instantSnapshot + - zones/zone/instantSnapshots/instantSnapshot This field is a member of `oneof`_ ``_source_instant_snapshot``. source_instant_snapshot_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): @@ -123226,45 +141287,45 @@ class Snapshot(proto.Message): This field is a member of `oneof`_ ``_source_instant_snapshot_encryption_key``. source_instant_snapshot_id (str): - [Output Only] The unique ID of the instant snapshot used to - create this snapshot. This value identifies the exact - instant snapshot that was used to create this snapshot. For - example, if you created the snapshot from an instant - snapshot that was later deleted and recreated under the same - name, the source instant snapshot ID would identify the - exact instant snapshot that was used. + Output only. [Output Only] The unique ID of the instant + snapshot used to create this snapshot. This value identifies + the exact instant snapshot that was used to create this + snapshot. For example, if you created the snapshot from an + instant snapshot that was later deleted and recreated under + the same name, the source instant snapshot ID would identify + the exact instant snapshot that was used. This field is a member of `oneof`_ ``_source_instant_snapshot_id``. source_snapshot_schedule_policy (str): - [Output Only] URL of the resource policy which created this - scheduled snapshot. + Output only. [Output Only] URL of the resource policy which + created this scheduled snapshot. This field is a member of `oneof`_ ``_source_snapshot_schedule_policy``. source_snapshot_schedule_policy_id (str): - [Output Only] ID of the resource policy which created this - scheduled snapshot. + Output only. [Output Only] ID of the resource policy which + created this scheduled snapshot. This field is a member of `oneof`_ ``_source_snapshot_schedule_policy_id``. status (str): - [Output Only] The status of the snapshot. This can be - CREATING, DELETING, FAILED, READY, or UPLOADING. Check the - Status enum for the list of possible values. + Output only. [Output Only] The status of the snapshot. This + can beCREATING, DELETING, FAILED,READY, or UPLOADING. Check + the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. storage_bytes (int): - [Output Only] A size of the storage used by the snapshot. As - snapshots share storage, this number is expected to change - with snapshot creation/deletion. + Output only. [Output Only] A size of the storage used by the + snapshot. As snapshots share storage, this number is + expected to change with snapshot creation/deletion. This field is a member of `oneof`_ ``_storage_bytes``. storage_bytes_status (str): - [Output Only] An indicator whether storageBytes is in a - stable state or it is being adjusted as a result of shared - storage reallocation. This status can either be UPDATING, - meaning the size of the snapshot is being updated, or - UP_TO_DATE, meaning the size of the snapshot is up-to-date. - Check the StorageBytesStatus enum for the list of possible - values. + Output only. [Output Only] An indicator whether storageBytes + is in a stable state or it is being adjusted as a result of + shared storage reallocation. This status can either be + UPDATING, meaning the size of the snapshot is being updated, + or UP_TO_DATE, meaning the size of the snapshot is + up-to-date. Check the StorageBytesStatus enum for the list + of possible values. This field is a member of `oneof`_ ``_storage_bytes_status``. storage_locations (MutableSequence[str]): @@ -123276,8 +141337,8 @@ class Snapshot(proto.Message): """ class Architecture(proto.Enum): - r"""[Output Only] The architecture of the snapshot. Valid values are - ARM64 or X86_64. + r"""Output only. [Output Only] The architecture of the snapshot. Valid + values are ARM64 or X86_64. Values: UNDEFINED_ARCHITECTURE (0): @@ -123313,8 +141374,8 @@ class SnapshotType(proto.Enum): STANDARD = 484642493 class Status(proto.Enum): - r"""[Output Only] The status of the snapshot. This can be CREATING, - DELETING, FAILED, READY, or UPLOADING. + r"""Output only. [Output Only] The status of the snapshot. This can + beCREATING, DELETING, FAILED,READY, or UPLOADING. Values: UNDEFINED_STATUS (0): @@ -123339,11 +141400,11 @@ class Status(proto.Enum): UPLOADING = 267603489 class StorageBytesStatus(proto.Enum): - r"""[Output Only] An indicator whether storageBytes is in a stable state - or it is being adjusted as a result of shared storage reallocation. - This status can either be UPDATING, meaning the size of the snapshot - is being updated, or UP_TO_DATE, meaning the size of the snapshot is - up-to-date. + r"""Output only. [Output Only] An indicator whether storageBytes is in a + stable state or it is being adjusted as a result of shared storage + reallocation. This status can either be UPDATING, meaning the size + of the snapshot is being updated, or UP_TO_DATE, meaning the size of + the snapshot is up-to-date. Values: UNDEFINED_STORAGE_BYTES_STATUS (0): @@ -123577,26 +141638,27 @@ class SnapshotAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SnapshotsScopedList]): A list of SnapshotsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#snapshotAggregatedList for aggregated lists of + Output only. [Output Only] Type of resource. + Alwayscompute#snapshotAggregatedList for aggregated lists of snapshots. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -123664,20 +141726,21 @@ class SnapshotList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Snapshot]): A list of Snapshot resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -123730,9 +141793,12 @@ class SnapshotParams(proto.Message): resource_manager_tags (MutableMapping[str, str]): Resource manager tags to be bound to the snapshot. Tag keys and values have the same definition as resource manager - tags. Keys must be in the format ``tagKeys/{tag_key_id}``, - and values are in the format ``tagValues/456``. The field is - ignored (both PUT & PATCH) when empty. + tags. Keys and values can be either in numeric format, such + as ``tagKeys/{tag_key_id}`` and ``tagValues/456`` or in + namespaced format such as + ``{org_id|project_id}/{tag_key_short_name}`` and + ``{tag_value_short_name}``. The field is ignored (both PUT & + PATCH) when empty. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -123967,20 +142033,23 @@ class SourceDiskEncryptionKey(proto.Message): Attributes: disk_encryption_key (google.cloud.compute_v1beta.types.CustomerEncryptionKey): - The customer-supplied encryption key of the - source disk. Required if the source disk is - protected by a customer-supplied encryption key. + Thecustomer-supplied + encryption key of the source disk. Required if + the source disk is protected by a + customer-supplied encryption key. This field is a member of `oneof`_ ``_disk_encryption_key``. source_disk (str): URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid - values: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /disks/disk - - projects/project/zones/zone/disks/disk - - zones/zone/disks/disk + values: + + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + - projects/project/zones/zone/disks/disk + - zones/zone/disks/disk This field is a member of `oneof`_ ``_source_disk``. """ @@ -124035,7 +142104,7 @@ class SourceInstanceProperties(proto.Message): their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave - this set to false. See the Enable IP forwarding + this set tofalse. See theEnable IP forwarding documentation for more information. This field is a member of `oneof`_ ``_can_ip_forward``. @@ -124079,7 +142148,7 @@ class SourceInstanceProperties(proto.Message): The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom - metadata or predefined keys. See Project and + metadata or predefined keys. SeeProject and instance metadata for more information. This field is a member of `oneof`_ ``_metadata``. @@ -124089,7 +142158,7 @@ class SourceInstanceProperties(proto.Message): may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: - "Intel Haswell" or minCpuPlatform: "Intel Sandy + "Intel Haswell" orminCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform. @@ -124121,7 +142190,7 @@ class SourceInstanceProperties(proto.Message): identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must - comply with RFC1035. + comply withRFC1035. This field is a member of `oneof`_ ``_tags``. """ @@ -124249,22 +142318,35 @@ class PostKeyRevocationActionType(proto.Enum): class SslCertificate(proto.Message): - r"""Represents an SSL certificate resource. Google Compute Engine has - two SSL certificate resources: \* - `Global `__ \* - `Regional `__ - The global SSL certificates (sslCertificates) are used by: - Global - external Application Load Balancers - Classic Application Load - Balancers - Proxy Network Load Balancers (with target SSL proxies) - The regional SSL certificates (regionSslCertificates) are used by: - - Regional external Application Load Balancers - Regional internal - Application Load Balancers Optionally, certificate file contents - that you upload can contain a set of up to five PEM-encoded - certificates. The API call creates an object (sslCertificate) that - holds this data. You can use SSL keys and certificates to secure - connections to a load balancer. For more information, read Creating - and using SSL certificates, SSL certificates quotas and limits, and - Troubleshooting SSL certificates. + r"""Represents an SSL certificate resource. + + Google Compute Engine has two SSL certificate resources: + + - `Global `__ + - `Regional `__ + + The global SSL certificates (sslCertificates) are used by: + + :: + + - Global external Application Load Balancers + - Classic Application Load Balancers + - Proxy Network Load Balancers (with target SSL proxies) + + The regional SSL certificates (regionSslCertificates) are used by: + + :: + + - Regional external Application Load Balancers + - Regional internal Application Load Balancers + + Optionally, certificate file contents that you upload can contain a + set of up to five PEM-encoded certificates. The API call creates an + object (sslCertificate) that holds this data. You can use SSL keys + and certificates to secure connections to a load balancer. For more + information, read Creating and using SSL certificates,SSL + certificates quotas and limits, and Troubleshooting SSL + certificates. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -124279,7 +142361,7 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_certificate``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -124289,7 +142371,8 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_description``. expire_time (str): - [Output Only] Expire time of the certificate. RFC3339 + Output only. [Output Only] Expire time of the certificate. + RFC3339 This field is a member of `oneof`_ ``_expire_time``. id (int): @@ -124298,8 +142381,8 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#sslCertificate for SSL certificates. + Output only. [Output Only] Type of the resource. + Alwayscompute#sslCertificate for SSL certificates. This field is a member of `oneof`_ ``_kind``. managed (google.cloud.compute_v1beta.types.SslCertificateManagedSslCertificate): @@ -124310,7 +142393,7 @@ class SslCertificate(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -124326,9 +142409,9 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_private_key``. region (str): - [Output Only] URL of the region where the regional SSL - Certificate resides. This field is not applicable to global - SSL Certificate. + Output only. [Output Only] URL of the region where the + regional SSL Certificate resides. This field is not + applicable to global SSL Certificate. This field is a member of `oneof`_ ``_region``. self_link (str): @@ -124341,12 +142424,12 @@ class SslCertificate(proto.Message): This field is a member of `oneof`_ ``_self_managed``. subject_alternative_names (MutableSequence[str]): - [Output Only] Domains associated with the certificate via - Subject Alternative Name. + Output only. [Output Only] Domains associated with the + certificate via Subject Alternative Name. type_ (str): (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the - certificate is self-managed and the fields certificate and + certificate is self-managed and the fieldscertificate and private_key are used. Check the Type enum for the list of possible values. @@ -124356,7 +142439,7 @@ class SslCertificate(proto.Message): class Type(proto.Enum): r"""(Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is - self-managed and the fields certificate and private_key are used. + self-managed and the fieldscertificate and private_key are used. Values: UNDEFINED_TYPE (0): @@ -124462,26 +142545,27 @@ class SslCertificateAggregatedList(proto.Message): A list of SslCertificatesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#sslCertificateAggregatedList for lists of SSL + Output only. [Output Only] Type of resource. + Alwayscompute#sslCertificateAggregatedList for lists of SSL Certificates. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -124544,20 +142628,21 @@ class SslCertificateList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.SslCertificate]): A list of SslCertificate resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -124610,22 +142695,24 @@ class SslCertificateManagedSslCertificate(proto.Message): Attributes: domain_status (MutableMapping[str, str]): - [Output only] Detailed statuses of the domains specified for - managed certificate resource. + Output only. [Output only] Detailed statuses of the domains + specified for managed certificate resource. domains (MutableSequence[str]): The domains for which a managed SSL certificate will be generated. Each Google-managed SSL certificate supports up to the `maximum number of domains per Google-managed SSL certificate `__. status (str): - [Output only] Status of the managed certificate resource. - Check the Status enum for the list of possible values. + Output only. [Output only] Status of the managed certificate + resource. Check the Status enum for the list of possible + values. This field is a member of `oneof`_ ``_status``. """ class Status(proto.Enum): - r"""[Output only] Status of the managed certificate resource. + r"""Output only. [Output only] Status of the managed certificate + resource. Values: UNDEFINED_STATUS (0): @@ -124759,25 +142846,27 @@ class SslPoliciesAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SslPoliciesScopedList]): A list of SslPoliciesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#sslPolicyAggregatedList for lists of SSL Policies. + Output only. [Output Only] Type of resource. + Alwayscompute#sslPolicyAggregatedList for lists of SSL + Policies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -124838,28 +142927,29 @@ class SslPoliciesList(proto.Message): Attributes: id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + Output only. [Output Only] Unique identifier for the + resource; defined by the server. This field is a member of `oneof`_ ``_id``. items (MutableSequence[google.cloud.compute_v1beta.types.SslPolicy]): - A list of SslPolicy resources. + Output only. A list of SslPolicy resources. kind (str): - [Output Only] Type of the resource. Always - compute#sslPoliciesList for lists of sslPolicies. + Output only. [Output Only] Type of the resource. + Alwayscompute#sslPoliciesList for lists of sslPolicies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -124949,25 +143039,28 @@ class SslPoliciesScopedList(proto.Message): class SslPolicy(proto.Message): - r"""Represents an SSL Policy resource. Use SSL policies to - control SSL features, such as versions and cipher suites, that - are offered by Application Load Balancers and proxy Network Load - Balancers. For more information, read SSL policies overview. + r"""Represents an SSL Policy resource. + + Use SSL policies to control SSL features, such as versions and + cipher suites, that are offered by Application Load Balancers + and proxy Network Load Balancers. For more information, read + SSL policies overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. custom_features (MutableSequence[str]): A list of features enabled when the selected - profile is CUSTOM. The method returns the set of - features that can be specified in this list. - This field must be empty if the profile is not - CUSTOM. + profile is CUSTOM. The method returns the set + of features that can be specified in this list. + This field must be empty if the profile is + notCUSTOM. description (str): An optional description of this resource. Provide this property when you create the @@ -124975,8 +143068,8 @@ class SslPolicy(proto.Message): This field is a member of `oneof`_ ``_description``. enabled_features (MutableSequence[str]): - [Output Only] The list of features enabled in the SSL - policy. + Output only. [Output Only] The list of features enabled in + the SSL policy. fingerprint (str): Fingerprint of this resource. A hash of the contents stored in this object. This field is @@ -124984,26 +143077,29 @@ class SslPolicy(proto.Message): ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve an SslPolicy. + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve an SslPolicy. This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output only] Type of the resource. Always - compute#sslPolicyfor SSL policies. + Output only. [Output only] Type of the resource. + Alwayscompute#sslPolicyfor SSL policies. This field is a member of `oneof`_ ``_kind``. min_tls_version (str): The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. - This can be one of TLS_1_0, TLS_1_1, TLS_1_2. Check the - MinTlsVersion enum for the list of possible values. + This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When + set to TLS_1_3, the profile field must be set to RESTRICTED. + Check the MinTlsVersion enum for the list of possible + values. This field is a member of `oneof`_ ``_min_tls_version``. name (str): @@ -125019,8 +143115,8 @@ class SslPolicy(proto.Message): profile (str): Profile specifies the set of SSL features that can be used by the load balancer when - negotiating SSL with clients. This can be one of - COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If + negotiating SSL with clients. This can be one + ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features to enable must be specified in the customFeatures field. Check the Profile enum for the list of possible @@ -125028,25 +143124,27 @@ class SslPolicy(proto.Message): This field is a member of `oneof`_ ``_profile``. region (str): - [Output Only] URL of the region where the regional SSL - policy resides. This field is not applicable to global SSL - policies. + Output only. [Output Only] URL of the region where the + regional SSL policy resides. This field is not applicable to + global SSL policies. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. warnings (MutableSequence[google.cloud.compute_v1beta.types.Warnings]): - [Output Only] If potential misconfigurations are detected - for this SSL policy, this field will be populated with - warning messages. + Output only. [Output Only] If potential misconfigurations + are detected for this SSL policy, this field will be + populated with warning messages. """ class MinTlsVersion(proto.Enum): r"""The minimum version of SSL protocol that can be used by the clients - to establish a connection with the load balancer. This can be one of - TLS_1_0, TLS_1_1, TLS_1_2. + to establish a connection with the load balancer. This can be one + ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the + profile field must be set to RESTRICTED. Values: UNDEFINED_MIN_TLS_VERSION (0): @@ -125058,18 +143156,21 @@ class MinTlsVersion(proto.Enum): TLS 1.1 TLS_1_2 (33116736): TLS 1.2 + TLS_1_3 (33116737): + TLS 1.3 """ UNDEFINED_MIN_TLS_VERSION = 0 TLS_1_0 = 33116734 TLS_1_1 = 33116735 TLS_1_2 = 33116736 + TLS_1_3 = 33116737 class Profile(proto.Enum): r"""Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be - one of COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using - CUSTOM, the set of SSL features to enable must be specified in - the customFeatures field. + one ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, + the set of SSL features to enable must be specified in the + customFeatures field. Values: UNDEFINED_PROFILE (0): @@ -125084,6 +143185,10 @@ class Profile(proto.Enum): Custom profile. Allow only the set of allowed SSL features specified in the customFeatures field. + FIPS_202205 (475828188): + FIPS compatible profile. Supports a reduced + set of SSL features, intended to meet FIPS 140-3 + compliance requirements. MODERN (132013855): Modern profile. Supports a wide set of SSL features, allowing modern clients to negotiate @@ -125096,6 +143201,7 @@ class Profile(proto.Enum): UNDEFINED_PROFILE = 0 COMPATIBLE = 179357396 CUSTOM = 388595569 + FIPS_202205 = 475828188 MODERN = 132013855 RESTRICTED = 261551195 @@ -125204,17 +143310,21 @@ class StartAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125266,17 +143376,21 @@ class StartAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125322,17 +143436,21 @@ class StartInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125377,21 +143495,25 @@ class StartInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -125441,17 +143563,21 @@ class StartInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125499,17 +143625,21 @@ class StartWithEncryptionKeyInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125617,7 +143747,7 @@ class StatefulPolicyPreservedStateDiskDevice(proto.Message): flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached - in READ_ONLY mode cannot be auto-deleted. Check the + inREAD_ONLY mode cannot be auto-deleted. Check the AutoDelete enum for the list of possible values. This field is a member of `oneof`_ ``_auto_delete``. @@ -125628,7 +143758,7 @@ class AutoDelete(proto.Enum): update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is - deleted. Note: disks attached in READ_ONLY mode cannot be + deleted. Note: disks attached inREAD_ONLY mode cannot be auto-deleted. Values: @@ -125664,18 +143794,19 @@ class StatefulPolicyPreservedStateNetworkIp(proto.Message): configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group - is deleted. Check the AutoDelete enum for the - list of possible values. + is deleted. + Check the AutoDelete enum for the list of + possible values. This field is a member of `oneof`_ ``_auto_delete``. """ class AutoDelete(proto.Enum): r"""These stateful IPs will never be released during autohealing, - update or VM instance recreate operations. This flag is used to - configure if the IP reservation should be deleted after it is no - longer used by the group, e.g. when the given instance or the - whole group is deleted. + update or VM instance recreate operations. + This flag is used to configure if the IP reservation should be + deleted after it is no longer used by the group, e.g. when the + given instance or the whole group is deleted. Values: UNDEFINED_AUTO_DELETE (0): @@ -125702,8 +143833,10 @@ class Status(proto.Message): for different programming environments, including REST APIs and RPC APIs. It is used by `gRPC `__. Each ``Status`` message contains three pieces of data: error code, error - message, and error details. You can find out more about this error - model and how to work with it in the `API Design + message, and error details. + + You can find out more about this error model and how to work with it + in the `API Design Guide `__. @@ -125717,7 +143850,7 @@ class Status(proto.Message): This field is a member of `oneof`_ ``_code``. details (MutableSequence[google.protobuf.any_pb2.Any]): A list of messages that carry the error - details. There is a common set of message types + details. There is a common set of message types for APIs to use. message (str): A developer-facing error message, which @@ -125763,17 +143896,21 @@ class StopAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125818,17 +143955,21 @@ class StopAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125869,17 +144010,21 @@ class StopGroupAsyncReplicationDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -125929,17 +144074,21 @@ class StopGroupAsyncReplicationRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -125993,17 +144142,21 @@ class StopInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -126058,21 +144211,25 @@ class StopInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -126122,17 +144279,21 @@ class StopInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -126174,7 +144335,8 @@ class StoragePool(proto.Message): This field is a member of `oneof`_ ``_capacity_provisioning_type``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -126183,13 +144345,18 @@ class StoragePool(proto.Message): resource. This field is a member of `oneof`_ ``_description``. + exapool_provisioned_capacity_gb (google.cloud.compute_v1beta.types.StoragePoolExapoolProvisionedCapacityGb): + Output only. [Output Only] Provisioned capacities for each + SKU for this Exapool in GiB + + This field is a member of `oneof`_ ``_exapool_provisioned_capacity_gb``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always + Output only. [Output Only] Type of the resource. Always compute#storagePool for storage pools. This field is a member of `oneof`_ ``_kind``. @@ -126202,9 +144369,10 @@ class StoragePool(proto.Message): to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a storage pool. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a storage pool. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): @@ -126213,7 +144381,7 @@ class StoragePool(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -126247,31 +144415,38 @@ class StoragePool(proto.Message): This field is a member of `oneof`_ ``_pool_provisioned_throughput``. resource_status (google.cloud.compute_v1beta.types.StoragePoolResourceStatus): - [Output Only] Status information for the storage pool - resource. + Output only. [Output Only] Status information for the + storage pool resource. This field is a member of `oneof`_ ``_resource_status``. self_link (str): - [Output Only] Server-defined fully-qualified URL for this - resource. + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource's - resource id. + Output only. [Output Only] Server-defined URL for this + resource's resource id. This field is a member of `oneof`_ ``_self_link_with_id``. state (str): - [Output Only] The status of storage pool creation. - - CREATING: Storage pool is provisioning. storagePool. - - FAILED: Storage pool creation failed. - READY: Storage pool - is ready for use. - DELETING: Storage pool is deleting. + Output only. [Output Only] The status of storage pool + creation. + + :: + + - CREATING: Storage pool is provisioning. + storagePool. + - FAILED: Storage pool creation failed. + - READY: Storage pool is ready for use. + - DELETING: Storage pool is deleting. + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. status (google.cloud.compute_v1beta.types.StoragePoolResourceStatus): - [Output Only] Status information for the storage pool - resource. + Output only. [Output Only] Status information for the + storage pool resource. This field is a member of `oneof`_ ``_status``. storage_pool_type (str): @@ -126279,10 +144454,10 @@ class StoragePool(proto.Message): This field is a member of `oneof`_ ``_storage_pool_type``. zone (str): - [Output Only] URL of the zone where the storage pool - resides. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + Output only. [Output Only] URL of the zone where the storage + pool resides. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_zone``. """ @@ -126305,9 +144480,9 @@ class CapacityProvisioningType(proto.Enum): class PerformanceProvisioningType(proto.Enum): r"""Provisioning type of the performance-related parameters of - the pool, such as throughput and IOPS. Additional supported - values which may be not listed in the enum directly due to - technical reasons: + the pool, such as throughput and IOPS. + Additional supported values which may be not listed in the enum + directly due to technical reasons: ADVANCED STANDARD @@ -126321,10 +144496,15 @@ class PerformanceProvisioningType(proto.Enum): UNDEFINED_PERFORMANCE_PROVISIONING_TYPE = 0 class State(proto.Enum): - r"""[Output Only] The status of storage pool creation. - CREATING: - Storage pool is provisioning. storagePool. - FAILED: Storage pool - creation failed. - READY: Storage pool is ready for use. - DELETING: - Storage pool is deleting. + r"""Output only. [Output Only] The status of storage pool creation. + + :: + + - CREATING: Storage pool is provisioning. + storagePool. + - FAILED: Storage pool creation failed. + - READY: Storage pool is ready for use. + - DELETING: Storage pool is deleting. Values: UNDEFINED_STATE (0): @@ -126360,6 +144540,14 @@ class State(proto.Enum): number=422937596, optional=True, ) + exapool_provisioned_capacity_gb: "StoragePoolExapoolProvisionedCapacityGb" = ( + proto.Field( + proto.MESSAGE, + number=345174240, + optional=True, + message="StoragePoolExapoolProvisionedCapacityGb", + ) + ) id: int = proto.Field( proto.UINT64, number=3355, @@ -126461,26 +144649,27 @@ class StoragePoolAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.StoragePoolsScopedList]): A list of StoragePoolsScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolAggregatedList for aggregated lists of - storage pools. + Output only. [Output Only] Type of resource. + Alwayscompute#storagePoolAggregatedList for aggregated lists + of storage pools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -126541,51 +144730,55 @@ class StoragePoolDisk(proto.Message): Attributes: attached_instances (MutableSequence[str]): - [Output Only] Instances this disk is attached to. + Output only. [Output Only] Instances this disk is attached + to. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. disk (str): - [Output Only] The URL of the disk. + Output only. [Output Only] The URL of the disk. This field is a member of `oneof`_ ``_disk``. name (str): - [Output Only] The name of the disk. + Output only. [Output Only] The name of the disk. This field is a member of `oneof`_ ``_name``. provisioned_iops (int): - [Output Only] The number of IOPS provisioned for the disk. + Output only. [Output Only] The number of IOPS provisioned + for the disk. This field is a member of `oneof`_ ``_provisioned_iops``. provisioned_throughput (int): - [Output Only] The throughput provisioned for the disk. + Output only. [Output Only] The throughput provisioned for + the disk. This field is a member of `oneof`_ ``_provisioned_throughput``. resource_policies (MutableSequence[str]): - [Output Only] Resource policies applied to disk for - automatic snapshot creations. + Output only. [Output Only] Resource policies applied to disk + for automatic snapshot creations. size_gb (int): - [Output Only] The disk size, in GB. + Output only. [Output Only] The disk size, in GB. This field is a member of `oneof`_ ``_size_gb``. status (str): - [Output Only] The disk status. Check the Status enum for the - list of possible values. + Output only. [Output Only] The disk status. Check the Status + enum for the list of possible values. This field is a member of `oneof`_ ``_status``. type_ (str): - [Output Only] The disk type. + Output only. [Output Only] The disk type. This field is a member of `oneof`_ ``_type``. used_bytes (int): - [Output Only] Amount of disk space used. + Output only. [Output Only] Amount of disk space used. This field is a member of `oneof`_ ``_used_bytes``. """ class Status(proto.Enum): - r"""[Output Only] The disk status. + r"""Output only. [Output Only] The disk status. Values: UNDEFINED_STATUS (0): @@ -126668,6 +144861,46 @@ class Status(proto.Enum): ) +class StoragePoolExapoolProvisionedCapacityGb(proto.Message): + r"""Exapool provisioned capacities for each SKU type + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + capacity_optimized (int): + Output only. Size, in GiB, of provisioned + capacity-optimized capacity for this Exapool + + This field is a member of `oneof`_ ``_capacity_optimized``. + read_optimized (int): + Output only. Size, in GiB, of provisioned + read-optimized capacity for this Exapool + + This field is a member of `oneof`_ ``_read_optimized``. + write_optimized (int): + Output only. Size, in GiB, of provisioned + write-optimized capacity for this Exapool + + This field is a member of `oneof`_ ``_write_optimized``. + """ + + capacity_optimized: int = proto.Field( + proto.INT64, + number=251131874, + optional=True, + ) + read_optimized: int = proto.Field( + proto.INT64, + number=389863870, + optional=True, + ) + write_optimized: int = proto.Field( + proto.INT64, + number=492523719, + optional=True, + ) + + class StoragePoolList(proto.Message): r"""A list of StoragePool resources. @@ -126685,26 +144918,27 @@ class StoragePoolList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.StoragePool]): A list of StoragePool resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#storagePoolList for lists of storagePools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -126767,36 +145001,37 @@ class StoragePoolListDisks(proto.Message): This field is a member of `oneof`_ ``_etag``. id (str): - [Output Only] Unique identifier for the resource; defined by - the server. + Output only. [Output Only] Unique identifier for the + resource; defined by the server. This field is a member of `oneof`_ ``_id``. items (MutableSequence[google.cloud.compute_v1beta.types.StoragePoolDisk]): A list of StoragePoolDisk resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolListDisks for lists of disks in a + Output only. [Output Only] Type of resource. + Alwayscompute#storagePoolListDisks for lists of disks in a storagePool. This field is a member of `oneof`_ ``_kind``. next_page_token (str): - [Output Only] This token allows you to get the next page of - results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for - the query parameter pageToken in the next list request. - Subsequent list requests will have their own nextPageToken - to continue paging through the results. + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): - [Output Only] Informational warning message. + Output only. [Output Only] Informational warning message. This field is a member of `oneof`_ ``_warning``. """ @@ -126857,9 +145092,29 @@ class StoragePoolResourceStatus(proto.Message): [Output Only] Number of disks used. This field is a member of `oneof`_ ``_disk_count``. + exapool_max_read_iops (int): + Output only. [Output Only] Maximum allowed read IOPS for + this Exapool. + + This field is a member of `oneof`_ ``_exapool_max_read_iops``. + exapool_max_read_throughput (int): + Output only. [Output Only] Maximum allowed read throughput + in MiB/s for this Exapool. + + This field is a member of `oneof`_ ``_exapool_max_read_throughput``. + exapool_max_write_iops (int): + Output only. [Output Only] Maximum allowed write IOPS for + this Exapool. + + This field is a member of `oneof`_ ``_exapool_max_write_iops``. + exapool_max_write_throughput (int): + Output only. [Output Only] Maximum allowed write throughput + in MiB/s for this Exapool. + + This field is a member of `oneof`_ ``_exapool_max_write_throughput``. last_resize_timestamp (str): - [Output Only] Timestamp of the last successful resize in - RFC3339 text format. + Output only. [Output Only] Timestamp of the last successful + resize inRFC3339 text format. This field is a member of `oneof`_ ``_last_resize_timestamp``. max_total_provisioned_disk_capacity_gb (int): @@ -126913,6 +145168,26 @@ class StoragePoolResourceStatus(proto.Message): number=182933485, optional=True, ) + exapool_max_read_iops: int = proto.Field( + proto.INT64, + number=59241794, + optional=True, + ) + exapool_max_read_throughput: int = proto.Field( + proto.INT64, + number=390933251, + optional=True, + ) + exapool_max_write_iops: int = proto.Field( + proto.INT64, + number=293212537, + optional=True, + ) + exapool_max_write_throughput: int = proto.Field( + proto.INT64, + number=330367482, + optional=True, + ) last_resize_timestamp: str = proto.Field( proto.STRING, number=500825556, @@ -126967,7 +145242,7 @@ class StoragePoolType(proto.Message): Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -126985,8 +145260,8 @@ class StoragePoolType(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#storagePoolType for storage pool types. + Output only. [Output Only] Type of the resource. + Alwayscompute#storagePoolType for storage pool types. This field is a member of `oneof`_ ``_kind``. max_pool_provisioned_capacity_gb (int): @@ -127027,8 +145302,8 @@ class StoragePoolType(proto.Message): This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL for this resource with the - resource id. + Output only. [Output Only] Server-defined URL for this + resource with the resource id. This field is a member of `oneof`_ ``_self_link_with_id``. supported_disk_types (MutableSequence[str]): @@ -127145,21 +145420,22 @@ class StoragePoolTypeAggregatedList(proto.Message): A list of StoragePoolTypesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolTypeAggregatedList . + Output only. [Output Only] Type of resource. + Alwayscompute#storagePoolTypeAggregatedList. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -127220,21 +145496,22 @@ class StoragePoolTypeList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.StoragePoolType]): A list of StoragePoolType resources. kind (str): - [Output Only] Type of resource. Always - compute#storagePoolTypeList for storage pool types. + Output only. [Output Only] Type of resource. + Alwayscompute#storagePoolTypeList for storage pool types. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -127357,11 +145634,12 @@ class StructuredEntries(proto.Message): class Subnetwork(proto.Message): - r"""Represents a Subnetwork resource. A subnetwork (also known as - a subnet) is a logical partition of a Virtual Private Cloud - network with one primary IP range and zero or more secondary IP - ranges. For more information, read Virtual Private Cloud (VPC) - Network. + r"""Represents a Subnetwork resource. + + A subnetwork (also known as a subnet) is a logical partition of + a Virtual Private Cloud network with one primary IP range and + zero or more secondary IP ranges. For more information, read + Virtual Private Cloud (VPC) Network. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -127372,23 +145650,31 @@ class Subnetwork(proto.Message): static routes. Setting this to true allows this subnetwork's primary and secondary ranges to overlap with (and contain) static routes that have already been configured on the - corresponding network. For example if a static route has - range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be - created if allow_conflicting_routes=true. Overlapping is - only allowed on subnetwork operations; routes whose ranges - conflict with this subnetwork's ranges won't be allowed - unless route.allow_conflicting_subnetworks is set to true. + corresponding network. + + For example if a static route has range 10.1.0.0/16, a + subnet range 10.0.0.0/8 could only be created if + allow_conflicting_routes=true. + + Overlapping is only allowed on subnetwork operations; routes + whose ranges conflict with this subnetwork's ranges won't be + allowed unless route.allow_conflicting_subnetworks is set to + true. + Typically packets destined to IPs within the subnetwork (which may contain private/sensitive data) are prevented from leaving the virtual network. Setting this field to true - will disable this feature. The default value is false and - applies to all existing subnetworks and automatically - created subnetworks. This field cannot be set to true at - resource creation time. + will disable this feature. + + The default value is false and applies to all existing + subnetworks and automatically created subnetworks. + + This field cannot be set to true at resource creation time. This field is a member of `oneof`_ ``_allow_subnet_cidr_routes_overlap``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -127404,7 +145690,8 @@ class Subnetwork(proto.Message): listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the - subnet purpose field is set to REGIONAL_MANAGED_PROXY. + subnet purpose field is set toREGIONAL_MANAGED_PROXY. It is + recommended to uselogConfig.enable field instead. This field is a member of `oneof`_ ``_enable_flow_logs``. external_ipv6_prefix (str): @@ -127419,19 +145706,21 @@ class Subnetwork(proto.Message): ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request - will fail with error 412 conditionNotMet. To see - the latest fingerprint, make a get() request to - retrieve a Subnetwork. + will fail with error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a Subnetwork. This field is a member of `oneof`_ ``_fingerprint``. gateway_address (str): - [Output Only] The gateway address for default routes to - reach destination addresses outside this subnetwork. + Output only. [Output Only] The gateway address for default + routes to reach destination addresses outside this + subnetwork. This field is a member of `oneof`_ ``_gateway_address``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. internal_ipv6_prefix (str): @@ -127442,28 +145731,36 @@ class Subnetwork(proto.Message): ip_cidr_range (str): The range of internal addresses that are owned by this subnetwork. Provide this property - when you create the subnetwork. For example, - 10.0.0.0/8 or 100.64.0.0/10. Ranges must be - unique and non-overlapping within a network. + when you create the subnetwork. For + example,10.0.0.0/8 or 100.64.0.0/10. Ranges must + be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any - range listed in the Valid ranges list. The range - can be expanded after creation using - expandIpCidrRange. + range listed in theValid + ranges list. The range can be expanded after + creation usingexpandIpCidrRange. This field is a member of `oneof`_ ``_ip_cidr_range``. ip_collection (str): Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in - EXTERNAL_IPV6_SUBNETWORK_CREATION mode. Use one of the - following formats to specify a sub-PDP when creating a dual - stack subnetwork with external access using BYOIP: - Full - resource URL, as in - https://www.googleapis.com/compute/v1/projects/projectId/regions/region - /publicDelegatedPrefixes/sub-pdp-name - Partial URL, as in - - projects/projectId/regions/region/publicDelegatedPrefixes/ - sub-pdp-name - - regions/region/publicDelegatedPrefixes/sub-pdp-name + EXTERNAL_IPV6_SUBNETWORK_CREATION or + INTERNAL_IPV6_SUBNETWORK_CREATION mode. + + Use one of the following formats to specify a sub-PDP when + creating a dual stack or IPv6-only subnetwork with external + access using BYOIP: + + :: + + - + Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name + - + Partial URL, as in + + + - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name + - regions/region/publicDelegatedPrefixes/sub-pdp-name This field is a member of `oneof`_ ``_ip_collection``. ipv6_access_type (str): @@ -127475,25 +145772,29 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_ipv6_access_type``. ipv6_cidr_range (str): - [Output Only] This field is for internal use. + Output only. [Output Only] This field is for internal use. This field is a member of `oneof`_ ``_ipv6_cidr_range``. ipv6_gce_endpoint (str): - [Output Only] Possible endpoints of this subnetwork. It can - be one of the following: - VM_ONLY: The subnetwork can be - used for creating instances and IPv6 addresses with VM - endpoint type. Such a subnetwork gets external IPv6 ranges - from a public delegated prefix and cannot be used to create - NetLb. - VM_AND_FR: The subnetwork can be used for creating - both VM instances and Forwarding Rules. It can also be used - to reserve IPv6 addresses with both VM and FR endpoint - types. Such a subnetwork gets its IPv6 range from Google IP - Pool directly. Check the Ipv6GceEndpoint enum for the list - of possible values. + Output only. [Output Only] Possible endpoints of this + subnetwork. It can be one of the following: + + :: + + - VM_ONLY: The subnetwork can be used for creating instances and + IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 + ranges from a public delegated prefix and cannot be used to create NetLb. + - VM_AND_FR: The subnetwork can be used for creating both VM + instances and Forwarding Rules. It can also be used to reserve IPv6 + addresses with both VM and FR endpoint types. Such a subnetwork gets its + IPv6 range from Google IP Pool directly. + + Check the Ipv6GceEndpoint enum for the list of possible + values. This field is a member of `oneof`_ ``_ipv6_gce_endpoint``. kind (str): - [Output Only] Type of the resource. Always + Output only. [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. This field is a member of `oneof`_ ``_kind``. @@ -127506,7 +145807,7 @@ class Subnetwork(proto.Message): name (str): The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 - characters long, and comply with RFC1035. Specifically, the + characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all @@ -127535,9 +145836,10 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_private_ip_google_access``. private_ipv6_google_access (str): - This field is for internal use. This field - can be both set at resource creation time and - updated using patch. Check the + This field is for internal use. + + This field can be both set at resource creation + time and updated usingpatch. Check the PrivateIpv6GoogleAccess enum for the list of possible values. @@ -127565,8 +145867,8 @@ class Subnetwork(proto.Message): This field is a member of `oneof`_ ``_resolve_subnet_mask``. role (str): The role of subnetwork. Currently, this field is only used - when purpose is set to GLOBAL_MANAGED_PROXY or - REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + when purpose is set to GLOBAL_MANAGED_PROXY + orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or @@ -127582,30 +145884,32 @@ class Subnetwork(proto.Message): belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be - updated with a patch request. + updated with apatch request. self_link (str): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. stack_type (str): The stack type for the subnet. If set to IPV4_ONLY, new VMs - in the subnet are assigned IPv4 addresses only. If set to - IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 + in the subnet are assigned IPv4 addresses only. If set + toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. + This field can be both set at resource creation time and - updated using patch. Check the StackType enum for the list - of possible values. + updated usingpatch. Check the StackType enum for the list of + possible values. This field is a member of `oneof`_ ``_stack_type``. state (str): - [Output Only] The state of the subnetwork, which can be one - of the following values: READY: Subnetwork is created and - ready to use DRAINING: only applicable to subnetworks that - have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and - indicates that connections to the load balancer are being - drained. A subnetwork that is draining cannot be used or - modified until it reaches a status of READY Check the State - enum for the list of possible values. + Output only. [Output Only] The state of the subnetwork, + which can be one of the following values:READY: Subnetwork + is created and ready to useDRAINING: only applicable to + subnetworks that have the purpose set to + INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections + to the load balancer are being drained. A subnetwork that is + draining cannot be used or modified until it reaches a + status ofREADY Check the State enum for the list of possible + values. This field is a member of `oneof`_ ``_state``. system_reserved_external_ipv6_ranges (MutableSequence[str]): @@ -127650,15 +145954,18 @@ class Ipv6AccessType(proto.Enum): UNSPECIFIED_IPV6_ACCESS_TYPE = 313080613 class Ipv6GceEndpoint(proto.Enum): - r"""[Output Only] Possible endpoints of this subnetwork. It can be one - of the following: - VM_ONLY: The subnetwork can be used for creating - instances and IPv6 addresses with VM endpoint type. Such a - subnetwork gets external IPv6 ranges from a public delegated prefix - and cannot be used to create NetLb. - VM_AND_FR: The subnetwork can - be used for creating both VM instances and Forwarding Rules. It can - also be used to reserve IPv6 addresses with both VM and FR endpoint - types. Such a subnetwork gets its IPv6 range from Google IP Pool - directly. + r"""Output only. [Output Only] Possible endpoints of this subnetwork. It + can be one of the following: + + :: + + - VM_ONLY: The subnetwork can be used for creating instances and + IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 + ranges from a public delegated prefix and cannot be used to create NetLb. + - VM_AND_FR: The subnetwork can be used for creating both VM + instances and Forwarding Rules. It can also be used to reserve IPv6 + addresses with both VM and FR endpoint types. Such a subnetwork gets its + IPv6 range from Google IP Pool directly. Values: UNDEFINED_IPV6_GCE_ENDPOINT (0): @@ -127674,8 +145981,10 @@ class Ipv6GceEndpoint(proto.Enum): VM_ONLY = 236773428 class PrivateIpv6GoogleAccess(proto.Enum): - r"""This field is for internal use. This field can be both set at - resource creation time and updated using patch. + r"""This field is for internal use. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS (0): @@ -127760,9 +146069,9 @@ class ResolveSubnetMask(proto.Enum): class Role(proto.Enum): r"""The role of subnetwork. Currently, this field is only used when - purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. - The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is - one that is currently being used for Envoy-based load balancers in a + purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The + value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one + that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. @@ -127783,10 +146092,12 @@ class Role(proto.Enum): class StackType(proto.Enum): r"""The stack type for the subnet. If set to IPV4_ONLY, new VMs in the - subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new - VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If - not specified, IPV4_ONLY is used. This field can be both set at - resource creation time and updated using patch. + subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs + in the subnet can be assigned both IPv4 and IPv6 addresses. If not + specified, IPV4_ONLY is used. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_STACK_TYPE (0): @@ -127799,7 +146110,7 @@ class StackType(proto.Enum): New VMs in this subnet will only be assigned IPv4 addresses. IPV6_ONLY (79632100): - New VMs in this subnet will only be assigned + New VMs in this subnet will only be assigned IPv6 addresses. UNSPECIFIED_STACK_TYPE (298084569): No description available. @@ -127811,12 +146122,13 @@ class StackType(proto.Enum): UNSPECIFIED_STACK_TYPE = 298084569 class State(proto.Enum): - r"""[Output Only] The state of the subnetwork, which can be one of the - following values: READY: Subnetwork is created and ready to use - DRAINING: only applicable to subnetworks that have the purpose set - to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to - the load balancer are being drained. A subnetwork that is draining - cannot be used or modified until it reaches a status of READY + r"""Output only. [Output Only] The state of the subnetwork, which can be + one of the following values:READY: Subnetwork is created and ready + to useDRAINING: only applicable to subnetworks that have the purpose + set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections + to the load balancer are being drained. A subnetwork that is + draining cannot be used or modified until it reaches a status + ofREADY Values: UNDEFINED_STATE (0): @@ -128015,26 +146327,27 @@ class SubnetworkAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.SubnetworksScopedList]): A list of SubnetworksScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#subnetworkAggregatedList for aggregated lists of - subnetworks. + Output only. [Output Only] Type of resource. + Alwayscompute#subnetworkAggregatedList for aggregated lists + of subnetworks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -128097,21 +146410,22 @@ class SubnetworkList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Subnetwork]): A list of Subnetwork resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -128204,7 +146518,7 @@ class SubnetworkLogConfig(proto.Message): Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow - logs. Default is EXCLUDE_ALL_METADATA. Check the Metadata + logs. Default isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values. This field is a member of `oneof`_ ``_metadata``. @@ -128248,8 +146562,8 @@ class AggregationInterval(proto.Enum): class Metadata(proto.Enum): r"""Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields - should be added to the reported VPC flow logs. Default is - EXCLUDE_ALL_METADATA. + should be added to the reported VPC flow logs. Default + isEXCLUDE_ALL_METADATA. Values: UNDEFINED_METADATA (0): @@ -128308,11 +146622,15 @@ class SubnetworkParams(proto.Message): tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are - valid inputs: \* {"tagKeys/333" : "tagValues/444", - "tagKeys/123" : "tagValues/456"} \* {"123/environment" : - "production", "345/abc" : "xyz"} Note: \* Invalid - combinations of ID & namespaced format is not supported. For - instance: {"123/environment" : "tagValues/444"} is invalid. + valid inputs: + + - {"tagKeys/333" : "tagValues/444", "tagKeys/123" : + "tagValues/456"} + - {"123/environment" : "production", "345/abc" : "xyz"} + Note: + - Invalid combinations of ID & namespaced format is not + supported. For instance: {"123/environment" : + "tagValues/444"} is invalid. """ resource_manager_tags: MutableMapping[str, str] = proto.MapField( @@ -128335,14 +146653,15 @@ class SubnetworkSecondaryRange(proto.Message): must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. The range can - be any range listed in the Valid ranges list. + be any range listed in theValid + ranges list. This field is a member of `oneof`_ ``_ip_cidr_range``. range_name (str): The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 - characters long, and comply with RFC1035. The + characters long, and comply withRFC1035. The name must be unique within the subnetwork. This field is a member of `oneof`_ ``_range_name``. @@ -128594,9 +146913,9 @@ class SubnetworksSetPrivateIpGoogleAccessRequest(proto.Message): class Subsetting(proto.Message): - r"""Subsetting configuration for this BackendService. Currently - this is applicable only for Internal TCP/UDP load balancing, - Internal HTTP(S) load balancing and Traffic Director. + r"""Subsetting configuration for this BackendService. + Currently this is applicable only for Internal TCP/UDP load + balancing, Internal HTTP(S) load balancing and Traffic Director. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -128609,18 +146928,23 @@ class Subsetting(proto.Message): This field is a member of `oneof`_ ``_policy``. subset_size (int): The number of backends per backend group assigned to each - proxy instance or each service mesh client. An input - parameter to the ``CONSISTENT_HASH_SUBSETTING`` algorithm. - Can only be set if ``policy`` is set to + proxy instance or each service mesh client. + + An input parameter to the ``CONSISTENT_HASH_SUBSETTING`` + algorithm. Can only be set if ``policy`` is set to ``CONSISTENT_HASH_SUBSETTING``. Can only be set if load balancing scheme is ``INTERNAL_MANAGED`` or - ``INTERNAL_SELF_MANAGED``. ``subset_size`` is optional for - Internal HTTP(S) load balancing and required for Traffic - Director. If you do not provide this value, Cloud Load - Balancing will calculate it dynamically to optimize the - number of proxies/clients visible to each backend and vice - versa. Must be greater than 0. If ``subset_size`` is larger - than the number of backends/endpoints, then subsetting is + ``INTERNAL_SELF_MANAGED``. + + ``subset_size`` is optional for Internal HTTP(S) load + balancing and required for Traffic Director. + + If you do not provide this value, Cloud Load Balancing will + calculate it dynamically to optimize the number of + proxies/clients visible to each backend and vice versa. + + Must be greater than 0. If ``subset_size`` is larger than + the number of backends/endpoints, then subsetting is disabled. This field is a member of `oneof`_ ``_subset_size``. @@ -128634,23 +146958,31 @@ class Policy(proto.Enum): A value indicating that the enum field is not set. CONSISTENT_HASH_SUBSETTING (108989492): - Subsetting based on consistent hashing. For Traffic - Director, the number of backends per backend group (the - subset size) is based on the ``subset_size`` parameter. For - Internal HTTP(S) load balancing, the number of backends per - backend group (the subset size) is dynamically adjusted in - two cases: - As the number of proxy instances participating - in Internal HTTP(S) load balancing increases, the subset - size decreases. - When the total number of backends in a - network exceeds the capacity of a single proxy instance, - subset sizes are reduced automatically for each service that - has backend subsetting enabled. + Subsetting based on consistent hashing. + + For Traffic Director, the number of backends per backend + group (the subset size) is based on the ``subset_size`` + parameter. + + For Internal HTTP(S) load balancing, the number of backends + per backend group (the subset size) is dynamically adjusted + in two cases: + + - As the number of proxy instances participating in Internal + HTTP(S) load balancing increases, the subset size + decreases. + - When the total number of backends in a network exceeds the + capacity of a single proxy instance, subset sizes are + reduced automatically for each service that has backend + subsetting enabled. NONE (2402104): - No Subsetting. Clients may open connections - and send traffic to all backends of this backend - service. This can lead to performance issues if - there is substantial imbalance in the count of - clients and backends. + No Subsetting. + + Clients may open connections and send traffic to + all backends of this backend service. This can + lead to performance issues if there is + substantial imbalance in the count of clients + and backends. """ UNDEFINED_POLICY = 0 CONSISTENT_HASH_SUBSETTING = 108989492 @@ -128693,17 +147025,21 @@ class SuspendInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -128753,21 +147089,25 @@ class SuspendInstancesInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed + The name of thezone where the managed instance group is located. """ @@ -128817,17 +147157,21 @@ class SuspendInstancesRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -128873,17 +147217,21 @@ class SwitchToCustomModeNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -128912,7 +147260,7 @@ class TCPHealthCheck(proto.Message): port (int): The TCP port number to which the health check prober sends packets. The default value is 80. - Valid values are 1 through 65535. + Valid values are 1 through65535. This field is a member of `oneof`_ ``_port``. port_name (str): @@ -128922,7 +147270,7 @@ class TCPHealthCheck(proto.Message): port_specification (str): Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a - port number explicitly using the port field in the health + port number explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all @@ -128935,14 +147283,16 @@ class TCPHealthCheck(proto.Message): service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports - all backends that can be health checked; for example, - GCE_VM_IP_PORT network endpoint groups and instance group - backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified - for each endpoint in the network endpoint group. For - instance group backends, the health check uses the port - number determined by looking up the backend service's named - port in the instance group's list of named ports. Check the + all backends that can be health checked; for + example,GCE_VM_IP_PORT network endpoint groups and instance + group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the + health check uses the port number specified for each + endpoint in the network endpoint group. For instance group + backends, the health check uses the port number determined + by looking up the backend service's named port in the + instance group's list of named ports. Check the PortSpecification enum for the list of possible values. This field is a member of `oneof`_ ``_port_specification``. @@ -128966,6 +147316,7 @@ class TCPHealthCheck(proto.Message): the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: + https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp This field is a member of `oneof`_ ``_response``. @@ -128974,7 +147325,7 @@ class TCPHealthCheck(proto.Message): class PortSpecification(proto.Enum): r"""Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number - explicitly using the port field in the health check. Supported by + explicitly using theport field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service @@ -128986,13 +147337,14 @@ class PortSpecification(proto.Enum): supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health - checked; for example, GCE_VM_IP_PORT network endpoint groups and - instance group backends. For GCE_VM_IP_PORT network endpoint group - backends, the health check uses the port number specified for each - endpoint in the network endpoint group. For instance group backends, - the health check uses the port number determined by looking up the - backend service's named port in the instance group's list of named - ports. + checked; for example,GCE_VM_IP_PORT network endpoint groups and + instance group backends. + + For GCE_VM_IP_PORT network endpoint group backends, the health check + uses the port number specified for each endpoint in the network + endpoint group. For instance group backends, the health check uses + the port number determined by looking up the backend service's named + port in the instance group's list of named ports. Values: UNDEFINED_PORT_SPECIFICATION (0): @@ -129081,8 +147433,10 @@ class Tags(proto.Message): Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update - or change tags. To see the latest fingerprint, - make get() request to the instance. + or change tags. + + To see the latest fingerprint, make get() + request to the instance. This field is a member of `oneof`_ ``_fingerprint``. items (MutableSequence[str]): @@ -129102,19 +147456,21 @@ class Tags(proto.Message): class TargetGrpcProxy(proto.Message): - r"""Represents a Target gRPC Proxy resource. A target gRPC proxy is a - component of load balancers intended for load balancing gRPC - traffic. Only global forwarding rules with load balancing scheme - INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The target - gRPC Proxy references a URL map that specifies how traffic is routed - to gRPC backend services. + r"""Represents a Target gRPC Proxy resource. + + A target gRPC proxy is a component of load balancers intended for + load balancing gRPC traffic. Only global forwarding rules with load + balancing scheme INTERNAL_SELF_MANAGED can reference a target gRPC + proxy. The target gRPC Proxy references a URL map that specifies how + traffic is routed to gRPC backend services. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129137,19 +147493,19 @@ class TargetGrpcProxy(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetGrpcProxy for target grpc proxies. + Output only. [Output Only] Type of the resource. + Alwayscompute#targetGrpcProxy for target grpc proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129158,11 +147514,13 @@ class TargetGrpcProxy(proto.Message): This field is a member of `oneof`_ ``_name``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. self_link_with_id (str): - [Output Only] Server-defined URL with id for the resource. + Output only. [Output Only] Server-defined URL with id for + the resource. This field is a member of `oneof`_ ``_self_link_with_id``. url_map (str): @@ -129180,12 +147538,13 @@ class TargetGrpcProxy(proto.Message): its referenced BackendServices to not allow unsupported features. A gRPC application must use "xds:///" scheme in the target URI of the - service it is connecting to. If false, indicates - that the BackendServices referenced by the - urlMap will be accessed by gRPC applications via - a sidecar proxy. In this case, a gRPC - application must not use "xds:///" scheme in the - target URI of the service it is connecting to + service it is connecting to. + If false, indicates that the BackendServices + referenced by the urlMap will be accessed by + gRPC applications via a sidecar proxy. In this + case, a gRPC application must not use "xds:///" + scheme in the target URI of the service it is + connecting to This field is a member of `oneof`_ ``_validate_for_proxyless``. """ @@ -129256,14 +147615,14 @@ class TargetGrpcProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetGrpcProxy]): A list of TargetGrpcProxy resources. kind (str): - [Output Only] Type of the resource. Always - compute#targetGrpcProxy for target grpc proxies. + Output only. [Output Only] Type of the resource. + Alwayscompute#targetGrpcProxy for target grpc proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -129346,26 +147705,33 @@ class TargetHttpProxiesScopedList(proto.Message): class TargetHttpProxy(proto.Message): - r"""Represents a Target HTTP Proxy resource. Google Compute Engine has - two Target HTTP Proxy resources: \* - `Global `__ \* - `Regional `__ + r"""Represents a Target HTTP Proxy resource. + + Google Compute Engine has two Target HTTP Proxy resources: + + - `Global `__ + - `Regional `__ + A target HTTP proxy is a component of Google Cloud HTTP load - balancers. \* targetHttpProxies are used by global external - Application Load Balancers, classic Application Load Balancers, - cross-region internal Application Load Balancers, and Traffic - Director. \* regionTargetHttpProxies are used by regional internal - Application Load Balancers and regional external Application Load - Balancers. Forwarding rules reference a target HTTP proxy, and the - target proxy then references a URL map. For more information, read - Using Target Proxies and Forwarding rule concepts. + balancers. + + - targetHttpProxies are used by global external Application Load + Balancers, classic Application Load Balancers, cross-region + internal Application Load Balancers, and Traffic Director. + - regionTargetHttpProxies are used by regional internal Application + Load Balancers and regional external Application Load Balancers. + + Forwarding rules reference a target HTTP proxy, and the target proxy + then references a URL map. For more information, readUsing Target + Proxies and Forwarding rule concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129389,29 +147755,34 @@ class TargetHttpProxy(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. http_filters (MutableSequence[str]): URLs to networkservices.HttpFilter resources enabled for xDS - clients using this configuration. For example, - https://networkservices.googleapis.com/v1alpha1/projects/project/locations/ - locationhttpFilters/httpFilter Only filters that handle - outbound connection and stream events may be specified. - These filters work in conjunction with a default set of HTTP - filters that may already be configured by Traffic Director. - Traffic Director will determine the final location of these - filters within xDS configuration based on the name of the - HTTP filter. If Traffic Director positions multiple filters - at the same location, those filters will be in the same - order as specified in this list. httpFilters only applies - for loadbalancers with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + clients using this configuration. For + example,https://networkservices.googleapis.com/v1alpha1/projects/project/locations/locationhttpFilters/httpFilter + Only filters that handle outbound connection and stream + events may be specified. These filters work in conjunction + with a default set of HTTP filters that may already be + configured by Traffic Director. Traffic Director will + determine the final location of these filters within xDS + configuration based on the name of the HTTP filter. If + Traffic Director positions multiple filters at the same + location, those filters will be in the same order as + specified in this list. + + httpFilters only applies for loadbalancers + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. See + ForwardingRule for more details. http_keep_alive_timeout_sec (int): Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value - (610 seconds) will be used. For global external - Application Load Balancers, the minimum allowed - value is 5 seconds and the maximum allowed value - is 1200 seconds. For classic Application Load - Balancers, this option is not supported. + (610 seconds) will be used. + + For global external Application Load Balancers, + the minimum allowed value is 5 seconds and the + maximum allowed value is 1200 seconds. + + For classic Application Load Balancers, this + option is not supported. This field is a member of `oneof`_ ``_http_keep_alive_timeout_sec``. id (int): @@ -129420,14 +147791,14 @@ class TargetHttpProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#targetHttpProxy for target HTTP proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129438,20 +147809,23 @@ class TargetHttpProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. region (str): - [Output Only] URL of the region where the regional Target - HTTP Proxy resides. This field is not applicable to global - Target HTTP Proxies. + Output only. [Output Only] URL of the region where the + regional Target HTTP Proxy resides. This field is not + applicable to global Target HTTP Proxies. This field is a member of `oneof`_ ``_region``. self_link (str): @@ -129541,26 +147915,27 @@ class TargetHttpProxyAggregatedList(proto.Message): A list of TargetHttpProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpProxyAggregatedList for lists of Target - HTTP Proxies. + Output only. [Output Only] Type of resource. + Alwayscompute#targetHttpProxyAggregatedList for lists of + Target HTTP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -129623,7 +147998,7 @@ class TargetHttpProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetHttpProxy]): A list of TargetHttpProxy resources. kind (str): - Type of resource. Always + Output only. Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies. @@ -129631,14 +148006,15 @@ class TargetHttpProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -129721,9 +148097,9 @@ class TargetHttpsProxiesSetCertificateMapRequest(proto.Message): Attributes: certificate_map (str): URL of the Certificate Map to associate with - this TargetHttpsProxy. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + this TargetHttpsProxy. + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. """ @@ -129798,19 +148174,25 @@ class TargetHttpsProxiesSetSslCertificatesRequest(proto.Message): class TargetHttpsProxy(proto.Message): - r"""Represents a Target HTTPS Proxy resource. Google Compute Engine has - two Target HTTPS Proxy resources: \* - `Global `__ \* - `Regional `__ + r"""Represents a Target HTTPS Proxy resource. + + Google Compute Engine has two Target HTTPS Proxy resources: + + - `Global `__ + - `Regional `__ + A target HTTPS proxy is a component of Google Cloud HTTPS load - balancers. \* targetHttpsProxies are used by global external - Application Load Balancers, classic Application Load Balancers, - cross-region internal Application Load Balancers, and Traffic - Director. \* regionTargetHttpsProxies are used by regional internal - Application Load Balancers and regional external Application Load - Balancers. Forwarding rules reference a target HTTPS proxy, and the - target proxy then references a URL map. For more information, read - Using Target Proxies and Forwarding rule concepts. + balancers. + + - targetHttpsProxies are used by global external Application Load + Balancers, classic Application Load Balancers, cross-region + internal Application Load Balancers, and Traffic Director. + - regionTargetHttpsProxies are used by regional internal Application + Load Balancers and regional external Application Load Balancers. + + Forwarding rules reference a target HTTPS proxy, and the target + proxy then references a URL map. For more information, readUsing + Target Proxies and Forwarding rule concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -129829,10 +148211,15 @@ class TargetHttpsProxy(proto.Message): networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization - policy. Refer to the AuthorizationPolicy resource for - additional details. authorizationPolicy only applies to a - global TargetHttpsProxy attached to globalForwardingRules - with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. + policy. + + Refer to the AuthorizationPolicy resource for additional + details. + + authorizationPolicy only applies to a globalTargetHttpsProxy + attached toglobalForwardingRules with theloadBalancingScheme + set to INTERNAL_SELF_MANAGED. + Note: This field currently has no impact. This field is a member of `oneof`_ ``_authorization_policy``. @@ -129842,15 +148229,17 @@ class TargetHttpsProxy(proto.Message): proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products - use Certificate Manager Certificates instead. If - set, sslCertificates will be ignored. Accepted - format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + use Certificate Manager Certificates instead. + + If set, sslCertificates will be ignored. + + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -129874,29 +148263,34 @@ class TargetHttpsProxy(proto.Message): This field is a member of `oneof`_ ``_fingerprint``. http_filters (MutableSequence[str]): URLs to networkservices.HttpFilter resources enabled for xDS - clients using this configuration. For example, - https://networkservices.googleapis.com/beta/projects/project/locations/ - location/httpFilters/httpFilter Only filters that handle - outbound connection and stream events may be specified. - These filters work in conjunction with a default set of HTTP - filters that may already be configured by Traffic Director. - Traffic Director will determine the final location of these - filters within xDS configuration based on the name of the - HTTP filter. If Traffic Director positions multiple filters - at the same location, those filters will be in the same - order as specified in this list. httpFilters only applies - for loadbalancers with loadBalancingScheme set to - INTERNAL_SELF_MANAGED. See ForwardingRule for more details. + clients using this configuration. For + example,https://networkservices.googleapis.com/beta/projects/project/locations/location/httpFilters/httpFilter + Only filters that handle outbound connection and stream + events may be specified. These filters work in conjunction + with a default set of HTTP filters that may already be + configured by Traffic Director. Traffic Director will + determine the final location of these filters within xDS + configuration based on the name of the HTTP filter. If + Traffic Director positions multiple filters at the same + location, those filters will be in the same order as + specified in this list. + + httpFilters only applies for loadbalancers + withloadBalancingScheme set to INTERNAL_SELF_MANAGED. See + ForwardingRule for more details. http_keep_alive_timeout_sec (int): Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value - (610 seconds) will be used. For global external - Application Load Balancers, the minimum allowed - value is 5 seconds and the maximum allowed value - is 1200 seconds. For classic Application Load - Balancers, this option is not supported. + (610 seconds) will be used. + + For global external Application Load Balancers, + the minimum allowed value is 5 seconds and the + maximum allowed value is 1200 seconds. + + For classic Application Load Balancers, this + option is not supported. This field is a member of `oneof`_ ``_http_keep_alive_timeout_sec``. id (int): @@ -129905,14 +148299,14 @@ class TargetHttpsProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpsProxy for target HTTPS proxies. + Output only. [Output Only] Type of resource. + Alwayscompute#targetHttpsProxy for target HTTPS proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -129923,13 +148317,16 @@ class TargetHttpsProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. @@ -129937,22 +148334,25 @@ class TargetHttpsProxy(proto.Message): Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to - negotiate QUIC with clients. You can specify - NONE, ENABLE, or DISABLE. - When quic-override - is set to NONE, Google manages whether QUIC is - used. - When quic-override is set to ENABLE, the - load balancer uses QUIC when possible. - When - quic-override is set to DISABLE, the load - balancer doesn't use QUIC. - If the - quic-override flag is not specified, NONE is - implied. Check the QuicOverride enum for the - list of possible values. + negotiate QUIC with clients. + You can specify NONE, ENABLE, orDISABLE. + + - When quic-override is set to NONE, + Google manages whether QUIC is used. + - When quic-override is set to ENABLE, the + load balancer uses QUIC when possible. + - When quic-override is set to DISABLE, the + load balancer doesn't use QUIC. + - If the quic-override flag is not + specified,NONE is implied. Check the + QuicOverride enum for the list of possible + values. This field is a member of `oneof`_ ``_quic_override``. region (str): - [Output Only] URL of the region where the regional - TargetHttpsProxy resides. This field is not applicable to - global TargetHttpsProxies. + Output only. [Output Only] URL of the region where the + regional TargetHttpsProxy resides. This field is not + applicable to global TargetHttpsProxies. This field is a member of `oneof`_ ``_region``. self_link (str): @@ -129963,18 +148363,20 @@ class TargetHttpsProxy(proto.Message): Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. - serverTlsPolicy only applies to a global TargetHttpsProxy - attached to globalForwardingRules with the - loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL - or EXTERNAL_MANAGED or INTERNAL_MANAGED. It also applies to - a regional TargetHttpsProxy attached to regional - forwardingRules with the loadBalancingScheme set to - EXTERNAL_MANAGED or INTERNAL_MANAGED. For details which - ServerTlsPolicy resources are accepted with - INTERNAL_SELF_MANAGED and which with EXTERNAL, - INTERNAL_MANAGED, EXTERNAL_MANAGED loadBalancingScheme - consult ServerTlsPolicy documentation. If left blank, - communications are not encrypted. + + serverTlsPolicy only applies to a globalTargetHttpsProxy + attached toglobalForwardingRules with theloadBalancingScheme + set to INTERNAL_SELF_MANAGED or EXTERNAL orEXTERNAL_MANAGED + or INTERNAL_MANAGED. It also applies to a regional + TargetHttpsProxy attached to regional forwardingRules with + theloadBalancingScheme set to EXTERNAL_MANAGED + orINTERNAL_MANAGED. For details whichServerTlsPolicy + resources are accepted withINTERNAL_SELF_MANAGED and which + with EXTERNAL,INTERNAL_MANAGED, + EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy + documentation. + + If left blank, communications are not encrypted. This field is a member of `oneof`_ ``_server_tls_policy``. ssl_certificates (MutableSequence[str]): @@ -129982,22 +148384,26 @@ class TargetHttpsProxy(proto.Message): authenticate connections between users and the load balancer. At least one SSL certificate must be specified. SslCertificates do not apply when the load balancing scheme - is set to INTERNAL_SELF_MANAGED. The URLs should refer to a - SSL Certificate resource or Certificate Manager Certificate - resource. Mixing Classic Certificates and Certificate - Manager Certificates is not allowed. Certificate Manager - Certificates must include the certificatemanager API - namespace. Using Certificate Manager Certificates in this - field is not supported by Global external Application Load - Balancer or Classic Application Load Balancer, use - certificate_map instead. Currently, you may specify up to 15 - Classic SSL Certificates or up to 100 Certificate Manager - Certificates. Certificate Manager Certificates accepted - formats are: - - //certificatemanager.googleapis.com/projects/{project}/locations/{ - location}/certificates/{resourceName}. - - https://certificatemanager.googleapis.com/v1alpha1/projects/{project - }/locations/{location}/certificates/{resourceName}. + is set to INTERNAL_SELF_MANAGED. + + The URLs should refer to a SSL Certificate resource or + Certificate Manager Certificate resource. Mixing Classic + Certificates and Certificate Manager Certificates is not + allowed. Certificate Manager Certificates must include the + certificatemanager API namespace. Using Certificate Manager + Certificates in this field is not supported by Global + external Application Load Balancer or Classic Application + Load Balancer, use certificate_map instead. + + Currently, you may specify up to 15 Classic SSL Certificates + or up to 100 Certificate Manager Certificates. + + Certificate Manager Certificates accepted formats are: + + :: + + - //certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificates/{resourceName}. + - https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}. ssl_policy (str): URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. @@ -130013,14 +148419,18 @@ class TargetHttpsProxy(proto.Message): request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP (HTTP/2) as well as - over UDP (QUIC/h3). This can improve application - performance, especially on networks where - interruptions may be common, such as on mobile. + over UDP (QUIC/h3). + + This can improve application performance, + especially on networks where interruptions may + be common, such as on mobile. + Requests with Early Data will have the "Early-Data" HTTP header set on the request, with a value of "1", to allow the backend to - determine whether Early Data was included. Note: - TLS Early Data may allow requests to be + determine whether Early Data was included. + + Note: TLS Early Data may allow requests to be replayed, as the data is sent to the backend before the handshake has fully completed. Applications that allow idempotent HTTP methods @@ -130029,9 +148439,11 @@ class TargetHttpsProxy(proto.Message): Early Data on those requests, and reject requests with the "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) status code, in - order to remain RFC compliant. The default value - is DISABLED. Check the TlsEarlyData enum for the - list of possible values. + order to remain RFC compliant. + + The default value is DISABLED. + Check the TlsEarlyData enum for the list of + possible values. This field is a member of `oneof`_ ``_tls_early_data``. url_map (str): @@ -130039,11 +148451,12 @@ class TargetHttpsProxy(proto.Message): UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a - URL map: - - https://www.googleapis.compute/v1/projects/project/global/urlMaps/ - url-map - - projects/project/global/urlMaps/url-map - - global/urlMaps/url-map + URL map: + + - + https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map + - projects/project/global/urlMaps/url-map + - global/urlMaps/url-map This field is a member of `oneof`_ ``_url_map``. """ @@ -130051,13 +148464,16 @@ class TargetHttpsProxy(proto.Message): class QuicOverride(proto.Enum): r"""Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer - attempts to negotiate QUIC with clients. You can specify NONE, - ENABLE, or DISABLE. - When quic-override is set to NONE, Google - manages whether QUIC is used. - When quic-override is set to - ENABLE, the load balancer uses QUIC when possible. - When - quic-override is set to DISABLE, the load balancer doesn't use - QUIC. - If the quic-override flag is not specified, NONE is - implied. + attempts to negotiate QUIC with clients. + You can specify NONE, ENABLE, orDISABLE. + + - When quic-override is set to NONE, + Google manages whether QUIC is used. + - When quic-override is set to ENABLE, the + load balancer uses QUIC when possible. + - When quic-override is set to DISABLE, the + load balancer doesn't use QUIC. + - If the quic-override flag is not specified,NONE is implied. Values: UNDEFINED_QUIC_OVERRIDE (0): @@ -130085,20 +148501,25 @@ class TlsEarlyData(proto.Enum): handshake to include the initial application payload (a HTTP request) alongside the handshake, reducing the effective round trips to "zero". This applies to TLS 1.3 connections over TCP - (HTTP/2) as well as over UDP (QUIC/h3). This can improve - application performance, especially on networks where - interruptions may be common, such as on mobile. Requests with - Early Data will have the "Early-Data" HTTP header set on the - request, with a value of "1", to allow the backend to determine - whether Early Data was included. Note: TLS Early Data may allow - requests to be replayed, as the data is sent to the backend - before the handshake has fully completed. Applications that - allow idempotent HTTP methods to make non-idempotent changes, - such as a GET request updating a database, should not accept - Early Data on those requests, and reject requests with the - "Early-Data: 1" HTTP header by returning a HTTP 425 (Too Early) - status code, in order to remain RFC compliant. The default value - is DISABLED. + (HTTP/2) as well as over UDP (QUIC/h3). + + This can improve application performance, especially on networks + where interruptions may be common, such as on mobile. + + Requests with Early Data will have the "Early-Data" HTTP header + set on the request, with a value of "1", to allow the backend to + determine whether Early Data was included. + + Note: TLS Early Data may allow requests to be replayed, as the + data is sent to the backend before the handshake has fully + completed. Applications that allow idempotent HTTP methods to + make non-idempotent changes, such as a GET request updating a + database, should not accept Early Data on those requests, and + reject requests with the "Early-Data: 1" HTTP header by + returning a HTTP 425 (Too Early) status code, in order to remain + RFC compliant. + + The default value is DISABLED. Values: UNDEFINED_TLS_EARLY_DATA (0): @@ -130259,26 +148680,27 @@ class TargetHttpsProxyAggregatedList(proto.Message): A list of TargetHttpsProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetHttpsProxyAggregatedList for lists of Target - HTTP Proxies. + Output only. [Output Only] Type of resource. + Alwayscompute#targetHttpsProxyAggregatedList for lists of + Target HTTP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -130341,7 +148763,7 @@ class TargetHttpsProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetHttpsProxy]): A list of TargetHttpsProxy resources. kind (str): - Type of resource. Always + Output only. Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies. @@ -130349,14 +148771,15 @@ class TargetHttpsProxyList(proto.Message): next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -130403,18 +148826,22 @@ def raw_page(self): class TargetInstance(proto.Message): - r"""Represents a Target Instance resource. You can use a target - instance to handle traffic for one or more forwarding rules, - which is ideal for forwarding protocol traffic that is managed - by a single source. For example, ESP, AH, TCP, or UDP. For more - information, read Target instances. + r"""Represents a Target Instance resource. + + You can use a target instance to handle traffic for one or more + forwarding rules, which is ideal for forwarding protocol traffic + that is managed by a single source. For example, ESP, AH, TCP, + or UDP. + For more information, readTarget + instances. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -130434,22 +148861,24 @@ class TargetInstance(proto.Message): creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the - following are all valid URLs: - - https://www.googleapis.com/compute/v1/projects/project/zones/zone - /instances/instance - - projects/project/zones/zone/instances/instance - - zones/zone/instances/instance + following are all valid URLs: + + - + https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + - + projects/project/zones/zone/instances/instance + - zones/zone/instances/instance This field is a member of `oneof`_ ``_instance``. kind (str): - [Output Only] The type of the resource. Always - compute#targetInstance for target instances. + Output only. [Output Only] The type of the resource. + Alwayscompute#targetInstance for target instances. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -130481,10 +148910,10 @@ class TargetInstance(proto.Message): This field is a member of `oneof`_ ``_self_link``. zone (str): - [Output Only] URL of the zone where the target instance - resides. You must specify this field as part of the HTTP - request URL. It is not settable as a field in the request - body. + Output only. [Output Only] URL of the zone where the target + instance resides. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_zone``. """ @@ -130575,24 +149004,25 @@ class TargetInstanceAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.TargetInstancesScopedList]): A list of TargetInstance resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -130655,20 +149085,21 @@ class TargetInstanceList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetInstance]): A list of TargetInstance resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -130744,11 +149175,13 @@ class TargetInstancesScopedList(proto.Message): class TargetPool(proto.Message): - r"""Represents a Target Pool resource. Target pools are used with - external passthrough Network Load Balancers. A target pool - references member instances, an associated legacy - HttpHealthCheck resource, and, optionally, a backup target pool. - For more information, read Using target pools. + r"""Represents a Target Pool resource. + + Target pools are used with external passthrough Network Load + Balancers. A target pool references member instances, an + associated legacy HttpHealthCheck resource, and, optionally, a + backup target pool. For more information, readUsing target + pools. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -130758,21 +149191,24 @@ class TargetPool(proto.Message): The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio - field is properly set to a value between [0, 1]. backupPool + field is properly set to a value between [0, 1].backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy - instances in the primary pool is at or below failoverRatio, + instances in the primary pool is at or belowfailoverRatio, traffic arriving at the load-balanced IP will be directed to - the backup pool. In case where failoverRatio and backupPool - are not set, or all the instances in the backup pool are - unhealthy, the traffic will be directed back to the primary - pool in the "force" mode, where traffic will be spread to - the healthy instances with the best effort, or to all - instances when no instance is healthy. + the backup pool. + + In case where failoverRatio and backupPool are not set, or + all the instances in the backup pool are unhealthy, the + traffic will be directed back to the primary pool in the + "force" mode, where traffic will be spread to the healthy + instances with the best effort, or to all instances when no + instance is healthy. This field is a member of `oneof`_ ``_backup_pool``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -130785,17 +149221,20 @@ class TargetPool(proto.Message): This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value - of the field must be in [0, 1]. If set, backupPool must also - be set. They together define the fallback behavior of the - primary target pool: if the ratio of the healthy instances - in the primary pool is at or below this number, traffic - arriving at the load-balanced IP will be directed to the - backup pool. In case where failoverRatio is not set or all - the instances in the backup pool are unhealthy, the traffic - will be directed back to the primary pool in the "force" - mode, where traffic will be spread to the healthy instances - with the best effort, or to all instances when no instance - is healthy. + of the field must be in [0, 1]. + + If set, backupPool must also be set. They together define + the fallback behavior of the primary target pool: if the + ratio of the healthy instances in the primary pool is at or + below this number, traffic arriving at the load-balanced IP + will be directed to the backup pool. + + In case where failoverRatio is not set or all the instances + in the backup pool are unhealthy, the traffic will be + directed back to the primary pool in the "force" mode, where + traffic will be spread to the healthy instances with the + best effort, or to all instances when no instance is + healthy. This field is a member of `oneof`_ ``_failover_ratio``. health_checks (MutableSequence[str]): @@ -130815,14 +149254,14 @@ class TargetPool(proto.Message): live in zones contained in the same region as this pool. kind (str): - [Output Only] Type of the resource. Always + Output only. [Output Only] Type of the resource. Always compute#targetPool for target pools. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -130831,8 +149270,8 @@ class TargetPool(proto.Message): This field is a member of `oneof`_ ``_name``. region (str): - [Output Only] URL of the region where the target pool - resides. + Output only. [Output Only] URL of the region where the + target pool resides. This field is a member of `oneof`_ ``_region``. security_policy (str): @@ -131011,26 +149450,27 @@ class TargetPoolAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.TargetPoolsScopedList]): A list of TargetPool resources. kind (str): - [Output Only] Type of resource. Always - compute#targetPoolAggregatedList for aggregated lists of - target pools. + Output only. [Output Only] Type of resource. + Alwayscompute#targetPoolAggregatedList for aggregated lists + of target pools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -131088,9 +149528,9 @@ class TargetPoolInstanceHealth(proto.Message): health_status (MutableSequence[google.cloud.compute_v1beta.types.HealthStatus]): kind (str): - [Output Only] Type of resource. Always - compute#targetPoolInstanceHealth when checking the health of - an instance. + Output only. [Output Only] Type of resource. + Alwayscompute#targetPoolInstanceHealth when checking the + health of an instance. This field is a member of `oneof`_ ``_kind``. """ @@ -131121,21 +149561,22 @@ class TargetPoolList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetPool]): A list of TargetPool resources. kind (str): - [Output Only] Type of resource. Always + Output only. [Output Only] Type of resource. Always compute#targetPoolList for lists of target pools. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -131205,11 +149646,13 @@ class TargetPoolsAddInstanceRequest(proto.Message): A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are - valid URLs: - - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone - /instances/instance-name - - projects/project-id/zones/zone/instances/instance-name - - zones/zone/instances/instance-name + valid URLs: + + - + https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name + - + projects/project-id/zones/zone/instances/instance-name + - zones/zone/instances/instance-name """ instances: MutableSequence["InstanceReference"] = proto.RepeatedField( @@ -131226,11 +149669,13 @@ class TargetPoolsRemoveHealthCheckRequest(proto.Message): health_checks (MutableSequence[google.cloud.compute_v1beta.types.HealthCheckReference]): Health check URL to be removed. This can be a full or valid partial URL. For example, the - following are valid URLs: - - https://www.googleapis.com/compute/beta/projects/project - /global/httpHealthChecks/health-check - - projects/project/global/httpHealthChecks/health-check - - global/httpHealthChecks/health-check + following are valid URLs: + + - + https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check + - + projects/project/global/httpHealthChecks/health-check + - global/httpHealthChecks/health-check """ health_checks: MutableSequence["HealthCheckReference"] = proto.RepeatedField( @@ -131331,9 +149776,9 @@ class TargetSslProxiesSetCertificateMapRequest(proto.Message): Attributes: certificate_map (str): URL of the Certificate Map to associate with - this TargetSslProxy. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + this TargetSslProxy. + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. """ @@ -131402,11 +149847,12 @@ class TargetSslProxiesSetSslCertificatesRequest(proto.Message): class TargetSslProxy(proto.Message): - r"""Represents a Target SSL Proxy resource. A target SSL proxy is - a component of a Proxy Network Load Balancer. The forwarding - rule references the target SSL proxy, and the target proxy then - references a backend service. For more information, read Proxy - Network Load Balancer overview. + r"""Represents a Target SSL Proxy resource. + + A target SSL proxy is a component of a Proxy Network Load + Balancer. The forwarding rule references the target SSL proxy, + and the target proxy then references a backend service. For more + information, readProxy Network Load Balancer overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -131417,13 +149863,15 @@ class TargetSslProxy(proto.Message): certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be - ignored. Accepted format is - //certificatemanager.googleapis.com/projects/{project - }/locations/{location}/certificateMaps/{resourceName}. + ignored. + + Accepted format + is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}. This field is a member of `oneof`_ ``_certificate_map``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -131438,14 +149886,14 @@ class TargetSslProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetSslProxy for target SSL proxies. + Output only. [Output Only] Type of the resource. + Alwayscompute#targetSslProxy for target SSL proxies. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -131570,20 +150018,21 @@ class TargetSslProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetSslProxy]): A list of TargetSslProxy resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -131717,18 +150166,20 @@ class ProxyHeader(proto.Enum): class TargetTcpProxy(proto.Message): - r"""Represents a Target TCP Proxy resource. A target TCP proxy is - a component of a Proxy Network Load Balancer. The forwarding - rule references the target TCP proxy, and the target proxy then - references a backend service. For more information, read Proxy - Network Load Balancer overview. + r"""Represents a Target TCP Proxy resource. + + A target TCP proxy is a component of a Proxy Network Load + Balancer. The forwarding rule references the target TCP proxy, + and the target proxy then references a backend service. For more + information, readProxy Network Load Balancer overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -131743,14 +150194,21 @@ class TargetTcpProxy(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#targetTcpProxy for target TCP proxies. + Output only. [Output Only] Type of the resource. + Alwayscompute#targetTcpProxy for target TCP proxies. This field is a member of `oneof`_ ``_kind``. + load_balancing_scheme (str): + Specifies the type of load balancing scheme + used by this target proxy. Check the + LoadBalancingScheme enum for the list of + possible values. + + This field is a member of `oneof`_ ``_load_balancing_scheme``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -131761,13 +150219,16 @@ class TargetTcpProxy(proto.Message): proxy_bind (bool): This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set - to INTERNAL_SELF_MANAGED. When this field is set to true, - Envoy proxies set up inbound traffic interception and bind - to the IP address and port specified in the forwarding rule. - This is generally useful when using Traffic Director to - configure Envoy as a gateway or middle proxy (in other - words, not a sidecar proxy). The Envoy proxy listens for - inbound requests and handles requests when it receives them. + toINTERNAL_SELF_MANAGED. + + When this field is set to true, Envoy proxies set up inbound + traffic interception and bind to the IP address and port + specified in the forwarding rule. This is generally useful + when using Traffic Director to configure Envoy as a gateway + or middle proxy (in other words, not a sidecar proxy). The + Envoy proxy listens for inbound requests and handles + requests when it receives them. + The default is false. This field is a member of `oneof`_ ``_proxy_bind``. @@ -131779,8 +150240,9 @@ class TargetTcpProxy(proto.Message): This field is a member of `oneof`_ ``_proxy_header``. region (str): - [Output Only] URL of the region where the regional TCP proxy - resides. This field is not applicable to global TCP proxy. + Output only. [Output Only] URL of the region where the + regional TCP proxy resides. This field is not applicable to + global TCP proxy. This field is a member of `oneof`_ ``_region``. self_link (str): @@ -131793,6 +150255,26 @@ class TargetTcpProxy(proto.Message): This field is a member of `oneof`_ ``_service``. """ + class LoadBalancingScheme(proto.Enum): + r"""Specifies the type of load balancing scheme used by this + target proxy. + + Values: + UNDEFINED_LOAD_BALANCING_SCHEME (0): + A value indicating that the enum field is not + set. + EXTERNAL (35607499): + No description available. + EXTERNAL_MANAGED (512006923): + No description available. + INTERNAL_MANAGED (37350397): + No description available. + """ + UNDEFINED_LOAD_BALANCING_SCHEME = 0 + EXTERNAL = 35607499 + EXTERNAL_MANAGED = 512006923 + INTERNAL_MANAGED = 37350397 + class ProxyHeader(proto.Enum): r"""Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. @@ -131830,6 +150312,11 @@ class ProxyHeader(proto.Enum): number=3292052, optional=True, ) + load_balancing_scheme: str = proto.Field( + proto.STRING, + number=363890244, + optional=True, + ) name: str = proto.Field( proto.STRING, number=3373707, @@ -131877,26 +150364,27 @@ class TargetTcpProxyAggregatedList(proto.Message): A list of TargetTcpProxiesScopedList resources. kind (str): - [Output Only] Type of resource. Always - compute#targetTcpProxyAggregatedList for lists of Target TCP - Proxies. + Output only. [Output Only] Type of resource. + Alwayscompute#targetTcpProxyAggregatedList for lists of + Target TCP Proxies. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -131959,20 +150447,21 @@ class TargetTcpProxyList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetTcpProxy]): A list of TargetTcpProxy resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -132019,16 +150508,19 @@ def raw_page(self): class TargetVpnGateway(proto.Message): - r"""Represents a Target VPN Gateway resource. The target VPN - gateway resource represents a Classic Cloud VPN gateway. For - more information, read the the Cloud VPN Overview. + r"""Represents a Target VPN Gateway resource. + + The target VPN gateway resource represents a Classic Cloud VPN + gateway. For more information, read thethe + Cloud VPN Overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -132039,17 +150531,17 @@ class TargetVpnGateway(proto.Message): This field is a member of `oneof`_ ``_description``. forwarding_rules (MutableSequence[str]): [Output Only] A list of URLs to the ForwardingRule - resources. ForwardingRules are created using - compute.forwardingRules.insert and associated with a VPN - gateway. + resources. ForwardingRules are created + usingcompute.forwardingRules.insert and associated with a + VPN gateway. id (int): [Output Only] The unique identifier for the resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + Output only. [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -132061,21 +150553,21 @@ class TargetVpnGateway(proto.Message): request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the - request will fail with error 412 - conditionNotMet. To see the latest fingerprint, - make a get() request to retrieve a - TargetVpnGateway. + request will fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a TargetVpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -132214,25 +150706,26 @@ class TargetVpnGatewayAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.TargetVpnGatewaysScopedList]): A list of TargetVpnGateway resources. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + Output only. [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -132295,21 +150788,22 @@ class TargetVpnGatewayList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.TargetVpnGateway]): A list of TargetVpnGateway resources. kind (str): - [Output Only] Type of resource. Always - compute#targetVpnGateway for target VPN gateways. + Output only. [Output Only] Type of resource. + Alwayscompute#targetVpnGateway for target VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -133462,8 +151956,112 @@ class TestIamPermissionsPacketMirroringRequest(proto.Message): ) -class TestIamPermissionsRegionAutoscalerRequest(proto.Message): - r"""A request message for RegionAutoscalers.TestIamPermissions. +class TestIamPermissionsRegionAutoscalerRequest(proto.Message): + r"""A request message for RegionAutoscalers.TestIamPermissions. + See the method description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsRegionBackendBucketRequest(proto.Message): + r"""A request message for + RegionBackendBuckets.TestIamPermissions. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsRegionBackendServiceRequest(proto.Message): + r"""A request message for + RegionBackendServices.TestIamPermissions. See the method + description for details. + + Attributes: + project (str): + Project ID for this request. + region (str): + The name of the region for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + region: str = proto.Field( + proto.STRING, + number=138946292, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + + +class TestIamPermissionsRegionCommitmentRequest(proto.Message): + r"""A request message for RegionCommitments.TestIamPermissions. See the method description for details. Attributes: @@ -133496,9 +152094,9 @@ class TestIamPermissionsRegionAutoscalerRequest(proto.Message): ) -class TestIamPermissionsRegionBackendServiceRequest(proto.Message): +class TestIamPermissionsRegionCompositeHealthCheckRequest(proto.Message): r"""A request message for - RegionBackendServices.TestIamPermissions. See the method + RegionCompositeHealthChecks.TestIamPermissions. See the method description for details. Attributes: @@ -133531,9 +152129,9 @@ class TestIamPermissionsRegionBackendServiceRequest(proto.Message): ) -class TestIamPermissionsRegionCommitmentRequest(proto.Message): - r"""A request message for RegionCommitments.TestIamPermissions. - See the method description for details. +class TestIamPermissionsRegionDiskRequest(proto.Message): + r"""A request message for RegionDisks.TestIamPermissions. See the + method description for details. Attributes: project (str): @@ -133565,8 +152163,9 @@ class TestIamPermissionsRegionCommitmentRequest(proto.Message): ) -class TestIamPermissionsRegionDiskRequest(proto.Message): - r"""A request message for RegionDisks.TestIamPermissions. See the +class TestIamPermissionsRegionHealthAggregationPolicyRequest(proto.Message): + r"""A request message for + RegionHealthAggregationPolicies.TestIamPermissions. See the method description for details. Attributes: @@ -134119,6 +152718,47 @@ class TestIamPermissionsRegionUrlMapRequest(proto.Message): ) +class TestIamPermissionsReservationBlockRequest(proto.Message): + r"""A request message for ReservationBlocks.TestIamPermissions. + See the method description for details. + + Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class TestIamPermissionsReservationRequest(proto.Message): r"""A request message for Reservations.TestIamPermissions. See the method description for details. @@ -134153,6 +152793,48 @@ class TestIamPermissionsReservationRequest(proto.Message): ) +class TestIamPermissionsReservationSubBlockRequest(proto.Message): + r"""A request message for + ReservationSubBlocks.TestIamPermissions. See the method + description for details. + + Attributes: + parent_resource (str): + Name or id of parent resource of the resource + for this request. + project (str): + Project ID for this request. + resource (str): + Name or id of the resource for this request. + test_permissions_request_resource (google.cloud.compute_v1beta.types.TestPermissionsRequest): + The body resource for this request + zone (str): + The name of the zone for this request. + """ + + parent_resource: str = proto.Field( + proto.STRING, + number=18091011, + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + resource: str = proto.Field( + proto.STRING, + number=195806222, + ) + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( + proto.MESSAGE, + number=439214758, + message="TestPermissionsRequest", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class TestIamPermissionsResourcePolicyRequest(proto.Message): r"""A request message for ResourcePolicies.TestIamPermissions. See the method description for details. @@ -134942,6 +153624,8 @@ class MaintenanceReasons(proto.Enum): Maintenance due to NVLink failure. FAILURE_REDUNDANT_HARDWARE_FAULT (31000530): Maintenance due to redundant hardware fault. + FAILURE_TPU (467889412): + Maintenance due to TPU errors. INFRASTRUCTURE_RELOCATION (359845636): Maintenance due to infrastructure relocation. MAINTENANCE_REASON_UNKNOWN (50570235): @@ -134966,6 +153650,7 @@ class MaintenanceReasons(proto.Enum): FAILURE_NETWORK = 42811449 FAILURE_NVLINK = 484426295 FAILURE_REDUNDANT_HARDWARE_FAULT = 31000530 + FAILURE_TPU = 467889412 INFRASTRUCTURE_RELOCATION = 359845636 MAINTENANCE_REASON_UNKNOWN = 50570235 PLANNED_NETWORK_UPDATE = 135494677 @@ -135079,17 +153764,21 @@ class UpdateAccessConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135145,17 +153834,21 @@ class UpdateAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135206,17 +153899,21 @@ class UpdateBackendBucketRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135261,17 +153958,21 @@ class UpdateBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135318,17 +154019,21 @@ class UpdateDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135393,17 +154098,21 @@ class UpdateDisplayDeviceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135453,17 +154162,21 @@ class UpdateFirewallRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135508,17 +154221,21 @@ class UpdateFutureReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135560,6 +154277,65 @@ class UpdateFutureReservationRequest(proto.Message): ) +class UpdateGlobalVmExtensionPolicyRequest(proto.Message): + r"""A request message for GlobalVmExtensionPolicies.Update. See + the method description for details. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + global_vm_extension_policy (str): + Name of the global VM extension policy to + update. + global_vm_extension_policy_resource (google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy): + The body resource for this request + project (str): + Project ID for this request. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + """ + + global_vm_extension_policy: str = proto.Field( + proto.STRING, + number=8334110, + ) + global_vm_extension_policy_resource: "GlobalVmExtensionPolicy" = proto.Field( + proto.MESSAGE, + number=101542927, + message="GlobalVmExtensionPolicy", + ) + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + + class UpdateHealthCheckRequest(proto.Message): r"""A request message for HealthChecks.Update. See the method description for details. @@ -135579,17 +154355,21 @@ class UpdateHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135633,22 +154413,27 @@ class UpdateInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where you want to create - the managed instance group. + The name of the zone + where you want to create the managed instance + group. """ instance_group_manager: str = proto.Field( @@ -135692,9 +154477,9 @@ class UpdateInstanceRequest(proto.Message): instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the - updated properties require. Check the - MinimalAction enum for the list of possible - values. + updated properties require. + Check the MinimalAction enum for the list of + possible values. This field is a member of `oneof`_ ``_minimal_action``. most_disruptive_allowed_action (str): @@ -135714,17 +154499,21 @@ class UpdateInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135815,17 +154604,21 @@ class UpdateLicenseRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -135881,17 +154674,21 @@ class UpdateNetworkInterfaceInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): @@ -135946,17 +154743,21 @@ class UpdatePeeringNetworkRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -135993,8 +154794,8 @@ class UpdatePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. instance_group_managers_update_per_instance_configs_req_resource (google.cloud.compute_v1beta.types.InstanceGroupManagersUpdatePerInstanceConfigsReq): The body resource for this request project (str): @@ -136004,23 +154805,27 @@ class UpdatePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. zone (str): - The name of the zone where the managed - instance group is located. It should conform to - RFC1035. + The name of thezone + where the managed instance group is located. + It should conform to RFC1035. """ instance_group_manager: str = proto.Field( @@ -136057,8 +154862,8 @@ class UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Attributes: instance_group_manager (str): - The name of the managed instance group. It - should conform to RFC1035. + The name of the managed instance group. + It should conform to RFC1035. project (str): Project ID for this request. region (str): @@ -136071,17 +154876,21 @@ class UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136129,17 +154938,21 @@ class UpdatePreviewFeatureRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136187,17 +155000,21 @@ class UpdateRegionAutoscalerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136249,17 +155066,21 @@ class UpdateRegionBackendServiceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136313,17 +155134,21 @@ class UpdateRegionCommitmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -136391,17 +155216,21 @@ class UpdateRegionDiskRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. update_mask (str): @@ -136466,17 +155295,21 @@ class UpdateRegionHealthCheckRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136526,17 +155359,21 @@ class UpdateRegionInstanceGroupManagerRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136630,17 +155467,21 @@ class UpdateReservationRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. reservation (str): @@ -136712,17 +155553,21 @@ class UpdateReservationsRegionCommitmentRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -136768,17 +155613,21 @@ class UpdateRoutePolicyRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. route_policy_resource (google.cloud.compute_v1beta.types.RoutePolicy): @@ -136829,17 +155678,21 @@ class UpdateRouterRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. router (str): @@ -136890,17 +155743,21 @@ class UpdateShieldedInstanceConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_instance_config_resource (google.cloud.compute_v1beta.types.ShieldedInstanceConfig): @@ -136950,17 +155807,21 @@ class UpdateShieldedVmConfigInstanceRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. shielded_vm_config_resource (google.cloud.compute_v1beta.types.ShieldedVmConfig): @@ -137008,17 +155869,21 @@ class UpdateStoragePoolRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. storage_pool (str): @@ -137078,17 +155943,21 @@ class UpdateUrlMapRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. url_map (str): @@ -137117,65 +155986,154 @@ class UpdateUrlMapRequest(proto.Message): ) +class UpdateZoneVmExtensionPolicyRequest(proto.Message): + r"""A request message for ZoneVmExtensionPolicies.Update. 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. + request_id (str): + An optional request ID to identify requests. + Specify a unique request ID so that if you must + retry your request, the server will know to + ignore the request if it has already been + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). + + This field is a member of `oneof`_ ``_request_id``. + vm_extension_policy (str): + Name of the zone VM extension policy to + update. + vm_extension_policy_resource (google.cloud.compute_v1beta.types.VmExtensionPolicy): + The body resource for this request + zone (str): + Name of the zone for this request. + """ + + project: str = proto.Field( + proto.STRING, + number=227560217, + ) + request_id: str = proto.Field( + proto.STRING, + number=37109963, + optional=True, + ) + vm_extension_policy: str = proto.Field( + proto.STRING, + number=331532730, + ) + vm_extension_policy_resource: "VmExtensionPolicy" = proto.Field( + proto.MESSAGE, + number=515669235, + message="VmExtensionPolicy", + ) + zone: str = proto.Field( + proto.STRING, + number=3744684, + ) + + class UrlMap(proto.Message): - r"""Represents a URL Map resource. Compute Engine has two URL Map - resources: \* `Global `__ - \* `Regional `__ A - URL map resource is a component of certain types of cloud load - balancers and Traffic Director: \* urlMaps are used by global - external Application Load Balancers, classic Application Load - Balancers, and cross-region internal Application Load Balancers. \* - regionUrlMaps are used by internal Application Load Balancers, - regional external Application Load Balancers and regional internal - Application Load Balancers. For a list of supported URL map features - by the load balancer type, see the Load balancing features: Routing - and traffic management table. For a list of supported URL map - features for Traffic Director, see the Traffic Director features: - Routing and traffic management table. This resource defines mappings - from hostnames and URL paths to either a backend service or a - backend bucket. To use the global urlMaps resource, the backend - service must have a loadBalancingScheme of either EXTERNAL, - EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the regionUrlMaps - resource, the backend service must have a loadBalancingScheme of - INTERNAL_MANAGED. For more information, read URL Map Concepts. + r"""Represents a URL Map resource. + + Compute Engine has two URL Map resources: + + - `Global `__ + - `Regional `__ + + A URL map resource is a component of certain types of cloud load + balancers and Traffic Director: + + - urlMaps are used by global external Application Load Balancers, + classic Application Load Balancers, and cross-region internal + Application Load Balancers. + - regionUrlMaps are used by internal Application Load Balancers, + regional external Application Load Balancers and regional internal + Application Load Balancers. + + For a list of supported URL map features by the load balancer type, + see the Load balancing features: Routing and traffic management + table. + + For a list of supported URL map features for Traffic Director, see + the Traffic Director features: Routing and traffic management table. + + This resource defines mappings from hostnames and URL paths to + either a backend service or a backend bucket. + + To use the global urlMaps resource, the backend service must have a + loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or + INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the + backend service must have aloadBalancingScheme of INTERNAL_MANAGED. + For more information, read URL Map Concepts. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. default_custom_error_response_policy (google.cloud.compute_v1beta.types.CustomErrorResponsePolicy): defaultCustomErrorResponsePolicy specifies how the Load - Balancer returns error responses when BackendServiceor - BackendBucket responds with an error. This policy takes - effect at the load balancer level and applies only when no - policy has been defined for the error code at lower levels - like PathMatcher, RouteRule and PathRule within this UrlMap. + Balancer returns error responses when + BackendServiceorBackendBucket responds with an error. + + This policy takes effect at the load balancer level and + applies only when no policy has been defined for the error + code at lower levels like PathMatcher, RouteRule and + PathRule within this UrlMap. + For example, consider a UrlMap with the following - configuration: - defaultCustomErrorResponsePolicy containing - policies for responding to 5xx and 4xx errors - A - PathMatcher configured for \*.example.com has - defaultCustomErrorResponsePolicy for 4xx. If a request for - http://www.example.com/ encounters a 404, the policy in - pathMatcher.defaultCustomErrorResponsePolicy will be - enforced. When the request for http://www.example.com/ - encounters a 502, the policy in - UrlMap.defaultCustomErrorResponsePolicy will be enforced. + configuration: + + :: + + - defaultCustomErrorResponsePolicy containing policies for + responding to 5xx and 4xx errors + - A PathMatcher configured for *.example.com has + defaultCustomErrorResponsePolicy for 4xx. + + If a request for http://www.example.com/ encounters a404, + the policy inpathMatcher.defaultCustomErrorResponsePolicy + will be enforced. When the request for + http://www.example.com/ encounters a502, the policy + inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When a request that does not match any host in \*.example.com such as http://www.myotherexample.com/, - encounters a 404, UrlMap.defaultCustomErrorResponsePolicy - takes effect. When used in conjunction with - defaultRouteAction.retryPolicy, retries take precedence. - Only once all retries are exhausted, the - defaultCustomErrorResponsePolicy is applied. While - attempting a retry, if load balancer is successful in + encounters a404, UrlMap.defaultCustomErrorResponsePolicy + takes effect. + + When used in conjunction withdefaultRouteAction.retryPolicy, + retries take precedence. Only once all retries are + exhausted, thedefaultCustomErrorResponsePolicy is applied. + While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to - the client. defaultCustomErrorResponsePolicy is supported - only for global external Application Load Balancers. + the client. + + defaultCustomErrorResponsePolicy is supported only for + global external Application Load Balancers. This field is a member of `oneof`_ ``_default_custom_error_response_policy``. default_route_action (google.cloud.compute_v1beta.types.HttpRouteAction): @@ -137183,14 +156141,19 @@ class UrlMap(proto.Message): the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding - the request to the selected backend. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. URL maps for classic Application Load - Balancers only support the urlRewrite action - within defaultRouteAction. defaultRouteAction - has no effect when the URL map is bound to a - target gRPC proxy that has the + the request to the selected backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + + URL maps for classic Application Load Balancers + only support the urlRewrite action within + defaultRouteAction. + + defaultRouteAction has no effect when the URL + map is bound to a target gRPC proxy that has the validateForProxyless field set to true. This field is a member of `oneof`_ ``_default_route_action``. @@ -137200,22 +156163,28 @@ class UrlMap(proto.Message): the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the - request to the backend. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. defaultService has no effect when the URL - map is bound to a target gRPC proxy that has the + request to the backend. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + defaultService has no effect when the URL map is + bound to a target gRPC proxy that has the validateForProxyless field set to true. This field is a member of `oneof`_ ``_default_service``. default_url_redirect (google.cloud.compute_v1beta.types.HttpRedirectAction): When none of the specified hostRules match, the request is redirected to a URL specified by - defaultUrlRedirect. Only one of - defaultUrlRedirect, defaultService or - defaultRouteAction.weightedBackendService can be - set. Not supported when the URL map is bound to - a target gRPC proxy. + defaultUrlRedirect. + + Only one of defaultUrlRedirect, defaultService + or defaultRouteAction.weightedBackendService can + be set. + + Not supported when the URL map is bound to a + target gRPC proxy. This field is a member of `oneof`_ ``_default_url_redirect``. description (str): @@ -137231,22 +156200,27 @@ class UrlMap(proto.Message): ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with - error 412 conditionNotMet. To see the latest - fingerprint, make a get() request to retrieve a - UrlMap. + error 412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a UrlMap. This field is a member of `oneof`_ ``_fingerprint``. header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backendService. The headerAction - specified here take effect after headerAction - specified under pathMatcher. headerAction is not - supported for load balancers that have their - loadBalancingScheme set to EXTERNAL. Not - supported when the URL map is bound to a target - gRPC proxy that has validateForProxyless field - set to true. + selected backendService. + + The headerAction specified here take effect + afterheaderAction specified under pathMatcher. + + headerAction is not supported for load balancers + that have + their loadBalancingScheme set to EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. host_rules (MutableSequence[google.cloud.compute_v1beta.types.HostRule]): @@ -137258,14 +156232,14 @@ class UrlMap(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always compute#urlMaps - for url maps. + Output only. [Output Only] Type of the resource. Always + compute#urlMaps for url maps. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -137277,10 +156251,11 @@ class UrlMap(proto.Message): The list of named PathMatchers to use against the URL. region (str): - [Output Only] URL of the region where the regional URL map - resides. This field is not applicable to global URL maps. - You must specify this field as part of the HTTP request URL. - It is not settable as a field in the request body. + Output only. [Output Only] URL of the region where the + regional URL map resides. This field is not applicable to + global URL maps. You must specify this field as part of the + HTTP request URL. It is not settable as a field in the + request body. This field is a member of `oneof`_ ``_region``. self_link (str): @@ -137289,11 +156264,13 @@ class UrlMap(proto.Message): This field is a member of `oneof`_ ``_self_link``. tests (MutableSequence[google.cloud.compute_v1beta.types.UrlMapTest]): The list of expected URL mapping tests. - Request to update the UrlMap succeeds only if - all test cases pass. You can specify a maximum - of 100 tests per UrlMap. Not supported when the - URL map is bound to a target gRPC proxy that has - validateForProxyless field set to true. + Request to update theUrlMap succeeds only if all + test cases pass. You can specify a maximum of + 100 tests per UrlMap. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. """ creation_timestamp: str = proto.Field( @@ -137396,20 +156373,21 @@ class UrlMapList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.UrlMap]): A list of UrlMap resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -137485,29 +156463,35 @@ class UrlMapTest(proto.Message): This field is a member of `oneof`_ ``_description``. expected_output_url (str): The expected output URL evaluated by the load balancer - containing the scheme, host, path and query parameters. For - rules that forward requests to backends, the test passes - only when expectedOutputUrl matches the request forwarded by + containing the scheme, host, path and query parameters. + + For rules that forward requests to backends, the test passes + only whenexpectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, - the test verifies that the forwarded request matches - hostRewrite and pathPrefixRewrite in the urlRewrite action. - When service is specified, expectedOutputUrl`s scheme is - ignored. For rules with urlRedirect, the test passes only if - expectedOutputUrl matches the URL in the load balancer's - redirect response. If urlRedirect specifies https_redirect, - the test passes only if the scheme in expectedOutputUrl is + the test verifies that the forwarded request + matcheshostRewrite and pathPrefixRewrite in theurlRewrite + action. When service is specified,expectedOutputUrl`s scheme + is ignored. + + For rules with urlRedirect, the test passes only + ifexpectedOutputUrl matches the URL in the load balancer's + redirect response. If urlRedirect specifieshttps_redirect, + the test passes only if the scheme inexpectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any - query parameters. expectedOutputUrl is optional when service - is specified. + query parameters. + + expectedOutputUrl is optional whenservice is specified. This field is a member of `oneof`_ ``_expected_output_url``. expected_redirect_response_code (int): For rules with urlRedirect, the test passes - only if expectedRedirectResponseCode matches the + only ifexpectedRedirectResponseCode matches the HTTP status code in load balancer's redirect - response. expectedRedirectResponseCode cannot be - set when service is set. + response. + + expectedRedirectResponseCode cannot be set + whenservice is set. This field is a member of `oneof`_ ``_expected_redirect_response_code``. headers (MutableSequence[google.cloud.compute_v1beta.types.UrlMapTestHeader]): @@ -137526,9 +156510,10 @@ class UrlMapTest(proto.Message): This field is a member of `oneof`_ ``_path``. service (str): Expected BackendService or BackendBucket - resource the given URL should be mapped to. The - service field cannot be set if - expectedRedirectResponseCode is set. + resource the given URL should be mapped to. + + The service field cannot + be set if expectedRedirectResponseCode is set. This field is a member of `oneof`_ ``_service``. """ @@ -137657,24 +156642,25 @@ class UrlMapsAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.UrlMapsScopedList]): A list of UrlMapsScopedList resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -137759,18 +156745,23 @@ class UrlMapsValidateRequest(proto.Message): Attributes: load_balancing_schemes (MutableSequence[str]): Specifies the load balancer type(s) this validation request - is for. Use EXTERNAL_MANAGED for global external Application + is for. UseEXTERNAL_MANAGED for global external Application Load Balancers and regional external Application Load Balancers. Use EXTERNAL for classic Application Load - Balancers. Use INTERNAL_MANAGED for internal Application - Load Balancers. For more information, refer to Choosing a - load balancer. If unspecified, the load balancing scheme - will be inferred from the backend service resources this URL - map references. If that can not be inferred (for example, - this URL map only references backend buckets, or this Url - map is for rewrites and redirects only and doesn't reference - any backends), EXTERNAL will be used as the default type. If - specified, the scheme(s) must not conflict with the load + Balancers. + + Use INTERNAL_MANAGED for internal Application Load + Balancers. For more information, refer to Choosing a load + balancer. + + If unspecified, the load balancing scheme will be inferred + from the backend service resources this URL map references. + If that can not be inferred (for example, this URL map only + references backend buckets, or this Url map is for rewrites + and redirects only and doesn't reference any + backends),EXTERNAL will be used as the default type. + + If specified, the scheme(s) must not conflict with the load balancing scheme of the backend service resources this Url map references. Check the LoadBalancingSchemes enum for the list of possible values. @@ -137848,34 +156839,46 @@ class UrlRewrite(proto.Message): host_rewrite (str): Before forwarding the request to the selected service, the request's host header is replaced - with contents of hostRewrite. The value must be - from 1 to 255 characters. + with contents of hostRewrite. + + The value must be from 1 to 255 characters. This field is a member of `oneof`_ ``_host_rewrite``. path_prefix_rewrite (str): Before forwarding the request to the selected backend service, the matching portion of the - request's path is replaced by pathPrefixRewrite. + request's path is replaced bypathPrefixRewrite. + The value must be from 1 to 1024 characters. This field is a member of `oneof`_ ``_path_prefix_rewrite``. path_template_rewrite (str): If specified, the pattern rewrites the URL path (based on - the :path header) using the HTTP template syntax. A - corresponding path_template_match must be specified. Any + the :path header) using the HTTP template syntax. + + A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match - field. - -At least one variable must be specified in the - path_template_match field - You can omit variables from the - rewritten URL - The \* and \*\* operators cannot be matched - unless they have a corresponding variable name - e.g. - {format=\*} or {var=\ **}. For example, a - path_template_match of /static/{format=**} could be - rewritten as /static/content/{format} to prefix /content to - the URL. Variables can also be re-ordered in a rewrite, so - that /{country}/{format}/{suffix=*\*} can be rewritten as - /content/{format}/{country}/{suffix}. At least one non-empty + field. + + :: + + - -At least one variable must be specified in the path_template_match + field + - You can omit variables from the rewritten URL + - The * and ** operators cannot be matched + unless they have a corresponding variable name - e.g. + {format=*} or {var=**}. + + For example, a path_template_match of /static/{format=\ **} + could be rewritten as /static/content/{format} to + prefix/content to the URL. Variables can also be re-ordered + in a rewrite, so that /{country}/{format}/{suffix=**} can be + rewritten as /content/{format}/{country}/{suffix}. + + At least one non-empty routeRules[].matchRules[].path_template_match is required. - Only one of path_prefix_rewrite or path_template_rewrite may + + Only one of path_prefix_rewrite orpath_template_rewrite may be specified. This field is a member of `oneof`_ ``_path_template_rewrite``. @@ -137907,13 +156910,13 @@ class UsableSubnetwork(proto.Message): Attributes: external_ipv6_prefix (str): - [Output Only] The external IPv6 address range that is - assigned to this subnetwork. + Output only. [Output Only] The external IPv6 address range + that is assigned to this subnetwork. This field is a member of `oneof`_ ``_external_ipv6_prefix``. internal_ipv6_prefix (str): - [Output Only] The internal IPv6 address range that is - assigned to this subnetwork. + Output only. [Output Only] The internal IPv6 address range + that is assigned to this subnetwork. This field is a member of `oneof`_ ``_internal_ipv6_prefix``. ip_cidr_range (str): @@ -137940,8 +156943,8 @@ class UsableSubnetwork(proto.Message): This field is a member of `oneof`_ ``_purpose``. role (str): The role of subnetwork. Currently, this field is only used - when purpose is set to GLOBAL_MANAGED_PROXY or - REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + when purpose is set to GLOBAL_MANAGED_PROXY + orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or @@ -137954,12 +156957,13 @@ class UsableSubnetwork(proto.Message): Secondary IP ranges. stack_type (str): The stack type for the subnet. If set to IPV4_ONLY, new VMs - in the subnet are assigned IPv4 addresses only. If set to - IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 + in the subnet are assigned IPv4 addresses only. If set + toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. + This field can be both set at resource creation time and - updated using patch. Check the StackType enum for the list - of possible values. + updated usingpatch. Check the StackType enum for the list of + possible values. This field is a member of `oneof`_ ``_stack_type``. subnetwork (str): @@ -138036,9 +157040,9 @@ class Purpose(proto.Enum): class Role(proto.Enum): r"""The role of subnetwork. Currently, this field is only used when - purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. - The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is - one that is currently being used for Envoy-based load balancers in a + purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The + value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one + that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. @@ -138059,10 +157063,12 @@ class Role(proto.Enum): class StackType(proto.Enum): r"""The stack type for the subnet. If set to IPV4_ONLY, new VMs in the - subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new - VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If - not specified, IPV4_ONLY is used. This field can be both set at - resource creation time and updated using patch. + subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs + in the subnet can be assigned both IPv4 and IPv6 addresses. If not + specified, IPV4_ONLY is used. + + This field can be both set at resource creation time and updated + usingpatch. Values: UNDEFINED_STACK_TYPE (0): @@ -138152,7 +157158,7 @@ class UsableSubnetworkSecondaryRange(proto.Message): The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 - characters long, and comply with RFC1035. The + characters long, and comply withRFC1035. The name must be unique within the subnetwork. This field is a member of `oneof`_ ``_range_name``. @@ -138184,31 +157190,32 @@ class UsableSubnetworksAggregatedList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.UsableSubnetwork]): [Output] A list of usable subnetwork URLs. kind (str): - [Output Only] Type of resource. Always - compute#usableSubnetworksAggregatedList for aggregated lists - of usable subnetworks. + Output only. [Output Only] Type of resource. + Alwayscompute#usableSubnetworksAggregatedList for aggregated + lists of usable subnetworks. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. In special cases - listUsable may return 0 subnetworks and nextPageToken which + listUsable may return 0 subnetworks andnextPageToken which still should be used to get the next page of results. This field is a member of `oneof`_ ``_next_page_token``. scoped_warnings (MutableSequence[google.cloud.compute_v1beta.types.SubnetworksScopedWarning]): - [Output Only] Informational warning messages for failures - encountered from scopes. + Output only. [Output Only] Informational warning messages + for failures encountered from scopes. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -138274,20 +157281,20 @@ class UsageExportLocation(proto.Message): Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the - bucket name by itself, such as example-bucket, - or the bucket name with gs:// or + bucket name by itself, such asexample-bucket, or + the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket. This field is a member of `oneof`_ ``_bucket_name``. report_name_prefix (str): An optional prefix for the name of the usage report object - stored in bucketName. If not supplied, defaults to - usage_gce. The report is stored as a CSV file named - report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the - day of the usage according to Pacific Time. If you supply a - prefix, it should conform to Cloud Storage object naming - conventions. + stored inbucketName. If not supplied, defaults tousage_gce. + The report is stored as a CSV file + namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD is + the day of the usage according to Pacific Time. If you + supply a prefix, it should conform to Cloud Storageobject + naming conventions. This field is a member of `oneof`_ ``_report_name_prefix``. """ @@ -138379,8 +157386,8 @@ class VmEndpointNatMappings(proto.Message): Attributes: instance_name (str): - Name of the VM instance which the endpoint - belongs to + Output only. Name of the VM instance which + the endpoint belongs to This field is a member of `oneof`_ ``_instance_name``. interface_nat_mappings (MutableSequence[google.cloud.compute_v1beta.types.VmEndpointNatMappingsInterfaceNatMappings]): @@ -138410,38 +157417,40 @@ class VmEndpointNatMappingsInterfaceNatMappings(proto.Message): Attributes: drain_nat_ip_port_ranges (MutableSequence[str]): - List of all drain IP:port-range mappings assigned to this - interface. These ranges are inclusive, that is, both the - first and the last ports can be used for NAT. Example: - ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + Output only. List of all drain IP:port-range mappings + assigned to this interface. These ranges are inclusive, that + is, both the first and the last ports can be used for NAT. + Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. nat_ip_port_ranges (MutableSequence[str]): - A list of all IP:port-range mappings assigned to this - interface. These ranges are inclusive, that is, both the - first and the last ports can be used for NAT. Example: + Output only. A list of all IP:port-range mappings assigned + to this interface. These ranges are inclusive, that is, both + the first and the last ports can be used for NAT. Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. num_total_drain_nat_ports (int): - Total number of drain ports across all NAT IPs allocated to - this interface. It equals to the aggregated port number in - the field drain_nat_ip_port_ranges. + Output only. Total number of drain ports across all NAT IPs + allocated to this interface. It equals to the aggregated + port number in the field drain_nat_ip_port_ranges. This field is a member of `oneof`_ ``_num_total_drain_nat_ports``. num_total_nat_ports (int): - Total number of ports across all NAT IPs allocated to this - interface. It equals to the aggregated port number in the - field nat_ip_port_ranges. + Output only. Total number of ports across all NAT IPs + allocated to this interface. It equals to the aggregated + port number in the field nat_ip_port_ranges. This field is a member of `oneof`_ ``_num_total_nat_ports``. rule_mappings (MutableSequence[google.cloud.compute_v1beta.types.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings]): - Information about mappings provided by rules - in this NAT. + Output only. Information about mappings + provided by rules in this NAT. source_alias_ip_range (str): - Alias IP range for this interface endpoint. - It will be a private (RFC 1918) IP range. - Examples: "10.33.4.55/32", or "192.168.5.0/24". + Output only. Alias IP range for this + interface endpoint. It will be a private (RFC + 1918) IP range. Examples: "10.33.4.55/32", or + "192.168.5.0/24". This field is a member of `oneof`_ ``_source_alias_ip_range``. source_virtual_ip (str): - Primary IP of the VM for this NIC. + Output only. Primary IP of the VM for this + NIC. This field is a member of `oneof`_ ``_source_virtual_ip``. """ @@ -138490,29 +157499,31 @@ class VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings(proto.Message): Attributes: drain_nat_ip_port_ranges (MutableSequence[str]): - List of all drain IP:port-range mappings assigned to this - interface by this rule. These ranges are inclusive, that is, - both the first and the last ports can be used for NAT. - Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + Output only. List of all drain IP:port-range mappings + assigned to this interface by this rule. These ranges are + inclusive, that is, both the first and the last ports can be + used for NAT. Example: ["2.2.2.2:12345-12355", + "1.1.1.1:2234-2234"]. nat_ip_port_ranges (MutableSequence[str]): - A list of all IP:port-range mappings assigned to this - interface by this rule. These ranges are inclusive, that is, - both the first and the last ports can be used for NAT. - Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + Output only. A list of all IP:port-range mappings assigned + to this interface by this rule. These ranges are inclusive, + that is, both the first and the last ports can be used for + NAT. Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. num_total_drain_nat_ports (int): - Total number of drain ports across all NAT IPs allocated to - this interface by this rule. It equals the aggregated port - number in the field drain_nat_ip_port_ranges. + Output only. Total number of drain ports across all NAT IPs + allocated to this interface by this rule. It equals the + aggregated port number in the field + drain_nat_ip_port_ranges. This field is a member of `oneof`_ ``_num_total_drain_nat_ports``. num_total_nat_ports (int): - Total number of ports across all NAT IPs allocated to this - interface by this rule. It equals the aggregated port number - in the field nat_ip_port_ranges. + Output only. Total number of ports across all NAT IPs + allocated to this interface by this rule. It equals the + aggregated port number in the field nat_ip_port_ranges. This field is a member of `oneof`_ ``_num_total_nat_ports``. rule_number (int): - Rule number of the NAT Rule. + Output only. Rule number of the NAT Rule. This field is a member of `oneof`_ ``_rule_number``. """ @@ -138554,15 +157565,15 @@ class VmEndpointNatMappingsList(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always - compute#vmEndpointNatMappingsList for lists of Nat mappings - of VM endpoints. + Output only. [Output Only] Type of resource. + Alwayscompute#vmEndpointNatMappingsList for lists of Nat + mappings of VM endpoints. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -138572,7 +157583,8 @@ class VmEndpointNatMappingsList(proto.Message): [Output Only] A list of Nat mapping information of VM endpoints. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -138618,20 +157630,511 @@ def raw_page(self): ) +class VmExtensionPoliciesScopedList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vm_extension_policies (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicy]): + List of VmExtensionPolicy resources contained + in this scope. + warning (google.cloud.compute_v1beta.types.Warning): + Informational warning which replaces the list + of backend services when the list is empty. + + This field is a member of `oneof`_ ``_warning``. + """ + + vm_extension_policies: MutableSequence["VmExtensionPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=238490584, + message="VmExtensionPolicy", + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class VmExtensionPolicy(proto.Message): + r"""Represents a VM extension policy. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + creation_timestamp (str): + Output only. [Output Only] Creation timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_creation_timestamp``. + description (str): + An optional description of this resource. + + This field is a member of `oneof`_ ``_description``. + extension_policies (MutableMapping[str, google.cloud.compute_v1beta.types.VmExtensionPolicyExtensionPolicy]): + Required. A map of extension names (e.g., + "cloudops") to their corresponding policy + configurations. + global_resource_link (str): + Optional. Output only. [Output Only] Link to the global + policy that manages this zone policy, if applicable. + + This field is a member of `oneof`_ ``_global_resource_link``. + id (int): + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. + + This field is a member of `oneof`_ ``_id``. + instance_selectors (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicyInstanceSelector]): + Optional. Selectors to target VMs for this policy. VMs are + selected if they match *any* of the provided selectors + (logical OR). If this list is empty, the policy applies to + all VMs. + kind (str): + Output only. [Output Only] Type of the resource. + Alwayscompute#vmExtensionPolicy. + + This field is a member of `oneof`_ ``_kind``. + managed_by_global (bool): + Optional. Output only. [Output Only] Indicates if this + policy is managed by a global policy. + + This field is a member of `oneof`_ ``_managed_by_global``. + name (str): + Name of the resource. Provided by the client when the + resource is created. The name must be 1-63 characters long, + and comply withRFC1035. Specifically, the name must be 1-63 + characters long and match the regular expression + ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first + character must be a lowercase letter, and all following + characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + + This field is a member of `oneof`_ ``_name``. + priority (int): + Optional. Priority of this policy. Used to + resolve conflicts when multiple policies apply + to the same extension. The policy priority is an + integer from 0 to 65535, inclusive. Lower + integers indicate higher priorities. If you do + not specify a priority when creating a rule, it + is assigned a priority of 1000. If priorities + are equal, the policy with the more recent + creation timestamp takes precedence. + + This field is a member of `oneof`_ ``_priority``. + self_link (str): + Output only. [Output Only] Server-defined fully-qualified + URL for this resource. + + This field is a member of `oneof`_ ``_self_link``. + self_link_with_id (str): + Output only. [Output Only] Server-defined URL for this + resource's resource id. + + This field is a member of `oneof`_ ``_self_link_with_id``. + state (str): + Optional. Output only. [Output Only] Current state of the + policy: ACTIVE or DELETING. Check the State enum for the + list of possible values. + + This field is a member of `oneof`_ ``_state``. + update_timestamp (str): + Output only. [Output Only] Update timestamp inRFC3339 text + format. + + This field is a member of `oneof`_ ``_update_timestamp``. + """ + + class State(proto.Enum): + r"""Optional. Output only. [Output Only] Current state of the policy: + ACTIVE or DELETING. + + Values: + UNDEFINED_STATE (0): + A value indicating that the enum field is not + set. + ACTIVE (314733318): + The policy is active and applied to matching + VMs. Newly created VMs that match the policy + will also receive the extension policy. + DELETING (528602024): + The policy is in the process of being + deleted. After the extension is removed from all + matching VMs, the policy will be deleted. + STATE_UNSPECIFIED (470755401): + Default value. Do not use. + """ + UNDEFINED_STATE = 0 + ACTIVE = 314733318 + DELETING = 528602024 + STATE_UNSPECIFIED = 470755401 + + creation_timestamp: str = proto.Field( + proto.STRING, + number=30525366, + optional=True, + ) + description: str = proto.Field( + proto.STRING, + number=422937596, + optional=True, + ) + extension_policies: MutableMapping[ + str, "VmExtensionPolicyExtensionPolicy" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=227761488, + message="VmExtensionPolicyExtensionPolicy", + ) + global_resource_link: str = proto.Field( + proto.STRING, + number=516569583, + optional=True, + ) + id: int = proto.Field( + proto.UINT64, + number=3355, + optional=True, + ) + instance_selectors: MutableSequence[ + "VmExtensionPolicyInstanceSelector" + ] = proto.RepeatedField( + proto.MESSAGE, + number=520298826, + message="VmExtensionPolicyInstanceSelector", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + managed_by_global: bool = proto.Field( + proto.BOOL, + number=88605675, + optional=True, + ) + name: str = proto.Field( + proto.STRING, + number=3373707, + optional=True, + ) + priority: int = proto.Field( + proto.INT32, + number=445151652, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + self_link_with_id: str = proto.Field( + proto.STRING, + number=44520962, + optional=True, + ) + state: str = proto.Field( + proto.STRING, + number=109757585, + optional=True, + ) + update_timestamp: str = proto.Field( + proto.STRING, + number=120894752, + optional=True, + ) + + +class VmExtensionPolicyAggregatedListResponse(proto.Message): + r"""Response for the aggregated list of VM extension policies. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + + This field is a member of `oneof`_ ``_etag``. + id (str): + [Output Only] Unique identifier for the resource; defined by + the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableMapping[str, google.cloud.compute_v1beta.types.VmExtensionPoliciesScopedList]): + A list of VmExtensionPoliciesScopedList + resources. + kind (str): + Output only. [Output Only] Type of resource. + Alwayscompute#VmExtensionPolicyAggregatedList for lists of + VmExtensionPolicies. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + [Output Only] This token allows you to get the next page of + results for list requests. If the number of results is + larger thanmaxResults, use the nextPageToken as a value for + the query parameter pageToken in the next list request. + Subsequent list requests will have their own nextPageToken + to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableMapping[str, "VmExtensionPoliciesScopedList"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=100526016, + message="VmExtensionPoliciesScopedList", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + +class VmExtensionPolicyExtensionPolicy(proto.Message): + r"""Configuration for a specific VM extension. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pinned_version (str): + Optional. The specific version of the + extension to install. If not set, the latest + version is used. + + This field is a member of `oneof`_ ``_pinned_version``. + string_config (str): + Optional. String-based configuration data for + the extension. + + This field is a member of `oneof`_ ``_string_config``. + """ + + pinned_version: str = proto.Field( + proto.STRING, + number=446267249, + optional=True, + ) + string_config: str = proto.Field( + proto.STRING, + number=318905136, + optional=True, + ) + + +class VmExtensionPolicyInstanceSelector(proto.Message): + r"""Defines how to select VMs to apply a zone VM extension + policy. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + label_selector (google.cloud.compute_v1beta.types.VmExtensionPolicyLabelSelector): + Optional. LabelSelector selects VMs based on + their labels. + + This field is a member of `oneof`_ ``_label_selector``. + """ + + label_selector: "VmExtensionPolicyLabelSelector" = proto.Field( + proto.MESSAGE, + number=349780170, + optional=True, + message="VmExtensionPolicyLabelSelector", + ) + + +class VmExtensionPolicyLabelSelector(proto.Message): + r"""A LabelSelector is applied to a VM only if it matches all the + specified labels. + + Attributes: + inclusion_labels (MutableMapping[str, str]): + Optional. A map of key-value pairs representing VM labels. + VMs must have all of the labels specified in this map to be + selected (logical AND). + + e.g. If the ``inclusion_labels`` are {("key1", "value1"), + ("key2", "value2")}, the VM labels must contain both + ("key1", "value1") and ("key2", "value2") to be selected. If + the VM labels are ("key1", "value1") and ("something", + "else"), it will not be selected. + + If the map is empty, it's considered a match. + """ + + inclusion_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=501312642, + ) + + +class VmExtensionPolicyList(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + etag (str): + Output only. [Output Only] Fingerprint of this resource. A + hash of the contents stored in this object. This field is + used in optimistic locking. This field will be ignored when + inserting a VmExtensionPolicy. An up-to-date fingerprint + must be provided in order to update the VmExtensionPolicy. + + To see the latest value of the fingerprint, make a get() + request to retrieve a VmExtensionPolicy. + + This field is a member of `oneof`_ ``_etag``. + id (str): + Output only. [Output Only] Unique identifier for the + resource; defined by the server. + + This field is a member of `oneof`_ ``_id``. + items (MutableSequence[google.cloud.compute_v1beta.types.VmExtensionPolicy]): + Output only. [Output Only] A list of VM extension policy + resources. + kind (str): + Output only. Type of resource. + + This field is a member of `oneof`_ ``_kind``. + next_page_token (str): + Output only. [Output Only] This token allows you to get the + next page of results for list requests. If the number of + results is larger thanmaxResults, use the nextPageToken as a + value for the query parameter pageToken in the next list + request. Subsequent list requests will have their own + nextPageToken to continue paging through the results. + + This field is a member of `oneof`_ ``_next_page_token``. + self_link (str): + Output only. [Output Only] Server-defined URL for this + resource. + + This field is a member of `oneof`_ ``_self_link``. + unreachables (MutableSequence[str]): + Output only. [Output Only] Unreachable resources. + warning (google.cloud.compute_v1beta.types.Warning): + Output only. [Output Only] Informational warning message. + + This field is a member of `oneof`_ ``_warning``. + """ + + @property + def raw_page(self): + return self + + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + id: str = proto.Field( + proto.STRING, + number=3355, + optional=True, + ) + items: MutableSequence["VmExtensionPolicy"] = proto.RepeatedField( + proto.MESSAGE, + number=100526016, + message="VmExtensionPolicy", + ) + kind: str = proto.Field( + proto.STRING, + number=3292052, + optional=True, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=79797525, + optional=True, + ) + self_link: str = proto.Field( + proto.STRING, + number=456214797, + optional=True, + ) + unreachables: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=243372063, + ) + warning: "Warning" = proto.Field( + proto.MESSAGE, + number=50704284, + optional=True, + message="Warning", + ) + + class VpnGateway(proto.Message): - r"""Represents a HA VPN gateway. HA VPN is a high-availability - (HA) Cloud VPN solution that lets you securely connect your - on-premises network to your Google Cloud Virtual Private Cloud - network through an IPsec VPN connection in a single region. For - more information about Cloud HA VPN solutions, see Cloud VPN - topologies . + r"""Represents a HA VPN gateway. + + HA VPN is a high-availability (HA) Cloud VPN solution that lets + you securely connect your on-premises network to your Google + Cloud Virtual Private Cloud network through an IPsec VPN + connection in a single region. For more information about Cloud + HA VPN solutions, see Cloud VPN topologies . .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -138648,13 +158151,13 @@ class VpnGateway(proto.Message): This field is a member of `oneof`_ ``_gateway_ip_version``. id (int): - [Output Only] The unique identifier for the resource. This - identifier is defined by the server. + Output only. [Output Only] The unique identifier for the + resource. This identifier is defined by the server. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of resource. Always compute#vpnGateway - for VPN gateways. + Output only. [Output Only] Type of resource. Always + compute#vpnGateway for VPN gateways. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -138666,20 +158169,21 @@ class VpnGateway(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a VpnGateway. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a VpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -138694,21 +158198,22 @@ class VpnGateway(proto.Message): This field is a member of `oneof`_ ``_network``. region (str): - [Output Only] URL of the region where the VPN gateway - resides. + Output only. [Output Only] URL of the region where the VPN + gateway resides. This field is a member of `oneof`_ ``_region``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. stack_type (str): The stack type for this VPN gateway to identify the IP - protocols that are enabled. Possible values are: IPV4_ONLY, - IPV4_IPV6, IPV6_ONLY. If not specified, IPV4_ONLY is used if - the gateway IP version is IPV4, or IPV4_IPV6 if the gateway - IP version is IPV6. Check the StackType enum for the list of - possible values. + protocols that are enabled. Possible values are: + IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY + is used if the gateway IP version isIPV4, or IPV4_IPV6 if + the gateway IP version isIPV6. Check the StackType enum for + the list of possible values. This field is a member of `oneof`_ ``_stack_type``. vpn_interfaces (MutableSequence[google.cloud.compute_v1beta.types.VpnGatewayVpnGatewayInterface]): @@ -138737,9 +158242,9 @@ class GatewayIpVersion(proto.Enum): class StackType(proto.Enum): r"""The stack type for this VPN gateway to identify the IP protocols - that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6, - IPV6_ONLY. If not specified, IPV4_ONLY is used if the gateway IP - version is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6. + that are enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, + IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP + version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6. Values: UNDEFINED_STACK_TYPE (0): @@ -138841,25 +158346,26 @@ class VpnGatewayAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.VpnGatewaysScopedList]): A list of VpnGateway resources. kind (str): - [Output Only] Type of resource. Always compute#vpnGateway - for VPN gateways. + Output only. [Output Only] Type of resource. Always + compute#vpnGateway for VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -138922,21 +158428,22 @@ class VpnGatewayList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.VpnGateway]): A list of VpnGateway resources. kind (str): - [Output Only] Type of resource. Always compute#vpnGateway - for VPN gateways. + Output only. [Output Only] Type of resource. Always + compute#vpnGateway for VPN gateways. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -138987,7 +158494,8 @@ class VpnGatewayStatus(proto.Message): Attributes: vpn_connections (MutableSequence[google.cloud.compute_v1beta.types.VpnGatewayStatusVpnConnection]): - List of VPN connection for this VpnGateway. + Output only. List of VPN connection for this + VpnGateway. """ vpn_connections: MutableSequence[ @@ -139009,9 +158517,9 @@ class VpnGatewayStatusHighAvailabilityRequirementState(proto.Message): Attributes: state (str): Indicates the high availability requirement state for the - VPN connection. Valid values are CONNECTION_REDUNDANCY_MET, - CONNECTION_REDUNDANCY_NOT_MET. Check the State enum for the - list of possible values. + VPN connection. Valid values are + CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. + Check the State enum for the list of possible values. This field is a member of `oneof`_ ``_state``. unsatisfied_reason (str): @@ -139025,8 +158533,8 @@ class VpnGatewayStatusHighAvailabilityRequirementState(proto.Message): class State(proto.Enum): r"""Indicates the high availability requirement state for the VPN - connection. Valid values are CONNECTION_REDUNDANCY_MET, - CONNECTION_REDUNDANCY_NOT_MET. + connection. Valid values are + CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. Values: UNDEFINED_STATE (0): @@ -139085,19 +158593,19 @@ class VpnGatewayStatusTunnel(proto.Message): Attributes: local_gateway_interface (int): - The VPN gateway interface this VPN tunnel is - associated with. + Output only. The VPN gateway interface this + VPN tunnel is associated with. This field is a member of `oneof`_ ``_local_gateway_interface``. peer_gateway_interface (int): - The peer gateway interface this VPN tunnel is - connected to, the peer gateway could either be - an external VPN gateway or a Google Cloud VPN - gateway. + Output only. The peer gateway interface this + VPN tunnel is connected to, the peer gateway + could either be an external VPN gateway or a + Google Cloud VPN gateway. This field is a member of `oneof`_ ``_peer_gateway_interface``. tunnel_url (str): - URL reference to the VPN tunnel. + Output only. URL reference to the VPN tunnel. This field is a member of `oneof`_ ``_tunnel_url``. """ @@ -139129,15 +158637,16 @@ class VpnGatewayStatusVpnConnection(proto.Message): Attributes: peer_external_gateway (str): - URL reference to the peer external VPN gateways to which the - VPN tunnels in this VPN connection are connected. This field - is mutually exclusive with peer_gcp_gateway. + Output only. URL reference to the peer external VPN gateways + to which the VPN tunnels in this VPN connection are + connected. This field is mutually exclusive with + peer_gcp_gateway. This field is a member of `oneof`_ ``_peer_external_gateway``. peer_gcp_gateway (str): - URL reference to the peer side VPN gateways to which the VPN - tunnels in this VPN connection are connected. This field is - mutually exclusive with peer_gcp_gateway. + Output only. URL reference to the peer side VPN gateways to + which the VPN tunnels in this VPN connection are connected. + This field is mutually exclusive with peer_gcp_gateway. This field is a member of `oneof`_ ``_peer_gcp_gateway``. state (google.cloud.compute_v1beta.types.VpnGatewayStatusHighAvailabilityRequirementState): @@ -139180,8 +158689,8 @@ class VpnGatewayVpnGatewayInterface(proto.Message): Attributes: id (int): - [Output Only] Numeric identifier for this VPN interface - associated with the VPN gateway. + Output only. [Output Only] Numeric identifier for this VPN + interface associated with the VPN gateway. This field is a member of `oneof`_ ``_id``. interconnect_attachment (str): @@ -139195,12 +158704,12 @@ class VpnGatewayVpnGatewayInterface(proto.Message): This field is a member of `oneof`_ ``_interconnect_attachment``. ip_address (str): - [Output Only] IP address for this VPN interface associated - with the VPN gateway. The IP address could be either a - regional external IP address or a regional internal IP - address. The two IP addresses for a VPN gateway must be all - regional external or regional internal IP addresses. There - cannot be a mix of regional external IP addresses and + Output only. [Output Only] IP address for this VPN interface + associated with the VPN gateway. The IP address could be + either a regional external IP address or a regional internal + IP address. The two IP addresses for a VPN gateway must be + all regional external or regional internal IP addresses. + There cannot be a mix of regional external IP addresses and regional internal IP addresses. For HA VPN over Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional @@ -139210,10 +158719,10 @@ class VpnGatewayVpnGatewayInterface(proto.Message): This field is a member of `oneof`_ ``_ip_address``. ipv6_address (str): - [Output Only] IPv6 address for this VPN interface associated - with the VPN gateway. The IPv6 address must be a regional - external IPv6 address. The format is RFC 5952 format (e.g. - 2001:db8::2d9:51:0:0). + Output only. [Output Only] IPv6 address for this VPN + interface associated with the VPN gateway. The IPv6 address + must be a regional external IPv6 address. The format is RFC + 5952 format (e.g. 2001:db8::2d9:51:0:0). This field is a member of `oneof`_ ``_ipv6_address``. """ @@ -139289,8 +158798,10 @@ class VpnGatewaysScopedList(proto.Message): class VpnTunnel(proto.Message): - r"""Represents a Cloud VPN Tunnel resource. For more information - about VPN, read the the Cloud VPN Overview. + r"""Represents a Cloud VPN Tunnel resource. + + For more information about VPN, read the + the Cloud VPN Overview. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -139302,7 +158813,8 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_cipher_suite``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -139328,8 +158840,8 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_ike_version``. kind (str): - [Output Only] Type of resource. Always compute#vpnTunnel for - VPN tunnels. + Output only. [Output Only] Type of resource. Always + compute#vpnTunnel for VPN tunnels. This field is a member of `oneof`_ ``_kind``. label_fingerprint (str): @@ -139341,15 +158853,16 @@ class VpnTunnel(proto.Message): or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will - fail with error 412 conditionNotMet. To see the - latest fingerprint, make a get() request to - retrieve a VpnTunnel. + fail with error412 conditionNotMet. + + To see the latest fingerprint, make a get() + request to retrieve a VpnTunnel. This field is a member of `oneof`_ ``_label_fingerprint``. labels (MutableMapping[str, str]): Labels for this resource. These can only be - added or modified by the setLabels method. Each - label key/value pair must comply with RFC1035. + added or modified by thesetLabels method. Each + label key/value pair must comply withRFC1035. Label values may be empty. local_traffic_selector (MutableSequence[str]): Local traffic selector to use when @@ -139362,7 +158875,7 @@ class VpnTunnel(proto.Message): name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -139372,9 +158885,9 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_name``. peer_external_gateway (str): URL of the peer side external VPN gateway to - which this VPN tunnel is connected. Provided by - the client when the VPN tunnel is created. This - field is exclusive with the field + which this VPN tunnel is connected. + Provided by the client when the VPN tunnel is + created. This field is exclusive with the field peerGcpGateway. This field is a member of `oneof`_ ``_peer_external_gateway``. @@ -139440,30 +158953,41 @@ class VpnTunnel(proto.Message): This field is a member of `oneof`_ ``_shared_secret_hash``. status (str): [Output Only] The status of the VPN tunnel, which can be one - of the following: - PROVISIONING: Resource is being - allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: - Waiting to receive all VPN-related configs from the user. - Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and - Route resources are needed to setup the VPN tunnel. - - FIRST_HANDSHAKE: Successful first handshake with the peer - VPN. - ESTABLISHED: Secure session is successfully - established with the peer VPN. - NETWORK_ERROR: Deprecated, - replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth - error (for example, bad shared secret). - - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: - Resources are being deallocated for the VPN tunnel. - - FAILED: Tunnel creation has failed and the tunnel is not - ready to be used. - NO_INCOMING_PACKETS: No incoming packets - from peer. - REJECTED: Tunnel configuration was rejected, - can be result of being denied access. - - ALLOCATING_RESOURCES: Cloud VPN is in the process of - allocating all required resources. - STOPPED: Tunnel is - stopped due to its Forwarding Rules being deleted for - Classic VPN tunnels or the project is in frozen state. - - PEER_IDENTITY_MISMATCH: Peer identity does not match peer - IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic - selector narrowing not allowed for an HA-VPN tunnel. Check - the Status enum for the list of possible values. + of the following: + + :: + + - PROVISIONING: Resource is being allocated for the VPN tunnel. + - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + from + the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route + resources are needed to setup the VPN tunnel. + - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + - ESTABLISHED: Secure session is successfully established with the peer + VPN. + - NETWORK_ERROR: Deprecated, replaced by + NO_INCOMING_PACKETS + - AUTHORIZATION_ERROR: Auth error (for example, + bad shared secret). + - NEGOTIATION_FAILURE: Handshake failed. + - DEPROVISIONING: Resources are being deallocated for the VPN + tunnel. + - FAILED: Tunnel creation has failed and the tunnel is not + ready to be used. + - NO_INCOMING_PACKETS: No incoming packets from + peer. + - REJECTED: Tunnel configuration was rejected, can be result + of being denied access. + - ALLOCATING_RESOURCES: Cloud VPN is in the + process of allocating all required resources. + - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted + for Classic VPN tunnels or the project is in frozen state. + - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + probably behind NAT. + - TS_NARROWING_NOT_ALLOWED: Traffic selector + narrowing not allowed for an HA-VPN tunnel. + + Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. target_vpn_gateway (str): @@ -139489,26 +159013,39 @@ class VpnTunnel(proto.Message): class Status(proto.Enum): r"""[Output Only] The status of the VPN tunnel, which can be one of the - following: - PROVISIONING: Resource is being allocated for the VPN - tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all - VPN-related configs from the user. Network, TargetVpnGateway, - VpnTunnel, ForwardingRule, and Route resources are needed to setup - the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with - the peer VPN. - ESTABLISHED: Secure session is successfully - established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced - by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for - example, bad shared secret). - NEGOTIATION_FAILURE: Handshake - failed. - DEPROVISIONING: Resources are being deallocated for the - VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is - not ready to be used. - NO_INCOMING_PACKETS: No incoming packets - from peer. - REJECTED: Tunnel configuration was rejected, can be - result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is - in the process of allocating all required resources. - STOPPED: - Tunnel is stopped due to its Forwarding Rules being deleted for - Classic VPN tunnels or the project is in frozen state. - - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, - probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector - narrowing not allowed for an HA-VPN tunnel. + following: + + :: + + - PROVISIONING: Resource is being allocated for the VPN tunnel. + - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs + from + the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route + resources are needed to setup the VPN tunnel. + - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. + - ESTABLISHED: Secure session is successfully established with the peer + VPN. + - NETWORK_ERROR: Deprecated, replaced by + NO_INCOMING_PACKETS + - AUTHORIZATION_ERROR: Auth error (for example, + bad shared secret). + - NEGOTIATION_FAILURE: Handshake failed. + - DEPROVISIONING: Resources are being deallocated for the VPN + tunnel. + - FAILED: Tunnel creation has failed and the tunnel is not + ready to be used. + - NO_INCOMING_PACKETS: No incoming packets from + peer. + - REJECTED: Tunnel configuration was rejected, can be result + of being denied access. + - ALLOCATING_RESOURCES: Cloud VPN is in the + process of allocating all required resources. + - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted + for Classic VPN tunnels or the project is in frozen state. + - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + probably behind NAT. + - TS_NARROWING_NOT_ALLOWED: Traffic selector + narrowing not allowed for an HA-VPN tunnel. Values: UNDEFINED_STATUS (0): @@ -139706,25 +159243,26 @@ class VpnTunnelAggregatedList(proto.Message): items (MutableMapping[str, google.cloud.compute_v1beta.types.VpnTunnelsScopedList]): A list of VpnTunnelsScopedList resources. kind (str): - [Output Only] Type of resource. Always compute#vpnTunnel for - VPN tunnels. + Output only. [Output Only] Type of resource. Always + compute#vpnTunnel for VPN tunnels. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. + Output only. [Output Only] Unreachable resources. warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -139815,21 +159353,22 @@ class VpnTunnelList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.VpnTunnel]): A list of VpnTunnel resources. kind (str): - [Output Only] Type of resource. Always compute#vpnTunnel for - VPN tunnels. + Output only. [Output Only] Type of resource. Always + compute#vpnTunnel for VPN tunnels. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -139970,16 +159509,22 @@ class WafExpressionSet(proto.Message): Attributes: aliases (MutableSequence[str]): A list of alternate IDs. The format should - be: - E.g. XSS-stable Generic suffix like - "stable" is particularly useful if a policy - likes to avail newer set of expressions without - having to change the policy. A given alias name - can't be used for more than one entity set. + be: + + - E.g. XSS-stable + Generic suffix like "stable" is particularly + useful if a policy likes to avail newer set of + expressions without having to change the policy. + A given alias name can't be used for more than + one entity set. expressions (MutableSequence[google.cloud.compute_v1beta.types.WafExpressionSetExpression]): List of available expressions. id (str): Google specified expression set ID. The - format should be: - E.g. XSS-20170329 required + format should be: + + - E.g. XSS-20170329 + required This field is a member of `oneof`_ ``_id``. """ @@ -140010,11 +159555,12 @@ class WafExpressionSetExpression(proto.Message): Expression ID should uniquely identify the origin of the expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core - rule set version 2.9.1 rule id 973337. The ID - could be used to determine the individual attack - definition that has been detected. It could also - be used to exclude it from the policy in case of - false positive. required + rule set version 2.9.1 rule id 973337. + The ID could be used to determine the individual + attack definition that has been detected. It + could also be used to exclude it from the policy + in case of false positive. + required This field is a member of `oneof`_ ``_id``. sensitivity (int): @@ -140131,8 +159677,9 @@ class Warning(proto.Message): This field is a member of `oneof`_ ``_code``. data (MutableSequence[google.cloud.compute_v1beta.types.Data]): [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } message (str): [Output Only] A human-readable description of the warning code. @@ -140303,8 +159850,9 @@ class Warnings(proto.Message): This field is a member of `oneof`_ ``_code``. data (MutableSequence[google.cloud.compute_v1beta.types.Data]): [Output Only] Metadata about this warning in key: value - format. For example: "data": [ { "key": "scope", "value": - "zones/us-east1-d" } + format. For example: + + "data": [ { "key": "scope", "value": "zones/us-east1-d" } message (str): [Output Only] A human-readable description of the warning code. @@ -140461,9 +160009,9 @@ class Code(proto.Enum): class WeightedBackendService(proto.Message): - r"""In contrast to a single BackendService in HttpRouteAction to - which all matching traffic is directed to, - WeightedBackendService allows traffic to be split across + r"""In contrast to a single BackendService in + HttpRouteAction to which all matching traffic is directed + to,WeightedBackendService allows traffic to be split across multiple backend services. The volume of traffic for each backend service is proportional to the weight specified in each WeightedBackendService @@ -140474,39 +160022,46 @@ class WeightedBackendService(proto.Message): Attributes: backend_service (str): The full or partial URL to the default - BackendService resource. Before forwarding the - request to backendService, the load balancer - applies any relevant headerActions specified as - part of this backendServiceWeight. + BackendService resource. Before + forwarding the request to backendService, the + load balancer applies any relevant headerActions + specified as part of thisbackendServiceWeight. This field is a member of `oneof`_ ``_backend_service``. header_action (google.cloud.compute_v1beta.types.HttpHeaderAction): Specifies changes to request and response headers that need to take effect for the - selected backendService. headerAction specified - here take effect before headerAction in the - enclosing HttpRouteRule, PathMatcher and UrlMap. + selected backendService. + + headerAction specified here take effect + beforeheaderAction in the enclosing + HttpRouteRule,PathMatcher and UrlMap. + headerAction is not supported for load balancers that have their loadBalancingScheme set to - EXTERNAL. Not supported when the URL map is - bound to a target gRPC proxy that has - validateForProxyless field set to true. + EXTERNAL. + + Not supported when the URL map is bound to a + target gRPC proxy that has validateForProxyless + field set to true. This field is a member of `oneof`_ ``_header_action``. weight (int): Specifies the fraction of traffic sent to a - backend service, computed as weight / (sum of - all weightedBackendService weights in - routeAction) . The selection of a backend - service is determined only for new traffic. Once - a user's request has been directed to a backend - service, subsequent requests are sent to the - same backend service as determined by the - backend service's session affinity policy. Don't - configure session affinity if you're using - weighted traffic splitting. If you do, the - weighted traffic splitting configuration takes - precedence. The value must be from 0 to 1000. + backend service, computed asweight / (sum of all + weightedBackendService weights in routeAction). + + The selection of a backend service is determined + only for new traffic. Once a user's request has + been directed to a backend service, subsequent + requests are sent to the same backend service as + determined by the backend service's session + affinity policy. Don't configure session + affinity if you're using weighted traffic + splitting. If you do, the weighted traffic + splitting configuration takes precedence. + + The value must be from 0 to 1000. This field is a member of `oneof`_ ``_weight``. """ @@ -140536,30 +160091,35 @@ class Wire(proto.Message): Attributes: admin_enabled (bool): - [Output Only] Indicates whether the wire is enabled. When - false, the wire is disabled. When true and when the wire - group of the wire is also enabled, the wire is enabled. - Defaults to true. + Output only. [Output Only] Indicates whether the wire is + enabled. When false, the wire is disabled. When true and + when the wire group of the wire is also enabled, the wire is + enabled. Defaults to true. This field is a member of `oneof`_ ``_admin_enabled``. endpoints (MutableSequence[google.cloud.compute_v1beta.types.WireEndpoint]): - Wire endpoints are specific Interconnect - connections. + Output only. Wire endpoints are specific + Interconnect connections. label (str): - [Output Only] A label that identifies the wire. The format - of this label combines the existing labels of the wire group - endpoints and Interconnect connections used by this wire in - alphabetical order as follows: + Output only. [Output Only] A label that identifies the wire. + The format of this label combines the existing labels of the + wire group endpoints and Interconnect connections used by + this wire in alphabetical order as follows: ``ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1``, - where: - ENDPOINT_A and ENDPOINT_B: are the labels that you - entered as map keys when you specified the wire group - endpoint objects. - CONNECTION_A1 and CONNECTION_B1: are the - labels that you entered as map keys when you specified the - wire group Interconnect objects. + where: + + :: + + - ENDPOINT_A and ENDPOINT_B: are the labels + that you entered as map keys when you specified the wire group endpoint + objects. + - CONNECTION_A1 and CONNECTION_B1: are the + labels that you entered as map keys when you specified the wire group + Interconnect objects. This field is a member of `oneof`_ ``_label``. wire_properties (google.cloud.compute_v1beta.types.WireProperties): - [Output Only] Properties of the wire. + Output only. [Output Only] Properties of the wire. This field is a member of `oneof`_ ``_wire_properties``. """ @@ -140628,7 +160188,8 @@ class WireGroup(proto.Message): This field is a member of `oneof`_ ``_admin_enabled``. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + Output only. [Output Only] Creation timestamp inRFC3339 text + format. This field is a member of `oneof`_ ``_creation_timestamp``. description (str): @@ -140638,22 +160199,24 @@ class WireGroup(proto.Message): endpoints (MutableMapping[str, google.cloud.compute_v1beta.types.WireGroupEndpoint]): A map that contains the logical endpoints of the wire group. Specify key-value pairs for the - map as follows: - Key: an RFC1035 user-specified - label. - Value: an Endpoint object. + map as follows: + + - Key: an RFC1035 user-specified label. + - Value: an Endpoint object. id (int): - [Output Only] The unique identifier for the resource type. - The server generates this identifier. + Output only. [Output Only] The unique identifier for the + resource type. The server generates this identifier. This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always - compute#wireGroups for wire groups. + Output only. [Output Only] Type of the resource. + Alwayscompute#wireGroups for wire groups. This field is a member of `oneof`_ ``_kind``. name (str): Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, - and comply with RFC1035. Specifically, the name must be 1-63 + and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ``[a-z]([-a-z0-9]*[a-z0-9])?`` which means the first character must be a lowercase letter, and all following @@ -140662,17 +160225,18 @@ class WireGroup(proto.Message): This field is a member of `oneof`_ ``_name``. reconciling (bool): - [Output Only] Indicates whether there are wire changes yet - to be processed. + Output only. [Output Only] Indicates whether there are wire + changes yet to be processed. This field is a member of `oneof`_ ``_reconciling``. self_link (str): - [Output Only] Server-defined URL for the resource. + Output only. [Output Only] Server-defined URL for the + resource. This field is a member of `oneof`_ ``_self_link``. topology (google.cloud.compute_v1beta.types.WireGroupTopology): - Topology details for the wire group - configuration. + Output only. Topology details for the wire + group configuration. This field is a member of `oneof`_ ``_topology``. wire_group_properties (google.cloud.compute_v1beta.types.WireGroupProperties): @@ -140684,8 +160248,8 @@ class WireGroup(proto.Message): This field is a member of `oneof`_ ``_wire_properties``. wires (MutableSequence[google.cloud.compute_v1beta.types.Wire]): - The single/redundant wire(s) managed by the - wire group. + Output only. The single/redundant wire(s) + managed by the wire group. """ admin_enabled: bool = proto.Field( @@ -140768,9 +160332,10 @@ class WireGroupEndpoint(proto.Message): interconnects (MutableMapping[str, google.cloud.compute_v1beta.types.WireGroupEndpointInterconnect]): A map that contains the redundant Interconnect connections. Specify key-value - pairs for the map as follows: - Key: an RFC1035 - user-specified label. - Value: an Interconnect - object. + pairs for the map as follows: + + - Key: an RFC1035 user-specified label. + - Value: an Interconnect object. """ interconnects: MutableMapping[ @@ -140790,30 +160355,42 @@ class WireGroupEndpointInterconnect(proto.Message): Attributes: interconnect (str): - An Interconnect connection. You can specify the connection - as a partial or full URL. If the connection is in a - different project from the cross-site network, use a format - that specifies the project. See the following examples of - partial and full URLs: global/interconnects/NAME - projects/PROJECT_ID/global/interconnects/NAME - - https://compute.googleapis.com/compute/projects/PROJECT_ID - /global/interconnects/NAME + Required. An Interconnect connection. You can specify the + connection as a partial or full URL. If the connection is in + a different project from the cross-site network, use a + format that specifies the project. See the following + examples of partial and full URLs: + + :: + + global/interconnects/NAME + + + projects/PROJECT_ID/global/interconnects/NAME + + - + https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME This field is a member of `oneof`_ ``_interconnect``. vlan_tags (MutableSequence[int]): - To configure the wire group for VLAN mode, enter a VLAN tag, - which is a number from ``2`` to ``4093``. You can + Required. To configure the wire group for VLAN mode, enter a + VLAN tag, which is a number from ``2`` to ``4093``. You can autoallocate a tag by entering ``0``. To configure the wire group for port mode, enter ``-1``. Review the following - guidelines: - A VLAN tag must be unique for an Interconnect - connection across all attachments and wire groups. - Both - endpoints of a wire must use the same VLAN tag value. - - Single wire and redundant type wire groups must have only - one VLAN tag. - Port mode pseudowires must have a single - VLAN tag with a value of ``-1`` for both endpoints. - Box - and cross type wire groups must have two VLAN tags. The - first is for the same-zone pseudowire, and the second is for - the cross-zone pseudowire. + guidelines: + + :: + + - A VLAN tag must be unique for an Interconnect connection across all + attachments and wire groups. + - Both endpoints of a wire must use the same VLAN tag value. + - Single wire and redundant type wire groups must have only one + VLAN tag. + - Port mode pseudowires must have a single VLAN tag with a value of + `-1` for both endpoints. + - Box and cross type wire groups must have two VLAN tags. The first + is for the same-zone pseudowire, and the second is for the cross-zone + pseudowire. """ interconnect: str = proto.Field( @@ -140844,14 +160421,14 @@ class WireGroupList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.WireGroup]): A list of wire group resources. kind (str): - [Output Only] Type of the resource. Always - compute#wireGroups for wire groups. + Output only. [Output Only] Type of the resource. + Alwayscompute#wireGroups for wire groups. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. @@ -140862,8 +160439,8 @@ class WireGroupList(proto.Message): This field is a member of `oneof`_ ``_self_link``. unreachables (MutableSequence[str]): - [Output Only] Unreachable resources. end_interface: - MixerListResponseWithEtagBuilder + Output only. [Output Only] Unreachable resources. + end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1beta.types.Warning): [Output Only] Informational warning message. @@ -140917,51 +160494,58 @@ def raw_page(self): class WireGroupProperties(proto.Message): - r"""The properties of a wire group. These properties determine - how a group of redundant wires are created and managed. + r"""The properties of a wire group. These properties + determine how a group of redundant wires are created and + managed. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: type_ (str): - The type of the wire group, one of the following: - WIRE: a - single pseudowire over two Interconnect connections with no - redundancy. - REDUNDANT: two pseudowires over four - Interconnect connections, with two connections in one metro - and two connections in another metro. Each redundant pair of - Interconnect connections spans both edge availability - domains of the metro. Each pseudowire connects Interconnect - connections in matching edge availability domains of the two - metros. - BOX_AND_CROSS: four pseudowires over four - Interconnect connections, with two connections in one metro - and two connections in another metro. Each redundant pair of - Interconnect connections spans both edge availability - domains of the metro. Two pseudowires connect Interconnect - connections in matching edge availability domains of the two - metros. Two additional pseudowires connect the non-matching - edge availability domains of the two metros. Check the Type - enum for the list of possible values. + The type of the wire group, one of the following: + + :: + + - WIRE: a single pseudowire over two Interconnect connections with no + redundancy. + - REDUNDANT: two pseudowires over four Interconnect connections, with + two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Each pseudowire connects Interconnect + connections in matching edge availability domains of the two metros. + - BOX_AND_CROSS: four pseudowires over four Interconnect connections, + with two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Two pseudowires connect Interconnect + connections in matching edge availability domains of the two metros. + Two additional pseudowires connect the non-matching edge availability + domains of the two metros. + + Check the Type enum for the list of possible values. This field is a member of `oneof`_ ``_type``. """ class Type(proto.Enum): - r"""The type of the wire group, one of the following: - WIRE: a single - pseudowire over two Interconnect connections with no redundancy. - - REDUNDANT: two pseudowires over four Interconnect connections, with - two connections in one metro and two connections in another metro. - Each redundant pair of Interconnect connections spans both edge - availability domains of the metro. Each pseudowire connects - Interconnect connections in matching edge availability domains of - the two metros. - BOX_AND_CROSS: four pseudowires over four - Interconnect connections, with two connections in one metro and two - connections in another metro. Each redundant pair of Interconnect - connections spans both edge availability domains of the metro. Two - pseudowires connect Interconnect connections in matching edge - availability domains of the two metros. Two additional pseudowires - connect the non-matching edge availability domains of the two - metros. + r"""The type of the wire group, one of the following: + + :: + + - WIRE: a single pseudowire over two Interconnect connections with no + redundancy. + - REDUNDANT: two pseudowires over four Interconnect connections, with + two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Each pseudowire connects Interconnect + connections in matching edge availability domains of the two metros. + - BOX_AND_CROSS: four pseudowires over four Interconnect connections, + with two connections in one metro and two connections in another metro. + Each redundant pair of Interconnect connections spans both edge + availability domains of the metro. Two pseudowires connect Interconnect + connections in matching edge availability domains of the two metros. + Two additional pseudowires connect the non-matching edge availability + domains of the two metros. Values: UNDEFINED_TYPE (0): @@ -141008,8 +160592,8 @@ class WireGroupTopology(proto.Message): Attributes: endpoints (MutableSequence[google.cloud.compute_v1beta.types.WireGroupTopologyEndpoint]): - Topology details for all endpoints in the - wire group. + Output only. Topology details for all + endpoints in the wire group. """ endpoints: MutableSequence["WireGroupTopologyEndpoint"] = proto.RepeatedField( @@ -141026,13 +160610,14 @@ class WireGroupTopologyEndpoint(proto.Message): Attributes: city (str): - The InterconnectLocation.city (metropolitan - area designator) that all interconnects are - located in. + Output only. The InterconnectLocation.city + (metropolitan area designator) that all + interconnects are located in. This field is a member of `oneof`_ ``_city``. label (str): - Endpoint label from the wire group. + Output only. Endpoint label from the wire + group. This field is a member of `oneof`_ ``_label``. """ @@ -141057,42 +160642,56 @@ class WireProperties(proto.Message): Attributes: bandwidth_allocation (str): The configuration of the bandwidth allocation, one of the - following: - ALLOCATE_PER_WIRE: configures a separate - unmetered bandwidth allocation (and associated charges) for - each wire in the group. - SHARED_WITH_WIRE_GROUP: this is - the default behavior, which configures one unmetered - bandwidth allocation for the wire group. The unmetered - bandwidth is divided equally across each wire in the group, - but dynamic throttling reallocates unused unmetered - bandwidth from unused or underused wires to other wires in - the group. Check the BandwidthAllocation enum for the list - of possible values. + following: + + :: + + - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation + (and associated charges) for each wire in the group. + - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures + one unmetered bandwidth allocation for the wire group. The unmetered + bandwidth is divided equally across each wire in the group, but dynamic + throttling reallocates unused unmetered bandwidth from unused or underused + wires to other wires in the group. + + Check the BandwidthAllocation enum for the list of possible + values. This field is a member of `oneof`_ ``_bandwidth_allocation``. bandwidth_unmetered (int): The unmetered bandwidth in Gigabits per second, using - decimal units. ``10`` is 10 Gbps, ``100`` is 100 Gbps. + decimal units. ``10`` is 10 Gbps, ``100`` is 100 Gbps. The + bandwidth must be greater than 0. This field is a member of `oneof`_ ``_bandwidth_unmetered``. fault_response (str): - Response when a fault is detected in a pseudowire: - NONE: - default. - DISABLE_PORT: set the port line protocol down - when inline probes detect a fault. This setting is only - permitted on port mode pseudowires. Check the FaultResponse - enum for the list of possible values. + Response when a fault is detected in a pseudowire: + + :: + + - NONE: default. + - DISABLE_PORT: set the port line protocol down when inline probes + detect a fault. This setting is only permitted on port mode + pseudowires. + + Check the FaultResponse enum for the list of possible + values. This field is a member of `oneof`_ ``_fault_response``. """ class BandwidthAllocation(proto.Enum): r"""The configuration of the bandwidth allocation, one of the following: - - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth - allocation (and associated charges) for each wire in the group. - - SHARED_WITH_WIRE_GROUP: this is the default behavior, which - configures one unmetered bandwidth allocation for the wire group. - The unmetered bandwidth is divided equally across each wire in the - group, but dynamic throttling reallocates unused unmetered bandwidth - from unused or underused wires to other wires in the group. + + :: + + - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation + (and associated charges) for each wire in the group. + - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures + one unmetered bandwidth allocation for the wire group. The unmetered + bandwidth is divided equally across each wire in the group, but dynamic + throttling reallocates unused unmetered bandwidth from unused or underused + wires to other wires in the group. Values: UNDEFINED_BANDWIDTH_ALLOCATION (0): @@ -141116,10 +160715,14 @@ class BandwidthAllocation(proto.Enum): SHARED_WITH_WIRE_GROUP = 286454628 class FaultResponse(proto.Enum): - r"""Response when a fault is detected in a pseudowire: - NONE: default. - - DISABLE_PORT: set the port line protocol down when inline probes - detect a fault. This setting is only permitted on port mode - pseudowires. + r"""Response when a fault is detected in a pseudowire: + + :: + + - NONE: default. + - DISABLE_PORT: set the port line protocol down when inline probes + detect a fault. This setting is only permitted on port mode + pseudowires. Values: UNDEFINED_FAULT_RESPONSE (0): @@ -141171,17 +160774,21 @@ class WithdrawPublicAdvertisedPrefixeRequest(proto.Message): Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -141215,25 +160822,29 @@ class WithdrawPublicDelegatedPrefixeRequest(proto.Message): The name of the public delegated prefix. It should comply with RFC1035. region (str): - The name of the region where the public - delegated prefix is located. It should comply - with RFC1035. + The name of theregion where + the public delegated prefix is located. It + should comply with RFC1035. request_id (str): An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been - completed. For example, consider a situation - where you make an initial request and the - request times out. If you make the request again - with the same request ID, the server can check - if original operation with the same request ID - was received, and if so, will ignore the second - request. This prevents clients from accidentally - creating duplicate commitments. The request ID - must be a valid UUID with the exception that - zero UUID is not supported ( - 00000000-0000-0000-0000-000000000000). + completed. + + For example, consider a situation where you make + an initial request and the request times out. If + you make the request again with the same request + ID, the server can check if original operation + with the same request ID was received, and if + so, will ignore the second request. This + prevents clients from accidentally creating + duplicate commitments. + + The request ID must be + a valid UUID with the exception that zero UUID + is not supported + (00000000-0000-0000-0000-000000000000). This field is a member of `oneof`_ ``_request_id``. """ @@ -141271,21 +160882,22 @@ class XpnHostList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Project]): [Output Only] A list of shared VPC host project URLs. kind (str): - [Output Only] Type of resource. Always compute#xpnHostList - for lists of shared VPC hosts. + Output only. [Output Only] Type of resource. Always + compute#xpnHostList for lists of shared VPC hosts. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -141381,10 +160993,11 @@ class Type(proto.Enum): class Zone(proto.Message): - r"""Represents a Zone resource. A zone is a deployment area. - These deployment areas are subsets of a region. For example the - zone us-east1-b is located in the us-east1 region. For more - information, read Regions and Zones. + r"""Represents a Zone resource. + + A zone is a deployment area. These deployment areas are subsets + of a region. For example the zone us-east1-b is located in + theus-east1 region. For more information, readRegions and Zones. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -141394,7 +161007,7 @@ class Zone(proto.Message): [Output Only] Available cpu/platform selections for the zone. creation_timestamp (str): - [Output Only] Creation timestamp in RFC3339 text format. + [Output Only] Creation timestamp inRFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. deprecated (google.cloud.compute_v1beta.types.DeprecationStatus): @@ -141412,8 +161025,8 @@ class Zone(proto.Message): This field is a member of `oneof`_ ``_id``. kind (str): - [Output Only] Type of the resource. Always compute#zone for - zones. + Output only. [Output Only] Type of the resource. Always + compute#zone for zones. This field is a member of `oneof`_ ``_kind``. name (str): @@ -141430,18 +161043,18 @@ class Zone(proto.Message): This field is a member of `oneof`_ ``_self_link``. status (str): - [Output Only] Status of the zone, either UP or DOWN. Check + [Output Only] Status of the zone, either UP orDOWN. Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. supports_pzs (bool): - [Output Only] Reserved for future use. + Output only. [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_supports_pzs``. """ class Status(proto.Enum): - r"""[Output Only] Status of the zone, either UP or DOWN. + r"""[Output Only] Status of the zone, either UP orDOWN. Values: UNDEFINED_STATUS (0): @@ -141527,20 +161140,21 @@ class ZoneList(proto.Message): items (MutableSequence[google.cloud.compute_v1beta.types.Zone]): A list of Zone resources. kind (str): - Type of resource. + Output only. Type of resource. This field is a member of `oneof`_ ``_kind``. next_page_token (str): [Output Only] This token allows you to get the next page of results for list requests. If the number of results is - larger than maxResults, use the nextPageToken as a value for + larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. self_link (str): - [Output Only] Server-defined URL for this resource. + Output only. [Output Only] Server-defined URL for this + resource. This field is a member of `oneof`_ ``_self_link``. warning (google.cloud.compute_v1beta.types.Warning): @@ -141619,6 +161233,50 @@ class ZoneSetLabelsRequest(proto.Message): ) +class ZoneSetNestedPolicyRequest(proto.Message): + r""" + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bindings (MutableSequence[google.cloud.compute_v1beta.types.Binding]): + Flatten Policy to create a backwacd + compatible wire-format. Deprecated. Use 'policy' + to specify bindings. + etag (str): + Flatten Policy to create a backward + compatible wire-format. Deprecated. Use 'policy' + to specify the etag. + + This field is a member of `oneof`_ ``_etag``. + policy (google.cloud.compute_v1beta.types.Policy): + REQUIRED: The complete policy to be applied + to the 'resource'. The size of the policy is + limited to a few 10s of KB. An empty policy is + in general a valid policy but certain services + (like Projects) might reject them. + + This field is a member of `oneof`_ ``_policy``. + """ + + bindings: MutableSequence["Binding"] = proto.RepeatedField( + proto.MESSAGE, + number=403251854, + message="Binding", + ) + etag: str = proto.Field( + proto.STRING, + number=3123477, + optional=True, + ) + policy: "Policy" = proto.Field( + proto.MESSAGE, + number=91071794, + optional=True, + message="Policy", + ) + + class ZoneSetPolicyRequest(proto.Message): r""" diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py new file mode 100644 index 000000000000..8f805c8930bf --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_backend_buckets_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_BackendBuckets_AggregatedList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.BackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListBackendBucketsRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_BackendBuckets_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py new file mode 100644 index 000000000000..be0f68048bbe --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_delete_sync.py new file mode 100644 index 000000000000..98cab21f7f24 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_delete_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py new file mode 100644 index 000000000000..72a53b775dba --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_get_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_insert_sync.py new file mode 100644 index 000000000000..965447a4d731 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_insert_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertGlobalVmExtensionPolicyRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_list_sync.py new file mode 100644 index 000000000000..555734fe45e8 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListGlobalVmExtensionPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_update_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_update_sync.py new file mode 100644 index 000000000000..1fd5f1a717e4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_global_vm_extension_policies_update_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Update +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_GlobalVmExtensionPolicies_Update_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_update(): + # Create a client + client = compute_v1beta.GlobalVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateGlobalVmExtensionPolicyRequest( + global_vm_extension_policy="global_vm_extension_policy_value", + project="project_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_GlobalVmExtensionPolicies_Update_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py new file mode 100644 index 000000000000..edf89c30ef8a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAvailableAcceleratorTopologies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get_available_accelerator_topologies(): + # Create a client + client = compute_v1beta.InstanceGroupManagersClient() + + # Initialize request argument(s) + request = ( + compute_v1beta.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest( + project="project_value", + resource_id="resource_id_value", + zone="zone_value", + ) + ) + + # Make the request + response = client.get_available_accelerator_topologies(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_networks_cancel_request_remove_peering_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_networks_cancel_request_remove_peering_sync.py new file mode 100644 index 000000000000..d6e58bb4367d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_networks_cancel_request_remove_peering_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CancelRequestRemovePeering +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_Networks_CancelRequestRemovePeering_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_cancel_request_remove_peering(): + # Create a client + client = compute_v1beta.NetworksClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRequestRemovePeeringNetworkRequest( + network="network_value", + project="project_value", + ) + + # Make the request + response = client.cancel_request_remove_peering(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_Networks_CancelRequestRemovePeering_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py new file mode 100644 index 000000000000..e15a52abfbf9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py new file mode 100644 index 000000000000..fcd43c7978c3 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py new file mode 100644 index 000000000000..e753d44b1b9f --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py new file mode 100644 index 000000000000..4914686f7b36 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionBackendBucketRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py new file mode 100644 index 000000000000..42685c31231c --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py new file mode 100644 index 000000000000..68b9f2d61d63 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_list_usable_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListUsable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list_usable(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListUsableRegionBackendBucketsRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list_usable(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py new file mode 100644 index 000000000000..2492ef59247a --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_Patch_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionBackendBucketRequest( + backend_bucket="backend_bucket_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py new file mode 100644 index 000000000000..4bb87b975c80 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py new file mode 100644 index 000000000000..13939dee4eb1 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionBackendBucketsClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionBackendBucketRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py new file mode 100644 index 000000000000..9102f7995f83 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionCompositeHealthChecksRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py new file mode 100644 index 000000000000..360fdd0dbfc9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py new file mode 100644 index 000000000000..9d1e853c5c5d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py new file mode 100644 index 000000000000..a26c44113523 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py new file mode 100644 index 000000000000..c1c01bda7826 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionCompositeHealthChecksRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py new file mode 100644 index 000000000000..79d284ba2c82 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionCompositeHealthCheckRequest( + composite_health_check="composite_health_check_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..e7733799c610 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionCompositeHealthChecksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionCompositeHealthCheckRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py new file mode 100644 index 000000000000..8680aa6cfc16 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AggregatedList +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_aggregated_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.AggregatedListRegionHealthAggregationPoliciesRequest( + project="project_value", + ) + + # Make the request + page_result = client.aggregated_list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py new file mode 100644 index 000000000000..df10d5678b38 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py new file mode 100644 index 000000000000..30098a1b4b91 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py new file mode 100644 index 000000000000..38876b073754 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py new file mode 100644 index 000000000000..3846ad0d53ab --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRegionHealthAggregationPoliciesRequest( + project="project_value", + region="region_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py new file mode 100644 index 000000000000..58d90a9cffee --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Patch +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_patch(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.PatchRegionHealthAggregationPolicyRequest( + health_aggregation_policy="health_aggregation_policy_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.patch(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py new file mode 100644 index 000000000000..241c63e77e19 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.RegionHealthAggregationPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsRegionHealthAggregationPolicyRequest( + project="project_value", + region="region_value", + resource="resource_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_instance_group_managers_adopt_instances_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_instance_group_managers_adopt_instances_sync.py new file mode 100644 index 000000000000..4297c76bc1e4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_region_instance_group_managers_adopt_instances_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AdoptInstances +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RegionInstanceGroupManagers_AdoptInstances_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_adopt_instances(): + # Create a client + client = compute_v1beta.RegionInstanceGroupManagersClient() + + # Initialize request argument(s) + request = compute_v1beta.AdoptInstancesRegionInstanceGroupManagerRequest( + instance_group_manager="instance_group_manager_value", + project="project_value", + region="region_value", + ) + + # Make the request + response = client.adopt_instances(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RegionInstanceGroupManagers_AdoptInstances_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py new file mode 100644 index 000000000000..f58dd0d1044c --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py new file mode 100644 index 000000000000..44b0852901f5 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..ec107223f53d --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py new file mode 100644 index 000000000000..5315c0935dad --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.GetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py new file mode 100644 index 000000000000..e6631fc46cf6 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_set_iam_policy(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.SetIamPolicyReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py new file mode 100644 index 000000000000..e95fb20146b9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_test_iam_permissions(): + # Create a client + client = compute_v1beta.ReservationSubBlocksClient() + + # Initialize request argument(s) + request = compute_v1beta.TestIamPermissionsReservationSubBlockRequest( + parent_resource="parent_resource_value", + project="project_value", + resource="resource_value", + zone="zone_value", + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_delete_sync.py new file mode 100644 index 000000000000..d9049bf944e3 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_delete_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RolloutPlans_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutPlanRequest( + project="project_value", + rollout_plan="rollout_plan_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RolloutPlans_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_get_sync.py new file mode 100644 index 000000000000..8423ed147aec --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_get_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RolloutPlans_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRolloutPlanRequest( + project="project_value", + rollout_plan="rollout_plan_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RolloutPlans_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_insert_sync.py new file mode 100644 index 000000000000..b51913746722 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_insert_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RolloutPlans_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertRolloutPlanRequest( + project="project_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_RolloutPlans_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_list_sync.py new file mode 100644 index 000000000000..1a21d47dccd4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollout_plans_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_RolloutPlans_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RolloutPlansClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRolloutPlansRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_RolloutPlans_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_cancel_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_cancel_sync.py new file mode 100644 index 000000000000..5812e0ad47d5 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_cancel_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Cancel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_Rollouts_Cancel_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_cancel(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.CancelRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.cancel(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_Rollouts_Cancel_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_delete_sync.py new file mode 100644 index 000000000000..794433218457 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_delete_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_Rollouts_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_Rollouts_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_get_sync.py new file mode 100644 index 000000000000..551fa8da02df --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_get_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_Rollouts_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.GetRolloutRequest( + project="project_value", + rollout="rollout_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_Rollouts_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_list_sync.py new file mode 100644 index 000000000000..9693d9de3bd2 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_rollouts_list_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_Rollouts_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.RolloutsClient() + + # Initialize request argument(s) + request = compute_v1beta.ListRolloutsRequest( + project="project_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_Rollouts_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py new file mode 100644 index 000000000000..5c20c1ac4786 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Delete +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_delete(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.DeleteZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.delete(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py new file mode 100644 index 000000000000..83d482a0e863 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_get_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Get +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_get(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.GetZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.get(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py new file mode 100644 index 000000000000..4aae87022713 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Insert +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_insert(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.InsertZoneVmExtensionPolicyRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + response = client.insert(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py new file mode 100644 index 000000000000..039b42926725 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_list_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for List +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_list(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.ListZoneVmExtensionPoliciesRequest( + project="project_value", + zone="zone_value", + ) + + # Make the request + page_result = client.list(request=request) + + # Handle the response + for response in page_result: + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync] diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py new file mode 100644 index 000000000000..d0b1ea91a9e9 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/compute_v1beta_generated_zone_vm_extension_policies_update_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for Update +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-compute-v1beta + + +# [START compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import compute_v1beta + + +def sample_update(): + # Create a client + client = compute_v1beta.ZoneVmExtensionPoliciesClient() + + # Initialize request argument(s) + request = compute_v1beta.UpdateZoneVmExtensionPolicyRequest( + project="project_value", + vm_extension_policy="vm_extension_policy_value", + zone="zone_value", + ) + + # Make the request + response = client.update(request=request) + + # Handle the response + print(response) + + +# [END compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync] 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 beb700a79ea9..4db981f1c03c 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 @@ -1839,6 +1839,86 @@ ], "title": "compute_v1beta_generated_backend_buckets_add_signed_url_key_sync.py" }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.BackendBucketsClient", + "shortName": "BackendBucketsClient" + }, + "fullName": "google.cloud.compute_v1beta.BackendBucketsClient.aggregated_list", + "method": { + "fullName": "google.cloud.compute.v1beta.BackendBuckets.AggregatedList", + "service": { + "fullName": "google.cloud.compute.v1beta.BackendBuckets", + "shortName": "BackendBuckets" + }, + "shortName": "AggregatedList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.AggregatedListBackendBucketsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.backend_buckets.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_backend_buckets_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_BackendBuckets_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_backend_buckets_aggregated_list_sync.py" + }, { "canonical": true, "clientMethod": { @@ -14099,22 +14179,22 @@ "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.AggregatedList", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListGlobalVmExtensionPoliciesRequest" }, { "name": "project", @@ -14133,14 +14213,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.AggregatedListPager", + "resultType": "google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.AggregatedListPager", "shortName": "aggregated_list" }, "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_health_checks_aggregated_list_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_AggregatedList_sync", "segments": [ { "end": 52, @@ -14173,37 +14253,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_aggregated_list_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.delete", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Delete", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.DeleteGlobalVmExtensionPolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "health_check", + "name": "global_vm_extension_policy", "type": "str" }, + { + "name": "global_vm_extension_policy_rollout_operation_rollout_input_resource", + "type": "google.cloud.compute_v1beta.types.GlobalVmExtensionPolicyRolloutOperationRolloutInput" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14221,10 +14305,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_health_checks_delete_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Delete_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_Delete_sync", "segments": [ { "end": 52, @@ -14257,35 +14341,35 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_delete_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.get", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Get", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.GetGlobalVmExtensionPolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "health_check", + "name": "global_vm_extension_policy", "type": "str" }, { @@ -14301,14 +14385,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "resultType": "google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_health_checks_get_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Get_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_Get_sync", "segments": [ { "end": 52, @@ -14341,36 +14425,36 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_get_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.insert", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Insert", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.InsertGlobalVmExtensionPolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "global_vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy" }, { "name": "retry", @@ -14389,10 +14473,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_health_checks_insert_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Insert_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_Insert_sync", "segments": [ { "end": 51, @@ -14425,28 +14509,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_insert_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.list", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.List", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.ListGlobalVmExtensionPoliciesRequest" }, { "name": "project", @@ -14465,14 +14549,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.global_vm_extension_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_health_checks_list_sync.py", + "file": "compute_v1beta_generated_global_vm_extension_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_List_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_List_sync", "segments": [ { "end": 52, @@ -14505,40 +14589,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_list_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.HealthChecksClient", - "shortName": "HealthChecksClient" + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient", + "shortName": "GlobalVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.patch", + "fullName": "google.cloud.compute_v1beta.GlobalVmExtensionPoliciesClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Patch", + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies.Update", "service": { - "fullName": "google.cloud.compute.v1beta.HealthChecks", - "shortName": "HealthChecks" + "fullName": "google.cloud.compute.v1beta.GlobalVmExtensionPolicies", + "shortName": "GlobalVmExtensionPolicies" }, - "shortName": "Patch" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.UpdateGlobalVmExtensionPolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "health_check", + "name": "global_vm_extension_policy", "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "global_vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.GlobalVmExtensionPolicy" }, { "name": "retry", @@ -14554,13 +14638,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "update" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_health_checks_patch_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_global_vm_extension_policies_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Patch_sync", + "regionTag": "compute_v1beta_generated_GlobalVmExtensionPolicies_Update_sync", "segments": [ { "end": 52, @@ -14593,7 +14677,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_patch_sync.py" + "title": "compute_v1beta_generated_global_vm_extension_policies_update_sync.py" }, { "canonical": true, @@ -14602,31 +14686,107 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.HealthChecks.AggregatedList", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "TestIamPermissions" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListHealthChecksRequest" }, { "name": "project", "type": "str" }, { - "name": "resource", + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_health_checks_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_HealthChecks_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_health_checks_aggregated_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" + }, + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.HealthChecks.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteHealthCheckRequest" + }, + { + "name": "project", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "health_check", + "type": "str" }, { "name": "retry", @@ -14641,14 +14801,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Delete_sync", "segments": [ { "end": 52, @@ -14681,7 +14841,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_health_checks_delete_sync.py" }, { "canonical": true, @@ -14690,19 +14850,19 @@ "fullName": "google.cloud.compute_v1beta.HealthChecksClient", "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.HealthChecksClient.update", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.HealthChecks.Update", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Get", "service": { "fullName": "google.cloud.compute.v1beta.HealthChecks", "shortName": "HealthChecks" }, - "shortName": "Update" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.GetHealthCheckRequest" }, { "name": "project", @@ -14712,10 +14872,6 @@ "name": "health_check", "type": "str" }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14729,14 +14885,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "shortName": "get" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_health_checks_update_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_HealthChecks_Update_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Get_sync", "segments": [ { "end": 52, @@ -14769,40 +14925,36 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_health_checks_update_sync.py" + "title": "compute_v1beta_generated_health_checks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient", - "shortName": "ImageFamilyViewsClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient.get", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.ImageFamilyViews.Get", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.ImageFamilyViews", - "shortName": "ImageFamilyViews" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetImageFamilyViewRequest" + "type": "google.cloud.compute_v1beta.types.InsertHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", - "type": "str" - }, - { - "name": "family", - "type": "str" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -14817,22 +14969,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ImageFamilyView", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_image_family_views_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ImageFamilyViews_Get_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Insert_sync", "segments": [ { - "end": 53, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 51, "start": 27, "type": "SHORT" }, @@ -14842,52 +14994,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_image_family_views_get_sync.py" + "title": "compute_v1beta_generated_health_checks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.delete", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Delete", + "fullName": "google.cloud.compute.v1beta.HealthChecks.List", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Delete" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteImageRequest" + "type": "google.cloud.compute_v1beta.types.ListHealthChecksRequest" }, { "name": "project", "type": "str" }, - { - "name": "image", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -14901,14 +15049,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.services.health_checks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_images_delete_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Delete_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_List_sync", "segments": [ { "end": 52, @@ -14926,55 +15074,55 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_delete_sync.py" + "title": "compute_v1beta_generated_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.deprecate", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Deprecate", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "Deprecate" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeprecateImageRequest" + "type": "google.cloud.compute_v1beta.types.PatchHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "image", + "name": "health_check", "type": "str" }, { - "name": "deprecation_status_resource", - "type": "google.cloud.compute_v1beta.types.DeprecationStatus" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -14990,13 +15138,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "deprecate" + "shortName": "patch" }, - "description": "Sample for Deprecate", - "file": "compute_v1beta_generated_images_deprecate_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Deprecate_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Patch_sync", "segments": [ { "end": 52, @@ -15029,37 +15177,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_deprecate_sync.py" + "title": "compute_v1beta_generated_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.get_from_family", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.Images.GetFromFamily", + "fullName": "google.cloud.compute.v1beta.HealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "GetFromFamily" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetFromFamilyImageRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "family", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -15073,14 +15225,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Image", - "shortName": "get_from_family" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for GetFromFamily", - "file": "compute_v1beta_generated_images_get_from_family_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_GetFromFamily_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_TestIamPermissions_sync", "segments": [ { "end": 52, @@ -15113,37 +15265,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_get_from_family_sync.py" + "title": "compute_v1beta_generated_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.HealthChecksClient", + "shortName": "HealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.HealthChecksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.Images.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.HealthChecks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.HealthChecks", + "shortName": "HealthChecks" }, - "shortName": "GetIamPolicy" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyImageRequest" + "type": "google.cloud.compute_v1beta.types.UpdateHealthCheckRequest" }, { "name": "project", "type": "str" }, { - "name": "resource", + "name": "health_check", "type": "str" }, + { + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -15157,14 +15313,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_images_get_iam_policy_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_health_checks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_HealthChecks_Update_sync", "segments": [ { "end": 52, @@ -15197,35 +15353,39 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_health_checks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ImagesClient", - "shortName": "ImagesClient" + "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient", + "shortName": "ImageFamilyViewsClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.get", + "fullName": "google.cloud.compute_v1beta.ImageFamilyViewsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Get", + "fullName": "google.cloud.compute.v1beta.ImageFamilyViews.Get", "service": { - "fullName": "google.cloud.compute.v1beta.Images", - "shortName": "Images" + "fullName": "google.cloud.compute.v1beta.ImageFamilyViews", + "shortName": "ImageFamilyViews" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetImageRequest" + "type": "google.cloud.compute_v1beta.types.GetImageFamilyViewRequest" }, { "name": "project", "type": "str" }, { - "name": "image", + "name": "zone", + "type": "str" + }, + { + "name": "family", "type": "str" }, { @@ -15241,22 +15401,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Image", + "resultType": "google.cloud.compute_v1beta.types.ImageFamilyView", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_images_get_sync.py", + "file": "compute_v1beta_generated_image_family_views_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Get_sync", + "regionTag": "compute_v1beta_generated_ImageFamilyViews_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -15266,22 +15426,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_get_sync.py" + "title": "compute_v1beta_generated_image_family_views_get_sync.py" }, { "canonical": true, @@ -15290,27 +15450,27 @@ "fullName": "google.cloud.compute_v1beta.ImagesClient", "shortName": "ImagesClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.insert", + "fullName": "google.cloud.compute_v1beta.ImagesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Insert", + "fullName": "google.cloud.compute.v1beta.Images.Delete", "service": { "fullName": "google.cloud.compute.v1beta.Images", "shortName": "Images" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertImageRequest" + "type": "google.cloud.compute_v1beta.types.DeleteImageRequest" }, { "name": "project", "type": "str" }, { - "name": "image_resource", - "type": "google.cloud.compute_v1beta.types.Image" + "name": "image", + "type": "str" }, { "name": "retry", @@ -15326,21 +15486,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_images_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_images_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Insert_sync", + "regionTag": "compute_v1beta_generated_Images_Delete_sync", "segments": [ { - "end": 51, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 52, "start": 27, "type": "SHORT" }, @@ -15350,22 +15510,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 52, - "start": 49, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_insert_sync.py" + "title": "compute_v1beta_generated_images_delete_sync.py" }, { "canonical": true, @@ -15374,24 +15534,32 @@ "fullName": "google.cloud.compute_v1beta.ImagesClient", "shortName": "ImagesClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.list", + "fullName": "google.cloud.compute_v1beta.ImagesClient.deprecate", "method": { - "fullName": "google.cloud.compute.v1beta.Images.List", + "fullName": "google.cloud.compute.v1beta.Images.Deprecate", "service": { "fullName": "google.cloud.compute.v1beta.Images", "shortName": "Images" }, - "shortName": "List" + "shortName": "Deprecate" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListImagesRequest" + "type": "google.cloud.compute_v1beta.types.DeprecateImageRequest" }, { "name": "project", "type": "str" }, + { + "name": "image", + "type": "str" + }, + { + "name": "deprecation_status_resource", + "type": "google.cloud.compute_v1beta.types.DeprecationStatus" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -15405,14 +15573,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.images.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "deprecate" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_images_list_sync.py", + "description": "Sample for Deprecate", + "file": "compute_v1beta_generated_images_deprecate_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_List_sync", + "regionTag": "compute_v1beta_generated_Images_Deprecate_sync", "segments": [ { "end": 52, @@ -15430,22 +15598,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 49, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_images_list_sync.py" + "title": "compute_v1beta_generated_images_deprecate_sync.py" }, { "canonical": true, @@ -15454,32 +15622,28 @@ "fullName": "google.cloud.compute_v1beta.ImagesClient", "shortName": "ImagesClient" }, - "fullName": "google.cloud.compute_v1beta.ImagesClient.patch", + "fullName": "google.cloud.compute_v1beta.ImagesClient.get_from_family", "method": { - "fullName": "google.cloud.compute.v1beta.Images.Patch", + "fullName": "google.cloud.compute.v1beta.Images.GetFromFamily", "service": { "fullName": "google.cloud.compute.v1beta.Images", "shortName": "Images" }, - "shortName": "Patch" + "shortName": "GetFromFamily" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchImageRequest" + "type": "google.cloud.compute_v1beta.types.GetFromFamilyImageRequest" }, { "name": "project", "type": "str" }, { - "name": "image", + "name": "family", "type": "str" }, - { - "name": "image_resource", - "type": "google.cloud.compute_v1beta.types.Image" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -15493,14 +15657,434 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.Image", + "shortName": "get_from_family" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_images_patch_sync.py", + "description": "Sample for GetFromFamily", + "file": "compute_v1beta_generated_images_get_from_family_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Images_Patch_sync", + "regionTag": "compute_v1beta_generated_Images_GetFromFamily_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_get_from_family_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.get_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.GetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetIamPolicyImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_images_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "image", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Image", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_images_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_Get_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "image_resource", + "type": "google.cloud.compute_v1beta.types.Image" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_images_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_Insert_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.List", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListImagesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.images.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_images_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_List_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_images_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ImagesClient", + "shortName": "ImagesClient" + }, + "fullName": "google.cloud.compute_v1beta.ImagesClient.patch", + "method": { + "fullName": "google.cloud.compute.v1beta.Images.Patch", + "service": { + "fullName": "google.cloud.compute.v1beta.Images", + "shortName": "Images" + }, + "shortName": "Patch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PatchImageRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "image", + "type": "str" + }, + { + "name": "image_resource", + "type": "google.cloud.compute_v1beta.types.Image" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" + }, + "description": "Sample for Patch", + "file": "compute_v1beta_generated_images_patch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Images_Patch_sync", "segments": [ { "end": 52, @@ -16883,6 +17467,94 @@ ], "title": "compute_v1beta_generated_instance_group_managers_delete_sync.py" }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient", + "shortName": "InstanceGroupManagersClient" + }, + "fullName": "google.cloud.compute_v1beta.InstanceGroupManagersClient.get_available_accelerator_topologies", + "method": { + "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers.GetAvailableAcceleratorTopologies", + "service": { + "fullName": "google.cloud.compute.v1beta.InstanceGroupManagers", + "shortName": "InstanceGroupManagers" + }, + "shortName": "GetAvailableAcceleratorTopologies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "resource_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", + "shortName": "get_available_accelerator_topologies" + }, + "description": "Sample for GetAvailableAcceleratorTopologies", + "file": "compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_InstanceGroupManagers_GetAvailableAcceleratorTopologies_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_instance_group_managers_get_available_accelerator_topologies_sync.py" + }, { "canonical": true, "clientMethod": { @@ -35639,6 +36311,94 @@ ], "title": "compute_v1beta_generated_networks_add_peering_sync.py" }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.NetworksClient", + "shortName": "NetworksClient" + }, + "fullName": "google.cloud.compute_v1beta.NetworksClient.cancel_request_remove_peering", + "method": { + "fullName": "google.cloud.compute.v1beta.Networks.CancelRequestRemovePeering", + "service": { + "fullName": "google.cloud.compute.v1beta.Networks", + "shortName": "Networks" + }, + "shortName": "CancelRequestRemovePeering" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.CancelRequestRemovePeeringNetworkRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "network", + "type": "str" + }, + { + "name": "networks_cancel_request_remove_peering_request_resource", + "type": "google.cloud.compute_v1beta.types.NetworksCancelRequestRemovePeeringRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "cancel_request_remove_peering" + }, + "description": "Sample for CancelRequestRemovePeering", + "file": "compute_v1beta_generated_networks_cancel_request_remove_peering_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Networks_CancelRequestRemovePeering_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_networks_cancel_request_remove_peering_sync.py" + }, { "canonical": true, "clientMethod": { @@ -44251,22 +45011,22 @@ "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Delete", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendBucketRequest" }, { "name": "project", @@ -44277,7 +45037,7 @@ "type": "str" }, { - "name": "backend_service", + "name": "backend_bucket", "type": "str" }, { @@ -44297,10 +45057,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_backend_services_delete_sync.py", + "file": "compute_v1beta_generated_region_backend_buckets_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Delete_sync", "segments": [ { "end": 53, @@ -44333,28 +45093,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_delete_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_health", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetHealth", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "GetHealth" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetHealthRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendBucketRequest" }, { "name": "project", @@ -44365,12 +45125,96 @@ "type": "str" }, { - "name": "backend_service", + "name": "resource", "type": "str" }, { - "name": "resource_group_reference_resource", - "type": "google.cloud.compute_v1beta.types.ResourceGroupReference" + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_GetIamPolicy_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_backend_buckets_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionBackendBucketRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "backend_bucket", + "type": "str" }, { "name": "retry", @@ -44385,14 +45229,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.BackendServiceGroupHealth", - "shortName": "get_health" + "resultType": "google.cloud.compute_v1beta.types.BackendBucket", + "shortName": "get" }, - "description": "Sample for GetHealth", - "file": "compute_v1beta_generated_region_backend_services_get_health_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_backend_buckets_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_GetHealth_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Get_sync", "segments": [ { "end": 53, @@ -44425,28 +45269,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_health_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "GetIamPolicy" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionBackendBucketRequest" }, { "name": "project", @@ -44457,8 +45301,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" + "name": "backend_bucket_resource", + "type": "google.cloud.compute_v1beta.types.BackendBucket" }, { "name": "retry", @@ -44473,22 +45317,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_backend_buckets_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -44498,43 +45342,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.list_usable", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.ListUsable", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "Get" + "shortName": "ListUsable" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendBucketsRequest" }, { "name": "project", @@ -44544,10 +45388,6 @@ "name": "region", "type": "str" }, - { - "name": "backend_service", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -44561,14 +45401,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.BackendService", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListUsablePager", + "shortName": "list_usable" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_backend_services_get_sync.py", + "description": "Sample for ListUsable", + "file": "compute_v1beta_generated_region_backend_buckets_list_usable_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_ListUsable_sync", "segments": [ { "end": 53, @@ -44586,43 +45426,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_get_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_list_usable_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Insert", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "Insert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionBackendBucketsRequest" }, { "name": "project", @@ -44632,10 +45472,6 @@ "name": "region", "type": "str" }, - { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -44649,22 +45485,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_backend_buckets.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_backend_services_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_backend_buckets_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -44684,33 +45520,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_insert_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list_usable", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.ListUsable", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "ListUsable" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendServicesRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionBackendBucketRequest" }, { "name": "project", @@ -44720,6 +45556,14 @@ "name": "region", "type": "str" }, + { + "name": "backend_bucket", + "type": "str" + }, + { + "name": "backend_bucket_resource", + "type": "google.cloud.compute_v1beta.types.BackendBucket" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -44733,14 +45577,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListUsablePager", - "shortName": "list_usable" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for ListUsable", - "file": "compute_v1beta_generated_region_backend_services_list_usable_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_backend_buckets_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_ListUsable_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_Patch_sync", "segments": [ { "end": 53, @@ -44758,43 +45602,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_list_usable_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.List", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "List" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionBackendServicesRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendBucketRequest" }, { "name": "project", @@ -44804,6 +45648,14 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -44817,14 +45669,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_backend_services_list_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_List_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -44842,43 +45694,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_list_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", - "shortName": "RegionBackendServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient", + "shortName": "RegionBackendBucketsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionBackendBucketsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Patch", + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices", - "shortName": "RegionBackendServices" + "fullName": "google.cloud.compute.v1beta.RegionBackendBuckets", + "shortName": "RegionBackendBuckets" }, - "shortName": "Patch" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendBucketRequest" }, { "name": "project", @@ -44889,12 +45741,12 @@ "type": "str" }, { - "name": "backend_service", + "name": "resource", "type": "str" }, { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -44909,14 +45761,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_backend_services_patch_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionBackendBuckets_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -44949,7 +45801,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_patch_sync.py" + "title": "compute_v1beta_generated_region_backend_buckets_test_iam_permissions_sync.py" }, { "canonical": true, @@ -44958,19 +45810,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Delete", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "SetIamPolicy" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionBackendServiceRequest" }, { "name": "project", @@ -44981,13 +45833,9 @@ "type": "str" }, { - "name": "resource", + "name": "backend_service", "type": "str" }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45001,14 +45849,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_backend_services_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Delete_sync", "segments": [ { "end": 53, @@ -45041,7 +45889,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_services_delete_sync.py" }, { "canonical": true, @@ -45050,19 +45898,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_security_policy", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_health", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetSecurityPolicy", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetHealth", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "SetSecurityPolicy" + "shortName": "GetHealth" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetSecurityPolicyRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetHealthRegionBackendServiceRequest" }, { "name": "project", @@ -45077,8 +45925,8 @@ "type": "str" }, { - "name": "security_policy_reference_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyReference" + "name": "resource_group_reference_resource", + "type": "google.cloud.compute_v1beta.types.ResourceGroupReference" }, { "name": "retry", @@ -45093,14 +45941,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_security_policy" + "resultType": "google.cloud.compute_v1beta.types.BackendServiceGroupHealth", + "shortName": "get_health" }, - "description": "Sample for SetSecurityPolicy", - "file": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py", + "description": "Sample for GetHealth", + "file": "compute_v1beta_generated_region_backend_services_get_health_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_SetSecurityPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_GetHealth_sync", "segments": [ { "end": 53, @@ -45133,7 +45981,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_health_sync.py" }, { "canonical": true, @@ -45142,19 +45990,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.GetIamPolicy", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "TestIamPermissions" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionBackendServiceRequest" }, { "name": "project", @@ -45168,10 +46016,6 @@ "name": "resource", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45185,14 +46029,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -45225,7 +46069,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_iam_policy_sync.py" }, { "canonical": true, @@ -45234,19 +46078,19 @@ "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.update", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Update", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Get", "service": { "fullName": "google.cloud.compute.v1beta.RegionBackendServices", "shortName": "RegionBackendServices" }, - "shortName": "Update" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionBackendServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionBackendServiceRequest" }, { "name": "project", @@ -45260,10 +46104,6 @@ "name": "backend_service", "type": "str" }, - { - "name": "backend_service_resource", - "type": "google.cloud.compute_v1beta.types.BackendService" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45277,14 +46117,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.BackendService", + "shortName": "get" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_backend_services_update_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_backend_services_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionBackendServices_Update_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Get_sync", "segments": [ { "end": 53, @@ -45317,33 +46157,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_backend_services_update_sync.py" + "title": "compute_v1beta_generated_region_backend_services_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "AggregatedList" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCommitmentsRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionBackendServiceRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45357,14 +46205,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_backend_services_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Insert_sync", "segments": [ { "end": 52, @@ -45382,43 +46230,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 49, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_backend_services_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list_usable", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.ListUsable", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Get" + "shortName": "ListUsable" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.ListUsableRegionBackendServicesRequest" }, { "name": "project", @@ -45428,10 +46276,6 @@ "name": "region", "type": "str" }, - { - "name": "commitment", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45445,14 +46289,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Commitment", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListUsablePager", + "shortName": "list_usable" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_commitments_get_sync.py", + "description": "Sample for ListUsable", + "file": "compute_v1beta_generated_region_backend_services_list_usable_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_ListUsable_sync", "segments": [ { "end": 53, @@ -45470,43 +46314,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_get_sync.py" + "title": "compute_v1beta_generated_region_backend_services_list_usable_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Insert", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Insert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionBackendServicesRequest" }, { "name": "project", @@ -45516,10 +46360,6 @@ "name": "region", "type": "str" }, - { - "name": "commitment_resource", - "type": "google.cloud.compute_v1beta.types.Commitment" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45533,22 +46373,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_backend_services.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_commitments_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_backend_services_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -45568,33 +46408,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_insert_sync.py" + "title": "compute_v1beta_generated_region_backend_services_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.List", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "List" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionCommitmentsRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionBackendServiceRequest" }, { "name": "project", @@ -45604,6 +46444,14 @@ "name": "region", "type": "str" }, + { + "name": "backend_service", + "type": "str" + }, + { + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45617,14 +46465,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_commitments_list_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_backend_services_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_List_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Patch_sync", "segments": [ { "end": 53, @@ -45642,43 +46490,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_list_sync.py" + "title": "compute_v1beta_generated_region_backend_services_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "TestIamPermissions" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionBackendServiceRequest" }, { "name": "project", @@ -45693,8 +46541,8 @@ "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -45709,14 +46557,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -45749,28 +46597,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_backend_services_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update_reservations", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.set_security_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.UpdateReservations", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.SetSecurityPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "UpdateReservations" + "shortName": "SetSecurityPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateReservationsRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.SetSecurityPolicyRegionBackendServiceRequest" }, { "name": "project", @@ -45781,12 +46629,12 @@ "type": "str" }, { - "name": "commitment", + "name": "backend_service", "type": "str" }, { - "name": "region_commitments_update_reservations_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionCommitmentsUpdateReservationsRequest" + "name": "security_policy_reference_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyReference" }, { "name": "retry", @@ -45802,13 +46650,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update_reservations" + "shortName": "set_security_policy" }, - "description": "Sample for UpdateReservations", - "file": "compute_v1beta_generated_region_commitments_update_reservations_sync.py", + "description": "Sample for SetSecurityPolicy", + "file": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_UpdateReservations_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_SetSecurityPolicy_sync", "segments": [ { "end": 53, @@ -45841,28 +46689,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_update_reservations_sync.py" + "title": "compute_v1beta_generated_region_backend_services_set_security_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", - "shortName": "RegionCommitmentsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments.Update", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionCommitments", - "shortName": "RegionCommitments" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Update" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionCommitmentRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionBackendServiceRequest" }, { "name": "project", @@ -45873,12 +46721,12 @@ "type": "str" }, { - "name": "commitment", + "name": "resource", "type": "str" }, { - "name": "commitment_resource", - "type": "google.cloud.compute_v1beta.types.Commitment" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -45893,14 +46741,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_commitments_update_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionCommitments_Update_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -45933,28 +46781,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_commitments_update_sync.py" + "title": "compute_v1beta_generated_region_backend_services_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", - "shortName": "RegionDiskSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient", + "shortName": "RegionBackendServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionBackendServicesClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Get", + "fullName": "google.cloud.compute.v1beta.RegionBackendServices.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", - "shortName": "RegionDiskSettings" + "fullName": "google.cloud.compute.v1beta.RegionBackendServices", + "shortName": "RegionBackendServices" }, - "shortName": "Get" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskSettingRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionBackendServiceRequest" }, { "name": "project", @@ -45964,6 +46812,14 @@ "name": "region", "type": "str" }, + { + "name": "backend_service", + "type": "str" + }, + { + "name": "backend_service_resource", + "type": "google.cloud.compute_v1beta.types.BackendService" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -45977,22 +46833,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DiskSettings", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disk_settings_get_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_backend_services_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskSettings_Get_sync", + "regionTag": "compute_v1beta_generated_RegionBackendServices_Update_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46002,56 +46858,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_settings_get_sync.py" + "title": "compute_v1beta_generated_region_backend_services_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", - "shortName": "RegionDiskSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Patch", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", - "shortName": "RegionDiskSettings" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "Patch" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionDiskSettingRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCommitmentsRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "disk_settings_resource", - "type": "google.cloud.compute_v1beta.types.DiskSettings" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46065,14 +46913,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_disk_settings_patch_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskSettings_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_AggregatedList_sync", "segments": [ { "end": 52, @@ -46090,43 +46938,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_settings_patch_sync.py" + "title": "compute_v1beta_generated_region_commitments_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", - "shortName": "RegionDiskTypesClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.Get", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", - "shortName": "RegionDiskTypes" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskTypeRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionCommitmentRequest" }, { "name": "project", @@ -46137,7 +46985,7 @@ "type": "str" }, { - "name": "disk_type", + "name": "commitment", "type": "str" }, { @@ -46153,14 +47001,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DiskType", + "resultType": "google.cloud.compute_v1beta.types.Commitment", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disk_types_get_sync.py", + "file": "compute_v1beta_generated_region_commitments_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskTypes_Get_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Get_sync", "segments": [ { "end": 53, @@ -46193,28 +47041,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_types_get_sync.py" + "title": "compute_v1beta_generated_region_commitments_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", - "shortName": "RegionDiskTypesClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.List", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", - "shortName": "RegionDiskTypes" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "List" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionDiskTypesRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionCommitmentRequest" }, { "name": "project", @@ -46224,6 +47072,10 @@ "name": "region", "type": "str" }, + { + "name": "commitment_resource", + "type": "google.cloud.compute_v1beta.types.Commitment" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46237,22 +47089,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_disk_types.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_disk_types_list_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_commitments_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDiskTypes_List_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -46272,33 +47124,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 53, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disk_types_list_sync.py" + "title": "compute_v1beta_generated_region_commitments_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.add_resource_policies", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.AddResourcePolicies", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "AddResourcePolicies" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddResourcePoliciesRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionCommitmentsRequest" }, { "name": "project", @@ -46308,14 +47160,6 @@ "name": "region", "type": "str" }, - { - "name": "disk", - "type": "str" - }, - { - "name": "region_disks_add_resource_policies_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksAddResourcePoliciesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46329,14 +47173,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_resource_policies" + "resultType": "google.cloud.compute_v1beta.services.region_commitments.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for AddResourcePolicies", - "file": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_commitments_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_AddResourcePolicies_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_List_sync", "segments": [ { "end": 53, @@ -46354,43 +47198,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py" + "title": "compute_v1beta_generated_region_commitments_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.bulk_insert", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.BulkInsert", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "BulkInsert" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.BulkInsertRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCommitmentRequest" }, { "name": "project", @@ -46401,8 +47245,12 @@ "type": "str" }, { - "name": "bulk_insert_disk_resource_resource", - "type": "google.cloud.compute_v1beta.types.BulkInsertDiskResource" + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -46417,22 +47265,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "bulk_insert" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for BulkInsert", - "file": "compute_v1beta_generated_region_disks_bulk_insert_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_BulkInsert_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_TestIamPermissions_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -46442,43 +47290,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_bulk_insert_sync.py" + "title": "compute_v1beta_generated_region_commitments_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.create_snapshot", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update_reservations", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.CreateSnapshot", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.UpdateReservations", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "CreateSnapshot" + "shortName": "UpdateReservations" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CreateSnapshotRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.UpdateReservationsRegionCommitmentRequest" }, { "name": "project", @@ -46489,12 +47337,12 @@ "type": "str" }, { - "name": "disk", + "name": "commitment", "type": "str" }, { - "name": "snapshot_resource", - "type": "google.cloud.compute_v1beta.types.Snapshot" + "name": "region_commitments_update_reservations_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionCommitmentsUpdateReservationsRequest" }, { "name": "retry", @@ -46510,13 +47358,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "create_snapshot" + "shortName": "update_reservations" }, - "description": "Sample for CreateSnapshot", - "file": "compute_v1beta_generated_region_disks_create_snapshot_sync.py", + "description": "Sample for UpdateReservations", + "file": "compute_v1beta_generated_region_commitments_update_reservations_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_CreateSnapshot_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_UpdateReservations_sync", "segments": [ { "end": 53, @@ -46549,28 +47397,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_create_snapshot_sync.py" + "title": "compute_v1beta_generated_region_commitments_update_reservations_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient", + "shortName": "RegionCommitmentsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionCommitmentsClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Delete", + "fullName": "google.cloud.compute.v1beta.RegionCommitments.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCommitments", + "shortName": "RegionCommitments" }, - "shortName": "Delete" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionCommitmentRequest" }, { "name": "project", @@ -46581,9 +47429,13 @@ "type": "str" }, { - "name": "disk", + "name": "commitment", "type": "str" }, + { + "name": "commitment_resource", + "type": "google.cloud.compute_v1beta.types.Commitment" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -46598,13 +47450,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "update" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_disks_delete_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_commitments_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionCommitments_Update_sync", "segments": [ { "end": 53, @@ -46637,28 +47489,108 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_delete_sync.py" + "title": "compute_v1beta_generated_region_commitments_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "GetIamPolicy" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionCompositeHealthChecksRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_composite_health_checks_aggregated_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -46669,7 +47601,7 @@ "type": "str" }, { - "name": "resource", + "name": "composite_health_check", "type": "str" }, { @@ -46685,14 +47617,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_composite_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Delete_sync", "segments": [ { "end": 53, @@ -46725,28 +47657,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Get", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -46757,7 +47689,7 @@ "type": "str" }, { - "name": "disk", + "name": "composite_health_check", "type": "str" }, { @@ -46773,14 +47705,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Disk", + "resultType": "google.cloud.compute_v1beta.types.CompositeHealthCheck", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_disks_get_sync.py", + "file": "compute_v1beta_generated_region_composite_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Get_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Get_sync", "segments": [ { "end": 53, @@ -46813,28 +47745,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_get_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Insert", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -46845,8 +47777,8 @@ "type": "str" }, { - "name": "disk_resource", - "type": "google.cloud.compute_v1beta.types.Disk" + "name": "composite_health_check_resource", + "type": "google.cloud.compute_v1beta.types.CompositeHealthCheck" }, { "name": "retry", @@ -46865,10 +47797,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_disks_insert_sync.py", + "file": "compute_v1beta_generated_region_composite_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Insert_sync", "segments": [ { "end": 52, @@ -46901,28 +47833,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_insert_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.list", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.List", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionDisksRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionCompositeHealthChecksRequest" }, { "name": "project", @@ -46945,14 +47877,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_disks.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_composite_health_checks.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_disks_list_sync.py", + "file": "compute_v1beta_generated_region_composite_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_List_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_List_sync", "segments": [ { "end": 53, @@ -46985,28 +47917,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_list_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.remove_resource_policies", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.RemoveResourcePolicies", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "RemoveResourcePolicies" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveResourcePoliciesRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -47017,12 +47949,12 @@ "type": "str" }, { - "name": "disk", + "name": "composite_health_check", "type": "str" }, { - "name": "region_disks_remove_resource_policies_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest" + "name": "composite_health_check_resource", + "type": "google.cloud.compute_v1beta.types.CompositeHealthCheck" }, { "name": "retry", @@ -47038,13 +47970,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_resource_policies" + "shortName": "patch" }, - "description": "Sample for RemoveResourcePolicies", - "file": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_composite_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_RemoveResourcePolicies_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_Patch_sync", "segments": [ { "end": 53, @@ -47077,28 +48009,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient", + "shortName": "RegionCompositeHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.resize", + "fullName": "google.cloud.compute_v1beta.RegionCompositeHealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Resize", + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionCompositeHealthChecks", + "shortName": "RegionCompositeHealthChecks" }, - "shortName": "Resize" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionCompositeHealthCheckRequest" }, { "name": "project", @@ -47109,12 +48041,12 @@ "type": "str" }, { - "name": "disk", + "name": "resource", "type": "str" }, { - "name": "region_disks_resize_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksResizeRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -47129,14 +48061,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Resize", - "file": "compute_v1beta_generated_region_disks_resize_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Resize_sync", + "regionTag": "compute_v1beta_generated_RegionCompositeHealthChecks_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -47169,28 +48101,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_resize_sync.py" + "title": "compute_v1beta_generated_region_composite_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", + "shortName": "RegionDiskSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", + "shortName": "RegionDiskSettings" }, - "shortName": "SetIamPolicy" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskSettingRequest" }, { "name": "project", @@ -47200,14 +48132,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47221,22 +48145,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.cloud.compute_v1beta.types.DiskSettings", + "shortName": "get" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_disk_settings_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionDiskSettings_Get_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47246,43 +48170,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_disk_settings_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient", + "shortName": "RegionDiskSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionDiskSettingsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskSettings", + "shortName": "RegionDiskSettings" }, - "shortName": "SetLabels" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionDiskSettingRequest" }, { "name": "project", @@ -47293,12 +48217,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "disk_settings_resource", + "type": "google.cloud.compute_v1beta.types.DiskSettings" }, { "name": "retry", @@ -47314,21 +48234,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "patch" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_disks_set_labels_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_disk_settings_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionDiskSettings_Patch_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -47338,43 +48258,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_set_labels_sync.py" + "title": "compute_v1beta_generated_region_disk_settings_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionDisksClient", - "shortName": "RegionDisksClient" + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", + "shortName": "RegionDiskTypesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.start_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StartAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionDisks", - "shortName": "RegionDisks" + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", + "shortName": "RegionDiskTypes" }, - "shortName": "StartAsyncReplication" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StartAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskTypeRequest" }, { "name": "project", @@ -47385,13 +48305,9 @@ "type": "str" }, { - "name": "disk", + "name": "disk_type", "type": "str" }, - { - "name": "region_disks_start_async_replication_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionDisksStartAsyncReplicationRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47405,14 +48321,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "start_async_replication" + "resultType": "google.cloud.compute_v1beta.types.DiskType", + "shortName": "get" }, - "description": "Sample for StartAsyncReplication", - "file": "compute_v1beta_generated_region_disks_start_async_replication_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_disk_types_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StartAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDiskTypes_Get_sync", "segments": [ { "end": 53, @@ -47445,7 +48361,91 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_start_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disk_types_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient", + "shortName": "RegionDiskTypesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionDiskTypesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionDiskTypes", + "shortName": "RegionDiskTypes" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionDiskTypesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_disk_types.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_disk_types_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionDiskTypes_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_disk_types_list_sync.py" }, { "canonical": true, @@ -47454,19 +48454,19 @@ "fullName": "google.cloud.compute_v1beta.RegionDisksClient", "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.add_resource_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StopAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDisks.AddResourcePolicies", "service": { "fullName": "google.cloud.compute.v1beta.RegionDisks", "shortName": "RegionDisks" }, - "shortName": "StopAsyncReplication" + "shortName": "AddResourcePolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.AddResourcePoliciesRegionDiskRequest" }, { "name": "project", @@ -47480,6 +48480,10 @@ "name": "disk", "type": "str" }, + { + "name": "region_disks_add_resource_policies_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksAddResourcePoliciesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47494,13 +48498,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_async_replication" + "shortName": "add_resource_policies" }, - "description": "Sample for StopAsyncReplication", - "file": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py", + "description": "Sample for AddResourcePolicies", + "file": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StopAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_AddResourcePolicies_sync", "segments": [ { "end": 53, @@ -47533,7 +48537,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disks_add_resource_policies_sync.py" }, { "canonical": true, @@ -47542,19 +48546,19 @@ "fullName": "google.cloud.compute_v1beta.RegionDisksClient", "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_group_async_replication", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.bulk_insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.StopGroupAsyncReplication", + "fullName": "google.cloud.compute.v1beta.RegionDisks.BulkInsert", "service": { "fullName": "google.cloud.compute.v1beta.RegionDisks", "shortName": "RegionDisks" }, - "shortName": "StopGroupAsyncReplication" + "shortName": "BulkInsert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopGroupAsyncReplicationRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.BulkInsertRegionDiskRequest" }, { "name": "project", @@ -47565,8 +48569,8 @@ "type": "str" }, { - "name": "disks_stop_group_async_replication_resource_resource", - "type": "google.cloud.compute_v1beta.types.DisksStopGroupAsyncReplicationResource" + "name": "bulk_insert_disk_resource_resource", + "type": "google.cloud.compute_v1beta.types.BulkInsertDiskResource" }, { "name": "retry", @@ -47582,13 +48586,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_group_async_replication" + "shortName": "bulk_insert" }, - "description": "Sample for StopGroupAsyncReplication", - "file": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py", + "description": "Sample for BulkInsert", + "file": "compute_v1beta_generated_region_disks_bulk_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_StopGroupAsyncReplication_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_BulkInsert_sync", "segments": [ { "end": 52, @@ -47621,7 +48625,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py" + "title": "compute_v1beta_generated_region_disks_bulk_insert_sync.py" }, { "canonical": true, @@ -47630,19 +48634,19 @@ "fullName": "google.cloud.compute_v1beta.RegionDisksClient", "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.create_snapshot", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDisks.CreateSnapshot", "service": { "fullName": "google.cloud.compute.v1beta.RegionDisks", "shortName": "RegionDisks" }, - "shortName": "TestIamPermissions" + "shortName": "CreateSnapshot" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.CreateSnapshotRegionDiskRequest" }, { "name": "project", @@ -47653,12 +48657,12 @@ "type": "str" }, { - "name": "resource", + "name": "disk", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "snapshot_resource", + "type": "google.cloud.compute_v1beta.types.Snapshot" }, { "name": "retry", @@ -47673,14 +48677,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "create_snapshot" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py", + "description": "Sample for CreateSnapshot", + "file": "compute_v1beta_generated_region_disks_create_snapshot_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_CreateSnapshot_sync", "segments": [ { "end": 53, @@ -47713,7 +48717,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disks_create_snapshot_sync.py" }, { "canonical": true, @@ -47722,19 +48726,19 @@ "fullName": "google.cloud.compute_v1beta.RegionDisksClient", "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionDisksClient.update", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionDisks.Update", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Delete", "service": { "fullName": "google.cloud.compute.v1beta.RegionDisks", "shortName": "RegionDisks" }, - "shortName": "Update" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionDiskRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionDiskRequest" }, { "name": "project", @@ -47748,10 +48752,6 @@ "name": "disk", "type": "str" }, - { - "name": "disk_resource", - "type": "google.cloud.compute_v1beta.types.Disk" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -47766,13 +48766,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "shortName": "delete" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_disks_update_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_disks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionDisks_Update_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Delete_sync", "segments": [ { "end": 53, @@ -47805,28 +48805,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_disks_update_sync.py" + "title": "compute_v1beta_generated_region_disks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Delete", + "fullName": "google.cloud.compute.v1beta.RegionDisks.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Delete" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionDiskRequest" }, { "name": "project", @@ -47837,7 +48837,7 @@ "type": "str" }, { - "name": "health_check_service", + "name": "resource", "type": "str" }, { @@ -47853,14 +48853,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_check_services_delete_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -47893,28 +48893,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_delete_sync.py" + "title": "compute_v1beta_generated_region_disks_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Get", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionDiskRequest" }, { "name": "project", @@ -47925,7 +48925,7 @@ "type": "str" }, { - "name": "health_check_service", + "name": "disk", "type": "str" }, { @@ -47941,14 +48941,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheckService", + "resultType": "google.cloud.compute_v1beta.types.Disk", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_check_services_get_sync.py", + "file": "compute_v1beta_generated_region_disks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Get_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Get_sync", "segments": [ { "end": 53, @@ -47981,28 +48981,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_get_sync.py" + "title": "compute_v1beta_generated_region_disks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Insert", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionDiskRequest" }, { "name": "project", @@ -48013,8 +49013,8 @@ "type": "str" }, { - "name": "health_check_service_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheckService" + "name": "disk_resource", + "type": "google.cloud.compute_v1beta.types.Disk" }, { "name": "retry", @@ -48033,10 +49033,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_check_services_insert_sync.py", + "file": "compute_v1beta_generated_region_disks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Insert_sync", "segments": [ { "end": 52, @@ -48069,28 +49069,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_insert_sync.py" + "title": "compute_v1beta_generated_region_disks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.List", + "fullName": "google.cloud.compute.v1beta.RegionDisks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthCheckServicesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionDisksRequest" }, { "name": "project", @@ -48113,14 +49113,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_check_services.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_disks.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_check_services_list_sync.py", + "file": "compute_v1beta_generated_region_disks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_List_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_List_sync", "segments": [ { "end": 53, @@ -48153,28 +49153,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_list_sync.py" + "title": "compute_v1beta_generated_region_disks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.remove_resource_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Patch", + "fullName": "google.cloud.compute.v1beta.RegionDisks.RemoveResourcePolicies", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Patch" + "shortName": "RemoveResourcePolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.RemoveResourcePoliciesRegionDiskRequest" }, { "name": "project", @@ -48185,12 +49185,12 @@ "type": "str" }, { - "name": "health_check_service", + "name": "disk", "type": "str" }, { - "name": "health_check_service_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheckService" + "name": "region_disks_remove_resource_policies_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksRemoveResourcePoliciesRequest" }, { "name": "retry", @@ -48206,13 +49206,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "remove_resource_policies" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_check_services_patch_sync.py", + "description": "Sample for RemoveResourcePolicies", + "file": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_RemoveResourcePolicies_sync", "segments": [ { "end": 53, @@ -48245,28 +49245,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_patch_sync.py" + "title": "compute_v1beta_generated_region_disks_remove_resource_policies_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", - "shortName": "RegionHealthCheckServicesClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.resize", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Resize", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", - "shortName": "RegionHealthCheckServices" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "TestIamPermissions" + "shortName": "Resize" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckServiceRequest" + "type": "google.cloud.compute_v1beta.types.ResizeRegionDiskRequest" }, { "name": "project", @@ -48277,12 +49277,12 @@ "type": "str" }, { - "name": "resource", + "name": "disk", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_disks_resize_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksResizeRequest" }, { "name": "retry", @@ -48297,14 +49297,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "resize" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py", + "description": "Sample for Resize", + "file": "compute_v1beta_generated_region_disks_resize_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Resize_sync", "segments": [ { "end": 53, @@ -48337,28 +49337,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disks_resize_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Delete", + "fullName": "google.cloud.compute.v1beta.RegionDisks.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Delete" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionDiskRequest" }, { "name": "project", @@ -48369,9 +49369,13 @@ "type": "str" }, { - "name": "health_check", + "name": "resource", "type": "str" }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48385,14 +49389,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_checks_delete_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -48425,28 +49429,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_delete_sync.py" + "title": "compute_v1beta_generated_region_disks_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.get", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Get", + "fullName": "google.cloud.compute.v1beta.RegionDisks.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Get" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionDiskRequest" }, { "name": "project", @@ -48457,9 +49461,13 @@ "type": "str" }, { - "name": "health_check", + "name": "resource", "type": "str" }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48473,14 +49481,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthCheck", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_labels" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_checks_get_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_disks_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Get_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_SetLabels_sync", "segments": [ { "end": 53, @@ -48513,28 +49521,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_get_sync.py" + "title": "compute_v1beta_generated_region_disks_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.start_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Insert", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StartAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Insert" + "shortName": "StartAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.StartAsyncReplicationRegionDiskRequest" }, { "name": "project", @@ -48545,8 +49553,12 @@ "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "disk", + "type": "str" + }, + { + "name": "region_disks_start_async_replication_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionDisksStartAsyncReplicationRequest" }, { "name": "retry", @@ -48562,21 +49574,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "start_async_replication" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_checks_insert_sync.py", + "description": "Sample for StartAsyncReplication", + "file": "compute_v1beta_generated_region_disks_start_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StartAsyncReplication_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -48586,43 +49598,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_insert_sync.py" + "title": "compute_v1beta_generated_region_disks_start_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.list", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.List", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StopAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "List" + "shortName": "StopAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthChecksRequest" + "type": "google.cloud.compute_v1beta.types.StopAsyncReplicationRegionDiskRequest" }, { "name": "project", @@ -48632,6 +49644,10 @@ "name": "region", "type": "str" }, + { + "name": "disk", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -48645,14 +49661,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_checks.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "stop_async_replication" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_checks_list_sync.py", + "description": "Sample for StopAsyncReplication", + "file": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_List_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StopAsyncReplication_sync", "segments": [ { "end": 53, @@ -48670,43 +49686,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_list_sync.py" + "title": "compute_v1beta_generated_region_disks_stop_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.stop_group_async_replication", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Patch", + "fullName": "google.cloud.compute.v1beta.RegionDisks.StopGroupAsyncReplication", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, - "shortName": "Patch" + "shortName": "StopGroupAsyncReplication" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.StopGroupAsyncReplicationRegionDiskRequest" }, { "name": "project", @@ -48717,12 +49733,8 @@ "type": "str" }, { - "name": "health_check", - "type": "str" - }, - { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "disks_stop_group_async_replication_resource_resource", + "type": "google.cloud.compute_v1beta.types.DisksStopGroupAsyncReplicationResource" }, { "name": "retry", @@ -48738,21 +49750,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "stop_group_async_replication" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_checks_patch_sync.py", + "description": "Sample for StopGroupAsyncReplication", + "file": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_StopGroupAsyncReplication_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -48762,43 +49774,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_patch_sync.py" + "title": "compute_v1beta_generated_region_disks_stop_group_async_replication_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionDisks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionDiskRequest" }, { "name": "project", @@ -48833,10 +49845,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -48869,28 +49881,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_disks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", - "shortName": "RegionHealthChecksClient" + "fullName": "google.cloud.compute_v1beta.RegionDisksClient", + "shortName": "RegionDisksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.update", + "fullName": "google.cloud.compute_v1beta.RegionDisksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Update", + "fullName": "google.cloud.compute.v1beta.RegionDisks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", - "shortName": "RegionHealthChecks" + "fullName": "google.cloud.compute.v1beta.RegionDisks", + "shortName": "RegionDisks" }, "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionHealthCheckRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionDiskRequest" }, { "name": "project", @@ -48901,12 +49913,12 @@ "type": "str" }, { - "name": "health_check", + "name": "disk", "type": "str" }, { - "name": "health_check_resource", - "type": "google.cloud.compute_v1beta.types.HealthCheck" + "name": "disk_resource", + "type": "google.cloud.compute_v1beta.types.Disk" }, { "name": "retry", @@ -48925,10 +49937,10 @@ "shortName": "update" }, "description": "Sample for Update", - "file": "compute_v1beta_generated_region_health_checks_update_sync.py", + "file": "compute_v1beta_generated_region_disks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthChecks_Update_sync", + "regionTag": "compute_v1beta_generated_RegionDisks_Update_sync", "segments": [ { "end": 53, @@ -48961,28 +49973,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_checks_update_sync.py" + "title": "compute_v1beta_generated_region_disks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthSourcesRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthAggregationPoliciesRequest" }, { "name": "project", @@ -49001,14 +50013,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.AggregatedListPager", + "resultType": "google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.AggregatedListPager", "shortName": "aggregated_list" }, "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_AggregatedList_sync", "segments": [ { "end": 52, @@ -49041,28 +50053,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Delete", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49073,7 +50085,7 @@ "type": "str" }, { - "name": "health_source", + "name": "health_aggregation_policy", "type": "str" }, { @@ -49093,10 +50105,10 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_health_sources_delete_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Delete_sync", "segments": [ { "end": 53, @@ -49129,28 +50141,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_delete_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Get", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49161,7 +50173,7 @@ "type": "str" }, { - "name": "health_source", + "name": "health_aggregation_policy", "type": "str" }, { @@ -49177,14 +50189,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.HealthSource", + "resultType": "google.cloud.compute_v1beta.types.HealthAggregationPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_health_sources_get_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Get_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Get_sync", "segments": [ { "end": 53, @@ -49217,28 +50229,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_get_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49249,8 +50261,8 @@ "type": "str" }, { - "name": "health_source_resource", - "type": "google.cloud.compute_v1beta.types.HealthSource" + "name": "health_aggregation_policy_resource", + "type": "google.cloud.compute_v1beta.types.HealthAggregationPolicy" }, { "name": "retry", @@ -49269,10 +50281,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_health_sources_insert_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Insert_sync", "segments": [ { "end": 52, @@ -49305,28 +50317,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_insert_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionHealthSourcesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthAggregationPoliciesRequest" }, { "name": "project", @@ -49349,14 +50361,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_health_aggregation_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_health_sources_list_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_List_sync", "segments": [ { "end": 53, @@ -49389,28 +50401,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_list_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Patch", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49421,12 +50433,12 @@ "type": "str" }, { - "name": "health_source", + "name": "health_aggregation_policy", "type": "str" }, { - "name": "health_source_resource", - "type": "google.cloud.compute_v1beta.types.HealthSource" + "name": "health_aggregation_policy_resource", + "type": "google.cloud.compute_v1beta.types.HealthAggregationPolicy" }, { "name": "retry", @@ -49445,10 +50457,10 @@ "shortName": "patch" }, "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_health_sources_patch_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_Patch_sync", "segments": [ { "end": 53, @@ -49481,28 +50493,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_patch_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", - "shortName": "RegionHealthSourcesClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient", + "shortName": "RegionHealthAggregationPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionHealthAggregationPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionHealthSources", - "shortName": "RegionHealthSources" + "fullName": "google.cloud.compute.v1beta.RegionHealthAggregationPolicies", + "shortName": "RegionHealthAggregationPolicies" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthSourceRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthAggregationPolicyRequest" }, { "name": "project", @@ -49537,10 +50549,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionHealthSources_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionHealthAggregationPolicies_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -49573,28 +50585,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_health_aggregation_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.cancel", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Cancel", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "Cancel" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CancelRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49605,11 +50617,7 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "resize_request", + "name": "health_check_service", "type": "str" }, { @@ -49626,21 +50634,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "cancel" + "shortName": "delete" }, - "description": "Sample for Cancel", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_check_services_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Cancel_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Delete_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49650,43 +50658,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Delete", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49697,11 +50705,7 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "resize_request", + "name": "health_check_service", "type": "str" }, { @@ -49717,22 +50721,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.HealthCheckService", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_check_services_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Get_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49742,43 +50746,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Get", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49789,11 +50793,91 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check_service_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheckService" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_check_services_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_health_check_services_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionHealthCheckServicesRequest" + }, + { + "name": "project", "type": "str" }, { - "name": "resize_request", + "name": "region", "type": "str" }, { @@ -49809,22 +50893,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_health_check_services.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_check_services_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Get_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_List_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -49834,43 +50918,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "Insert" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerResizeRequestRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49881,12 +50965,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check_service", "type": "str" }, { - "name": "instance_group_manager_resize_request_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest" + "name": "health_check_service_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheckService" }, { "name": "retry", @@ -49902,13 +50986,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "patch" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_check_services_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_Patch_sync", "segments": [ { "end": 53, @@ -49941,28 +51025,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", - "shortName": "RegionInstanceGroupManagerResizeRequestsClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient", + "shortName": "RegionHealthCheckServicesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthCheckServicesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", - "shortName": "RegionInstanceGroupManagerResizeRequests" + "fullName": "google.cloud.compute.v1beta.RegionHealthCheckServices", + "shortName": "RegionHealthCheckServices" }, - "shortName": "List" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagerResizeRequestsRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckServiceRequest" }, { "name": "project", @@ -49973,9 +51057,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -49989,22 +51077,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_manager_resize_requests.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthCheckServices_TestIamPermissions_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50024,33 +51112,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py" + "title": "compute_v1beta_generated_region_health_check_services_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.abandon_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.AbandonInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "AbandonInstances" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AbandonInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthCheckRequest" }, { "name": "project", @@ -50061,13 +51149,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, - { - "name": "region_instance_group_managers_abandon_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAbandonInstancesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50082,13 +51166,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "abandon_instances" + "shortName": "delete" }, - "description": "Sample for AbandonInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_checks_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_AbandonInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Delete_sync", "segments": [ { "end": 53, @@ -50121,28 +51205,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py" + "title": "compute_v1beta_generated_region_health_checks_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.apply_updates_to_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ApplyUpdatesToInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "ApplyUpdatesToInstances" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthCheckRequest" }, { "name": "project", @@ -50153,13 +51237,9 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, - { - "name": "region_instance_group_managers_apply_updates_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50173,14 +51253,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "apply_updates_to_instances" + "resultType": "google.cloud.compute_v1beta.types.HealthCheck", + "shortName": "get" }, - "description": "Sample for ApplyUpdatesToInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_checks_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Get_sync", "segments": [ { "end": 53, @@ -50213,28 +51293,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py" + "title": "compute_v1beta_generated_region_health_checks_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.create_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.CreateInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "CreateInstances" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CreateInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthCheckRequest" }, { "name": "project", @@ -50245,12 +51325,8 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_create_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -50266,21 +51342,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "create_instances" + "shortName": "insert" }, - "description": "Sample for CreateInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_checks_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_CreateInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -50290,43 +51366,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py" + "title": "compute_v1beta_generated_region_health_checks_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeleteInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "DeleteInstances" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthChecksRequest" }, { "name": "project", @@ -50336,14 +51412,6 @@ "name": "region", "type": "str" }, - { - "name": "instance_group_manager", - "type": "str" - }, - { - "name": "region_instance_group_managers_delete_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50357,14 +51425,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete_instances" + "resultType": "google.cloud.compute_v1beta.services.region_health_checks.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for DeleteInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_health_checks_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeleteInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_List_sync", "segments": [ { "end": 53, @@ -50382,43 +51450,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py" + "title": "compute_v1beta_generated_region_health_checks_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeletePerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "DeletePerInstanceConfigs" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthCheckRequest" }, { "name": "project", @@ -50429,12 +51497,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, { - "name": "region_instance_group_manager_delete_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq" + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" }, { "name": "retry", @@ -50450,13 +51518,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete_per_instance_configs" + "shortName": "patch" }, - "description": "Sample for DeletePerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_checks_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Patch_sync", "segments": [ { "end": 53, @@ -50489,28 +51557,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_checks_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Delete", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "Delete" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthCheckRequest" }, { "name": "project", @@ -50521,9 +51589,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50537,14 +51609,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -50577,28 +51649,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py" + "title": "compute_v1beta_generated_region_health_checks_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient", + "shortName": "RegionHealthChecksClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.get", + "fullName": "google.cloud.compute_v1beta.RegionHealthChecksClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Get", + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthChecks", + "shortName": "RegionHealthChecks" }, - "shortName": "Get" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionHealthCheckRequest" }, { "name": "project", @@ -50609,9 +51681,13 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_check", "type": "str" }, + { + "name": "health_check_resource", + "type": "google.cloud.compute_v1beta.types.HealthCheck" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50625,14 +51701,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_group_managers_get_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_health_checks_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Get_sync", + "regionTag": "compute_v1beta_generated_RegionHealthChecks_Update_sync", "segments": [ { "end": 53, @@ -50665,41 +51741,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_get_sync.py" + "title": "compute_v1beta_generated_region_health_checks_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Insert", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "Insert" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionHealthSourcesRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -50713,14 +51781,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_AggregatedList_sync", "segments": [ { "end": 52, @@ -50738,43 +51806,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py" + "title": "compute_v1beta_generated_region_health_sources_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_errors", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListErrors", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "ListErrors" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListErrorsRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionHealthSourceRequest" }, { "name": "project", @@ -50785,7 +51853,7 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, { @@ -50801,22 +51869,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListErrorsPager", - "shortName": "list_errors" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for ListErrors", - "file": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_health_sources_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListErrors_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Delete_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50836,33 +51904,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py" + "title": "compute_v1beta_generated_region_health_sources_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_managed_instances", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListManagedInstances", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "ListManagedInstances" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListManagedInstancesRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionHealthSourceRequest" }, { "name": "project", @@ -50873,7 +51941,7 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, { @@ -50889,22 +51957,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListManagedInstancesPager", - "shortName": "list_managed_instances" + "resultType": "google.cloud.compute_v1beta.types.HealthSource", + "shortName": "get" }, - "description": "Sample for ListManagedInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_health_sources_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListManagedInstances_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Get_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -50924,33 +51992,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py" + "title": "compute_v1beta_generated_region_health_sources_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListPerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "ListPerInstanceConfigs" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListPerInstanceConfigsRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionHealthSourceRequest" }, { "name": "project", @@ -50961,8 +52029,8 @@ "type": "str" }, { - "name": "instance_group_manager", - "type": "str" + "name": "health_source_resource", + "type": "google.cloud.compute_v1beta.types.HealthSource" }, { "name": "retry", @@ -50977,22 +52045,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPerInstanceConfigsPager", - "shortName": "list_per_instance_configs" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for ListPerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_health_sources_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Insert_sync", "segments": [ { - "end": 54, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 52, "start": 27, "type": "SHORT" }, @@ -51002,43 +52070,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_sources_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.List", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagersRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionHealthSourcesRequest" }, { "name": "project", @@ -51061,14 +52129,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_health_sources.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_group_managers_list_sync.py", + "file": "compute_v1beta_generated_region_health_sources_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_List_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_List_sync", "segments": [ { "end": 53, @@ -51101,28 +52169,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_list_sync.py" + "title": "compute_v1beta_generated_region_health_sources_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.PatchPerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "PatchPerInstanceConfigs" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionHealthSourceRequest" }, { "name": "project", @@ -51133,12 +52201,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "health_source", "type": "str" }, { - "name": "region_instance_group_manager_patch_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerPatchInstanceConfigReq" + "name": "health_source_resource", + "type": "google.cloud.compute_v1beta.types.HealthSource" }, { "name": "retry", @@ -51154,13 +52222,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_per_instance_configs" + "shortName": "patch" }, - "description": "Sample for PatchPerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_health_sources_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_Patch_sync", "segments": [ { "end": 53, @@ -51193,28 +52261,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_health_sources_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient", + "shortName": "RegionHealthSourcesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionHealthSourcesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Patch", + "fullName": "google.cloud.compute.v1beta.RegionHealthSources.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionHealthSources", + "shortName": "RegionHealthSources" }, - "shortName": "Patch" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionHealthSourceRequest" }, { "name": "project", @@ -51225,12 +52293,12 @@ "type": "str" }, { - "name": "instance_group_manager", + "name": "resource", "type": "str" }, { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -51245,14 +52313,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionHealthSources_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -51285,28 +52353,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py" + "title": "compute_v1beta_generated_region_health_sources_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.recreate_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.cancel", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.RecreateInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Cancel", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "RecreateInstances" + "shortName": "Cancel" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RecreateInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.CancelRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51321,8 +52389,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_recreate_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51338,21 +52406,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "recreate_instances" + "shortName": "cancel" }, - "description": "Sample for RecreateInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py", + "description": "Sample for Cancel", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_RecreateInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Cancel_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51362,43 +52430,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_cancel_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize_advanced", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResizeAdvanced", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "ResizeAdvanced" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeAdvancedRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51413,8 +52481,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_resize_advanced_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51430,21 +52498,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize_advanced" + "shortName": "delete" }, - "description": "Sample for ResizeAdvanced", - "file": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResizeAdvanced_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Delete_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51454,43 +52522,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Resize", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "Resize" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51505,8 +52573,8 @@ "type": "str" }, { - "name": "size", - "type": "int" + "name": "resize_request", + "type": "str" }, { "name": "retry", @@ -51521,14 +52589,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest", + "shortName": "get" }, - "description": "Sample for Resize", - "file": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Resize_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Get_sync", "segments": [ { "end": 54, @@ -51561,28 +52629,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resume_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResumeInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "ResumeInstances" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResumeInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerResizeRequestRequest" }, { "name": "project", @@ -51597,8 +52665,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_resume_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest" + "name": "instance_group_manager_resize_request_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManagerResizeRequest" }, { "name": "retry", @@ -51614,13 +52682,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resume_instances" + "shortName": "insert" }, - "description": "Sample for ResumeInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResumeInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_Insert_sync", "segments": [ { "end": 53, @@ -51653,28 +52721,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", - "shortName": "RegionInstanceGroupManagersClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient", + "shortName": "RegionInstanceGroupManagerResizeRequestsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_auto_healing_policies", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagerResizeRequestsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetAutoHealingPolicies", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", - "shortName": "RegionInstanceGroupManagers" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagerResizeRequests", + "shortName": "RegionInstanceGroupManagerResizeRequests" }, - "shortName": "SetAutoHealingPolicies" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagerResizeRequestsRequest" }, { "name": "project", @@ -51688,10 +52756,6 @@ "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_group_managers_set_auto_healing_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetAutoHealingRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -51705,22 +52769,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_auto_healing_policies" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_manager_resize_requests.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for SetAutoHealingPolicies", - "file": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetAutoHealingPolicies_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagerResizeRequests_List_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -51740,12 +52804,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py" + "title": "compute_v1beta_generated_region_instance_group_manager_resize_requests_list_sync.py" }, { "canonical": true, @@ -51754,19 +52818,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_instance_template", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.abandon_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetInstanceTemplate", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.AbandonInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetInstanceTemplate" + "shortName": "AbandonInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetInstanceTemplateRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.AbandonInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -51781,8 +52845,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_set_template_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTemplateRequest" + "name": "region_instance_group_managers_abandon_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAbandonInstancesRequest" }, { "name": "retry", @@ -51798,13 +52862,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_instance_template" + "shortName": "abandon_instances" }, - "description": "Sample for SetInstanceTemplate", - "file": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py", + "description": "Sample for AbandonInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_AbandonInstances_sync", "segments": [ { "end": 53, @@ -51837,7 +52901,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_abandon_instances_sync.py" }, { "canonical": true, @@ -51846,19 +52910,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_target_pools", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.adopt_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetTargetPools", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.AdoptInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetTargetPools" + "shortName": "AdoptInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetTargetPoolsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.AdoptInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -51873,8 +52937,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_set_target_pools_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTargetPoolsRequest" + "name": "region_instance_group_managers_adopt_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersAdoptInstancesRequest" }, { "name": "retry", @@ -51890,13 +52954,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_target_pools" + "shortName": "adopt_instances" }, - "description": "Sample for SetTargetPools", - "file": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py", + "description": "Sample for AdoptInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_adopt_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetTargetPools_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_AdoptInstances_sync", "segments": [ { "end": 53, @@ -51929,7 +52993,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_adopt_instances_sync.py" }, { "canonical": true, @@ -51938,19 +53002,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.start_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.apply_updates_to_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StartInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ApplyUpdatesToInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "StartInstances" + "shortName": "ApplyUpdatesToInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StartInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -51965,8 +53029,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_start_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStartInstancesRequest" + "name": "region_instance_group_managers_apply_updates_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersApplyUpdatesRequest" }, { "name": "retry", @@ -51982,13 +53046,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "start_instances" + "shortName": "apply_updates_to_instances" }, - "description": "Sample for StartInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py", + "description": "Sample for ApplyUpdatesToInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StartInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync", "segments": [ { "end": 53, @@ -52021,7 +53085,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_apply_updates_to_instances_sync.py" }, { "canonical": true, @@ -52030,19 +53094,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.stop_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.create_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StopInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.CreateInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "StopInstances" + "shortName": "CreateInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.StopInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.CreateInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52057,8 +53121,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_stop_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStopInstancesRequest" + "name": "region_instance_group_managers_create_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersCreateInstancesRequest" }, { "name": "retry", @@ -52074,13 +53138,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "stop_instances" + "shortName": "create_instances" }, - "description": "Sample for StopInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py", + "description": "Sample for CreateInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StopInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_CreateInstances_sync", "segments": [ { "end": 53, @@ -52113,7 +53177,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_create_instances_sync.py" }, { "canonical": true, @@ -52122,19 +53186,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.suspend_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SuspendInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeleteInstances", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SuspendInstances" + "shortName": "DeleteInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SuspendInstancesRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52149,8 +53213,8 @@ "type": "str" }, { - "name": "region_instance_group_managers_suspend_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSuspendInstancesRequest" + "name": "region_instance_group_managers_delete_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersDeleteInstancesRequest" }, { "name": "retry", @@ -52166,13 +53230,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "suspend_instances" + "shortName": "delete_instances" }, - "description": "Sample for SuspendInstances", - "file": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py", + "description": "Sample for DeleteInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SuspendInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeleteInstances_sync", "segments": [ { "end": 53, @@ -52205,7 +53269,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_instances_sync.py" }, { "canonical": true, @@ -52214,19 +53278,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.DeletePerInstanceConfigs", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "TestIamPermissions" + "shortName": "DeletePerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52237,12 +53301,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "region_instance_group_manager_delete_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerDeleteInstanceConfigReq" }, { "name": "retry", @@ -52257,14 +53321,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete_per_instance_configs" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py", + "description": "Sample for DeletePerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync", "segments": [ { "end": 53, @@ -52297,7 +53361,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_per_instance_configs_sync.py" }, { "canonical": true, @@ -52306,19 +53370,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update_per_instance_configs", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.UpdatePerInstanceConfigs", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Delete", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "UpdatePerInstanceConfigs" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52332,10 +53396,6 @@ "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_group_manager_update_instance_config_req_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerUpdateInstanceConfigReq" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52350,13 +53410,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update_per_instance_configs" + "shortName": "delete" }, - "description": "Sample for UpdatePerInstanceConfigs", - "file": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Delete_sync", "segments": [ { "end": 53, @@ -52389,7 +53449,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_delete_sync.py" }, { "canonical": true, @@ -52398,19 +53458,19 @@ "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Update", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Get", "service": { "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Update" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionInstanceGroupManagerRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52424,10 +53484,6 @@ "name": "instance_group_manager", "type": "str" }, - { - "name": "instance_group_manager_resource", - "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52441,14 +53497,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroupManager", + "shortName": "get" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_instance_group_managers_update_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_group_managers_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Update_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Get_sync", "segments": [ { "end": 53, @@ -52481,28 +53537,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_group_managers_update_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52513,8 +53569,8 @@ "type": "str" }, { - "name": "instance_group", - "type": "str" + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" }, { "name": "retry", @@ -52529,22 +53585,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceGroup", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_groups_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -52554,43 +53610,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list_instances", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_errors", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.ListInstances", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListErrors", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "ListInstances" + "shortName": "ListErrors" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListInstancesRegionInstanceGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListErrorsRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -52601,13 +53657,9 @@ "type": "str" }, { - "name": "instance_group", + "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_groups_list_instances_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52621,14 +53673,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListInstancesPager", - "shortName": "list_instances" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListErrorsPager", + "shortName": "list_errors" }, - "description": "Sample for ListInstances", - "file": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py", + "description": "Sample for ListErrors", + "file": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_ListInstances_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListErrors_sync", "segments": [ { "end": 54, @@ -52661,28 +53713,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_errors_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_managed_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListManagedInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "List" + "shortName": "ListManagedInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListManagedInstancesRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -52692,6 +53744,10 @@ "name": "region", "type": "str" }, + { + "name": "instance_group_manager", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52705,22 +53761,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListManagedInstancesPager", + "shortName": "list_managed_instances" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_groups_list_sync.py", + "description": "Sample for ListManagedInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListManagedInstances_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -52730,43 +53786,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 50, + "end": 55, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_managed_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.set_named_ports", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.SetNamedPorts", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ListPerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetNamedPorts" + "shortName": "ListPerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetNamedPortsRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.ListPerInstanceConfigsRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -52777,13 +53833,9 @@ "type": "str" }, { - "name": "instance_group", + "name": "instance_group_manager", "type": "str" }, - { - "name": "region_instance_groups_set_named_ports_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsSetNamedPortsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52797,22 +53849,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_named_ports" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPerInstanceConfigsPager", + "shortName": "list_per_instance_configs" }, - "description": "Sample for SetNamedPorts", - "file": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py", + "description": "Sample for ListPerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_SetNamedPorts_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -52832,33 +53884,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", - "shortName": "RegionInstanceGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", - "shortName": "RegionInstanceGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupManagersRequest" }, { "name": "project", @@ -52868,14 +53920,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52889,14 +53933,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.region_instance_group_managers.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instance_group_managers_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceGroups_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_List_sync", "segments": [ { "end": 53, @@ -52914,43 +53958,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.PatchPerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "PatchPerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -52961,9 +54005,13 @@ "type": "str" }, { - "name": "instance_template", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_manager_patch_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerPatchInstanceConfigReq" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -52978,13 +54026,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch_per_instance_configs" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instance_templates_delete_sync.py", + "description": "Sample for PatchPerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync", "segments": [ { "end": 53, @@ -53017,28 +54065,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_patch_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53049,9 +54097,13 @@ "type": "str" }, { - "name": "instance_template", + "name": "instance_group_manager", "type": "str" }, + { + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53065,14 +54117,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstanceTemplate", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instance_templates_get_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Patch_sync", "segments": [ { "end": 53, @@ -53105,28 +54157,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.recreate_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.RecreateInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Insert" + "shortName": "RecreateInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceTemplateRequest" + "type": "google.cloud.compute_v1beta.types.RecreateInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53137,8 +54189,12 @@ "type": "str" }, { - "name": "instance_template_resource", - "type": "google.cloud.compute_v1beta.types.InstanceTemplate" + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_managers_recreate_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersRecreateRequest" }, { "name": "retry", @@ -53154,21 +54210,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "recreate_instances" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instance_templates_insert_sync.py", + "description": "Sample for RecreateInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_RecreateInstances_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -53178,43 +54234,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_recreate_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", - "shortName": "RegionInstanceTemplatesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize_advanced", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResizeAdvanced", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", - "shortName": "RegionInstanceTemplates" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "List" + "shortName": "ResizeAdvanced" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstanceTemplatesRequest" + "type": "google.cloud.compute_v1beta.types.ResizeAdvancedRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53224,6 +54280,14 @@ "name": "region", "type": "str" }, + { + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_managers_resize_advanced_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResizeAdvancedRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53237,14 +54301,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instance_templates.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "resize_advanced" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instance_templates_list_sync.py", + "description": "Sample for ResizeAdvanced", + "file": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResizeAdvanced_sync", "segments": [ { "end": 53, @@ -53262,43 +54326,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instance_templates_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resize_advanced_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstancesClient", - "shortName": "RegionInstancesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstancesClient.bulk_insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resize", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstances.BulkInsert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Resize", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstances", - "shortName": "RegionInstances" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "BulkInsert" + "shortName": "Resize" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.BulkInsertRegionInstanceRequest" + "type": "google.cloud.compute_v1beta.types.ResizeRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53309,8 +54373,12 @@ "type": "str" }, { - "name": "bulk_insert_instance_resource_resource", - "type": "google.cloud.compute_v1beta.types.BulkInsertInstanceResource" + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "size", + "type": "int" }, { "name": "retry", @@ -53326,21 +54394,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "bulk_insert" + "shortName": "resize" }, - "description": "Sample for BulkInsert", - "file": "compute_v1beta_generated_region_instances_bulk_insert_sync.py", + "description": "Sample for Resize", + "file": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstances_BulkInsert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Resize_sync", "segments": [ { - "end": 52, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 54, "start": 27, "type": "SHORT" }, @@ -53350,43 +54418,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 48, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instances_bulk_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resize_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.resume_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.ResumeInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "ResumeInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.ResumeInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53397,9 +54465,13 @@ "type": "str" }, { - "name": "instant_snapshot", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_resume_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersResumeInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53414,13 +54486,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "resume_instances" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py", + "description": "Sample for ResumeInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_ResumeInstances_sync", "segments": [ { "end": 53, @@ -53453,28 +54525,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_resume_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_auto_healing_policies", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetAutoHealingPolicies", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "GetIamPolicy" + "shortName": "SetAutoHealingPolicies" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53485,9 +54557,13 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_set_auto_healing_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetAutoHealingRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53501,14 +54577,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_auto_healing_policies" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py", + "description": "Sample for SetAutoHealingPolicies", + "file": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetAutoHealingPolicies_sync", "segments": [ { "end": 53, @@ -53541,28 +54617,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_auto_healing_policies_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_instance_template", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetInstanceTemplate", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "SetInstanceTemplate" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetInstanceTemplateRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53573,9 +54649,13 @@ "type": "str" }, { - "name": "instant_snapshot", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_managers_set_template_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTemplateRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53589,14 +54669,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.InstantSnapshot", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_instance_template" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_instant_snapshots_get_sync.py", + "description": "Sample for SetInstanceTemplate", + "file": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync", "segments": [ { "end": 53, @@ -53629,28 +54709,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_instance_template_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.set_target_pools", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SetTargetPools", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Insert" + "shortName": "SetTargetPools" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SetTargetPoolsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53661,8 +54741,12 @@ "type": "str" }, { - "name": "instant_snapshot_resource", - "type": "google.cloud.compute_v1beta.types.InstantSnapshot" + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_managers_set_target_pools_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSetTargetPoolsRequest" }, { "name": "retry", @@ -53678,21 +54762,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "set_target_pools" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py", + "description": "Sample for SetTargetPools", + "file": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SetTargetPools_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -53702,43 +54786,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_set_target_pools_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.start_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StartInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "List" + "shortName": "StartInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionInstantSnapshotsRequest" + "type": "google.cloud.compute_v1beta.types.StartInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53748,6 +54832,14 @@ "name": "region", "type": "str" }, + { + "name": "instance_group_manager", + "type": "str" + }, + { + "name": "region_instance_group_managers_start_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStartInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -53761,14 +54853,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_instant_snapshots.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "start_instances" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_instant_snapshots_list_sync.py", + "description": "Sample for StartInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StartInstances_sync", "segments": [ { "end": 53, @@ -53786,43 +54878,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_list_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_start_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.stop_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.StopInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetIamPolicy" + "shortName": "StopInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.StopInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53833,12 +54925,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + "name": "region_instance_group_managers_stop_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersStopInstancesRequest" }, { "name": "retry", @@ -53853,14 +54945,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "stop_instances" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py", + "description": "Sample for StopInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_StopInstances_sync", "segments": [ { "end": 53, @@ -53893,28 +54985,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_stop_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.suspend_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.SuspendInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "SetLabels" + "shortName": "SuspendInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.SuspendInstancesRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -53925,12 +55017,12 @@ "type": "str" }, { - "name": "resource", + "name": "instance_group_manager", "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "region_instance_group_managers_suspend_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagersSuspendInstancesRequest" }, { "name": "retry", @@ -53946,13 +55038,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "suspend_instances" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py", + "description": "Sample for SuspendInstances", + "file": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_SuspendInstances_sync", "segments": [ { "end": 53, @@ -53985,28 +55077,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_suspend_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", - "shortName": "RegionInstantSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", - "shortName": "RegionInstantSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstantSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54041,10 +55133,10 @@ "shortName": "test_iam_permissions" }, "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py", + "file": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -54077,28 +55169,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update_per_instance_configs", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.UpdatePerInstanceConfigs", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Delete" + "shortName": "UpdatePerInstanceConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54109,9 +55201,13 @@ "type": "str" }, { - "name": "multi_mig", + "name": "instance_group_manager", "type": "str" }, + { + "name": "region_instance_group_manager_update_instance_config_req_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupManagerUpdateInstanceConfigReq" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54126,13 +55222,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "update_per_instance_configs" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_multi_migs_delete_sync.py", + "description": "Sample for UpdatePerInstanceConfigs", + "file": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync", "segments": [ { "end": 53, @@ -54165,28 +55261,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_update_per_instance_configs_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient", + "shortName": "RegionInstanceGroupManagersClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupManagersClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers.Update", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroupManagers", + "shortName": "RegionInstanceGroupManagers" }, - "shortName": "Get" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.UpdateRegionInstanceGroupManagerRequest" }, { "name": "project", @@ -54197,9 +55293,13 @@ "type": "str" }, { - "name": "multi_mig", + "name": "instance_group_manager", "type": "str" }, + { + "name": "instance_group_manager_resource", + "type": "google.cloud.compute_v1beta.types.InstanceGroupManager" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54213,14 +55313,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.MultiMig", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_multi_migs_get_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_instance_group_managers_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroupManagers_Update_sync", "segments": [ { "end": 53, @@ -54253,28 +55353,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_get_sync.py" + "title": "compute_v1beta_generated_region_instance_group_managers_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "Insert" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionMultiMigRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceGroupRequest" }, { "name": "project", @@ -54285,8 +55385,8 @@ "type": "str" }, { - "name": "multi_mig_resource", - "type": "google.cloud.compute_v1beta.types.MultiMig" + "name": "instance_group", + "type": "str" }, { "name": "retry", @@ -54301,22 +55401,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.InstanceGroup", + "shortName": "get" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_multi_migs_insert_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -54326,43 +55426,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", - "shortName": "RegionMultiMigsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list_instances", "method": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.ListInstances", "service": { - "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", - "shortName": "RegionMultiMigs" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "List" + "shortName": "ListInstances" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionMultiMigsRequest" + "type": "google.cloud.compute_v1beta.types.ListInstancesRegionInstanceGroupsRequest" }, { "name": "project", @@ -54372,6 +55472,14 @@ "name": "region", "type": "str" }, + { + "name": "instance_group", + "type": "str" + }, + { + "name": "region_instance_groups_list_instances_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsListInstancesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54385,22 +55493,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_multi_migs.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListInstancesPager", + "shortName": "list_instances" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_multi_migs_list_sync.py", + "description": "Sample for ListInstances", + "file": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionMultiMigs_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_ListInstances_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -54410,43 +55518,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 50, + "end": 55, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_multi_migs_list_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_list_instances_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.attach_network_endpoints", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.AttachNetworkEndpoints", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "AttachNetworkEndpoints" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceGroupsRequest" }, { "name": "project", @@ -54456,14 +55564,6 @@ "name": "region", "type": "str" }, - { - "name": "network_endpoint_group", - "type": "str" - }, - { - "name": "region_network_endpoint_groups_attach_endpoints_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54477,14 +55577,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "attach_network_endpoints" + "resultType": "google.cloud.compute_v1beta.services.region_instance_groups.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for AttachNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instance_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_AttachNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_List_sync", "segments": [ { "end": 53, @@ -54502,43 +55602,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.set_named_ports", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.SetNamedPorts", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "Delete" + "shortName": "SetNamedPorts" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.SetNamedPortsRegionInstanceGroupRequest" }, { "name": "project", @@ -54549,9 +55649,13 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "instance_group", "type": "str" }, + { + "name": "region_instance_groups_set_named_ports_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionInstanceGroupsSetNamedPortsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -54566,13 +55670,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "set_named_ports" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py", + "description": "Sample for SetNamedPorts", + "file": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_SetNamedPorts_sync", "segments": [ { "end": 53, @@ -54605,28 +55709,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_set_named_ports_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient", + "shortName": "RegionInstanceGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.detach_network_endpoints", + "fullName": "google.cloud.compute_v1beta.RegionInstanceGroupsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.DetachNetworkEndpoints", + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceGroups", + "shortName": "RegionInstanceGroups" }, - "shortName": "DetachNetworkEndpoints" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstanceGroupRequest" }, { "name": "project", @@ -54637,12 +55741,12 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "resource", "type": "str" }, { - "name": "region_network_endpoint_groups_detach_endpoints_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -54657,14 +55761,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "detach_network_endpoints" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for DetachNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_DetachNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceGroups_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -54697,28 +55801,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_groups_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstanceTemplateRequest" }, { "name": "project", @@ -54729,7 +55833,7 @@ "type": "str" }, { - "name": "network_endpoint_group", + "name": "instance_template", "type": "str" }, { @@ -54745,14 +55849,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkEndpointGroup", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instance_templates_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Delete_sync", "segments": [ { "end": 53, @@ -54785,28 +55889,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Insert", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "Insert" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkEndpointGroupRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstanceTemplateRequest" }, { "name": "project", @@ -54817,8 +55921,8 @@ "type": "str" }, { - "name": "network_endpoint_group_resource", - "type": "google.cloud.compute_v1beta.types.NetworkEndpointGroup" + "name": "instance_template", + "type": "str" }, { "name": "retry", @@ -54833,22 +55937,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.InstanceTemplate", + "shortName": "get" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instance_templates_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -54858,43 +55962,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list_network_endpoints", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.ListNetworkEndpoints", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, - "shortName": "ListNetworkEndpoints" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstanceTemplateRequest" }, { "name": "project", @@ -54905,8 +56009,8 @@ "type": "str" }, { - "name": "network_endpoint_group", - "type": "str" + "name": "instance_template_resource", + "type": "google.cloud.compute_v1beta.types.InstanceTemplate" }, { "name": "retry", @@ -54921,22 +56025,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListNetworkEndpointsPager", - "shortName": "list_network_endpoints" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for ListNetworkEndpoints", - "file": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instance_templates_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_ListNetworkEndpoints_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_Insert_sync", "segments": [ { - "end": 54, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 52, "start": 27, "type": "SHORT" }, @@ -54946,43 +56050,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", - "shortName": "RegionNetworkEndpointGroupsClient" + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient", + "shortName": "RegionInstanceTemplatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionInstanceTemplatesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.List", + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", - "shortName": "RegionNetworkEndpointGroups" + "fullName": "google.cloud.compute.v1beta.RegionInstanceTemplates", + "shortName": "RegionInstanceTemplates" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkEndpointGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstanceTemplatesRequest" }, { "name": "project", @@ -55005,14 +56109,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_instance_templates.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py", + "file": "compute_v1beta_generated_region_instance_templates_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_List_sync", + "regionTag": "compute_v1beta_generated_RegionInstanceTemplates_List_sync", "segments": [ { "end": 53, @@ -55045,28 +56149,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py" + "title": "compute_v1beta_generated_region_instance_templates_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstancesClient", + "shortName": "RegionInstancesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_association", + "fullName": "google.cloud.compute_v1beta.RegionInstancesClient.bulk_insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddAssociation", + "fullName": "google.cloud.compute.v1beta.RegionInstances.BulkInsert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstances", + "shortName": "RegionInstances" }, - "shortName": "AddAssociation" + "shortName": "BulkInsert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.BulkInsertRegionInstanceRequest" }, { "name": "project", @@ -55077,12 +56181,8 @@ "type": "str" }, { - "name": "firewall_policy", - "type": "str" - }, - { - "name": "firewall_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + "name": "bulk_insert_instance_resource_resource", + "type": "google.cloud.compute_v1beta.types.BulkInsertInstanceResource" }, { "name": "retry", @@ -55098,21 +56198,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_association" + "shortName": "bulk_insert" }, - "description": "Sample for AddAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py", + "description": "Sample for BulkInsert", + "file": "compute_v1beta_generated_region_instances_bulk_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionInstances_BulkInsert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -55122,43 +56222,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py" + "title": "compute_v1beta_generated_region_instances_bulk_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_rule", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddRule", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "AddRule" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionInstantSnapshotRequest" }, { "name": "project", @@ -55169,13 +56269,9 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instant_snapshot", "type": "str" }, - { - "name": "firewall_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55190,13 +56286,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_rule" + "shortName": "delete" }, - "description": "Sample for AddRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddRule_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Delete_sync", "segments": [ { "end": 53, @@ -55229,28 +56325,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.clone_rules", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.CloneRules", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "CloneRules" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.CloneRulesRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionInstantSnapshotRequest" }, { "name": "project", @@ -55261,7 +56357,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, { @@ -55277,14 +56373,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "clone_rules" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for CloneRules", - "file": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_CloneRules_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -55317,28 +56413,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionInstantSnapshotRequest" }, { "name": "project", @@ -55349,7 +56445,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "instant_snapshot", "type": "str" }, { @@ -55365,14 +56461,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.InstantSnapshot", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_instant_snapshots_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Get_sync", "segments": [ { "end": 53, @@ -55405,28 +56501,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_association", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetAssociation", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetAssociation" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionInstantSnapshotRequest" }, { "name": "project", @@ -55437,8 +56533,8 @@ "type": "str" }, { - "name": "firewall_policy", - "type": "str" + "name": "instant_snapshot_resource", + "type": "google.cloud.compute_v1beta.types.InstantSnapshot" }, { "name": "retry", @@ -55453,22 +56549,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation", - "shortName": "get_association" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for GetAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -55478,43 +56574,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_effective_firewalls", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetEffectiveFirewalls", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetEffectiveFirewalls" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionInstantSnapshotsRequest" }, { "name": "project", @@ -55524,10 +56620,6 @@ "name": "region", "type": "str" }, - { - "name": "network", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55541,14 +56633,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", - "shortName": "get_effective_firewalls" + "resultType": "google.cloud.compute_v1beta.services.region_instant_snapshots.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for GetEffectiveFirewalls", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_instant_snapshots_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_List_sync", "segments": [ { "end": 53, @@ -55566,43 +56658,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetIamPolicy" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionInstantSnapshotRequest" }, { "name": "project", @@ -55616,6 +56708,10 @@ "name": "resource", "type": "str" }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55630,13 +56726,13 @@ } ], "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "shortName": "set_iam_policy" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -55669,28 +56765,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_rule", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetRule", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "GetRule" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionInstantSnapshotRequest" }, { "name": "project", @@ -55701,9 +56797,13 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55717,14 +56817,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyRule", - "shortName": "get_rule" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_labels" }, - "description": "Sample for GetRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetRule_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_SetLabels_sync", "segments": [ { "end": 53, @@ -55757,28 +56857,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient", + "shortName": "RegionInstantSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionInstantSnapshotsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionInstantSnapshots", + "shortName": "RegionInstantSnapshots" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionInstantSnapshotRequest" }, { "name": "project", @@ -55789,9 +56889,13 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55805,14 +56909,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.FirewallPolicy", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionInstantSnapshots_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -55845,28 +56949,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py" + "title": "compute_v1beta_generated_region_instant_snapshots_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionMultiMigRequest" }, { "name": "project", @@ -55877,8 +56981,8 @@ "type": "str" }, { - "name": "firewall_policy_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicy" + "name": "multi_mig", + "type": "str" }, { "name": "retry", @@ -55894,21 +56998,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_multi_migs_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -55918,43 +57022,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkFirewallPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionMultiMigRequest" }, { "name": "project", @@ -55964,6 +57068,10 @@ "name": "region", "type": "str" }, + { + "name": "multi_mig", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -55977,14 +57085,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_firewall_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.MultiMig", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_multi_migs_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Get_sync", "segments": [ { "end": 53, @@ -56002,43 +57110,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_association", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchAssociation", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "PatchAssociation" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionMultiMigRequest" }, { "name": "project", @@ -56049,12 +57157,8 @@ "type": "str" }, { - "name": "firewall_policy", - "type": "str" - }, - { - "name": "firewall_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + "name": "multi_mig_resource", + "type": "google.cloud.compute_v1beta.types.MultiMig" }, { "name": "retry", @@ -56070,21 +57174,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_association" + "shortName": "insert" }, - "description": "Sample for PatchAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_multi_migs_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -56094,43 +57198,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient", + "shortName": "RegionMultiMigsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_rule", + "fullName": "google.cloud.compute_v1beta.RegionMultiMigsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchRule", + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionMultiMigs", + "shortName": "RegionMultiMigs" }, - "shortName": "PatchRule" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionMultiMigsRequest" }, { "name": "project", @@ -56140,14 +57244,6 @@ "name": "region", "type": "str" }, - { - "name": "firewall_policy", - "type": "str" - }, - { - "name": "firewall_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56161,14 +57257,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_rule" + "resultType": "google.cloud.compute_v1beta.services.region_multi_migs.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for PatchRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_multi_migs_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchRule_sync", + "regionTag": "compute_v1beta_generated_RegionMultiMigs_List_sync", "segments": [ { "end": 53, @@ -56186,43 +57282,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py" + "title": "compute_v1beta_generated_region_multi_migs_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.attach_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.AttachNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "Patch" + "shortName": "AttachNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56233,12 +57329,12 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "network_endpoint_group", "type": "str" }, { - "name": "firewall_policy_resource", - "type": "google.cloud.compute_v1beta.types.FirewallPolicy" + "name": "region_network_endpoint_groups_attach_endpoints_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsAttachEndpointsRequest" }, { "name": "retry", @@ -56254,13 +57350,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "attach_network_endpoints" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py", + "description": "Sample for AttachNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_AttachNetworkEndpoints_sync", "segments": [ { "end": 53, @@ -56293,28 +57389,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_attach_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "RemoveAssociation" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56325,7 +57421,7 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "network_endpoint_group", "type": "str" }, { @@ -56342,13 +57438,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_association" + "shortName": "delete" }, - "description": "Sample for RemoveAssociation", - "file": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Delete_sync", "segments": [ { "end": 53, @@ -56381,28 +57477,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.detach_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.DetachNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "RemoveRule" + "shortName": "DetachNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56413,9 +57509,13 @@ "type": "str" }, { - "name": "firewall_policy", + "name": "network_endpoint_group", "type": "str" }, + { + "name": "region_network_endpoint_groups_detach_endpoints_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionNetworkEndpointGroupsDetachEndpointsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56430,13 +57530,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_rule" + "shortName": "detach_network_endpoints" }, - "description": "Sample for RemoveRule", - "file": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py", + "description": "Sample for DetachNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_DetachNetworkEndpoints_sync", "segments": [ { "end": 53, @@ -56469,28 +57569,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_detach_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "SetIamPolicy" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56501,13 +57601,9 @@ "type": "str" }, { - "name": "resource", + "name": "network_endpoint_group", "type": "str" }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56521,14 +57617,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.cloud.compute_v1beta.types.NetworkEndpointGroup", + "shortName": "get" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Get_sync", "segments": [ { "end": 53, @@ -56561,28 +57657,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", - "shortName": "RegionNetworkFirewallPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", - "shortName": "RegionNetworkFirewallPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNetworkFirewallPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkEndpointGroupRequest" }, { "name": "project", @@ -56593,12 +57689,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "network_endpoint_group_resource", + "type": "google.cloud.compute_v1beta.types.NetworkEndpointGroup" }, { "name": "retry", @@ -56613,22 +57705,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -56638,43 +57730,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list_network_endpoints", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.ListNetworkEndpoints", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "AddAssociation" + "shortName": "ListNetworkEndpoints" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest" }, { "name": "project", @@ -56685,13 +57777,9 @@ "type": "str" }, { - "name": "network_policy", + "name": "network_endpoint_group", "type": "str" }, - { - "name": "network_policy_association_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56705,22 +57793,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_association" + "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListNetworkEndpointsPager", + "shortName": "list_network_endpoints" }, - "description": "Sample for AddAssociation", - "file": "compute_v1beta_generated_region_network_policies_add_association_sync.py", + "description": "Sample for ListNetworkEndpoints", + "file": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_ListNetworkEndpoints_sync", "segments": [ { - "end": 53, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 54, "start": 27, "type": "SHORT" }, @@ -56740,33 +57828,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 55, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_add_association_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_list_network_endpoints_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient", + "shortName": "RegionNetworkEndpointGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkEndpointGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkEndpointGroups", + "shortName": "RegionNetworkEndpointGroups" }, - "shortName": "AddTrafficClassificationRule" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkEndpointGroupsRequest" }, { "name": "project", @@ -56776,14 +57864,6 @@ "name": "region", "type": "str" }, - { - "name": "network_policy", - "type": "str" - }, - { - "name": "network_policy_traffic_classification_rule_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56797,14 +57877,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_traffic_classification_rule" + "resultType": "google.cloud.compute_v1beta.services.region_network_endpoint_groups.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for AddTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkEndpointGroups_List_sync", "segments": [ { "end": 53, @@ -56822,48 +57902,60 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_endpoint_groups_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AggregatedList", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "AggregatedList" + "shortName": "AddAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListRegionNetworkPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "firewall_policy", + "type": "str" + }, + { + "name": "firewall_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56877,22 +57969,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_association" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py", + "description": "Sample for AddAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddAssociation_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -56902,43 +57994,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_add_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.add_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.AddRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "AddRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AddRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -56949,9 +58041,13 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, + { + "name": "firewall_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -56966,13 +58062,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "add_rule" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_network_policies_delete_sync.py", + "description": "Sample for AddRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_AddRule_sync", "segments": [ { "end": 53, @@ -57005,28 +58101,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_add_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.clone_rules", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.CloneRules", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "GetAssociation" + "shortName": "CloneRules" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.CloneRulesRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57037,7 +58133,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, { @@ -57053,14 +58149,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation", - "shortName": "get_association" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "clone_rules" }, - "description": "Sample for GetAssociation", - "file": "compute_v1beta_generated_region_network_policies_get_association_sync.py", + "description": "Sample for CloneRules", + "file": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_CloneRules_sync", "segments": [ { "end": 53, @@ -57093,28 +58189,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_association_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_clone_rules_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "GetTrafficClassificationRule" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57125,7 +58221,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, { @@ -57141,14 +58237,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule", - "shortName": "get_traffic_classification_rule" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for GetTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Delete_sync", "segments": [ { "end": 53, @@ -57181,28 +58277,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Get" + "shortName": "GetAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57213,7 +58309,7 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, { @@ -57229,14 +58325,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NetworkPolicy", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation", + "shortName": "get_association" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_network_policies_get_sync.py", + "description": "Sample for GetAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetAssociation_sync", "segments": [ { "end": 53, @@ -57269,28 +58365,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_get_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_effective_firewalls", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetEffectiveFirewalls", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Insert" + "shortName": "GetEffectiveFirewalls" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57301,8 +58397,8 @@ "type": "str" }, { - "name": "network_policy_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicy" + "name": "network", + "type": "str" }, { "name": "retry", @@ -57317,22 +58413,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", + "shortName": "get_effective_firewalls" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_network_policies_insert_sync.py", + "description": "Sample for GetEffectiveFirewalls", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -57342,43 +58438,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_effective_firewalls_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "List" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNetworkPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57388,6 +58484,10 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57401,14 +58501,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_network_policies_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -57426,43 +58526,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.PatchTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.GetRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "PatchTrafficClassificationRule" + "shortName": "GetRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57473,13 +58573,9 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, - { - "name": "network_policy_traffic_classification_rule_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57493,14 +58589,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_traffic_classification_rule" + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicyRule", + "shortName": "get_rule" }, - "description": "Sample for PatchTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py", + "description": "Sample for GetRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_PatchTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_GetRule_sync", "segments": [ { "end": 53, @@ -57533,28 +58629,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57565,13 +58661,9 @@ "type": "str" }, { - "name": "network_policy", + "name": "firewall_policy", "type": "str" }, - { - "name": "network_policy_resource", - "type": "google.cloud.compute_v1beta.types.NetworkPolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57585,14 +58677,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.FirewallPolicy", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_network_policies_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Get_sync", "segments": [ { "end": 53, @@ -57625,28 +58717,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_association", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveAssociation", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "RemoveAssociation" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57657,8 +58749,8 @@ "type": "str" }, { - "name": "network_policy", - "type": "str" + "name": "firewall_policy_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicy" }, { "name": "retry", @@ -57674,21 +58766,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_association" + "shortName": "insert" }, - "description": "Sample for RemoveAssociation", - "file": "compute_v1beta_generated_region_network_policies_remove_association_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveAssociation_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -57698,43 +58790,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_remove_association_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", - "shortName": "RegionNetworkPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_traffic_classification_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveTrafficClassificationRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", - "shortName": "RegionNetworkPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "RemoveTrafficClassificationRule" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveTrafficClassificationRuleRegionNetworkPolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkFirewallPoliciesRequest" }, { "name": "project", @@ -57744,10 +58836,6 @@ "name": "region", "type": "str" }, - { - "name": "network_policy", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57761,14 +58849,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_traffic_classification_rule" + "resultType": "google.cloud.compute_v1beta.services.region_network_firewall_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for RemoveTrafficClassificationRule", - "file": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveTrafficClassificationRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_List_sync", "segments": [ { "end": 53, @@ -57786,43 +58874,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "PatchAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.PatchAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57833,9 +58921,13 @@ "type": "str" }, { - "name": "notification_endpoint", + "name": "firewall_policy", "type": "str" }, + { + "name": "firewall_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyAssociation" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57850,13 +58942,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch_association" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py", + "description": "Sample for PatchAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchAssociation_sync", "segments": [ { "end": 53, @@ -57889,28 +58981,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.PatchRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Get" + "shortName": "PatchRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.PatchRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -57921,9 +59013,13 @@ "type": "str" }, { - "name": "notification_endpoint", + "name": "firewall_policy", "type": "str" }, + { + "name": "firewall_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicyRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -57937,14 +59033,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.NotificationEndpoint", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch_rule" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_notification_endpoints_get_sync.py", + "description": "Sample for PatchRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_PatchRule_sync", "segments": [ { "end": 53, @@ -57977,28 +59073,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_get_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Insert" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58009,8 +59105,12 @@ "type": "str" }, { - "name": "notification_endpoint_resource", - "type": "google.cloud.compute_v1beta.types.NotificationEndpoint" + "name": "firewall_policy", + "type": "str" + }, + { + "name": "firewall_policy_resource", + "type": "google.cloud.compute_v1beta.types.FirewallPolicy" }, { "name": "retry", @@ -58026,21 +59126,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "patch" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_Patch_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -58050,43 +59150,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "List" + "shortName": "RemoveAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionNotificationEndpointsRequest" + "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58096,6 +59196,10 @@ "name": "region", "type": "str" }, + { + "name": "firewall_policy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58109,14 +59213,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_notification_endpoints.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_association" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_notification_endpoints_list_sync.py", + "description": "Sample for RemoveAssociation", + "file": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync", "segments": [ { "end": 53, @@ -58134,43 +59238,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_list_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_remove_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", - "shortName": "RegionNotificationEndpointsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.remove_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.RemoveRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", - "shortName": "RegionNotificationEndpoints" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "RemoveRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNotificationEndpointRequest" + "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58181,13 +59285,9 @@ "type": "str" }, { - "name": "resource", + "name": "firewall_policy", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58201,14 +59301,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_rule" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py", + "description": "Sample for RemoveRule", + "file": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_RemoveRule_sync", "segments": [ { "end": 53, @@ -58241,28 +59341,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_remove_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Delete" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58273,9 +59373,13 @@ "type": "str" }, { - "name": "operation", + "name": "resource", "type": "str" }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58289,14 +59393,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DeleteRegionOperationResponse", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_operations_delete_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -58329,28 +59433,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_delete_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient", + "shortName": "RegionNetworkFirewallPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkFirewallPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkFirewallPolicies", + "shortName": "RegionNetworkFirewallPolicies" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNetworkFirewallPolicyRequest" }, { "name": "project", @@ -58361,9 +59465,13 @@ "type": "str" }, { - "name": "operation", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58377,14 +59485,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_operations_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -58417,28 +59525,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_get_sync.py" + "title": "compute_v1beta_generated_region_network_firewall_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "List" + "shortName": "AddAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionOperationsRequest" + "type": "google.cloud.compute_v1beta.types.AddAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -58448,6 +59556,14 @@ "name": "region", "type": "str" }, + { + "name": "network_policy", + "type": "str" + }, + { + "name": "network_policy_association_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58461,14 +59577,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_operations.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_association" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_operations_list_sync.py", + "description": "Sample for AddAssociation", + "file": "compute_v1beta_generated_region_network_policies_add_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddAssociation_sync", "segments": [ { "end": 53, @@ -58486,43 +59602,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_list_sync.py" + "title": "compute_v1beta_generated_region_network_policies_add_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", - "shortName": "RegionOperationsClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.wait", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.add_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionOperations.Wait", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AddTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionOperations", - "shortName": "RegionOperations" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Wait" + "shortName": "AddTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.WaitRegionOperationRequest" + "type": "google.cloud.compute_v1beta.types.AddTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -58533,9 +59649,13 @@ "type": "str" }, { - "name": "operation", + "name": "network_policy", "type": "str" }, + { + "name": "network_policy_traffic_classification_rule_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -58549,14 +59669,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "wait" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "add_traffic_classification_rule" }, - "description": "Sample for Wait", - "file": "compute_v1beta_generated_region_operations_wait_sync.py", + "description": "Sample for AddTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionOperations_Wait_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AddTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -58589,44 +59709,120 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_operations_wait_sync.py" + "title": "compute_v1beta_generated_region_network_policies_add_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.add_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.AddRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "AddRule" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AddRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListRegionNetworkPoliciesRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_network_policies_aggregated_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionNetworkPolicyRequest" + }, + { + "name": "project", "type": "str" }, { - "name": "security_policy", + "name": "region", "type": "str" }, { - "name": "security_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" + "name": "network_policy", + "type": "str" }, { "name": "retry", @@ -58642,13 +59838,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "add_rule" + "shortName": "delete" }, - "description": "Sample for AddRule", - "file": "compute_v1beta_generated_region_security_policies_add_rule_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_network_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_AddRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Delete_sync", "segments": [ { "end": 53, @@ -58681,28 +59877,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_add_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "Delete" + "shortName": "GetAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -58713,7 +59909,7 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { @@ -58729,14 +59925,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyAssociation", + "shortName": "get_association" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_security_policies_delete_sync.py", + "description": "Sample for GetAssociation", + "file": "compute_v1beta_generated_region_network_policies_get_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetAssociation_sync", "segments": [ { "end": 53, @@ -58769,28 +59965,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.GetRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.GetTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "GetRule" + "shortName": "GetTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -58801,7 +59997,7 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { @@ -58817,14 +60013,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SecurityPolicyRule", - "shortName": "get_rule" + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule", + "shortName": "get_traffic_classification_rule" }, - "description": "Sample for GetRule", - "file": "compute_v1beta_generated_region_security_policies_get_rule_sync.py", + "description": "Sample for GetTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_GetRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_GetTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -58857,28 +60053,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_get_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNetworkPolicyRequest" }, { "name": "project", @@ -58889,7 +60085,7 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { @@ -58905,14 +60101,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SecurityPolicy", + "resultType": "google.cloud.compute_v1beta.types.NetworkPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_security_policies_get_sync.py", + "file": "compute_v1beta_generated_region_network_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Get_sync", "segments": [ { "end": 53, @@ -58945,28 +60141,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_get_sync.py" + "title": "compute_v1beta_generated_region_network_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNetworkPolicyRequest" }, { "name": "project", @@ -58977,8 +60173,8 @@ "type": "str" }, { - "name": "security_policy_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicy" + "name": "network_policy_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicy" }, { "name": "retry", @@ -58997,10 +60193,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_security_policies_insert_sync.py", + "file": "compute_v1beta_generated_region_network_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Insert_sync", "segments": [ { "end": 52, @@ -59033,28 +60229,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_network_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSecurityPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNetworkPoliciesRequest" }, { "name": "project", @@ -59077,14 +60273,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_security_policies.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_network_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_security_policies_list_sync.py", + "file": "compute_v1beta_generated_region_network_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_List_sync", "segments": [ { "end": 53, @@ -59117,28 +60313,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_list_sync.py" + "title": "compute_v1beta_generated_region_network_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.PatchRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.PatchTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "PatchRule" + "shortName": "PatchTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.PatchTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -59149,12 +60345,12 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { - "name": "security_policy_rule_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" + "name": "network_policy_traffic_classification_rule_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRule" }, { "name": "retry", @@ -59170,13 +60366,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch_rule" + "shortName": "patch_traffic_classification_rule" }, - "description": "Sample for PatchRule", - "file": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py", + "description": "Sample for PatchTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_PatchRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_PatchTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -59209,28 +60405,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_patch_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionNetworkPolicyRequest" }, { "name": "project", @@ -59241,12 +60437,12 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { - "name": "security_policy_resource", - "type": "google.cloud.compute_v1beta.types.SecurityPolicy" + "name": "network_policy_resource", + "type": "google.cloud.compute_v1beta.types.NetworkPolicy" }, { "name": "retry", @@ -59265,10 +60461,10 @@ "shortName": "patch" }, "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_security_policies_patch_sync.py", + "file": "compute_v1beta_generated_region_network_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_Patch_sync", "segments": [ { "end": 53, @@ -59301,28 +60497,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_network_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.remove_rule", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_association", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.RemoveRule", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveAssociation", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "RemoveRule" + "shortName": "RemoveAssociation" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.RemoveAssociationRegionNetworkPolicyRequest" }, { "name": "project", @@ -59333,7 +60529,7 @@ "type": "str" }, { - "name": "security_policy", + "name": "network_policy", "type": "str" }, { @@ -59350,13 +60546,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "remove_rule" + "shortName": "remove_association" }, - "description": "Sample for RemoveRule", - "file": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py", + "description": "Sample for RemoveAssociation", + "file": "compute_v1beta_generated_region_network_policies_remove_association_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_RemoveRule_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveAssociation_sync", "segments": [ { "end": 53, @@ -59389,28 +60585,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py" + "title": "compute_v1beta_generated_region_network_policies_remove_association_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", - "shortName": "RegionSecurityPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient", + "shortName": "RegionNetworkPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionNetworkPoliciesClient.remove_traffic_classification_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies.RemoveTrafficClassificationRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", - "shortName": "RegionSecurityPolicies" + "fullName": "google.cloud.compute.v1beta.RegionNetworkPolicies", + "shortName": "RegionNetworkPolicies" }, - "shortName": "SetLabels" + "shortName": "RemoveTrafficClassificationRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSecurityPolicyRequest" + "type": "google.cloud.compute_v1beta.types.RemoveTrafficClassificationRuleRegionNetworkPolicyRequest" }, { "name": "project", @@ -59421,13 +60617,9 @@ "type": "str" }, { - "name": "resource", + "name": "network_policy", "type": "str" }, - { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59442,13 +60634,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "remove_traffic_classification_rule" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_security_policies_set_labels_sync.py", + "description": "Sample for RemoveTrafficClassificationRule", + "file": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionNetworkPolicies_RemoveTrafficClassificationRule_sync", "segments": [ { "end": 53, @@ -59481,28 +60673,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_security_policies_set_labels_sync.py" + "title": "compute_v1beta_generated_region_network_policies_remove_traffic_classification_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", - "shortName": "RegionSnapshotSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Get", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", - "shortName": "RegionSnapshotSettings" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotSettingRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionNotificationEndpointRequest" }, { "name": "project", @@ -59512,6 +60704,10 @@ "name": "region", "type": "str" }, + { + "name": "notification_endpoint", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59525,22 +60721,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SnapshotSettings", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_snapshot_settings_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59550,43 +60746,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshot_settings_get_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", - "shortName": "RegionSnapshotSettingsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Patch", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", - "shortName": "RegionSnapshotSettings" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSnapshotSettingRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionNotificationEndpointRequest" }, { "name": "project", @@ -59597,8 +60793,8 @@ "type": "str" }, { - "name": "snapshot_settings_resource", - "type": "google.cloud.compute_v1beta.types.SnapshotSettings" + "name": "notification_endpoint", + "type": "str" }, { "name": "retry", @@ -59613,22 +60809,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.NotificationEndpoint", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_notification_endpoints_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59638,43 +60834,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Delete", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "Delete" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionNotificationEndpointRequest" }, { "name": "project", @@ -59685,8 +60881,8 @@ "type": "str" }, { - "name": "snapshot", - "type": "str" + "name": "notification_endpoint_resource", + "type": "google.cloud.compute_v1beta.types.NotificationEndpoint" }, { "name": "retry", @@ -59702,21 +60898,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "insert" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_snapshots_delete_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -59726,43 +60922,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_delete_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "GetIamPolicy" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionNotificationEndpointsRequest" }, { "name": "project", @@ -59772,10 +60968,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59789,14 +60981,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.cloud.compute_v1beta.services.region_notification_endpoints.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_notification_endpoints_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_List_sync", "segments": [ { "end": 53, @@ -59814,43 +61006,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient", + "shortName": "RegionNotificationEndpointsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionNotificationEndpointsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Get", + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionNotificationEndpoints", + "shortName": "RegionNotificationEndpoints" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionNotificationEndpointRequest" }, { "name": "project", @@ -59861,9 +61053,13 @@ "type": "str" }, { - "name": "snapshot", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -59877,14 +61073,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Snapshot", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_snapshots_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Get_sync", + "regionTag": "compute_v1beta_generated_RegionNotificationEndpoints_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -59917,28 +61113,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_get_sync.py" + "title": "compute_v1beta_generated_region_notification_endpoints_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Insert", + "fullName": "google.cloud.compute.v1beta.RegionOperations.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionOperationRequest" }, { "name": "project", @@ -59949,8 +61145,8 @@ "type": "str" }, { - "name": "snapshot_resource", - "type": "google.cloud.compute_v1beta.types.Snapshot" + "name": "operation", + "type": "str" }, { "name": "retry", @@ -59965,22 +61161,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.DeleteRegionOperationResponse", + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_snapshots_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_operations_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -59990,43 +61186,131 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_operations_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionOperations.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionOperationRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "operation", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_operations_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionOperations_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, { "end": 53, - "start": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_insert_sync.py" + "title": "compute_v1beta_generated_region_operations_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.List", + "fullName": "google.cloud.compute.v1beta.RegionOperations.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSnapshotsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionOperationsRequest" }, { "name": "project", @@ -60049,14 +61333,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_snapshots.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_operations.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_snapshots_list_sync.py", + "file": "compute_v1beta_generated_region_operations_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_List_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_List_sync", "segments": [ { "end": 53, @@ -60089,28 +61373,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_list_sync.py" + "title": "compute_v1beta_generated_region_operations_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient", + "shortName": "RegionOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RegionOperationsClient.wait", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RegionOperations.Wait", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionOperations", + "shortName": "RegionOperations" }, - "shortName": "SetIamPolicy" + "shortName": "Wait" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.WaitRegionOperationRequest" }, { "name": "project", @@ -60121,13 +61405,9 @@ "type": "str" }, { - "name": "resource", + "name": "operation", "type": "str" }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60141,14 +61421,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "wait" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py", + "description": "Sample for Wait", + "file": "compute_v1beta_generated_region_operations_wait_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RegionOperations_Wait_sync", "segments": [ { "end": 53, @@ -60181,28 +61461,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_region_operations_wait_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.add_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetLabels", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.AddRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "SetLabels" + "shortName": "AddRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.AddRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -60213,12 +61493,12 @@ "type": "str" }, { - "name": "resource", + "name": "security_policy", "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "security_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" }, { "name": "retry", @@ -60234,13 +61514,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "add_rule" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_region_snapshots_set_labels_sync.py", + "description": "Sample for AddRule", + "file": "compute_v1beta_generated_region_security_policies_add_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_SetLabels_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_AddRule_sync", "segments": [ { "end": 53, @@ -60273,28 +61553,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_set_labels_sync.py" + "title": "compute_v1beta_generated_region_security_policies_add_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", - "shortName": "RegionSnapshotsClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSnapshots", - "shortName": "RegionSnapshots" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSnapshotRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSecurityPolicyRequest" }, { "name": "project", @@ -60305,13 +61585,9 @@ "type": "str" }, { - "name": "resource", + "name": "security_policy", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60325,14 +61601,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_security_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSnapshots_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Delete_sync", "segments": [ { "end": 53, @@ -60365,28 +61641,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_security_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.GetRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Delete" + "shortName": "GetRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.GetRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -60397,7 +61673,7 @@ "type": "str" }, { - "name": "ssl_certificate", + "name": "security_policy", "type": "str" }, { @@ -60413,14 +61689,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.SecurityPolicyRule", + "shortName": "get_rule" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py", + "description": "Sample for GetRule", + "file": "compute_v1beta_generated_region_security_policies_get_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_GetRule_sync", "segments": [ { "end": 53, @@ -60453,28 +61729,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py" + "title": "compute_v1beta_generated_region_security_policies_get_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Get", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSecurityPolicyRequest" }, { "name": "project", @@ -60485,7 +61761,7 @@ "type": "str" }, { - "name": "ssl_certificate", + "name": "security_policy", "type": "str" }, { @@ -60501,14 +61777,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslCertificate", + "resultType": "google.cloud.compute_v1beta.types.SecurityPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_region_ssl_certificates_get_sync.py", + "file": "compute_v1beta_generated_region_security_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Get_sync", "segments": [ { "end": 53, @@ -60541,28 +61817,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_get_sync.py" + "title": "compute_v1beta_generated_region_security_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSecurityPolicyRequest" }, { "name": "project", @@ -60573,8 +61849,8 @@ "type": "str" }, { - "name": "ssl_certificate_resource", - "type": "google.cloud.compute_v1beta.types.SslCertificate" + "name": "security_policy_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicy" }, { "name": "retry", @@ -60593,10 +61869,10 @@ "shortName": "insert" }, "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py", + "file": "compute_v1beta_generated_region_security_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Insert_sync", "segments": [ { "end": 52, @@ -60629,28 +61905,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py" + "title": "compute_v1beta_generated_region_security_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.List", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSslCertificatesRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSecurityPoliciesRequest" }, { "name": "project", @@ -60673,14 +61949,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_ssl_certificates.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_security_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_region_ssl_certificates_list_sync.py", + "file": "compute_v1beta_generated_region_security_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_List_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_List_sync", "segments": [ { "end": 53, @@ -60713,28 +61989,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_list_sync.py" + "title": "compute_v1beta_generated_region_security_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", - "shortName": "RegionSslCertificatesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.PatchRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", - "shortName": "RegionSslCertificates" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "PatchRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslCertificateRequest" + "type": "google.cloud.compute_v1beta.types.PatchRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -60745,12 +62021,12 @@ "type": "str" }, { - "name": "resource", + "name": "security_policy", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "security_policy_rule_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicyRule" }, { "name": "retry", @@ -60765,14 +62041,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch_rule" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py", + "description": "Sample for PatchRule", + "file": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslCertificates_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_PatchRule_sync", "segments": [ { "end": 53, @@ -60805,28 +62081,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_security_policies_patch_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSecurityPolicyRequest" }, { "name": "project", @@ -60837,9 +62113,13 @@ "type": "str" }, { - "name": "ssl_policy", + "name": "security_policy", "type": "str" }, + { + "name": "security_policy_resource", + "type": "google.cloud.compute_v1beta.types.SecurityPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -60854,13 +62134,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_ssl_policies_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_security_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_Patch_sync", "segments": [ { "end": 53, @@ -60893,28 +62173,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_delete_sync.py" + "title": "compute_v1beta_generated_region_security_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.remove_rule", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.RemoveRule", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Get" + "shortName": "RemoveRule" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.RemoveRuleRegionSecurityPolicyRequest" }, { "name": "project", @@ -60925,7 +62205,7 @@ "type": "str" }, { - "name": "ssl_policy", + "name": "security_policy", "type": "str" }, { @@ -60941,14 +62221,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslPolicy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "remove_rule" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_ssl_policies_get_sync.py", + "description": "Sample for RemoveRule", + "file": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_RemoveRule_sync", "segments": [ { "end": 53, @@ -60981,28 +62261,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_get_sync.py" + "title": "compute_v1beta_generated_region_security_policies_remove_rule_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient", + "shortName": "RegionSecurityPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSecurityPoliciesClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSecurityPolicies", + "shortName": "RegionSecurityPolicies" }, - "shortName": "Insert" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSecurityPolicyRequest" }, { "name": "project", @@ -61013,8 +62293,12 @@ "type": "str" }, { - "name": "ssl_policy_resource", - "type": "google.cloud.compute_v1beta.types.SslPolicy" + "name": "resource", + "type": "str" + }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" }, { "name": "retry", @@ -61030,13 +62314,97 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "set_labels" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_ssl_policies_insert_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_security_policies_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSecurityPolicies_SetLabels_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_security_policies_set_labels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", + "shortName": "RegionSnapshotSettingsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", + "shortName": "RegionSnapshotSettings" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotSettingRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.SnapshotSettings", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_snapshot_settings_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Get_sync", "segments": [ { "end": 52, @@ -61069,28 +62437,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_insert_sync.py" + "title": "compute_v1beta_generated_region_snapshot_settings_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient", + "shortName": "RegionSnapshotSettingsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list_available_features", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotSettingsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.ListAvailableFeatures", + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshotSettings", + "shortName": "RegionSnapshotSettings" }, - "shortName": "ListAvailableFeatures" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListAvailableFeaturesRegionSslPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSnapshotSettingRequest" }, { "name": "project", @@ -61100,6 +62468,10 @@ "name": "region", "type": "str" }, + { + "name": "snapshot_settings_resource", + "type": "google.cloud.compute_v1beta.types.SnapshotSettings" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61113,14 +62485,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.SslPoliciesListAvailableFeaturesResponse", - "shortName": "list_available_features" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for ListAvailableFeatures", - "file": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_ListAvailableFeatures_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshotSettings_Patch_sync", "segments": [ { "end": 52, @@ -61153,28 +62525,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py" + "title": "compute_v1beta_generated_region_snapshot_settings_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.List", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionSslPoliciesRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSnapshotRequest" }, { "name": "project", @@ -61184,6 +62556,10 @@ "name": "region", "type": "str" }, + { + "name": "snapshot", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61197,14 +62573,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_ssl_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_ssl_policies_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_snapshots_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Delete_sync", "segments": [ { "end": 53, @@ -61222,43 +62598,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_list_sync.py" + "title": "compute_v1beta_generated_region_snapshots_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "Patch" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyRegionSnapshotRequest" }, { "name": "project", @@ -61269,13 +62645,9 @@ "type": "str" }, { - "name": "ssl_policy", + "name": "resource", "type": "str" }, - { - "name": "ssl_policy_resource", - "type": "google.cloud.compute_v1beta.types.SslPolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61289,14 +62661,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_ssl_policies_patch_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -61329,28 +62701,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_patch_sync.py" + "title": "compute_v1beta_generated_region_snapshots_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", - "shortName": "RegionSslPoliciesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", - "shortName": "RegionSslPolicies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "TestIamPermissions" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslPolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSnapshotRequest" }, { "name": "project", @@ -61361,13 +62733,9 @@ "type": "str" }, { - "name": "resource", + "name": "snapshot", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61381,14 +62749,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.Snapshot", + "shortName": "get" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_snapshots_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionSslPolicies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Get_sync", "segments": [ { "end": 53, @@ -61421,28 +62789,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_snapshots_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "Delete" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSnapshotRequest" }, { "name": "project", @@ -61453,8 +62821,8 @@ "type": "str" }, { - "name": "target_http_proxy", - "type": "str" + "name": "snapshot_resource", + "type": "google.cloud.compute_v1beta.types.Snapshot" }, { "name": "retry", @@ -61470,21 +62838,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "insert" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_snapshots_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -61494,43 +62862,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_snapshots_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "Get" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSnapshotsRequest" }, { "name": "project", @@ -61540,10 +62908,6 @@ "name": "region", "type": "str" }, - { - "name": "target_http_proxy", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61557,14 +62921,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetHttpProxy", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_snapshots.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_http_proxies_get_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_snapshots_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_List_sync", "segments": [ { "end": 53, @@ -61582,43 +62946,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_snapshots_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "Insert" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyRegionSnapshotRequest" }, { "name": "project", @@ -61629,8 +62993,12 @@ "type": "str" }, { - "name": "target_http_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpProxy" + "name": "resource", + "type": "str" + }, + { + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -61645,22 +63013,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_SetIamPolicy_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -61670,43 +63038,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_snapshots_set_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.SetLabels", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "List" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpProxiesRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsRegionSnapshotRequest" }, { "name": "project", @@ -61716,6 +63084,14 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61729,14 +63105,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_http_proxies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_labels" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_http_proxies_list_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_region_snapshots_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_SetLabels_sync", "segments": [ { "end": 53, @@ -61754,43 +63130,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_list_sync.py" + "title": "compute_v1beta_generated_region_snapshots_set_labels_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient", + "shortName": "RegionSnapshotsClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.set_url_map", + "fullName": "google.cloud.compute_v1beta.RegionSnapshotsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.SetUrlMap", + "fullName": "google.cloud.compute.v1beta.RegionSnapshots.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSnapshots", + "shortName": "RegionSnapshots" }, - "shortName": "SetUrlMap" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSnapshotRequest" }, { "name": "project", @@ -61801,12 +63177,12 @@ "type": "str" }, { - "name": "target_http_proxy", + "name": "resource", "type": "str" }, { - "name": "url_map_reference_resource", - "type": "google.cloud.compute_v1beta.types.UrlMapReference" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -61821,14 +63197,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_url_map" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for SetUrlMap", - "file": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_SetUrlMap_sync", + "regionTag": "compute_v1beta_generated_RegionSnapshots_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -61861,28 +63237,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py" + "title": "compute_v1beta_generated_region_snapshots_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", - "shortName": "RegionTargetHttpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", - "shortName": "RegionTargetHttpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, - "shortName": "TestIamPermissions" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpProxyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSslCertificateRequest" }, { "name": "project", @@ -61893,13 +63269,9 @@ "type": "str" }, { - "name": "resource", + "name": "ssl_certificate", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -61913,14 +63285,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Delete_sync", "segments": [ { "end": 53, @@ -61953,28 +63325,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, - "shortName": "Delete" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSslCertificateRequest" }, { "name": "project", @@ -61985,7 +63357,7 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "ssl_certificate", "type": "str" }, { @@ -62001,14 +63373,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.SslCertificate", + "shortName": "get" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_ssl_certificates_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Get_sync", "segments": [ { "end": 53, @@ -62041,28 +63413,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSslCertificateRequest" }, { "name": "project", @@ -62073,8 +63445,8 @@ "type": "str" }, { - "name": "target_https_proxy", - "type": "str" + "name": "ssl_certificate_resource", + "type": "google.cloud.compute_v1beta.types.SslCertificate" }, { "name": "retry", @@ -62089,22 +63461,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetHttpsProxy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_https_proxies_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -62114,43 +63486,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, - "shortName": "Insert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSslCertificatesRequest" }, { "name": "project", @@ -62160,10 +63532,6 @@ "name": "region", "type": "str" }, - { - "name": "target_https_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62177,22 +63545,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.region_ssl_certificates.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_ssl_certificates_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -62212,33 +63580,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient", + "shortName": "RegionSslCertificatesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionSslCertificatesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslCertificates", + "shortName": "RegionSslCertificates" }, - "shortName": "List" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpsProxiesRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslCertificateRequest" }, { "name": "project", @@ -62248,6 +63616,14 @@ "name": "region", "type": "str" }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62261,14 +63637,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_https_proxies.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_https_proxies_list_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionSslCertificates_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -62286,43 +63662,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_list_sync.py" + "title": "compute_v1beta_generated_region_ssl_certificates_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Patch", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "Patch" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionSslPolicyRequest" }, { "name": "project", @@ -62333,13 +63709,9 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "ssl_policy", "type": "str" }, - { - "name": "target_https_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62354,13 +63726,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "delete" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_ssl_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Delete_sync", "segments": [ { "end": 53, @@ -62393,28 +63765,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_ssl_certificates", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetSslCertificates", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "SetSslCertificates" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetSslCertificatesRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionSslPolicyRequest" }, { "name": "project", @@ -62425,13 +63797,9 @@ "type": "str" }, { - "name": "target_https_proxy", + "name": "ssl_policy", "type": "str" }, - { - "name": "region_target_https_proxies_set_ssl_certificates_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionTargetHttpsProxiesSetSslCertificatesRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62445,14 +63813,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_ssl_certificates" + "resultType": "google.cloud.compute_v1beta.types.SslPolicy", + "shortName": "get" }, - "description": "Sample for SetSslCertificates", - "file": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_ssl_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetSslCertificates_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Get_sync", "segments": [ { "end": 53, @@ -62485,28 +63853,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_url_map", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetUrlMap", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "SetUrlMap" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionSslPolicyRequest" }, { "name": "project", @@ -62517,12 +63885,8 @@ "type": "str" }, { - "name": "target_https_proxy", - "type": "str" - }, - { - "name": "url_map_reference_resource", - "type": "google.cloud.compute_v1beta.types.UrlMapReference" + "name": "ssl_policy_resource", + "type": "google.cloud.compute_v1beta.types.SslPolicy" }, { "name": "retry", @@ -62538,21 +63902,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_url_map" + "shortName": "insert" }, - "description": "Sample for SetUrlMap", - "file": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_ssl_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetUrlMap_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -62562,43 +63926,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", - "shortName": "RegionTargetHttpsProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list_available_features", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.ListAvailableFeatures", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", - "shortName": "RegionTargetHttpsProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "TestIamPermissions" + "shortName": "ListAvailableFeatures" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpsProxyRequest" + "type": "google.cloud.compute_v1beta.types.ListAvailableFeaturesRegionSslPoliciesRequest" }, { "name": "project", @@ -62608,14 +63972,6 @@ "name": "region", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62629,22 +63985,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.SslPoliciesListAvailableFeaturesResponse", + "shortName": "list_available_features" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py", + "description": "Sample for ListAvailableFeatures", + "file": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_ListAvailableFeatures_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -62654,43 +64010,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_list_available_features_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Delete", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "Delete" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionSslPoliciesRequest" }, { "name": "project", @@ -62700,10 +64056,6 @@ "name": "region", "type": "str" }, - { - "name": "target_tcp_proxy", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62717,14 +64069,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.services.region_ssl_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_ssl_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_List_sync", "segments": [ { "end": 53, @@ -62742,43 +64094,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.get", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Get", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "Get" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionSslPolicyRequest" }, { "name": "project", @@ -62789,9 +64141,13 @@ "type": "str" }, { - "name": "target_tcp_proxy", + "name": "ssl_policy", "type": "str" }, + { + "name": "ssl_policy_resource", + "type": "google.cloud.compute_v1beta.types.SslPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62805,14 +64161,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TargetTcpProxy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_ssl_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Get_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_Patch_sync", "segments": [ { "end": 53, @@ -62845,28 +64201,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient", + "shortName": "RegionSslPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionSslPoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Insert", + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionSslPolicies", + "shortName": "RegionSslPolicies" }, - "shortName": "Insert" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionSslPolicyRequest" }, { "name": "project", @@ -62877,8 +64233,12 @@ "type": "str" }, { - "name": "target_tcp_proxy_resource", - "type": "google.cloud.compute_v1beta.types.TargetTcpProxy" + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -62893,22 +64253,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionSslPolicies_TestIamPermissions_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -62918,43 +64278,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py" + "title": "compute_v1beta_generated_region_ssl_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.List", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionTargetTcpProxiesRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpProxyRequest" }, { "name": "project", @@ -62964,6 +64324,10 @@ "name": "region", "type": "str" }, + { + "name": "target_http_proxy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -62977,14 +64341,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_target_tcp_proxies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_List_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Delete_sync", "segments": [ { "end": 53, @@ -63002,43 +64366,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", - "shortName": "RegionTargetTcpProxiesClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", - "shortName": "RegionTargetTcpProxies" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "TestIamPermissions" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetTcpProxyRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63049,13 +64413,9 @@ "type": "str" }, { - "name": "resource", + "name": "target_http_proxy", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63069,14 +64429,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.types.TargetHttpProxy", + "shortName": "get" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_target_http_proxies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Get_sync", "segments": [ { "end": 53, @@ -63109,28 +64469,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.delete", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Delete", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "Delete" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63141,8 +64501,8 @@ "type": "str" }, { - "name": "url_map", - "type": "str" + "name": "target_http_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpProxy" }, { "name": "retry", @@ -63158,21 +64518,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "insert" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_region_url_maps_delete_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Delete_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -63182,43 +64542,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_delete_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Get", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "Get" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpProxiesRequest" }, { "name": "project", @@ -63228,10 +64588,6 @@ "name": "region", "type": "str" }, - { - "name": "url_map", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63245,14 +64601,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.UrlMap", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.region_target_http_proxies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_region_url_maps_get_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_target_http_proxies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Get_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_List_sync", "segments": [ { "end": 53, @@ -63270,43 +64626,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_get_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.insert", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.set_url_map", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Insert", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.SetUrlMap", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "Insert" + "shortName": "SetUrlMap" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63317,8 +64673,12 @@ "type": "str" }, { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" + "name": "target_http_proxy", + "type": "str" + }, + { + "name": "url_map_reference_resource", + "type": "google.cloud.compute_v1beta.types.UrlMapReference" }, { "name": "retry", @@ -63334,21 +64694,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "set_url_map" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_region_url_maps_insert_sync.py", + "description": "Sample for SetUrlMap", + "file": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Insert_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_SetUrlMap_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -63358,43 +64718,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_insert_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_set_url_map_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient", + "shortName": "RegionTargetHttpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.invalidate_cache", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpProxiesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.InvalidateCache", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies.TestIamPermissions", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpProxies", + "shortName": "RegionTargetHttpProxies" }, - "shortName": "InvalidateCache" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InvalidateCacheRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpProxyRequest" }, { "name": "project", @@ -63405,12 +64765,12 @@ "type": "str" }, { - "name": "url_map", + "name": "resource", "type": "str" }, { - "name": "cache_invalidation_rule_resource", - "type": "google.cloud.compute_v1beta.types.CacheInvalidationRule" + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" }, { "name": "retry", @@ -63425,14 +64785,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "invalidate_cache" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for InvalidateCache", - "file": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_InvalidateCache_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpProxies_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -63465,28 +64825,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py" + "title": "compute_v1beta_generated_region_target_http_proxies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.List", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "List" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionUrlMapsRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetHttpsProxyRequest" }, { "name": "project", @@ -63496,6 +64856,10 @@ "name": "region", "type": "str" }, + { + "name": "target_https_proxy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63509,14 +64873,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_url_maps.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_url_maps_list_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_List_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Delete_sync", "segments": [ { "end": 53, @@ -63534,43 +64898,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_list_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.patch", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Patch", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "Patch" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionTargetHttpsProxyRequest" }, { "name": "project", @@ -63581,13 +64945,9 @@ "type": "str" }, { - "name": "url_map", + "name": "target_https_proxy", "type": "str" }, - { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63601,14 +64961,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.TargetHttpsProxy", + "shortName": "get" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_region_url_maps_patch_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_target_https_proxies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Patch_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Get_sync", "segments": [ { "end": 53, @@ -63641,28 +65001,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_patch_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetHttpsProxyRequest" }, { "name": "project", @@ -63673,12 +65033,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "target_https_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" }, { "name": "retry", @@ -63693,22 +65049,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -63718,43 +65074,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.update", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Update", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.List", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "Update" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionTargetHttpsProxiesRequest" }, { "name": "project", @@ -63764,14 +65120,6 @@ "name": "region", "type": "str" }, - { - "name": "url_map", - "type": "str" - }, - { - "name": "url_map_resource", - "type": "google.cloud.compute_v1beta.types.UrlMap" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63785,14 +65133,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.services.region_target_https_proxies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_region_url_maps_update_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_region_target_https_proxies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Update_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_List_sync", "segments": [ { "end": 53, @@ -63810,43 +65158,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_update_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", - "shortName": "RegionUrlMapsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.validate", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Validate", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", - "shortName": "RegionUrlMaps" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "Validate" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ValidateRegionUrlMapRequest" + "type": "google.cloud.compute_v1beta.types.PatchRegionTargetHttpsProxyRequest" }, { "name": "project", @@ -63857,12 +65205,12 @@ "type": "str" }, { - "name": "url_map", + "name": "target_https_proxy", "type": "str" }, { - "name": "region_url_maps_validate_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionUrlMapsValidateRequest" + "name": "target_https_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetHttpsProxy" }, { "name": "retry", @@ -63877,14 +65225,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.UrlMapsValidateResponse", - "shortName": "validate" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for Validate", - "file": "compute_v1beta_generated_region_url_maps_validate_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionUrlMaps_Validate_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_Patch_sync", "segments": [ { "end": 53, @@ -63917,28 +65265,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_url_maps_validate_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionZonesClient", - "shortName": "RegionZonesClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionZonesClient.list", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_ssl_certificates", "method": { - "fullName": "google.cloud.compute.v1beta.RegionZones.List", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetSslCertificates", "service": { - "fullName": "google.cloud.compute.v1beta.RegionZones", - "shortName": "RegionZones" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" }, - "shortName": "List" + "shortName": "SetSslCertificates" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionZonesRequest" + "type": "google.cloud.compute_v1beta.types.SetSslCertificatesRegionTargetHttpsProxyRequest" }, { "name": "project", @@ -63948,6 +65296,14 @@ "name": "region", "type": "str" }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "region_target_https_proxies_set_ssl_certificates_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionTargetHttpsProxiesSetSslCertificatesRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -63961,14 +65317,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.region_zones.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_ssl_certificates" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_region_zones_list_sync.py", + "description": "Sample for SetSslCertificates", + "file": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_RegionZones_List_sync", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetSslCertificates_sync", "segments": [ { "end": 53, @@ -63986,43 +65342,315 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_region_zones_list_sync.py" + "title": "compute_v1beta_generated_region_target_https_proxies_set_ssl_certificates_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionsClient", - "shortName": "RegionsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionsClient.get", + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.set_url_map", "method": { - "fullName": "google.cloud.compute.v1beta.Regions.Get", + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.SetUrlMap", "service": { - "fullName": "google.cloud.compute.v1beta.Regions", - "shortName": "Regions" + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "SetUrlMap" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetUrlMapRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_https_proxy", + "type": "str" + }, + { + "name": "url_map_reference_resource", + "type": "google.cloud.compute_v1beta.types.UrlMapReference" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "set_url_map" + }, + "description": "Sample for SetUrlMap", + "file": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_SetUrlMap_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_set_url_map_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient", + "shortName": "RegionTargetHttpsProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetHttpsProxiesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetHttpsProxies", + "shortName": "RegionTargetHttpsProxies" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetHttpsProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetHttpsProxies_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_https_proxies_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_tcp_proxy", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetRegionRequest" + "type": "google.cloud.compute_v1beta.types.GetRegionTargetTcpProxyRequest" }, { "name": "project", @@ -64032,6 +65660,10 @@ "name": "region", "type": "str" }, + { + "name": "target_tcp_proxy", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64045,14 +65677,102 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Region", + "resultType": "google.cloud.compute_v1beta.types.TargetTcpProxy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_regions_get_sync.py", + "file": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Regions_Get_sync", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "target_tcp_proxy_resource", + "type": "google.cloud.compute_v1beta.types.TargetTcpProxy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_Insert_sync", "segments": [ { "end": 52, @@ -64085,33 +65805,37 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_regions_get_sync.py" + "title": "compute_v1beta_generated_region_target_tcp_proxies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.RegionsClient", - "shortName": "RegionsClient" + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" }, - "fullName": "google.cloud.compute_v1beta.RegionsClient.list", + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.Regions.List", + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.List", "service": { - "fullName": "google.cloud.compute.v1beta.Regions", - "shortName": "Regions" + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListRegionsRequest" + "type": "google.cloud.compute_v1beta.types.ListRegionTargetTcpProxiesRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64125,14 +65849,2454 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.regions.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.region_target_tcp_proxies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_regions_list_sync.py", + "file": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Regions_List_sync", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient", + "shortName": "RegionTargetTcpProxiesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionTargetTcpProxiesClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionTargetTcpProxies", + "shortName": "RegionTargetTcpProxies" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionTargetTcpProxyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionTargetTcpProxies_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_target_tcp_proxies_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_region_url_maps_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.UrlMap", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_region_url_maps_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.insert", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Insert", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_region_url_maps_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.invalidate_cache", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.InvalidateCache", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "InvalidateCache" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InvalidateCacheRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "cache_invalidation_rule_resource", + "type": "google.cloud.compute_v1beta.types.CacheInvalidationRule" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "invalidate_cache" + }, + "description": "Sample for InvalidateCache", + "file": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_InvalidateCache_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_invalidate_cache_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionUrlMapsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_url_maps.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_url_maps_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.patch", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Patch", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Patch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PatchRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" + }, + "description": "Sample for Patch", + "file": "compute_v1beta_generated_region_url_maps_patch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Patch_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_patch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.update", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Update", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Update" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.UpdateRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "url_map_resource", + "type": "google.cloud.compute_v1beta.types.UrlMap" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" + }, + "description": "Sample for Update", + "file": "compute_v1beta_generated_region_url_maps_update_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Update_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_update_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient", + "shortName": "RegionUrlMapsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionUrlMapsClient.validate", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps.Validate", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionUrlMaps", + "shortName": "RegionUrlMaps" + }, + "shortName": "Validate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ValidateRegionUrlMapRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "url_map", + "type": "str" + }, + { + "name": "region_url_maps_validate_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionUrlMapsValidateRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.UrlMapsValidateResponse", + "shortName": "validate" + }, + "description": "Sample for Validate", + "file": "compute_v1beta_generated_region_url_maps_validate_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionUrlMaps_Validate_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_url_maps_validate_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionZonesClient", + "shortName": "RegionZonesClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionZonesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.RegionZones.List", + "service": { + "fullName": "google.cloud.compute.v1beta.RegionZones", + "shortName": "RegionZones" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionZonesRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.region_zones.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_region_zones_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_RegionZones_List_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_region_zones_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionsClient", + "shortName": "RegionsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.Regions.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.Regions", + "shortName": "Regions" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetRegionRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Region", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_regions_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Regions_Get_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_regions_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.RegionsClient", + "shortName": "RegionsClient" + }, + "fullName": "google.cloud.compute_v1beta.RegionsClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.Regions.List", + "service": { + "fullName": "google.cloud.compute.v1beta.Regions", + "shortName": "Regions" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListRegionsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.regions.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_regions_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Regions_List_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_regions_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.GetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_GetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetReservationBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "reservation", + "type": "str" + }, + { + "name": "reservation_block", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.ReservationBlocksGetResponse", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_reservation_blocks_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_Get_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.List", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListReservationBlocksRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "reservation", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.reservation_blocks.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_reservation_blocks_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_List_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.perform_maintenance", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.PerformMaintenance", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "PerformMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "reservation", + "type": "str" + }, + { + "name": "reservation_block", + "type": "str" + }, + { + "name": "reservations_blocks_perform_maintenance_request_resource", + "type": "google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "perform_maintenance" + }, + "description": "Sample for PerformMaintenance", + "file": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_PerformMaintenance_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.set_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.SetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "zone_set_nested_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_SetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", + "shortName": "ReservationBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationBlocks", + "shortName": "ReservationBlocks" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationBlocks_TestIamPermissions_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_blocks_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.get_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.GetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_GetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_name", + "type": "str" + }, + { + "name": "reservation_sub_block", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.ReservationSubBlocksGetResponse", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_reservation_sub_blocks_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_Get_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_get_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.List", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "List" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ListReservationSubBlocksRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.reservation_sub_blocks.pagers.ListPager", + "shortName": "list" + }, + "description": "Sample for List", + "file": "compute_v1beta_generated_reservation_sub_blocks_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_List_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.perform_maintenance", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.PerformMaintenance", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "PerformMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_name", + "type": "str" + }, + { + "name": "reservation_sub_block", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "perform_maintenance" + }, + "description": "Sample for PerformMaintenance", + "file": "compute_v1beta_generated_reservation_sub_blocks_perform_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_PerformMaintenance_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_perform_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.report_faulty", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.ReportFaulty", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "ReportFaulty" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.ReportFaultyReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_name", + "type": "str" + }, + { + "name": "reservation_sub_block", + "type": "str" + }, + { + "name": "reservation_sub_blocks_report_faulty_request_resource", + "type": "google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "report_faulty" + }, + "description": "Sample for ReportFaulty", + "file": "compute_v1beta_generated_reservation_sub_blocks_report_faulty_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_ReportFaulty_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_report_faulty_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.set_iam_policy", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.SetIamPolicy", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "zone_set_nested_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.ZoneSetNestedPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_SetIamPolicy_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", + "shortName": "ReservationSubBlocksClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", + "shortName": "ReservationSubBlocks" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationSubBlockRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "parent_resource", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ReservationSubBlocks_TestIamPermissions_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_reservation_sub_blocks_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" + }, + "fullName": "google.cloud.compute_v1beta.ReservationsClient.aggregated_list", + "method": { + "fullName": "google.cloud.compute.v1beta.Reservations.AggregatedList", + "service": { + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" + }, + "shortName": "AggregatedList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.AggregatedListReservationsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.reservations.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_reservations_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_Reservations_AggregatedList_sync", "segments": [ { "end": 52, @@ -64165,28 +68329,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_regions_list_sync.py" + "title": "compute_v1beta_generated_reservations_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", - "shortName": "ReservationBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.get", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.Get", + "fullName": "google.cloud.compute.v1beta.Reservations.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks", - "shortName": "ReservationBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetReservationBlockRequest" + "type": "google.cloud.compute_v1beta.types.DeleteReservationRequest" }, { "name": "project", @@ -64200,10 +68364,6 @@ "name": "reservation", "type": "str" }, - { - "name": "reservation_block", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64217,22 +68377,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ReservationBlocksGetResponse", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_reservation_blocks_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_reservations_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_Get_sync", + "regionTag": "compute_v1beta_generated_Reservations_Delete_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64242,43 +68402,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_get_sync.py" + "title": "compute_v1beta_generated_reservations_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", - "shortName": "ReservationBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.list", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.List", + "fullName": "google.cloud.compute.v1beta.Reservations.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks", - "shortName": "ReservationBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, - "shortName": "List" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListReservationBlocksRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationRequest" }, { "name": "project", @@ -64289,7 +68449,7 @@ "type": "str" }, { - "name": "reservation", + "name": "resource", "type": "str" }, { @@ -64305,22 +68465,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.reservation_blocks.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_reservation_blocks_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_reservations_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_List_sync", + "regionTag": "compute_v1beta_generated_Reservations_GetIamPolicy_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64340,33 +68500,33 @@ "type": "REQUEST_EXECUTION" }, { - "end": 55, + "end": 54, "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_list_sync.py" + "title": "compute_v1beta_generated_reservations_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient", - "shortName": "ReservationBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationBlocksClient.perform_maintenance", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks.PerformMaintenance", + "fullName": "google.cloud.compute.v1beta.Reservations.Get", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationBlocks", - "shortName": "ReservationBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, - "shortName": "PerformMaintenance" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationBlockRequest" + "type": "google.cloud.compute_v1beta.types.GetReservationRequest" }, { "name": "project", @@ -64380,14 +68540,6 @@ "name": "reservation", "type": "str" }, - { - "name": "reservation_block", - "type": "str" - }, - { - "name": "reservations_blocks_perform_maintenance_request_resource", - "type": "google.cloud.compute_v1beta.types.ReservationsBlocksPerformMaintenanceRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64401,22 +68553,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "perform_maintenance" + "resultType": "google.cloud.compute_v1beta.types.Reservation", + "shortName": "get" }, - "description": "Sample for PerformMaintenance", - "file": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_reservations_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationBlocks_PerformMaintenance_sync", + "regionTag": "compute_v1beta_generated_Reservations_Get_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64426,43 +68578,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_blocks_perform_maintenance_sync.py" + "title": "compute_v1beta_generated_reservations_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", - "shortName": "ReservationSubBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.get", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.Get", + "fullName": "google.cloud.compute.v1beta.Reservations.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", - "shortName": "ReservationSubBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetReservationSubBlockRequest" + "type": "google.cloud.compute_v1beta.types.InsertReservationRequest" }, { "name": "project", @@ -64473,12 +68625,8 @@ "type": "str" }, { - "name": "parent_name", - "type": "str" - }, - { - "name": "reservation_sub_block", - "type": "str" + "name": "reservation_resource", + "type": "google.cloud.compute_v1beta.types.Reservation" }, { "name": "retry", @@ -64493,22 +68641,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ReservationSubBlocksGetResponse", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_reservation_sub_blocks_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_reservations_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationSubBlocks_Get_sync", + "regionTag": "compute_v1beta_generated_Reservations_Insert_sync", "segments": [ { - "end": 54, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 52, "start": 27, "type": "SHORT" }, @@ -64518,43 +68666,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_sub_blocks_get_sync.py" + "title": "compute_v1beta_generated_reservations_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", - "shortName": "ReservationSubBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.list", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.List", + "fullName": "google.cloud.compute.v1beta.Reservations.List", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", - "shortName": "ReservationSubBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListReservationSubBlocksRequest" + "type": "google.cloud.compute_v1beta.types.ListReservationsRequest" }, { "name": "project", @@ -64564,10 +68712,6 @@ "name": "zone", "type": "str" }, - { - "name": "parent_name", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64581,22 +68725,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.reservation_sub_blocks.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.reservations.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_reservation_sub_blocks_list_sync.py", + "file": "compute_v1beta_generated_reservations_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationSubBlocks_List_sync", + "regionTag": "compute_v1beta_generated_Reservations_List_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64606,43 +68750,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 51, + "end": 54, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_sub_blocks_list_sync.py" + "title": "compute_v1beta_generated_reservations_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", - "shortName": "ReservationSubBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.perform_maintenance", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.perform_maintenance", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.PerformMaintenance", + "fullName": "google.cloud.compute.v1beta.Reservations.PerformMaintenance", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", - "shortName": "ReservationSubBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, "shortName": "PerformMaintenance" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationSubBlockRequest" + "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationRequest" }, { "name": "project", @@ -64653,12 +68797,12 @@ "type": "str" }, { - "name": "parent_name", + "name": "reservation", "type": "str" }, { - "name": "reservation_sub_block", - "type": "str" + "name": "reservations_perform_maintenance_request_resource", + "type": "google.cloud.compute_v1beta.types.ReservationsPerformMaintenanceRequest" }, { "name": "retry", @@ -64677,18 +68821,18 @@ "shortName": "perform_maintenance" }, "description": "Sample for PerformMaintenance", - "file": "compute_v1beta_generated_reservation_sub_blocks_perform_maintenance_sync.py", + "file": "compute_v1beta_generated_reservations_perform_maintenance_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationSubBlocks_PerformMaintenance_sync", + "regionTag": "compute_v1beta_generated_Reservations_PerformMaintenance_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64698,43 +68842,43 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_sub_blocks_perform_maintenance_sync.py" + "title": "compute_v1beta_generated_reservations_perform_maintenance_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient", - "shortName": "ReservationSubBlocksClient" + "fullName": "google.cloud.compute_v1beta.ReservationsClient", + "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationSubBlocksClient.report_faulty", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.resize", "method": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks.ReportFaulty", + "fullName": "google.cloud.compute.v1beta.Reservations.Resize", "service": { - "fullName": "google.cloud.compute.v1beta.ReservationSubBlocks", - "shortName": "ReservationSubBlocks" + "fullName": "google.cloud.compute.v1beta.Reservations", + "shortName": "Reservations" }, - "shortName": "ReportFaulty" + "shortName": "Resize" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ReportFaultyReservationSubBlockRequest" + "type": "google.cloud.compute_v1beta.types.ResizeReservationRequest" }, { "name": "project", @@ -64745,16 +68889,12 @@ "type": "str" }, { - "name": "parent_name", - "type": "str" - }, - { - "name": "reservation_sub_block", + "name": "reservation", "type": "str" }, { - "name": "reservation_sub_blocks_report_faulty_request_resource", - "type": "google.cloud.compute_v1beta.types.ReservationSubBlocksReportFaultyRequest" + "name": "reservations_resize_request_resource", + "type": "google.cloud.compute_v1beta.types.ReservationsResizeRequest" }, { "name": "retry", @@ -64770,21 +68910,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "report_faulty" + "shortName": "resize" }, - "description": "Sample for ReportFaulty", - "file": "compute_v1beta_generated_reservation_sub_blocks_report_faulty_sync.py", + "description": "Sample for Resize", + "file": "compute_v1beta_generated_reservations_resize_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ReservationSubBlocks_ReportFaulty_sync", + "regionTag": "compute_v1beta_generated_Reservations_Resize_sync", "segments": [ { - "end": 54, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 54, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64794,22 +68934,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 48, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 51, - "start": 49, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 55, - "start": 52, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservation_sub_blocks_report_faulty_sync.py" + "title": "compute_v1beta_generated_reservations_resize_sync.py" }, { "canonical": true, @@ -64818,24 +68958,36 @@ "fullName": "google.cloud.compute_v1beta.ReservationsClient", "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.AggregatedList", + "fullName": "google.cloud.compute.v1beta.Reservations.SetIamPolicy", "service": { "fullName": "google.cloud.compute.v1beta.Reservations", "shortName": "Reservations" }, - "shortName": "AggregatedList" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListReservationsRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationRequest" }, { "name": "project", "type": "str" }, + { + "name": "zone", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "zone_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.ZoneSetPolicyRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64849,22 +69001,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.reservations.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_reservations_aggregated_list_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_reservations_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_Reservations_SetIamPolicy_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -64874,22 +69026,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_aggregated_list_sync.py" + "title": "compute_v1beta_generated_reservations_set_iam_policy_sync.py" }, { "canonical": true, @@ -64898,19 +69050,19 @@ "fullName": "google.cloud.compute_v1beta.ReservationsClient", "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.delete", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.Delete", + "fullName": "google.cloud.compute.v1beta.Reservations.TestIamPermissions", "service": { "fullName": "google.cloud.compute.v1beta.Reservations", "shortName": "Reservations" }, - "shortName": "Delete" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteReservationRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationRequest" }, { "name": "project", @@ -64921,9 +69073,13 @@ "type": "str" }, { - "name": "reservation", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -64937,14 +69093,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_reservations_delete_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_reservations_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_Delete_sync", + "regionTag": "compute_v1beta_generated_Reservations_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -64977,7 +69133,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_delete_sync.py" + "title": "compute_v1beta_generated_reservations_test_iam_permissions_sync.py" }, { "canonical": true, @@ -64986,19 +69142,19 @@ "fullName": "google.cloud.compute_v1beta.ReservationsClient", "shortName": "ReservationsClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.ReservationsClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.Reservations.Update", "service": { "fullName": "google.cloud.compute.v1beta.Reservations", "shortName": "Reservations" }, - "shortName": "GetIamPolicy" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyReservationRequest" + "type": "google.cloud.compute_v1beta.types.UpdateReservationRequest" }, { "name": "project", @@ -65009,9 +69165,13 @@ "type": "str" }, { - "name": "resource", + "name": "reservation", "type": "str" }, + { + "name": "reservation_resource", + "type": "google.cloud.compute_v1beta.types.Reservation" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -65025,14 +69185,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_reservations_get_iam_policy_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_reservations_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_Reservations_Update_sync", "segments": [ { "end": 53, @@ -65065,41 +69225,33 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_reservations_update_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.get", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.aggregated_list", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.Get", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.AggregatedList", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "Get" + "shortName": "AggregatedList" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetReservationRequest" + "type": "google.cloud.compute_v1beta.types.AggregatedListResourcePoliciesRequest" }, { "name": "project", "type": "str" }, - { - "name": "zone", - "type": "str" - }, - { - "name": "reservation", - "type": "str" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -65113,22 +69265,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Reservation", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.services.resource_policies.pagers.AggregatedListPager", + "shortName": "aggregated_list" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_reservations_get_sync.py", + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_resource_policies_aggregated_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_Get_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_AggregatedList_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -65138,55 +69290,55 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_get_sync.py" + "title": "compute_v1beta_generated_resource_policies_aggregated_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.insert", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.Insert", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertReservationRequest" + "type": "google.cloud.compute_v1beta.types.DeleteResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "region", "type": "str" }, { - "name": "reservation_resource", - "type": "google.cloud.compute_v1beta.types.Reservation" + "name": "resource_policy", + "type": "str" }, { "name": "retry", @@ -65202,21 +69354,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_reservations_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_resource_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_Insert_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -65226,50 +69378,54 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_insert_sync.py" + "title": "compute_v1beta_generated_resource_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.list", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.get_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.List", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.GetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "List" + "shortName": "GetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListReservationsRequest" + "type": "google.cloud.compute_v1beta.types.GetIamPolicyResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "region", + "type": "str" + }, + { + "name": "resource", "type": "str" }, { @@ -65285,14 +69441,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.reservations.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "get_iam_policy" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_reservations_list_sync.py", + "description": "Sample for GetIamPolicy", + "file": "compute_v1beta_generated_resource_policies_get_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_List_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_GetIamPolicy_sync", "segments": [ { "end": 53, @@ -65310,60 +69466,56 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_list_sync.py" + "title": "compute_v1beta_generated_resource_policies_get_iam_policy_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.perform_maintenance", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.PerformMaintenance", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "PerformMaintenance" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PerformMaintenanceReservationRequest" + "type": "google.cloud.compute_v1beta.types.GetResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "region", "type": "str" }, { - "name": "reservation", + "name": "resource_policy", "type": "str" }, - { - "name": "reservations_perform_maintenance_request_resource", - "type": "google.cloud.compute_v1beta.types.ReservationsPerformMaintenanceRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -65377,14 +69529,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "perform_maintenance" + "resultType": "google.cloud.compute_v1beta.types.ResourcePolicy", + "shortName": "get" }, - "description": "Sample for PerformMaintenance", - "file": "compute_v1beta_generated_reservations_perform_maintenance_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_resource_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_PerformMaintenance_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_Get_sync", "segments": [ { "end": 53, @@ -65417,44 +69569,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_perform_maintenance_sync.py" + "title": "compute_v1beta_generated_resource_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.resize", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.Resize", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "Resize" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ResizeReservationRequest" + "type": "google.cloud.compute_v1beta.types.InsertResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", - "type": "str" - }, - { - "name": "reservation", + "name": "region", "type": "str" }, { - "name": "reservations_resize_request_resource", - "type": "google.cloud.compute_v1beta.types.ReservationsResizeRequest" + "name": "resource_policy_resource", + "type": "google.cloud.compute_v1beta.types.ResourcePolicy" }, { "name": "retry", @@ -65470,21 +69618,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "resize" + "shortName": "insert" }, - "description": "Sample for Resize", - "file": "compute_v1beta_generated_reservations_resize_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_resource_policies_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_Resize_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -65494,60 +69642,52 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_resize_sync.py" + "title": "compute_v1beta_generated_resource_policies_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.List", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "SetIamPolicy" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyReservationRequest" + "type": "google.cloud.compute_v1beta.types.ListResourcePoliciesRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", - "type": "str" - }, - { - "name": "resource", + "name": "region", "type": "str" }, - { - "name": "zone_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.ZoneSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -65561,14 +69701,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.cloud.compute_v1beta.services.resource_policies.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_reservations_set_iam_policy_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_resource_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_List_sync", "segments": [ { "end": 53, @@ -65586,59 +69726,59 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_resource_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Patch", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "TestIamPermissions" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsReservationRequest" + "type": "google.cloud.compute_v1beta.types.PatchResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "region", "type": "str" }, { - "name": "resource", + "name": "resource_policy", "type": "str" }, { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "resource_policy_resource", + "type": "google.cloud.compute_v1beta.types.ResourcePolicy" }, { "name": "retry", @@ -65653,14 +69793,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "patch" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_reservations_test_iam_permissions_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_resource_policies_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_Patch_sync", "segments": [ { "end": 53, @@ -65693,44 +69833,44 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_resource_policies_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ReservationsClient", - "shortName": "ReservationsClient" + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", + "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ReservationsClient.update", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.set_iam_policy", "method": { - "fullName": "google.cloud.compute.v1beta.Reservations.Update", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.SetIamPolicy", "service": { - "fullName": "google.cloud.compute.v1beta.Reservations", - "shortName": "Reservations" + "fullName": "google.cloud.compute.v1beta.ResourcePolicies", + "shortName": "ResourcePolicies" }, - "shortName": "Update" + "shortName": "SetIamPolicy" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.UpdateReservationRequest" + "type": "google.cloud.compute_v1beta.types.SetIamPolicyResourcePolicyRequest" }, { "name": "project", "type": "str" }, { - "name": "zone", + "name": "region", "type": "str" }, { - "name": "reservation", + "name": "resource", "type": "str" }, { - "name": "reservation_resource", - "type": "google.cloud.compute_v1beta.types.Reservation" + "name": "region_set_policy_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" }, { "name": "retry", @@ -65745,14 +69885,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "update" + "resultType": "google.cloud.compute_v1beta.types.Policy", + "shortName": "set_iam_policy" }, - "description": "Sample for Update", - "file": "compute_v1beta_generated_reservations_update_sync.py", + "description": "Sample for SetIamPolicy", + "file": "compute_v1beta_generated_resource_policies_set_iam_policy_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_Reservations_Update_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_SetIamPolicy_sync", "segments": [ { "end": 53, @@ -65785,7 +69925,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_reservations_update_sync.py" + "title": "compute_v1beta_generated_resource_policies_set_iam_policy_sync.py" }, { "canonical": true, @@ -65794,24 +69934,36 @@ "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", "shortName": "ResourcePoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.AggregatedList", + "fullName": "google.cloud.compute.v1beta.ResourcePolicies.TestIamPermissions", "service": { "fullName": "google.cloud.compute.v1beta.ResourcePolicies", "shortName": "ResourcePolicies" }, - "shortName": "AggregatedList" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListResourcePoliciesRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsResourcePolicyRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -65825,22 +69977,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.resource_policies.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_resource_policies_aggregated_list_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_resource_policies_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_ResourcePolicies_TestIamPermissions_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -65850,54 +70002,50 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_aggregated_list_sync.py" + "title": "compute_v1beta_generated_resource_policies_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient", + "shortName": "RolloutPlansClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.delete", + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Delete", + "fullName": "google.cloud.compute.v1beta.RolloutPlans.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.RolloutPlans", + "shortName": "RolloutPlans" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRolloutPlanRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource_policy", + "name": "rollout_plan", "type": "str" }, { @@ -65917,18 +70065,18 @@ "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_resource_policies_delete_sync.py", + "file": "compute_v1beta_generated_rollout_plans_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_Delete_sync", + "regionTag": "compute_v1beta_generated_RolloutPlans_Delete_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -65938,54 +70086,50 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_delete_sync.py" + "title": "compute_v1beta_generated_rollout_plans_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient", + "shortName": "RolloutPlansClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.get_iam_policy", + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.GetIamPolicy", + "fullName": "google.cloud.compute.v1beta.RolloutPlans.Get", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.RolloutPlans", + "shortName": "RolloutPlans" }, - "shortName": "GetIamPolicy" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetIamPolicyResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRolloutPlanRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource", + "name": "rollout_plan", "type": "str" }, { @@ -66001,22 +70145,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "get_iam_policy" + "resultType": "google.cloud.compute_v1beta.types.RolloutPlan", + "shortName": "get" }, - "description": "Sample for GetIamPolicy", - "file": "compute_v1beta_generated_resource_policies_get_iam_policy_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_rollout_plans_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_GetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_RolloutPlans_Get_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -66026,55 +70170,51 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_get_iam_policy_sync.py" + "title": "compute_v1beta_generated_rollout_plans_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient", + "shortName": "RolloutPlansClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.get", + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Get", + "fullName": "google.cloud.compute.v1beta.RolloutPlans.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.RolloutPlans", + "shortName": "RolloutPlans" }, - "shortName": "Get" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.InsertRolloutPlanRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource_policy", - "type": "str" + "name": "rollout_plan_resource", + "type": "google.cloud.compute_v1beta.types.RolloutPlan" }, { "name": "retry", @@ -66089,22 +70229,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.ResourcePolicy", - "shortName": "get" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_resource_policies_get_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_rollout_plans_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_Get_sync", + "regionTag": "compute_v1beta_generated_RolloutPlans_Insert_sync", "segments": [ { - "end": 53, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 51, "start": 27, "type": "SHORT" }, @@ -66114,56 +70254,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_get_sync.py" + "title": "compute_v1beta_generated_rollout_plans_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient", + "shortName": "RolloutPlansClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.insert", + "fullName": "google.cloud.compute_v1beta.RolloutPlansClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Insert", + "fullName": "google.cloud.compute.v1beta.RolloutPlans.List", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.RolloutPlans", + "shortName": "RolloutPlans" }, - "shortName": "Insert" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRolloutPlansRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "resource_policy_resource", - "type": "google.cloud.compute_v1beta.types.ResourcePolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -66177,14 +70309,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.services.rollout_plans.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_resource_policies_insert_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_rollout_plans_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_Insert_sync", + "regionTag": "compute_v1beta_generated_RolloutPlans_List_sync", "segments": [ { "end": 52, @@ -66202,50 +70334,50 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { "end": 53, - "start": 50, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_insert_sync.py" + "title": "compute_v1beta_generated_rollout_plans_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutsClient", + "shortName": "RolloutsClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.list", + "fullName": "google.cloud.compute_v1beta.RolloutsClient.cancel", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.List", + "fullName": "google.cloud.compute.v1beta.Rollouts.Cancel", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.Rollouts", + "shortName": "Rollouts" }, - "shortName": "List" + "shortName": "Cancel" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListResourcePoliciesRequest" + "type": "google.cloud.compute_v1beta.types.CancelRolloutRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "rollout", "type": "str" }, { @@ -66261,22 +70393,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.resource_policies.pagers.ListPager", - "shortName": "list" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "cancel" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_resource_policies_list_sync.py", + "description": "Sample for Cancel", + "file": "compute_v1beta_generated_rollouts_cancel_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_List_sync", + "regionTag": "compute_v1beta_generated_Rollouts_Cancel_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -66296,50 +70428,42 @@ "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 53, "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_list_sync.py" + "title": "compute_v1beta_generated_rollouts_cancel_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutsClient", + "shortName": "RolloutsClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.patch", + "fullName": "google.cloud.compute_v1beta.RolloutsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.Patch", + "fullName": "google.cloud.compute.v1beta.Rollouts.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.Rollouts", + "shortName": "Rollouts" }, - "shortName": "Patch" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.DeleteRolloutRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "rollout", "type": "str" }, - { - "name": "resource_policy", - "type": "str" - }, - { - "name": "resource_policy_resource", - "type": "google.cloud.compute_v1beta.types.ResourcePolicy" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -66354,21 +70478,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "shortName": "delete" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_resource_policies_patch_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_rollouts_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_Patch_sync", + "regionTag": "compute_v1beta_generated_Rollouts_Delete_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -66378,60 +70502,52 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_patch_sync.py" + "title": "compute_v1beta_generated_rollouts_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutsClient", + "shortName": "RolloutsClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.set_iam_policy", + "fullName": "google.cloud.compute_v1beta.RolloutsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.SetIamPolicy", + "fullName": "google.cloud.compute.v1beta.Rollouts.Get", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.Rollouts", + "shortName": "Rollouts" }, - "shortName": "SetIamPolicy" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetIamPolicyResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.GetRolloutRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "rollout", "type": "str" }, - { - "name": "resource", - "type": "str" - }, - { - "name": "region_set_policy_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetPolicyRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -66445,22 +70561,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Policy", - "shortName": "set_iam_policy" + "resultType": "google.cloud.compute_v1beta.types.Rollout", + "shortName": "get" }, - "description": "Sample for SetIamPolicy", - "file": "compute_v1beta_generated_resource_policies_set_iam_policy_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_rollouts_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_SetIamPolicy_sync", + "regionTag": "compute_v1beta_generated_Rollouts_Get_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -66470,60 +70586,48 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_set_iam_policy_sync.py" + "title": "compute_v1beta_generated_rollouts_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient", - "shortName": "ResourcePoliciesClient" + "fullName": "google.cloud.compute_v1beta.RolloutsClient", + "shortName": "RolloutsClient" }, - "fullName": "google.cloud.compute_v1beta.ResourcePoliciesClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.RolloutsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.Rollouts.List", "service": { - "fullName": "google.cloud.compute.v1beta.ResourcePolicies", - "shortName": "ResourcePolicies" + "fullName": "google.cloud.compute.v1beta.Rollouts", + "shortName": "Rollouts" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsResourcePolicyRequest" + "type": "google.cloud.compute_v1beta.types.ListRolloutsRequest" }, { "name": "project", "type": "str" }, - { - "name": "region", - "type": "str" - }, - { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -66537,22 +70641,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.rollouts.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_resource_policies_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_rollouts_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ResourcePolicies_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_Rollouts_List_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -66562,22 +70666,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 45, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_resource_policies_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_rollouts_list_sync.py" }, { "canonical": true, @@ -82361,28 +86465,376 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_gateways_set_labels_sync.py" + "title": "compute_v1beta_generated_vpn_gateways_set_labels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient", + "shortName": "VpnGatewaysClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnGateways.TestIamPermissions", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnGateways", + "shortName": "VpnGateways" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnGatewayRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnGateways_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.aggregated_list", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.AggregatedList", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "AggregatedList" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.AggregatedListVpnTunnelsRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.AggregatedListPager", + "shortName": "aggregated_list" + }, + "description": "Sample for AggregatedList", + "file": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_AggregatedList_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.delete", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Delete", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "Delete" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.DeleteVpnTunnelRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "vpn_tunnel", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "delete" + }, + "description": "Sample for Delete", + "file": "compute_v1beta_generated_vpn_tunnels_delete_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_Delete_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_delete_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" + }, + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.get", + "method": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Get", + "service": { + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" + }, + "shortName": "Get" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.GetVpnTunnelRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "region", + "type": "str" + }, + { + "name": "vpn_tunnel", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.compute_v1beta.types.VpnTunnel", + "shortName": "get" + }, + "description": "Sample for Get", + "file": "compute_v1beta_generated_vpn_tunnels_get_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_VpnTunnels_Get_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_vpn_tunnels_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient", - "shortName": "VpnGatewaysClient" + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", + "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnGatewaysClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.VpnGateways.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.VpnGateways", - "shortName": "VpnGateways" + "fullName": "google.cloud.compute.v1beta.VpnTunnels", + "shortName": "VpnTunnels" }, - "shortName": "TestIamPermissions" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnGatewayRequest" + "type": "google.cloud.compute_v1beta.types.InsertVpnTunnelRequest" }, { "name": "project", @@ -82393,12 +86845,8 @@ "type": "str" }, { - "name": "resource", - "type": "str" - }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + "name": "vpn_tunnel_resource", + "type": "google.cloud.compute_v1beta.types.VpnTunnel" }, { "name": "retry", @@ -82413,22 +86861,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_vpn_tunnels_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnGateways_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -82438,22 +86886,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_gateways_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_insert_sync.py" }, { "canonical": true, @@ -82462,24 +86910,28 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.aggregated_list", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.AggregatedList", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.List", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "AggregatedList" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.AggregatedListVpnTunnelsRequest" + "type": "google.cloud.compute_v1beta.types.ListVpnTunnelsRequest" }, { "name": "project", "type": "str" }, + { + "name": "region", + "type": "str" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82493,22 +86945,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.AggregatedListPager", - "shortName": "aggregated_list" + "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for AggregatedList", - "file": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_vpn_tunnels_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_AggregatedList_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_List_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -82518,22 +86970,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 48, - "start": 46, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 49, + "end": 54, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_aggregated_list_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_list_sync.py" }, { "canonical": true, @@ -82542,19 +86994,19 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.delete", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.set_labels", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Delete", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.SetLabels", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "Delete" + "shortName": "SetLabels" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.SetLabelsVpnTunnelRequest" }, { "name": "project", @@ -82565,9 +87017,13 @@ "type": "str" }, { - "name": "vpn_tunnel", + "name": "resource", "type": "str" }, + { + "name": "region_set_labels_request_resource", + "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82582,13 +87038,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "set_labels" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_vpn_tunnels_delete_sync.py", + "description": "Sample for SetLabels", + "file": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Delete_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_SetLabels_sync", "segments": [ { "end": 53, @@ -82621,7 +87077,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_delete_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py" }, { "canonical": true, @@ -82630,19 +87086,19 @@ "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", "shortName": "VpnTunnelsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.get", + "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.test_iam_permissions", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Get", + "fullName": "google.cloud.compute.v1beta.VpnTunnels.TestIamPermissions", "service": { "fullName": "google.cloud.compute.v1beta.VpnTunnels", "shortName": "VpnTunnels" }, - "shortName": "Get" + "shortName": "TestIamPermissions" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnTunnelRequest" }, { "name": "project", @@ -82653,9 +87109,13 @@ "type": "str" }, { - "name": "vpn_tunnel", + "name": "resource", "type": "str" }, + { + "name": "test_permissions_request_resource", + "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -82669,14 +87129,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.VpnTunnel", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", + "shortName": "test_iam_permissions" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_vpn_tunnels_get_sync.py", + "description": "Sample for TestIamPermissions", + "file": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Get_sync", + "regionTag": "compute_v1beta_generated_VpnTunnels_TestIamPermissions_sync", "segments": [ { "end": 53, @@ -82709,40 +87169,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_get_sync.py" + "title": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.insert", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.Insert", + "fullName": "google.cloud.compute.v1beta.WireGroups.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "Insert" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.DeleteWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "cross_site_network", "type": "str" }, { - "name": "vpn_tunnel_resource", - "type": "google.cloud.compute_v1beta.types.VpnTunnel" + "name": "wire_group", + "type": "str" }, { "name": "retry", @@ -82758,21 +87218,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "shortName": "delete" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_vpn_tunnels_insert_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_wire_groups_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_Insert_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Delete_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -82782,50 +87242,54 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_insert_sync.py" + "title": "compute_v1beta_generated_wire_groups_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.list", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.List", + "fullName": "google.cloud.compute.v1beta.WireGroups.Get", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "List" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListVpnTunnelsRequest" + "type": "google.cloud.compute_v1beta.types.GetWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", + "name": "cross_site_network", + "type": "str" + }, + { + "name": "wire_group", "type": "str" }, { @@ -82841,14 +87305,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.vpn_tunnels.pagers.ListPager", - "shortName": "list" + "resultType": "google.cloud.compute_v1beta.types.WireGroup", + "shortName": "get" }, - "description": "Sample for List", - "file": "compute_v1beta_generated_vpn_tunnels_list_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_wire_groups_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_List_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Get_sync", "segments": [ { "end": 53, @@ -82866,59 +87330,55 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 50, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_list_sync.py" + "title": "compute_v1beta_generated_wire_groups_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.set_labels", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.SetLabels", + "fullName": "google.cloud.compute.v1beta.WireGroups.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "SetLabels" + "shortName": "Insert" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.SetLabelsVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.InsertWireGroupRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource", + "name": "cross_site_network", "type": "str" }, { - "name": "region_set_labels_request_resource", - "type": "google.cloud.compute_v1beta.types.RegionSetLabelsRequest" + "name": "wire_group_resource", + "type": "google.cloud.compute_v1beta.types.WireGroup" }, { "name": "retry", @@ -82934,21 +87394,21 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "set_labels" + "shortName": "insert" }, - "description": "Sample for SetLabels", - "file": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py", + "description": "Sample for Insert", + "file": "compute_v1beta_generated_wire_groups_insert_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_SetLabels_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Insert_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -82958,60 +87418,52 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_set_labels_sync.py" + "title": "compute_v1beta_generated_wire_groups_insert_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient", - "shortName": "VpnTunnelsClient" + "fullName": "google.cloud.compute_v1beta.WireGroupsClient", + "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.VpnTunnelsClient.test_iam_permissions", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels.TestIamPermissions", + "fullName": "google.cloud.compute.v1beta.WireGroups.List", "service": { - "fullName": "google.cloud.compute.v1beta.VpnTunnels", - "shortName": "VpnTunnels" + "fullName": "google.cloud.compute.v1beta.WireGroups", + "shortName": "WireGroups" }, - "shortName": "TestIamPermissions" + "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.TestIamPermissionsVpnTunnelRequest" + "type": "google.cloud.compute_v1beta.types.ListWireGroupsRequest" }, { "name": "project", "type": "str" }, { - "name": "region", - "type": "str" - }, - { - "name": "resource", + "name": "cross_site_network", "type": "str" }, - { - "name": "test_permissions_request_resource", - "type": "google.cloud.compute_v1beta.types.TestPermissionsRequest" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83025,14 +87477,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.TestPermissionsResponse", - "shortName": "test_iam_permissions" + "resultType": "google.cloud.compute_v1beta.services.wire_groups.pagers.ListPager", + "shortName": "list" }, - "description": "Sample for TestIamPermissions", - "file": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py", + "description": "Sample for List", + "file": "compute_v1beta_generated_wire_groups_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_VpnTunnels_TestIamPermissions_sync", + "regionTag": "compute_v1beta_generated_WireGroups_List_sync", "segments": [ { "end": 53, @@ -83050,22 +87502,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { "end": 54, - "start": 51, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_vpn_tunnels_test_iam_permissions_sync.py" + "title": "compute_v1beta_generated_wire_groups_list_sync.py" }, { "canonical": true, @@ -83074,19 +87526,19 @@ "fullName": "google.cloud.compute_v1beta.WireGroupsClient", "shortName": "WireGroupsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.delete", + "fullName": "google.cloud.compute_v1beta.WireGroupsClient.patch", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Delete", + "fullName": "google.cloud.compute.v1beta.WireGroups.Patch", "service": { "fullName": "google.cloud.compute.v1beta.WireGroups", "shortName": "WireGroups" }, - "shortName": "Delete" + "shortName": "Patch" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.PatchWireGroupRequest" }, { "name": "project", @@ -83100,6 +87552,10 @@ "name": "wire_group", "type": "str" }, + { + "name": "wire_group_resource", + "type": "google.cloud.compute_v1beta.types.WireGroup" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83114,13 +87570,13 @@ } ], "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "delete" + "shortName": "patch" }, - "description": "Sample for Delete", - "file": "compute_v1beta_generated_wire_groups_delete_sync.py", + "description": "Sample for Patch", + "file": "compute_v1beta_generated_wire_groups_patch_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Delete_sync", + "regionTag": "compute_v1beta_generated_WireGroups_Patch_sync", "segments": [ { "end": 53, @@ -83153,39 +87609,39 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_delete_sync.py" + "title": "compute_v1beta_generated_wire_groups_patch_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.get", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Get", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Get" + "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.DeleteZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group", + "name": "operation", "type": "str" }, { @@ -83201,14 +87657,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.WireGroup", - "shortName": "get" + "resultType": "google.cloud.compute_v1beta.types.DeleteZoneOperationResponse", + "shortName": "delete" }, - "description": "Sample for Get", - "file": "compute_v1beta_generated_wire_groups_get_sync.py", + "description": "Sample for Delete", + "file": "compute_v1beta_generated_zone_operations_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Get_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Delete_sync", "segments": [ { "end": 53, @@ -83241,40 +87697,40 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_get_sync.py" + "title": "compute_v1beta_generated_zone_operations_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.insert", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Insert", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Get", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Insert" + "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.InsertWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.GetZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group_resource", - "type": "google.cloud.compute_v1beta.types.WireGroup" + "name": "operation", + "type": "str" }, { "name": "retry", @@ -83289,22 +87745,22 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "insert" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "get" }, - "description": "Sample for Insert", - "file": "compute_v1beta_generated_wire_groups_insert_sync.py", + "description": "Sample for Get", + "file": "compute_v1beta_generated_zone_operations_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Insert_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Get_sync", "segments": [ { - "end": 52, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 53, "start": 27, "type": "SHORT" }, @@ -83314,50 +87770,50 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 46, + "end": 47, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_insert_sync.py" + "title": "compute_v1beta_generated_zone_operations_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.list", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.list", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.List", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.List", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListWireGroupsRequest" + "type": "google.cloud.compute_v1beta.types.ListZoneOperationsRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { @@ -83373,14 +87829,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.wire_groups.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.zone_operations.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_wire_groups_list_sync.py", + "file": "compute_v1beta_generated_zone_operations_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_List_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_List_sync", "segments": [ { "end": 53, @@ -83413,45 +87869,41 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_list_sync.py" + "title": "compute_v1beta_generated_zone_operations_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.WireGroupsClient", - "shortName": "WireGroupsClient" + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", + "shortName": "ZoneOperationsClient" }, - "fullName": "google.cloud.compute_v1beta.WireGroupsClient.patch", + "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.wait", "method": { - "fullName": "google.cloud.compute.v1beta.WireGroups.Patch", + "fullName": "google.cloud.compute.v1beta.ZoneOperations.Wait", "service": { - "fullName": "google.cloud.compute.v1beta.WireGroups", - "shortName": "WireGroups" + "fullName": "google.cloud.compute.v1beta.ZoneOperations", + "shortName": "ZoneOperations" }, - "shortName": "Patch" + "shortName": "Wait" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.PatchWireGroupRequest" + "type": "google.cloud.compute_v1beta.types.WaitZoneOperationRequest" }, { "name": "project", "type": "str" }, { - "name": "cross_site_network", + "name": "zone", "type": "str" }, { - "name": "wire_group", + "name": "operation", "type": "str" }, - { - "name": "wire_group_resource", - "type": "google.cloud.compute_v1beta.types.WireGroup" - }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83465,14 +87917,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.api_core.extended_operation.ExtendedOperation", - "shortName": "patch" + "resultType": "google.cloud.compute_v1beta.types.Operation", + "shortName": "wait" }, - "description": "Sample for Patch", - "file": "compute_v1beta_generated_wire_groups_patch_sync.py", + "description": "Sample for Wait", + "file": "compute_v1beta_generated_zone_operations_wait_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_WireGroups_Patch_sync", + "regionTag": "compute_v1beta_generated_ZoneOperations_Wait_sync", "segments": [ { "end": 53, @@ -83505,28 +87957,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_wire_groups_patch_sync.py" + "title": "compute_v1beta_generated_zone_operations_wait_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.delete", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.delete", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Delete", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Delete", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "Delete" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.DeleteZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.DeleteZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83537,7 +87989,7 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, { @@ -83553,14 +88005,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.DeleteZoneOperationResponse", + "resultType": "google.api_core.extended_operation.ExtendedOperation", "shortName": "delete" }, "description": "Sample for Delete", - "file": "compute_v1beta_generated_zone_operations_delete_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Delete_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Delete_sync", "segments": [ { "end": 53, @@ -83593,28 +88045,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_delete_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_delete_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.get", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.get", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Get", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Get", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "Get" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.GetZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.GetZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83625,7 +88077,7 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, { @@ -83641,14 +88093,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", + "resultType": "google.cloud.compute_v1beta.types.VmExtensionPolicy", "shortName": "get" }, "description": "Sample for Get", - "file": "compute_v1beta_generated_zone_operations_get_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_get_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Get_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Get_sync", "segments": [ { "end": 53, @@ -83681,28 +88133,116 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_get_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_get_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.list", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.insert", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.List", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Insert", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" + }, + "shortName": "Insert" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.compute_v1beta.types.InsertZoneVmExtensionPolicyRequest" + }, + { + "name": "project", + "type": "str" + }, + { + "name": "zone", + "type": "str" + }, + { + "name": "vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.VmExtensionPolicy" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "insert" + }, + "description": "Sample for Insert", + "file": "compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Insert_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "compute_v1beta_generated_zone_vm_extension_policies_insert_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" + }, + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.list", + "method": { + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.List", + "service": { + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, "shortName": "List" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.ListZoneOperationsRequest" + "type": "google.cloud.compute_v1beta.types.ListZoneVmExtensionPoliciesRequest" }, { "name": "project", @@ -83725,14 +88265,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.services.zone_operations.pagers.ListPager", + "resultType": "google.cloud.compute_v1beta.services.zone_vm_extension_policies.pagers.ListPager", "shortName": "list" }, "description": "Sample for List", - "file": "compute_v1beta_generated_zone_operations_list_sync.py", + "file": "compute_v1beta_generated_zone_vm_extension_policies_list_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_List_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_List_sync", "segments": [ { "end": 53, @@ -83765,28 +88305,28 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_list_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_list_sync.py" }, { "canonical": true, "clientMethod": { "client": { - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient", - "shortName": "ZoneOperationsClient" + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient", + "shortName": "ZoneVmExtensionPoliciesClient" }, - "fullName": "google.cloud.compute_v1beta.ZoneOperationsClient.wait", + "fullName": "google.cloud.compute_v1beta.ZoneVmExtensionPoliciesClient.update", "method": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations.Wait", + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies.Update", "service": { - "fullName": "google.cloud.compute.v1beta.ZoneOperations", - "shortName": "ZoneOperations" + "fullName": "google.cloud.compute.v1beta.ZoneVmExtensionPolicies", + "shortName": "ZoneVmExtensionPolicies" }, - "shortName": "Wait" + "shortName": "Update" }, "parameters": [ { "name": "request", - "type": "google.cloud.compute_v1beta.types.WaitZoneOperationRequest" + "type": "google.cloud.compute_v1beta.types.UpdateZoneVmExtensionPolicyRequest" }, { "name": "project", @@ -83797,9 +88337,13 @@ "type": "str" }, { - "name": "operation", + "name": "vm_extension_policy", "type": "str" }, + { + "name": "vm_extension_policy_resource", + "type": "google.cloud.compute_v1beta.types.VmExtensionPolicy" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -83813,14 +88357,14 @@ "type": "Sequence[Tuple[str, Union[str, bytes]]]" } ], - "resultType": "google.cloud.compute_v1beta.types.Operation", - "shortName": "wait" + "resultType": "google.api_core.extended_operation.ExtendedOperation", + "shortName": "update" }, - "description": "Sample for Wait", - "file": "compute_v1beta_generated_zone_operations_wait_sync.py", + "description": "Sample for Update", + "file": "compute_v1beta_generated_zone_vm_extension_policies_update_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "compute_v1beta_generated_ZoneOperations_Wait_sync", + "regionTag": "compute_v1beta_generated_ZoneVmExtensionPolicies_Update_sync", "segments": [ { "end": 53, @@ -83853,7 +88397,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "compute_v1beta_generated_zone_operations_wait_sync.py" + "title": "compute_v1beta_generated_zone_vm_extension_policies_update_sync.py" }, { "canonical": true, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py index aece76a04f70..7a634b2454c8 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py @@ -1560,6 +1560,284 @@ def test_add_signed_url_key_unary_rest_flattened_error(transport: str = "rest"): ) +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListBackendBucketsRequest, +): + transport_class = transports.BackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.BackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListBackendBucketsRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketAggregatedList( + items={ + "a": compute.BackendBucketsScopedList(), + "b": compute.BackendBucketsScopedList(), + "c": compute.BackendBucketsScopedList(), + }, + next_page_token="abc", + ), + compute.BackendBucketAggregatedList( + items={}, + next_page_token="def", + ), + compute.BackendBucketAggregatedList( + items={ + "g": compute.BackendBucketsScopedList(), + }, + next_page_token="ghi", + ), + compute.BackendBucketAggregatedList( + items={ + "h": compute.BackendBucketsScopedList(), + "i": compute.BackendBucketsScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.BackendBucketAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.BackendBucketsScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.BackendBucketsScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.BackendBucketsScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + def test_delete_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -5681,6 +5959,144 @@ def test_add_signed_url_key_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListBackendBucketsRequest, +): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListBackendBucketsRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.BackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.BackendBucketsRestInterceptor(), + ) + client = BackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.BackendBucketsRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.BackendBucketsRestInterceptor, "post_aggregated_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.BackendBucketsRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListBackendBucketsRequest.pb( + compute.AggregatedListBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketAggregatedList.to_json( + compute.BackendBucketAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketAggregatedList() + post_with_metadata.return_value = ( + compute.BackendBucketAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + def test_delete_rest_bad_request(request_type=compute.DeleteBackendBucketRequest): client = BackendBucketsClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -6072,6 +6488,7 @@ def test_get_rest_call_success(request_type): kind="kind_value", load_balancing_scheme="load_balancing_scheme_value", name="name_value", + region="region_value", self_link="self_link_value", ) @@ -6100,6 +6517,7 @@ def test_get_rest_call_success(request_type): assert response.kind == "kind_value" assert response.load_balancing_scheme == "load_balancing_scheme_value" assert response.name == "name_value" + assert response.region == "region_value" assert response.self_link == "self_link_value" @@ -6375,6 +6793,7 @@ def test_insert_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -6924,6 +7343,7 @@ def test_patch_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -7910,6 +8330,7 @@ def test_update_rest_call_success(request_type): "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "params": {"resource_manager_tags": {}}, + "region": "region_value", "self_link": "self_link_value", "used_by": [{"reference": "reference_value"}], } @@ -8143,6 +8564,26 @@ def test_add_signed_url_key_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = BackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListBackendBucketsRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_delete_unary_empty_call_rest(): @@ -8412,6 +8853,7 @@ def test_backend_buckets_base_transport(): # raise NotImplementedError. methods = ( "add_signed_url_key", + "aggregated_list", "delete", "delete_signed_url_key", "get", @@ -8564,6 +9006,9 @@ def test_backend_buckets_client_transport_session_collision(transport_name): session1 = client1.transport.add_signed_url_key._session session2 = client2.transport.add_signed_url_key._session assert session1 != session2 + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 session1 = client1.transport.delete._session session2 = client2.transport.delete._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py index 4d654ae3af2c..08bacc741518 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py @@ -8165,6 +8165,7 @@ def test_insert_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -8869,6 +8870,7 @@ def test_patch_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -10258,6 +10260,7 @@ def test_update_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py index a4877820a27a..68a9559e19a3 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py @@ -8309,6 +8309,7 @@ def test_add_packet_mirroring_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -8331,6 +8332,7 @@ def test_add_packet_mirroring_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -8615,6 +8617,7 @@ def test_add_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -8637,6 +8640,7 @@ def test_add_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -10010,6 +10014,7 @@ def test_insert_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -10032,6 +10037,7 @@ def test_insert_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -10779,6 +10785,7 @@ def test_patch_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -10801,6 +10808,7 @@ def test_patch_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -11099,6 +11107,7 @@ def test_patch_packet_mirroring_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -11121,6 +11130,7 @@ def test_patch_packet_mirroring_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -11407,6 +11417,7 @@ def test_patch_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -11429,6 +11440,7 @@ def test_patch_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py index f6bbbd8ff845..c6bc2fe6b48d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py @@ -3209,6 +3209,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", is_live_migration=True, kind="kind_value", mode="mode_value", @@ -3241,6 +3242,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.is_live_migration is True assert response.kind == "kind_value" assert response.mode == "mode_value" @@ -3364,6 +3366,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -3376,6 +3379,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", @@ -3777,6 +3781,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -3789,6 +3794,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py new file mode 100644 index 000000000000..6b99097c06d7 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_vm_extension_policies.py @@ -0,0 +1,5006 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.global_vm_extension_policies import ( + GlobalVmExtensionPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(None) is None + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + GlobalVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + GlobalVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert GlobalVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + GlobalVmExtensionPoliciesClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert GlobalVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert ( + GlobalVmExtensionPoliciesClient._use_client_cert_effective() + is False + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert GlobalVmExtensionPoliciesClient._get_client_cert_source(None, False) is None + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + GlobalVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == GlobalVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + GlobalVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + GlobalVmExtensionPoliciesClient._get_universe_domain(None, None) + == GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + GlobalVmExtensionPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = GlobalVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = GlobalVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (GlobalVmExtensionPoliciesClient, "rest"), + ], +) +def test_global_vm_extension_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.GlobalVmExtensionPoliciesRestTransport, "rest"), + ], +) +def test_global_vm_extension_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (GlobalVmExtensionPoliciesClient, "rest"), + ], +) +def test_global_vm_extension_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_global_vm_extension_policies_client_get_transport_class(): + transport = GlobalVmExtensionPoliciesClient.get_transport_class() + available_transports = [ + transports.GlobalVmExtensionPoliciesRestTransport, + ] + assert transport in available_transports + + transport = GlobalVmExtensionPoliciesClient.get_transport_class("rest") + assert transport == transports.GlobalVmExtensionPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + GlobalVmExtensionPoliciesClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + GlobalVmExtensionPoliciesClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + "true", + ), + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_global_vm_extension_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [GlobalVmExtensionPoliciesClient]) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [GlobalVmExtensionPoliciesClient]) +@mock.patch.object( + GlobalVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(GlobalVmExtensionPoliciesClient), +) +def test_global_vm_extension_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = GlobalVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = GlobalVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +def test_global_vm_extension_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_global_vm_extension_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListGlobalVmExtensionPoliciesRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListGlobalVmExtensionPoliciesRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "a": compute.VmExtensionPoliciesScopedList(), + "b": compute.VmExtensionPoliciesScopedList(), + "c": compute.VmExtensionPoliciesScopedList(), + }, + next_page_token="abc", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={}, + next_page_token="def", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "g": compute.VmExtensionPoliciesScopedList(), + }, + next_page_token="ghi", + ), + compute.VmExtensionPolicyAggregatedListResponse( + items={ + "h": compute.VmExtensionPoliciesScopedList(), + "i": compute.VmExtensionPoliciesScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.VmExtensionPolicyAggregatedListResponse.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.VmExtensionPoliciesScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.VmExtensionPoliciesScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.VmExtensionPoliciesScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicy", + "globalVmExtensionPolicyRolloutOperationRolloutInputResource", + "project", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_rollout_operation_rollout_input_resource=compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput( + conflict_behavior="conflict_behavior_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}/delete" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_rollout_operation_rollout_input_resource=compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput( + conflict_behavior="conflict_behavior_value" + ), + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicy", + "globalVmExtensionPolicyRolloutOperationRolloutInputResource", + "project", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_rollout_operation_rollout_input_resource=compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput( + conflict_behavior="conflict_behavior_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}/delete" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_rollout_operation_rollout_input_resource=compute.GlobalVmExtensionPolicyRolloutOperationRolloutInput( + conflict_behavior="conflict_behavior_value" + ), + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "globalVmExtensionPolicy", + "project", + ) + ) + ) + + +def test_get_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicyResource", + "project", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicyResource", + "project", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListGlobalVmExtensionPoliciesRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicyList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set(("project",)) + ) + + +def test_list_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicyList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListGlobalVmExtensionPoliciesRequest(), + project="project_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.GlobalVmExtensionPolicyList( + items=[ + compute.GlobalVmExtensionPolicy(), + compute.GlobalVmExtensionPolicy(), + compute.GlobalVmExtensionPolicy(), + ], + next_page_token="abc", + ), + compute.GlobalVmExtensionPolicyList( + items=[], + next_page_token="def", + ), + compute.GlobalVmExtensionPolicyList( + items=[ + compute.GlobalVmExtensionPolicy(), + ], + next_page_token="ghi", + ), + compute.GlobalVmExtensionPolicyList( + items=[ + compute.GlobalVmExtensionPolicy(), + compute.GlobalVmExtensionPolicy(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.GlobalVmExtensionPolicyList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.GlobalVmExtensionPolicy) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_update_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_rest_required_fields( + request_type=compute.UpdateGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicy", + "globalVmExtensionPolicyResource", + "project", + ) + ) + ) + + +def test_update_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update( + compute.UpdateGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_update_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_unary_rest_required_fields( + request_type=compute.UpdateGlobalVmExtensionPolicyRequest, +): + transport_class = transports.GlobalVmExtensionPoliciesRestTransport + + request_init = {} + request_init["global_vm_extension_policy"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["globalVmExtensionPolicy"] = "global_vm_extension_policy_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "globalVmExtensionPolicy" in jsonified_request + assert ( + jsonified_request["globalVmExtensionPolicy"] + == "global_vm_extension_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_unary_rest_unset_required_fields(): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "globalVmExtensionPolicy", + "globalVmExtensionPolicyResource", + "project", + ) + ) + ) + + +def test_update_unary_rest_flattened(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "global_vm_extension_policy": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/vmExtensionPolicies/{global_vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_unary_rest_flattened_error(transport: str = "rest"): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_unary( + compute.UpdateGlobalVmExtensionPolicyRequest(), + project="project_value", + global_vm_extension_policy="global_vm_extension_policy_value", + global_vm_extension_policy_resource=compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = GlobalVmExtensionPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.GlobalVmExtensionPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = GlobalVmExtensionPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListGlobalVmExtensionPoliciesRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListGlobalVmExtensionPoliciesRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyAggregatedListResponse( + etag="etag_value", + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyAggregatedListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListGlobalVmExtensionPoliciesRequest.pb( + compute.AggregatedListGlobalVmExtensionPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicyAggregatedListResponse.to_json( + compute.VmExtensionPolicyAggregatedListResponse() + ) + req.return_value.content = return_value + + request = compute.AggregatedListGlobalVmExtensionPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicyAggregatedListResponse() + post_with_metadata.return_value = ( + compute.VmExtensionPolicyAggregatedListResponse(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request( + request_type=compute.DeleteGlobalVmExtensionPolicyRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteGlobalVmExtensionPolicyRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request_init[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ] = { + "conflict_behavior": "conflict_behavior_value", + "name": "name_value", + "predefined_rollout_plan": "predefined_rollout_plan_value", + "retry_uuid": "retry_uuid_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.DeleteGlobalVmExtensionPolicyRequest.meta.fields[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ][field] + ), + ): + del request_init[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ][field][i][subfield] + else: + del request_init[ + "global_vm_extension_policy_rollout_operation_rollout_input_resource" + ][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteGlobalVmExtensionPolicyRequest.pb( + compute.DeleteGlobalVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteGlobalVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetGlobalVmExtensionPolicyRequest): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetGlobalVmExtensionPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + id=205, + kind="kind_value", + name="name_value", + priority=898, + scoped_resource_status="scoped_resource_status_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + update_timestamp="update_timestamp_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.GlobalVmExtensionPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.priority == 898 + assert response.scoped_resource_status == "scoped_resource_status_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + assert response.update_timestamp == "update_timestamp_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetGlobalVmExtensionPolicyRequest.pb( + compute.GetGlobalVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.GlobalVmExtensionPolicy.to_json( + compute.GlobalVmExtensionPolicy() + ) + req.return_value.content = return_value + + request = compute.GetGlobalVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.GlobalVmExtensionPolicy() + post_with_metadata.return_value = compute.GlobalVmExtensionPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertGlobalVmExtensionPolicyRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertGlobalVmExtensionPolicyRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request_init["global_vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "name": "name_value", + "priority": 898, + "rollout_operation": { + "rollout_input": { + "conflict_behavior": "conflict_behavior_value", + "name": "name_value", + "predefined_rollout_plan": "predefined_rollout_plan_value", + "retry_uuid": "retry_uuid_value", + }, + "rollout_status": { + "current_rollouts": [ + { + "rollout": "rollout_value", + "rollout_plan": "rollout_plan_value", + "state": "state_value", + } + ], + "previous_rollout": {}, + }, + }, + "scoped_resource_status": "scoped_resource_status_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "update_timestamp": "update_timestamp_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertGlobalVmExtensionPolicyRequest.meta.fields[ + "global_vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "global_vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["global_vm_extension_policy_resource"][field]) + ): + del request_init["global_vm_extension_policy_resource"][field][i][ + subfield + ] + else: + del request_init["global_vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertGlobalVmExtensionPolicyRequest.pb( + compute.InsertGlobalVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertGlobalVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request( + request_type=compute.ListGlobalVmExtensionPoliciesRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListGlobalVmExtensionPoliciesRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.GlobalVmExtensionPolicyList( + etag="etag_value", + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.GlobalVmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListGlobalVmExtensionPoliciesRequest.pb( + compute.ListGlobalVmExtensionPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.GlobalVmExtensionPolicyList.to_json( + compute.GlobalVmExtensionPolicyList() + ) + req.return_value.content = return_value + + request = compute.ListGlobalVmExtensionPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.GlobalVmExtensionPolicyList() + post_with_metadata.return_value = ( + compute.GlobalVmExtensionPolicyList(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_update_rest_bad_request( + request_type=compute.UpdateGlobalVmExtensionPolicyRequest, +): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.update(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.UpdateGlobalVmExtensionPolicyRequest, + dict, + ], +) +def test_update_rest_call_success(request_type): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "global_vm_extension_policy": "sample2"} + request_init["global_vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "name": "name_value", + "priority": 898, + "rollout_operation": { + "rollout_input": { + "conflict_behavior": "conflict_behavior_value", + "name": "name_value", + "predefined_rollout_plan": "predefined_rollout_plan_value", + "retry_uuid": "retry_uuid_value", + }, + "rollout_status": { + "current_rollouts": [ + { + "rollout": "rollout_value", + "rollout_plan": "rollout_plan_value", + "state": "state_value", + } + ], + "previous_rollout": {}, + }, + }, + "scoped_resource_status": "scoped_resource_status_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "update_timestamp": "update_timestamp_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.UpdateGlobalVmExtensionPolicyRequest.meta.fields[ + "global_vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "global_vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["global_vm_extension_policy_resource"][field]) + ): + del request_init["global_vm_extension_policy_resource"][field][i][ + subfield + ] + else: + del request_init["global_vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.update(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_update_rest_interceptors(null_interceptor): + transport = transports.GlobalVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.GlobalVmExtensionPoliciesRestInterceptor(), + ) + client = GlobalVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_update" + ) as post, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "post_update_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.GlobalVmExtensionPoliciesRestInterceptor, "pre_update" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.UpdateGlobalVmExtensionPolicyRequest.pb( + compute.UpdateGlobalVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.UpdateGlobalVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.update( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListGlobalVmExtensionPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteGlobalVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetGlobalVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertGlobalVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListGlobalVmExtensionPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_update_unary_empty_call_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.update), "__call__") as call: + client.update_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.UpdateGlobalVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +def test_global_vm_extension_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_global_vm_extension_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "delete", + "get", + "insert", + "list", + "update", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_global_vm_extension_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.GlobalVmExtensionPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_global_vm_extension_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.global_vm_extension_policies.transports.GlobalVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.GlobalVmExtensionPoliciesTransport() + adc.assert_called_once() + + +def test_global_vm_extension_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + GlobalVmExtensionPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_global_vm_extension_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.GlobalVmExtensionPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_host_no_port(transport_name): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_host_with_port(transport_name): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_global_vm_extension_policies_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = GlobalVmExtensionPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = GlobalVmExtensionPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.update._session + session2 = client2.transport.update._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = GlobalVmExtensionPoliciesClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = GlobalVmExtensionPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = GlobalVmExtensionPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = GlobalVmExtensionPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = GlobalVmExtensionPoliciesClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = GlobalVmExtensionPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = GlobalVmExtensionPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = GlobalVmExtensionPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = GlobalVmExtensionPoliciesClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = GlobalVmExtensionPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = GlobalVmExtensionPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.GlobalVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.GlobalVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = GlobalVmExtensionPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = GlobalVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + GlobalVmExtensionPoliciesClient, + transports.GlobalVmExtensionPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py index 1046e5ba8ce2..a4a1507e6e75 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py @@ -4285,6 +4285,228 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_available_accelerator_topologies_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.get_available_accelerator_topologies + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.get_available_accelerator_topologies + ] = mock_rpc + + request = {} + client.get_available_accelerator_topologies(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_available_accelerator_topologies(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_available_accelerator_topologies_rest_required_fields( + request_type=compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, +): + transport_class = transports.InstanceGroupManagersRestTransport + + request_init = {} + request_init["project"] = "" + request_init["resource_id"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_available_accelerator_topologies._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["resourceId"] = "resource_id_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_available_accelerator_topologies._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resourceId" in jsonified_request + assert jsonified_request["resourceId"] == "resource_id_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_available_accelerator_topologies(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_available_accelerator_topologies_rest_unset_required_fields(): + transport = transports.InstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = ( + transport.get_available_accelerator_topologies._get_unset_required_fields({}) + ) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "resourceId", + "zone", + ) + ) + ) + + +def test_get_available_accelerator_topologies_rest_flattened(): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "resource_id": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + resource_id="resource_id_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + ) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_available_accelerator_topologies(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/instanceGroupManagers/{resource_id}/getAvailableAcceleratorTopologies" + % client.transport._host, + args[1], + ) + + +def test_get_available_accelerator_topologies_rest_flattened_error( + transport: str = "rest", +): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_available_accelerator_topologies( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest(), + project="project_value", + zone="zone_value", + resource_id="resource_id_value", + ) + + def test_insert_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -14238,6 +14460,150 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() +def test_get_available_accelerator_topologies_rest_bad_request( + request_type=compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, +): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "resource_id": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_available_accelerator_topologies(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest, + dict, + ], +) +def test_get_available_accelerator_topologies_rest_call_success(request_type): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "resource_id": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.pb( + return_value + ) + ) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_available_accelerator_topologies(request) + + # Establish that the response is the type that we expect. + assert isinstance( + response, compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse + ) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_available_accelerator_topologies_rest_interceptors(null_interceptor): + transport = transports.InstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.InstanceGroupManagersRestInterceptor(), + ) + client = InstanceGroupManagersClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "post_get_available_accelerator_topologies", + ) as post, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "post_get_available_accelerator_topologies_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.InstanceGroupManagersRestInterceptor, + "pre_get_available_accelerator_topologies", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest.pb( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + ) + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.to_json( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + req.return_value.content = return_value + + request = compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse() + ) + post_with_metadata.return_value = ( + compute.InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse(), + metadata, + ) + + client.get_available_accelerator_topologies( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + def test_insert_rest_bad_request( request_type=compute.InsertInstanceGroupManagerRequest, ): @@ -14286,6 +14652,7 @@ def test_insert_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -15242,6 +15609,7 @@ def test_patch_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -18673,6 +19041,7 @@ def test_update_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -19464,6 +19833,30 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_available_accelerator_topologies_empty_call_rest(): + client = InstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.get_available_accelerator_topologies), "__call__" + ) as call: + client.get_available_accelerator_topologies(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = ( + compute.GetAvailableAcceleratorTopologiesInstanceGroupManagerRequest() + ) + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_insert_unary_empty_call_rest(): @@ -19912,6 +20305,7 @@ def test_instance_group_managers_base_transport(): "delete_instances", "delete_per_instance_configs", "get", + "get_available_accelerator_topologies", "insert", "list", "list_errors", @@ -20093,6 +20487,9 @@ def test_instance_group_managers_client_transport_session_collision(transport_na session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_available_accelerator_topologies._session + session2 = client2.transport.get_available_accelerator_topologies._session + assert session1 != session2 session1 = client1.transport.insert._session session2 = client2.transport.insert._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py index ba93790a8a69..009de34b56cd 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py @@ -26700,6 +26700,9 @@ def test_insert_rest_call_success(request_type): "host": "host_value", "subblock": "subblock_value", }, + "reservation_consumption_info": { + "consumed_reservation": "consumed_reservation_value" + }, "scheduling": { "availability_domain": 2002, "termination_timestamp": "termination_timestamp_value", @@ -33610,6 +33613,9 @@ def test_update_rest_call_success(request_type): "host": "host_value", "subblock": "subblock_value", }, + "reservation_consumption_info": { + "consumed_reservation": "consumed_reservation_value" + }, "scheduling": { "availability_domain": 2002, "termination_timestamp": "termination_timestamp_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py index 9c755988926b..8495e35b4346 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py @@ -4601,12 +4601,20 @@ def test_insert_rest_call_success(request_type): "ipsec_internal_addresses_value2", ], "kind": "kind_value", + "l2_forwarding": { + "appliance_mappings": {}, + "default_appliance_ip_address": "default_appliance_ip_address_value", + "geneve_header": {"vni": 333}, + "network": "network_value", + "tunnel_endpoint_ip_address": "tunnel_endpoint_ip_address_value", + }, "label_fingerprint": "label_fingerprint_value", "labels": {}, "mtu": 342, "name": "name_value", "operational_status": "operational_status_value", "pairing_key": "pairing_key_value", + "params": {"resource_manager_tags": {}}, "partner_asn": 1181, "partner_metadata": { "interconnect_name": "interconnect_name_value", @@ -5046,12 +5054,20 @@ def test_patch_rest_call_success(request_type): "ipsec_internal_addresses_value2", ], "kind": "kind_value", + "l2_forwarding": { + "appliance_mappings": {}, + "default_appliance_ip_address": "default_appliance_ip_address_value", + "geneve_header": {"vni": 333}, + "network": "network_value", + "tunnel_endpoint_ip_address": "tunnel_endpoint_ip_address_value", + }, "label_fingerprint": "label_fingerprint_value", "labels": {}, "mtu": 342, "name": "name_value", "operational_status": "operational_status_value", "pairing_key": "pairing_key_value", + "params": {"resource_manager_tags": {}}, "partner_asn": 1181, "partner_metadata": { "interconnect_name": "interconnect_name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py index d2ea44e812eb..362808dcf41f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py @@ -4571,6 +4571,7 @@ def test_insert_rest_call_success(request_type): "name": "name_value", "noc_contact_email": "noc_contact_email_value", "operational_status": "operational_status_value", + "params": {"resource_manager_tags": {}}, "peer_ip_address": "peer_ip_address_value", "provisioned_link_count": 2375, "remote_location": "remote_location_value", @@ -5021,6 +5022,7 @@ def test_patch_rest_call_success(request_type): "name": "name_value", "noc_contact_email": "noc_contact_email_value", "operational_status": "operational_status_value", + "params": {"resource_manager_tags": {}}, "peer_ip_address": "peer_ip_address_value", "provisioned_link_count": 2375, "remote_location": "remote_location_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py index 7f6de6832f03..33dc6c556b6d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py @@ -8611,6 +8611,7 @@ def test_add_packet_mirroring_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -8633,6 +8634,7 @@ def test_add_packet_mirroring_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -8921,6 +8923,7 @@ def test_add_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -8943,6 +8946,7 @@ def test_add_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -10468,6 +10472,7 @@ def test_insert_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -10490,6 +10495,7 @@ def test_insert_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -10937,6 +10943,7 @@ def test_patch_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -10959,6 +10966,7 @@ def test_patch_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -11257,6 +11265,7 @@ def test_patch_packet_mirroring_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -11279,6 +11288,7 @@ def test_patch_packet_mirroring_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -11569,6 +11579,7 @@ def test_patch_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -11591,6 +11602,7 @@ def test_patch_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py index 22ea01e7f66d..4f9e7371c8bb 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py @@ -1528,6 +1528,434 @@ def test_add_peering_unary_rest_flattened_error(transport: str = "rest"): ) +def test_cancel_request_remove_peering_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.cancel_request_remove_peering + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.cancel_request_remove_peering + ] = mock_rpc + + request = {} + client.cancel_request_remove_peering(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.cancel_request_remove_peering(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_cancel_request_remove_peering_rest_required_fields( + request_type=compute.CancelRequestRemovePeeringNetworkRequest, +): + transport_class = transports.NetworksRestTransport + + request_init = {} + request_init["network"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel_request_remove_peering._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["network"] = "network_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel_request_remove_peering._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "network" in jsonified_request + assert jsonified_request["network"] == "network_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.cancel_request_remove_peering(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_cancel_request_remove_peering_rest_unset_required_fields(): + transport = transports.NetworksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.cancel_request_remove_peering._get_unset_required_fields( + {} + ) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "network", + "networksCancelRequestRemovePeeringRequestResource", + "project", + ) + ) + ) + + +def test_cancel_request_remove_peering_rest_flattened(): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "network": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + network="network_value", + networks_cancel_request_remove_peering_request_resource=compute.NetworksCancelRequestRemovePeeringRequest( + name="name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.cancel_request_remove_peering(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/networks/{network}/cancelRequestRemovePeering" + % client.transport._host, + args[1], + ) + + +def test_cancel_request_remove_peering_rest_flattened_error(transport: str = "rest"): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.cancel_request_remove_peering( + compute.CancelRequestRemovePeeringNetworkRequest(), + project="project_value", + network="network_value", + networks_cancel_request_remove_peering_request_resource=compute.NetworksCancelRequestRemovePeeringRequest( + name="name_value" + ), + ) + + +def test_cancel_request_remove_peering_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.cancel_request_remove_peering + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.cancel_request_remove_peering + ] = mock_rpc + + request = {} + client.cancel_request_remove_peering_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.cancel_request_remove_peering_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_cancel_request_remove_peering_unary_rest_required_fields( + request_type=compute.CancelRequestRemovePeeringNetworkRequest, +): + transport_class = transports.NetworksRestTransport + + request_init = {} + request_init["network"] = "" + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel_request_remove_peering._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["network"] = "network_value" + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel_request_remove_peering._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "network" in jsonified_request + assert jsonified_request["network"] == "network_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.cancel_request_remove_peering_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_cancel_request_remove_peering_unary_rest_unset_required_fields(): + transport = transports.NetworksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.cancel_request_remove_peering._get_unset_required_fields( + {} + ) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "network", + "networksCancelRequestRemovePeeringRequestResource", + "project", + ) + ) + ) + + +def test_cancel_request_remove_peering_unary_rest_flattened(): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "network": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + network="network_value", + networks_cancel_request_remove_peering_request_resource=compute.NetworksCancelRequestRemovePeeringRequest( + name="name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.cancel_request_remove_peering_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/networks/{network}/cancelRequestRemovePeering" + % client.transport._host, + args[1], + ) + + +def test_cancel_request_remove_peering_unary_rest_flattened_error( + transport: str = "rest", +): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.cancel_request_remove_peering_unary( + compute.CancelRequestRemovePeeringNetworkRequest(), + project="project_value", + network="network_value", + networks_cancel_request_remove_peering_request_resource=compute.NetworksCancelRequestRemovePeeringRequest( + name="name_value" + ), + ) + + def test_delete_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -5850,6 +6278,259 @@ def test_add_peering_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() +def test_cancel_request_remove_peering_rest_bad_request( + request_type=compute.CancelRequestRemovePeeringNetworkRequest, +): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "network": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.cancel_request_remove_peering(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.CancelRequestRemovePeeringNetworkRequest, + dict, + ], +) +def test_cancel_request_remove_peering_rest_call_success(request_type): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "network": "sample2"} + request_init["networks_cancel_request_remove_peering_request_resource"] = { + "name": "name_value" + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.CancelRequestRemovePeeringNetworkRequest.meta.fields[ + "networks_cancel_request_remove_peering_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "networks_cancel_request_remove_peering_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "networks_cancel_request_remove_peering_request_resource" + ][field] + ), + ): + del request_init[ + "networks_cancel_request_remove_peering_request_resource" + ][field][i][subfield] + else: + del request_init[ + "networks_cancel_request_remove_peering_request_resource" + ][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.cancel_request_remove_peering(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_cancel_request_remove_peering_rest_interceptors(null_interceptor): + transport = transports.NetworksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None if null_interceptor else transports.NetworksRestInterceptor(), + ) + client = NetworksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.NetworksRestInterceptor, "post_cancel_request_remove_peering" + ) as post, mock.patch.object( + transports.NetworksRestInterceptor, + "post_cancel_request_remove_peering_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.NetworksRestInterceptor, "pre_cancel_request_remove_peering" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.CancelRequestRemovePeeringNetworkRequest.pb( + compute.CancelRequestRemovePeeringNetworkRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.CancelRequestRemovePeeringNetworkRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.cancel_request_remove_peering( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + def test_delete_rest_bad_request(request_type=compute.DeleteNetworkRequest): client = NetworksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -8311,6 +8992,28 @@ def test_add_peering_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_cancel_request_remove_peering_unary_empty_call_rest(): + client = NetworksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.cancel_request_remove_peering), "__call__" + ) as call: + client.cancel_request_remove_peering_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.CancelRequestRemovePeeringNetworkRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_delete_unary_empty_call_rest(): @@ -8584,6 +9287,7 @@ def test_networks_base_transport(): # raise NotImplementedError. methods = ( "add_peering", + "cancel_request_remove_peering", "delete", "get", "get_effective_firewalls", @@ -8736,6 +9440,9 @@ def test_networks_client_transport_session_collision(transport_name): session1 = client1.transport.add_peering._session session2 = client2.transport.add_peering._session assert session1 != session2 + session1 = client1.transport.cancel_request_remove_peering._session + session2 = client2.transport.cancel_request_remove_peering._session + assert session1 != session2 session1 = client1.transport.delete._session session2 = client2.transport.delete._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py index 03369f97d9ec..11f65ea273ff 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py @@ -6420,9 +6420,10 @@ def test_add_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -7556,7 +7557,11 @@ def test_insert_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -7645,9 +7650,10 @@ def test_insert_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -8597,7 +8603,11 @@ def test_patch_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -8686,9 +8696,10 @@ def test_patch_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -9049,9 +9060,10 @@ def test_patch_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py index 47a76fc71f08..9fe4d046360d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py @@ -4141,6 +4141,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", kind="kind_value", name="name_value", pdp_scope="pdp_scope_value", @@ -4170,6 +4171,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.kind == "kind_value" assert response.name == "name_value" assert response.pdp_scope == "pdp_scope_value" @@ -4289,6 +4291,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "kind": "kind_value", "name": "name_value", "pdp_scope": "pdp_scope_value", @@ -4692,6 +4695,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "kind": "kind_value", "name": "name_value", "pdp_scope": "pdp_scope_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py index d94a2686d0b4..a8a00a1e0f48 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py @@ -4684,6 +4684,7 @@ def test_get_rest_call_success(request_type): fingerprint="fingerprint_value", id=205, ip_cidr_range="ip_cidr_range_value", + ipv6_access_type="ipv6_access_type_value", is_live_migration=True, kind="kind_value", mode="mode_value", @@ -4716,6 +4717,7 @@ def test_get_rest_call_success(request_type): assert response.fingerprint == "fingerprint_value" assert response.id == 205 assert response.ip_cidr_range == "ip_cidr_range_value" + assert response.ipv6_access_type == "ipv6_access_type_value" assert response.is_live_migration is True assert response.kind == "kind_value" assert response.mode == "mode_value" @@ -4838,6 +4840,7 @@ def test_insert_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -4850,6 +4853,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", @@ -5255,6 +5259,7 @@ def test_patch_rest_call_success(request_type): "fingerprint": "fingerprint_value", "id": 205, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_live_migration": True, "kind": "kind_value", "mode": "mode_value", @@ -5267,6 +5272,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "enable_enhanced_ipv4_allocation": True, "ip_cidr_range": "ip_cidr_range_value", + "ipv6_access_type": "ipv6_access_type_value", "is_address": True, "mode": "mode_value", "name": "name_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py new file mode 100644 index 000000000000..32e39d0c64c8 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_buckets.py @@ -0,0 +1,6264 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_backend_buckets import ( + RegionBackendBucketsClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RegionBackendBucketsClient._get_default_mtls_endpoint(None) is None + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionBackendBucketsClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + RegionBackendBucketsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionBackendBucketsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionBackendBucketsClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is True + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionBackendBucketsClient._use_client_cert_effective() is True + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert RegionBackendBucketsClient._use_client_cert_effective() is True + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert RegionBackendBucketsClient._use_client_cert_effective() is True + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + RegionBackendBucketsClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert RegionBackendBucketsClient._use_client_cert_effective() is False + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert RegionBackendBucketsClient._get_client_cert_source(None, False) is None + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionBackendBucketsClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RegionBackendBucketsClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + default_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RegionBackendBucketsClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionBackendBucketsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint(None, None, mock_universe, "never") + == mock_endpoint + ) + assert ( + RegionBackendBucketsClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionBackendBucketsClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionBackendBucketsClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionBackendBucketsClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + RegionBackendBucketsClient._get_universe_domain(None, None) + == RegionBackendBucketsClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionBackendBucketsClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionBackendBucketsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionBackendBucketsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionBackendBucketsClient, "rest"), + ], +) +def test_region_backend_buckets_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionBackendBucketsRestTransport, "rest"), + ], +) +def test_region_backend_buckets_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionBackendBucketsClient, "rest"), + ], +) +def test_region_backend_buckets_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_backend_buckets_client_get_transport_class(): + transport = RegionBackendBucketsClient.get_transport_class() + available_transports = [ + transports.RegionBackendBucketsRestTransport, + ] + assert transport in available_transports + + transport = RegionBackendBucketsClient.get_transport_class("rest") + assert transport == transports.RegionBackendBucketsRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(RegionBackendBucketsClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(RegionBackendBucketsClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + "true", + ), + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_backend_buckets_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionBackendBucketsClient]) +@mock.patch.object( + RegionBackendBucketsClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [RegionBackendBucketsClient]) +@mock.patch.object( + RegionBackendBucketsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionBackendBucketsClient), +) +def test_region_backend_buckets_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionBackendBucketsClient._DEFAULT_UNIVERSE + default_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RegionBackendBucketsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + ), + ], +) +def test_region_backend_buckets_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionBackendBucketsClient, + transports.RegionBackendBucketsRestTransport, + "rest", + None, + ), + ], +) +def test_region_backend_buckets_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "force_delete", + "request_id", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "forceDelete", + "requestId", + ) + ) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "force_delete", + "request_id", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "forceDelete", + "requestId", + ) + ) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetRegionBackendBucketRequest): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "backendBucket", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + ) + + +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "project", + "region", + "resource", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionBackendBucketsRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionBackendBucketsRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + compute.BackendBucket(), + ], + next_page_token="abc", + ), + compute.BackendBucketList( + items=[], + next_page_token="def", + ), + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + ], + next_page_token="ghi", + ), + compute.BackendBucketList( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.BackendBucketList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.BackendBucket) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_list_usable_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list_usable in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list_usable] = mock_rpc + + request = {} + client.list_usable(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list_usable(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_usable_rest_required_fields( + request_type=compute.ListUsableRegionBackendBucketsRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_usable._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_usable._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list_usable(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_usable_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list_usable._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_usable_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list_usable(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/listUsable" + % client.transport._host, + args[1], + ) + + +def test_list_usable_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_usable( + compute.ListUsableRegionBackendBucketsRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_usable_rest_pager(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + compute.BackendBucket(), + ], + next_page_token="abc", + ), + compute.BackendBucketListUsable( + items=[], + next_page_token="def", + ), + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + ], + next_page_token="ghi", + ), + compute.BackendBucketListUsable( + items=[ + compute.BackendBucket(), + compute.BackendBucket(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.BackendBucketListUsable.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list_usable(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.BackendBucket) for i in results) + + pages = list(client.list_usable(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucket", + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["backend_bucket"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["backendBucket"] = "backend_bucket_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "backendBucket" in jsonified_request + assert jsonified_request["backendBucket"] == "backend_bucket_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "backendBucket", + "backendBucketResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{backend_bucket}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionBackendBucketRequest(), + project="project_value", + region="region_value", + backend_bucket="backend_bucket_value", + backend_bucket_resource=compute.BackendBucket( + bucket_name="bucket_name_value" + ), + ) + + +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc + + request = {} + client.set_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.set_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "regionSetPolicyRequestResource", + "resource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + region_set_policy_request_resource=compute.RegionSetPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + region_set_policy_request_resource=compute.RegionSetPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionBackendBucketRequest, +): + transport_class = transports.RegionBackendBucketsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionBackendBucketRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionBackendBucketsClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionBackendBucketsClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionBackendBucketsRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionBackendBucketsClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_delete_rest_bad_request(request_type=compute.DeleteRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionBackendBucketRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionBackendBucketRequest.pb( + compute.DeleteRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionBackendBucketRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucket( + bucket_name="bucket_name_value", + compression_mode="compression_mode_value", + creation_timestamp="creation_timestamp_value", + custom_response_headers=["custom_response_headers_value"], + description="description_value", + edge_security_policy="edge_security_policy_value", + enable_cdn=True, + id=205, + kind="kind_value", + load_balancing_scheme="load_balancing_scheme_value", + name="name_value", + region="region_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucket.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.BackendBucket) + assert response.bucket_name == "bucket_name_value" + assert response.compression_mode == "compression_mode_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.custom_response_headers == ["custom_response_headers_value"] + assert response.description == "description_value" + assert response.edge_security_policy == "edge_security_policy_value" + assert response.enable_cdn is True + assert response.id == 205 + assert response.kind == "kind_value" + assert response.load_balancing_scheme == "load_balancing_scheme_value" + assert response.name == "name_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionBackendBucketRequest.pb( + compute.GetRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucket.to_json(compute.BackendBucket()) + req.return_value.content = return_value + + request = compute.GetRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucket() + post_with_metadata.return_value = compute.BackendBucket(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyRegionBackendBucketRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_get_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyRegionBackendBucketRequest.pb( + compute.GetIamPolicyRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request(request_type=compute.InsertRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionBackendBucketRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["backend_bucket_resource"] = { + "bucket_name": "bucket_name_value", + "cdn_policy": { + "bypass_cache_on_request_headers": [{"header_name": "header_name_value"}], + "cache_key_policy": { + "include_http_headers": [ + "include_http_headers_value1", + "include_http_headers_value2", + ], + "query_string_whitelist": [ + "query_string_whitelist_value1", + "query_string_whitelist_value2", + ], + }, + "cache_mode": "cache_mode_value", + "client_ttl": 1074, + "default_ttl": 1176, + "max_ttl": 761, + "negative_caching": True, + "negative_caching_policy": [{"code": 411, "ttl": 340}], + "request_coalescing": True, + "serve_while_stale": 1813, + "signed_url_cache_max_age_sec": 2890, + "signed_url_key_names": [ + "signed_url_key_names_value1", + "signed_url_key_names_value2", + ], + }, + "compression_mode": "compression_mode_value", + "creation_timestamp": "creation_timestamp_value", + "custom_response_headers": [ + "custom_response_headers_value1", + "custom_response_headers_value2", + ], + "description": "description_value", + "edge_security_policy": "edge_security_policy_value", + "enable_cdn": True, + "id": 205, + "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", + "name": "name_value", + "params": {"resource_manager_tags": {}}, + "region": "region_value", + "self_link": "self_link_value", + "used_by": [{"reference": "reference_value"}], + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionBackendBucketRequest.meta.fields[ + "backend_bucket_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "backend_bucket_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["backend_bucket_resource"][field])): + del request_init["backend_bucket_resource"][field][i][subfield] + else: + del request_init["backend_bucket_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionBackendBucketRequest.pb( + compute.InsertRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListRegionBackendBucketsRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionBackendBucketsRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionBackendBucketsRequest.pb( + compute.ListRegionBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketList.to_json(compute.BackendBucketList()) + req.return_value.content = return_value + + request = compute.ListRegionBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketList() + post_with_metadata.return_value = compute.BackendBucketList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_usable_rest_bad_request( + request_type=compute.ListUsableRegionBackendBucketsRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list_usable(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListUsableRegionBackendBucketsRequest, + dict, + ], +) +def test_list_usable_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.BackendBucketListUsable( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.BackendBucketListUsable.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list_usable(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListUsablePager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_usable_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_usable" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_list_usable_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_list_usable" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListUsableRegionBackendBucketsRequest.pb( + compute.ListUsableRegionBackendBucketsRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.BackendBucketListUsable.to_json( + compute.BackendBucketListUsable() + ) + req.return_value.content = return_value + + request = compute.ListUsableRegionBackendBucketsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.BackendBucketListUsable() + post_with_metadata.return_value = compute.BackendBucketListUsable(), metadata + + client.list_usable( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request(request_type=compute.PatchRegionBackendBucketRequest): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionBackendBucketRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "backend_bucket": "sample3", + } + request_init["backend_bucket_resource"] = { + "bucket_name": "bucket_name_value", + "cdn_policy": { + "bypass_cache_on_request_headers": [{"header_name": "header_name_value"}], + "cache_key_policy": { + "include_http_headers": [ + "include_http_headers_value1", + "include_http_headers_value2", + ], + "query_string_whitelist": [ + "query_string_whitelist_value1", + "query_string_whitelist_value2", + ], + }, + "cache_mode": "cache_mode_value", + "client_ttl": 1074, + "default_ttl": 1176, + "max_ttl": 761, + "negative_caching": True, + "negative_caching_policy": [{"code": 411, "ttl": 340}], + "request_coalescing": True, + "serve_while_stale": 1813, + "signed_url_cache_max_age_sec": 2890, + "signed_url_key_names": [ + "signed_url_key_names_value1", + "signed_url_key_names_value2", + ], + }, + "compression_mode": "compression_mode_value", + "creation_timestamp": "creation_timestamp_value", + "custom_response_headers": [ + "custom_response_headers_value1", + "custom_response_headers_value2", + ], + "description": "description_value", + "edge_security_policy": "edge_security_policy_value", + "enable_cdn": True, + "id": 205, + "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", + "name": "name_value", + "params": {"resource_manager_tags": {}}, + "region": "region_value", + "self_link": "self_link_value", + "used_by": [{"reference": "reference_value"}], + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionBackendBucketRequest.meta.fields[ + "backend_bucket_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "backend_bucket_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["backend_bucket_resource"][field])): + del request_init["backend_bucket_resource"][field][i][subfield] + else: + del request_init["backend_bucket_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_patch_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionBackendBucketRequest.pb( + compute.PatchRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.set_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.SetIamPolicyRegionBackendBucketRequest, + dict, + ], +) +def test_set_iam_policy_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["region_set_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyRegionBackendBucketRequest.meta.fields[ + "region_set_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "region_set_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["region_set_policy_request_resource"][field]) + ): + del request_init["region_set_policy_request_resource"][field][i][ + subfield + ] + else: + del request_init["region_set_policy_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.set_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_set_iam_policy_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_set_iam_policy" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_set_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_set_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.SetIamPolicyRegionBackendBucketRequest.pb( + compute.SetIamPolicyRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.SetIamPolicyRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.set_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionBackendBucketRequest, +): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionBackendBucketRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.TestIamPermissionsRegionBackendBucketRequest.meta.fields[ + "test_permissions_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionBackendBucketsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionBackendBucketsRestInterceptor(), + ) + client = RegionBackendBucketsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "post_test_iam_permissions" + ) as post, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionBackendBucketsRestInterceptor, "pre_test_iam_permissions" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionBackendBucketRequest.pb( + compute.TestIamPermissionsRegionBackendBucketRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionBackendBucketRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionBackendBucketsRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_usable_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list_usable), "__call__") as call: + client.list_usable(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListUsableRegionBackendBucketsRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyRegionBackendBucketRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionBackendBucketRequest() + + assert args[0] == request_msg + + +def test_region_backend_buckets_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionBackendBucketsTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_backend_buckets_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionBackendBucketsTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "delete", + "get", + "get_iam_policy", + "insert", + "list", + "list_usable", + "patch", + "set_iam_policy", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_backend_buckets_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionBackendBucketsTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_backend_buckets_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_backend_buckets.transports.RegionBackendBucketsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionBackendBucketsTransport() + adc.assert_called_once() + + +def test_region_backend_buckets_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionBackendBucketsClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_backend_buckets_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionBackendBucketsRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_host_no_port(transport_name): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_host_with_port(transport_name): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_backend_buckets_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionBackendBucketsClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionBackendBucketsClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.list_usable._session + session2 = client2.transport.list_usable._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionBackendBucketsClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionBackendBucketsClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionBackendBucketsClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionBackendBucketsClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionBackendBucketsClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionBackendBucketsClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionBackendBucketsClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionBackendBucketsClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionBackendBucketsClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionBackendBucketsClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionBackendBucketsClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionBackendBucketsTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionBackendBucketsTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionBackendBucketsClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionBackendBucketsClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RegionBackendBucketsClient, transports.RegionBackendBucketsRestTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py index 65a8c35c5e5e..7c887a448cbb 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py @@ -5946,6 +5946,7 @@ def test_insert_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -6659,6 +6660,7 @@ def test_patch_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { @@ -7819,6 +7821,7 @@ def test_update_rest_call_success(request_type): "timeout_sec": 1185, "tls_settings": { "authentication_config": "authentication_config_value", + "identity": "identity_value", "sni": "sni_value", "subject_alt_names": [ { diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py new file mode 100644 index 000000000000..3b2cecb98cb4 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_composite_health_checks.py @@ -0,0 +1,5422 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_composite_health_checks import ( + RegionCompositeHealthChecksClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RegionCompositeHealthChecksClient._get_default_mtls_endpoint(None) is None + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + RegionCompositeHealthChecksClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionCompositeHealthChecksClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionCompositeHealthChecksClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is True + ) + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is True + ) + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is True + ) + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is True + ) + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + RegionCompositeHealthChecksClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() is False + ) + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert ( + RegionCompositeHealthChecksClient._use_client_cert_effective() + is False + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source(None, False) is None + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RegionCompositeHealthChecksClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionCompositeHealthChecksClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + RegionCompositeHealthChecksClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionCompositeHealthChecksClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionCompositeHealthChecksClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionCompositeHealthChecksClient._get_universe_domain( + None, universe_domain_env + ) + == universe_domain_env + ) + assert ( + RegionCompositeHealthChecksClient._get_universe_domain(None, None) + == RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionCompositeHealthChecksClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionCompositeHealthChecksClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionCompositeHealthChecksClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionCompositeHealthChecksClient, "rest"), + ], +) +def test_region_composite_health_checks_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionCompositeHealthChecksRestTransport, "rest"), + ], +) +def test_region_composite_health_checks_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionCompositeHealthChecksClient, "rest"), + ], +) +def test_region_composite_health_checks_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_composite_health_checks_client_get_transport_class(): + transport = RegionCompositeHealthChecksClient.get_transport_class() + available_transports = [ + transports.RegionCompositeHealthChecksRestTransport, + ] + assert transport in available_transports + + transport = RegionCompositeHealthChecksClient.get_transport_class("rest") + assert transport == transports.RegionCompositeHealthChecksRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + RegionCompositeHealthChecksClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + RegionCompositeHealthChecksClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + "true", + ), + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_composite_health_checks_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionCompositeHealthChecksClient]) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [RegionCompositeHealthChecksClient]) +@mock.patch.object( + RegionCompositeHealthChecksClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionCompositeHealthChecksClient), +) +def test_region_composite_health_checks_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionCompositeHealthChecksClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = RegionCompositeHealthChecksClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + ), + ], +) +def test_region_composite_health_checks_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + "rest", + None, + ), + ], +) +def test_region_composite_health_checks_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListRegionCompositeHealthChecksRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListRegionCompositeHealthChecksRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.CompositeHealthCheckAggregatedList( + items={ + "a": compute.CompositeHealthChecksScopedList(), + "b": compute.CompositeHealthChecksScopedList(), + "c": compute.CompositeHealthChecksScopedList(), + }, + next_page_token="abc", + ), + compute.CompositeHealthCheckAggregatedList( + items={}, + next_page_token="def", + ), + compute.CompositeHealthCheckAggregatedList( + items={ + "g": compute.CompositeHealthChecksScopedList(), + }, + next_page_token="ghi", + ), + compute.CompositeHealthCheckAggregatedList( + items={ + "h": compute.CompositeHealthChecksScopedList(), + "i": compute.CompositeHealthChecksScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.CompositeHealthCheckAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.CompositeHealthChecksScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.CompositeHealthChecksScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.CompositeHealthChecksScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "compositeHealthCheck", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionCompositeHealthChecksRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionCompositeHealthChecksRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + ], + next_page_token="abc", + ), + compute.CompositeHealthCheckList( + items=[], + next_page_token="def", + ), + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + ], + next_page_token="ghi", + ), + compute.CompositeHealthCheckList( + items=[ + compute.CompositeHealthCheck(), + compute.CompositeHealthCheck(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.CompositeHealthCheckList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.CompositeHealthCheck) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["composite_health_check"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["compositeHealthCheck"] = "composite_health_check_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "compositeHealthCheck" in jsonified_request + assert jsonified_request["compositeHealthCheck"] == "composite_health_check_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "compositeHealthCheck", + "compositeHealthCheckResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{composite_health_check}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + composite_health_check="composite_health_check_value", + composite_health_check_resource=compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionCompositeHealthCheckRequest, +): + transport_class = transports.RegionCompositeHealthChecksRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionCompositeHealthChecksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionCompositeHealthChecksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionCompositeHealthChecksClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListRegionCompositeHealthChecksRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListRegionCompositeHealthChecksRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_aggregated_list" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListRegionCompositeHealthChecksRequest.pb( + compute.AggregatedListRegionCompositeHealthChecksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheckAggregatedList.to_json( + compute.CompositeHealthCheckAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListRegionCompositeHealthChecksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheckAggregatedList() + post_with_metadata.return_value = ( + compute.CompositeHealthCheckAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request( + request_type=compute.DeleteRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_delete_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionCompositeHealthCheckRequest.pb( + compute.DeleteRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request( + request_type=compute.GetRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheck( + creation_timestamp="creation_timestamp_value", + description="description_value", + fingerprint="fingerprint_value", + health_destination="health_destination_value", + health_sources=["health_sources_value"], + id=205, + kind="kind_value", + name="name_value", + region="region_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheck.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.CompositeHealthCheck) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.fingerprint == "fingerprint_value" + assert response.health_destination == "health_destination_value" + assert response.health_sources == ["health_sources_value"] + assert response.id == 205 + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionCompositeHealthCheckRequest.pb( + compute.GetRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheck.to_json( + compute.CompositeHealthCheck() + ) + req.return_value.content = return_value + + request = compute.GetRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheck() + post_with_metadata.return_value = compute.CompositeHealthCheck(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["composite_health_check_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "health_destination": "health_destination_value", + "health_sources": ["health_sources_value1", "health_sources_value2"], + "id": 205, + "kind": "kind_value", + "name": "name_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionCompositeHealthCheckRequest.meta.fields[ + "composite_health_check_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "composite_health_check_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["composite_health_check_resource"][field]) + ): + del request_init["composite_health_check_resource"][field][i][ + subfield + ] + else: + del request_init["composite_health_check_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_insert_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionCompositeHealthCheckRequest.pb( + compute.InsertRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request( + request_type=compute.ListRegionCompositeHealthChecksRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionCompositeHealthChecksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.CompositeHealthCheckList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.CompositeHealthCheckList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionCompositeHealthChecksRequest.pb( + compute.ListRegionCompositeHealthChecksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.CompositeHealthCheckList.to_json( + compute.CompositeHealthCheckList() + ) + req.return_value.content = return_value + + request = compute.ListRegionCompositeHealthChecksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.CompositeHealthCheckList() + post_with_metadata.return_value = compute.CompositeHealthCheckList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request( + request_type=compute.PatchRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "composite_health_check": "sample3", + } + request_init["composite_health_check_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "health_destination": "health_destination_value", + "health_sources": ["health_sources_value1", "health_sources_value2"], + "id": 205, + "kind": "kind_value", + "name": "name_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionCompositeHealthCheckRequest.meta.fields[ + "composite_health_check_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "composite_health_check_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["composite_health_check_resource"][field]) + ): + del request_init["composite_health_check_resource"][field][i][ + subfield + ] + else: + del request_init["composite_health_check_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_patch_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionCompositeHealthCheckRequest.pb( + compute.PatchRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionCompositeHealthCheckRequest, +): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionCompositeHealthCheckRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = ( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest.meta.fields[ + "test_permissions_request_resource" + ] + ) + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionCompositeHealthChecksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionCompositeHealthChecksRestInterceptor(), + ) + client = RegionCompositeHealthChecksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_test_iam_permissions", + ) as post, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionCompositeHealthChecksRestInterceptor, + "pre_test_iam_permissions", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionCompositeHealthCheckRequest.pb( + compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListRegionCompositeHealthChecksRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionCompositeHealthChecksRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionCompositeHealthCheckRequest() + + assert args[0] == request_msg + + +def test_region_composite_health_checks_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionCompositeHealthChecksTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_composite_health_checks_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionCompositeHealthChecksTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "delete", + "get", + "insert", + "list", + "patch", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_composite_health_checks_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionCompositeHealthChecksTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_composite_health_checks_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_composite_health_checks.transports.RegionCompositeHealthChecksTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionCompositeHealthChecksTransport() + adc.assert_called_once() + + +def test_region_composite_health_checks_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionCompositeHealthChecksClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_composite_health_checks_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionCompositeHealthChecksRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_host_no_port(transport_name): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_host_with_port(transport_name): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_composite_health_checks_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionCompositeHealthChecksClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionCompositeHealthChecksClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionCompositeHealthChecksClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionCompositeHealthChecksClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionCompositeHealthChecksClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionCompositeHealthChecksClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionCompositeHealthChecksClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionCompositeHealthChecksClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionCompositeHealthChecksClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionCompositeHealthChecksClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionCompositeHealthChecksClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionCompositeHealthChecksClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionCompositeHealthChecksClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionCompositeHealthChecksTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionCompositeHealthChecksTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionCompositeHealthChecksClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionCompositeHealthChecksClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + RegionCompositeHealthChecksClient, + transports.RegionCompositeHealthChecksRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py new file mode 100644 index 000000000000..87990b451dfd --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_aggregation_policies.py @@ -0,0 +1,5483 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.region_health_aggregation_policies import ( + RegionHealthAggregationPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(None) is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + api_mtls_endpoint + ) + == api_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + sandbox_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint( + sandbox_mtls_endpoint + ) + == sandbox_mtls_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + RegionHealthAggregationPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert ( + RegionHealthAggregationPoliciesClient._read_environment_variables() + == ( + False, + "auto", + None, + ) + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionHealthAggregationPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RegionHealthAggregationPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is True + ) + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is True + ) + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is True + ) + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is True + ) + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert ( + RegionHealthAggregationPoliciesClient._use_client_cert_effective() + is False + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source(None, False) + is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + None, True + ) + is mock_default_cert_source + ) + assert ( + RegionHealthAggregationPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + ) + + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RegionHealthAggregationPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RegionHealthAggregationPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain( + None, universe_domain_env + ) + == universe_domain_env + ) + assert ( + RegionHealthAggregationPoliciesClient._get_universe_domain(None, None) + == RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RegionHealthAggregationPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RegionHealthAggregationPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RegionHealthAggregationPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionHealthAggregationPoliciesClient, "rest"), + ], +) +def test_region_health_aggregation_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RegionHealthAggregationPoliciesRestTransport, "rest"), + ], +) +def test_region_health_aggregation_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RegionHealthAggregationPoliciesClient, "rest"), + ], +) +def test_region_health_aggregation_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_region_health_aggregation_policies_client_get_transport_class(): + transport = RegionHealthAggregationPoliciesClient.get_transport_class() + available_transports = [ + transports.RegionHealthAggregationPoliciesRestTransport, + ] + assert transport in available_transports + + transport = RegionHealthAggregationPoliciesClient.get_transport_class("rest") + assert transport == transports.RegionHealthAggregationPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object( + RegionHealthAggregationPoliciesClient, "get_transport_class" + ) as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object( + RegionHealthAggregationPoliciesClient, "get_transport_class" + ) as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + "true", + ), + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_region_health_aggregation_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RegionHealthAggregationPoliciesClient]) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [RegionHealthAggregationPoliciesClient]) +@mock.patch.object( + RegionHealthAggregationPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RegionHealthAggregationPoliciesClient), +) +def test_region_health_aggregation_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RegionHealthAggregationPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + ) + mock_universe = "bar.com" + mock_endpoint = ( + RegionHealthAggregationPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + ), + ], +) +def test_region_health_aggregation_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_region_health_aggregation_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_aggregated_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.aggregated_list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.aggregated_list] = mock_rpc + + request = {} + client.aggregated_list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.aggregated_list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_aggregated_list_rest_required_fields( + request_type=compute.AggregatedListRegionHealthAggregationPoliciesRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).aggregated_list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "include_all_scopes", + "max_results", + "order_by", + "page_token", + "return_partial_success", + "service_project_number", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb( + return_value + ) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.aggregated_list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_aggregated_list_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.aggregated_list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "includeAllScopes", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + "serviceProjectNumber", + ) + ) + & set(("project",)) + ) + + +def test_aggregated_list_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.aggregated_list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/aggregated/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_aggregated_list_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.aggregated_list( + compute.AggregatedListRegionHealthAggregationPoliciesRequest(), + project="project_value", + ) + + +def test_aggregated_list_rest_pager(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.HealthAggregationPolicyAggregatedList( + items={ + "a": compute.HealthAggregationPoliciesScopedList(), + "b": compute.HealthAggregationPoliciesScopedList(), + "c": compute.HealthAggregationPoliciesScopedList(), + }, + next_page_token="abc", + ), + compute.HealthAggregationPolicyAggregatedList( + items={}, + next_page_token="def", + ), + compute.HealthAggregationPolicyAggregatedList( + items={ + "g": compute.HealthAggregationPoliciesScopedList(), + }, + next_page_token="ghi", + ), + compute.HealthAggregationPolicyAggregatedList( + items={ + "h": compute.HealthAggregationPoliciesScopedList(), + "i": compute.HealthAggregationPoliciesScopedList(), + }, + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.HealthAggregationPolicyAggregatedList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.aggregated_list(request=sample_request) + + assert isinstance(pager.get("a"), compute.HealthAggregationPoliciesScopedList) + assert pager.get("h") is None + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, tuple) for i in results) + for result in results: + assert isinstance(result, tuple) + assert tuple(type(t) for t in result) == ( + str, + compute.HealthAggregationPoliciesScopedList, + ) + + assert pager.get("a") is None + assert isinstance(pager.get("h"), compute.HealthAggregationPoliciesScopedList) + + pages = list(client.aggregated_list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields( + request_type=compute.GetRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "healthAggregationPolicy", + "project", + "region", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListRegionHealthAggregationPoliciesRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "region", + ) + ) + ) + + +def test_list_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "region": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRegionHealthAggregationPoliciesRequest(), + project="project_value", + region="region_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + ], + next_page_token="abc", + ), + compute.HealthAggregationPolicyList( + items=[], + next_page_token="def", + ), + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + ], + next_page_token="ghi", + ), + compute.HealthAggregationPolicyList( + items=[ + compute.HealthAggregationPolicy(), + compute.HealthAggregationPolicy(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.HealthAggregationPolicyList.to_json(x) for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "region": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.HealthAggregationPolicy) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_rest_required_fields( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_patch_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_patch_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch( + compute.PatchRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_patch_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.patch] = mock_rpc + + request = {} + client.patch_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.patch_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["health_aggregation_policy"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["healthAggregationPolicy"] = "health_aggregation_policy_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).patch._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "healthAggregationPolicy" in jsonified_request + assert ( + jsonified_request["healthAggregationPolicy"] + == "health_aggregation_policy_value" + ) + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.patch_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_patch_unary_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.patch._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "healthAggregationPolicy", + "healthAggregationPolicyResource", + "project", + "region", + ) + ) + ) + + +def test_patch_unary_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.patch_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{health_aggregation_policy}" + % client.transport._host, + args[1], + ) + + +def test_patch_unary_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.patch_unary( + compute.PatchRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + health_aggregation_policy="health_aggregation_policy_value", + health_aggregation_policy_resource=compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, +): + transport_class = transports.RegionHealthAggregationPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["region"] = "" + request_init["resource"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "region", + "resource", + "testPermissionsRequestResource", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "resource": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest(), + project="project_value", + region="region_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionHealthAggregationPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionHealthAggregationPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionHealthAggregationPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_aggregated_list_rest_bad_request( + request_type=compute.AggregatedListRegionHealthAggregationPoliciesRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.aggregated_list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AggregatedListRegionHealthAggregationPoliciesRequest, + dict, + ], +) +def test_aggregated_list_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyAggregatedList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyAggregatedList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.aggregated_list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.AggregatedListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_aggregated_list_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_aggregated_list", + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_aggregated_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_aggregated_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AggregatedListRegionHealthAggregationPoliciesRequest.pb( + compute.AggregatedListRegionHealthAggregationPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicyAggregatedList.to_json( + compute.HealthAggregationPolicyAggregatedList() + ) + req.return_value.content = return_value + + request = compute.AggregatedListRegionHealthAggregationPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicyAggregatedList() + post_with_metadata.return_value = ( + compute.HealthAggregationPolicyAggregatedList(), + metadata, + ) + + client.aggregated_list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request( + request_type=compute.DeleteRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_delete_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRegionHealthAggregationPolicyRequest.pb( + compute.DeleteRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request( + request_type=compute.GetRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + fingerprint="fingerprint_value", + healthy_percent_threshold=2667, + id=205, + kind="kind_value", + min_healthy_threshold=2238, + name="name_value", + policy_type="policy_type_value", + region="region_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.HealthAggregationPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.fingerprint == "fingerprint_value" + assert response.healthy_percent_threshold == 2667 + assert response.id == 205 + assert response.kind == "kind_value" + assert response.min_healthy_threshold == 2238 + assert response.name == "name_value" + assert response.policy_type == "policy_type_value" + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_get_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRegionHealthAggregationPolicyRequest.pb( + compute.GetRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicy.to_json( + compute.HealthAggregationPolicy() + ) + req.return_value.content = return_value + + request = compute.GetRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicy() + post_with_metadata.return_value = compute.HealthAggregationPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request_init["health_aggregation_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "healthy_percent_threshold": 2667, + "id": 205, + "kind": "kind_value", + "min_healthy_threshold": 2238, + "name": "name_value", + "policy_type": "policy_type_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRegionHealthAggregationPolicyRequest.meta.fields[ + "health_aggregation_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "health_aggregation_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["health_aggregation_policy_resource"][field]) + ): + del request_init["health_aggregation_policy_resource"][field][i][ + subfield + ] + else: + del request_init["health_aggregation_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_insert_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRegionHealthAggregationPolicyRequest.pb( + compute.InsertRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request( + request_type=compute.ListRegionHealthAggregationPoliciesRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRegionHealthAggregationPoliciesRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.HealthAggregationPolicyList( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.HealthAggregationPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_list_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRegionHealthAggregationPoliciesRequest.pb( + compute.ListRegionHealthAggregationPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.HealthAggregationPolicyList.to_json( + compute.HealthAggregationPolicyList() + ) + req.return_value.content = return_value + + request = compute.ListRegionHealthAggregationPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.HealthAggregationPolicyList() + post_with_metadata.return_value = ( + compute.HealthAggregationPolicyList(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_patch_rest_bad_request( + request_type=compute.PatchRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.patch(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.PatchRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_patch_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "health_aggregation_policy": "sample3", + } + request_init["health_aggregation_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "fingerprint": "fingerprint_value", + "healthy_percent_threshold": 2667, + "id": 205, + "kind": "kind_value", + "min_healthy_threshold": 2238, + "name": "name_value", + "policy_type": "policy_type_value", + "region": "region_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PatchRegionHealthAggregationPolicyRequest.meta.fields[ + "health_aggregation_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "health_aggregation_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["health_aggregation_policy_resource"][field]) + ): + del request_init["health_aggregation_policy_resource"][field][i][ + subfield + ] + else: + del request_init["health_aggregation_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.patch(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_patch_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "post_patch" + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_patch_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, "pre_patch" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.PatchRegionHealthAggregationPolicyRequest.pb( + compute.PatchRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.PatchRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.patch( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, +): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.test_iam_permissions(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest, + dict, + ], +) +def test_test_iam_permissions_rest_call_success(request_type): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "region": "sample2", "resource": "sample3"} + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = ( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.meta.fields[ + "test_permissions_request_resource" + ] + ) + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "test_permissions_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["test_permissions_request_resource"][field]) + ): + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] + else: + del request_init["test_permissions_request_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.test_iam_permissions(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_test_iam_permissions_rest_interceptors(null_interceptor): + transport = transports.RegionHealthAggregationPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionHealthAggregationPoliciesRestInterceptor(), + ) + client = RegionHealthAggregationPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_test_iam_permissions", + ) as post, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "post_test_iam_permissions_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionHealthAggregationPoliciesRestInterceptor, + "pre_test_iam_permissions", + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest.pb( + compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) + req.return_value.content = return_value + + request = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata + + client.test_iam_permissions( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_aggregated_list_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.aggregated_list), "__call__") as call: + client.aggregated_list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AggregatedListRegionHealthAggregationPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRegionHealthAggregationPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_patch_unary_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.patch), "__call__") as call: + client.patch_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.PatchRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsRegionHealthAggregationPolicyRequest() + + assert args[0] == request_msg + + +def test_region_health_aggregation_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_region_health_aggregation_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "aggregated_list", + "delete", + "get", + "insert", + "list", + "patch", + "test_iam_permissions", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_region_health_aggregation_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionHealthAggregationPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_region_health_aggregation_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.region_health_aggregation_policies.transports.RegionHealthAggregationPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RegionHealthAggregationPoliciesTransport() + adc.assert_called_once() + + +def test_region_health_aggregation_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RegionHealthAggregationPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_region_health_aggregation_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RegionHealthAggregationPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_host_no_port(transport_name): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_host_with_port(transport_name): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_region_health_aggregation_policies_client_transport_session_collision( + transport_name, +): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RegionHealthAggregationPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RegionHealthAggregationPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.aggregated_list._session + session2 = client2.transport.aggregated_list._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.patch._session + session2 = client2.transport.patch._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RegionHealthAggregationPoliciesClient.common_billing_account_path( + billing_account + ) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RegionHealthAggregationPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_billing_account_path( + path + ) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RegionHealthAggregationPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RegionHealthAggregationPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RegionHealthAggregationPoliciesClient.common_organization_path( + organization + ) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RegionHealthAggregationPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RegionHealthAggregationPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RegionHealthAggregationPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RegionHealthAggregationPoliciesClient.common_location_path( + project, location + ) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RegionHealthAggregationPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RegionHealthAggregationPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RegionHealthAggregationPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RegionHealthAggregationPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RegionHealthAggregationPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RegionHealthAggregationPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + RegionHealthAggregationPoliciesClient, + transports.RegionHealthAggregationPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py index 99f507df158a..5f27ece7c3c2 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_sources.py @@ -3548,6 +3548,7 @@ def test_aggregated_list_rest_call_success(request_type): kind="kind_value", next_page_token="next_page_token_value", self_link="self_link_value", + unreachables=["unreachables_value"], ) # Wrap the value into a proper Response obj @@ -3568,6 +3569,7 @@ def test_aggregated_list_rest_call_success(request_type): assert response.kind == "kind_value" assert response.next_page_token == "next_page_token_value" assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py index 129358ae7dfc..84dc564643b7 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py @@ -1669,7 +1669,7 @@ def test_abandon_instances_unary_rest_flattened_error(transport: str = "rest"): ) -def test_apply_updates_to_instances_rest_use_cached_wrapped_rpc(): +def test_adopt_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -1683,22 +1683,17 @@ def test_apply_updates_to_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.apply_updates_to_instances - in client._transport._wrapped_methods - ) + assert client._transport.adopt_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.apply_updates_to_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.adopt_instances] = mock_rpc request = {} - client.apply_updates_to_instances(request) + client.adopt_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -1707,15 +1702,15 @@ def test_apply_updates_to_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.apply_updates_to_instances(request) + client.adopt_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_apply_updates_to_instances_rest_required_fields( - request_type=compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, +def test_adopt_instances_rest_required_fields( + request_type=compute.AdoptInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -1733,7 +1728,7 @@ def test_apply_updates_to_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) + ).adopt_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -1744,7 +1739,9 @@ def test_apply_updates_to_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) + ).adopt_instances._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -1791,33 +1788,33 @@ def test_apply_updates_to_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.apply_updates_to_instances(request) + response = client.adopt_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_apply_updates_to_instances_rest_unset_required_fields(): +def test_adopt_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.apply_updates_to_instances._get_unset_required_fields({}) + unset_fields = transport.adopt_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersApplyUpdatesRequestResource", + "regionInstanceGroupManagersAdoptInstancesRequestResource", ) ) ) -def test_apply_updates_to_instances_rest_flattened(): +def test_adopt_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -1840,8 +1837,8 @@ def test_apply_updates_to_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( - all_instances=True + region_instance_group_managers_adopt_instances_request_resource=compute.RegionInstanceGroupManagersAdoptInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] ), ) mock_args.update(sample_request) @@ -1856,20 +1853,20 @@ def test_apply_updates_to_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.apply_updates_to_instances(**mock_args) + client.adopt_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/adoptInstances" % client.transport._host, args[1], ) -def test_apply_updates_to_instances_rest_flattened_error(transport: str = "rest"): +def test_adopt_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -1878,18 +1875,18 @@ def test_apply_updates_to_instances_rest_flattened_error(transport: str = "rest" # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.apply_updates_to_instances( - compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(), + client.adopt_instances( + compute.AdoptInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( - all_instances=True + region_instance_group_managers_adopt_instances_request_resource=compute.RegionInstanceGroupManagersAdoptInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] ), ) -def test_apply_updates_to_instances_unary_rest_use_cached_wrapped_rpc(): +def test_adopt_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -1903,22 +1900,17 @@ def test_apply_updates_to_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.apply_updates_to_instances - in client._transport._wrapped_methods - ) + assert client._transport.adopt_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.apply_updates_to_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.adopt_instances] = mock_rpc request = {} - client.apply_updates_to_instances_unary(request) + client.adopt_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -1927,15 +1919,15 @@ def test_apply_updates_to_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.apply_updates_to_instances_unary(request) + client.adopt_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_apply_updates_to_instances_unary_rest_required_fields( - request_type=compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, +def test_adopt_instances_unary_rest_required_fields( + request_type=compute.AdoptInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -1953,7 +1945,7 @@ def test_apply_updates_to_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) + ).adopt_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -1964,7 +1956,9 @@ def test_apply_updates_to_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) + ).adopt_instances._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -2011,33 +2005,33 @@ def test_apply_updates_to_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.apply_updates_to_instances_unary(request) + response = client.adopt_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_apply_updates_to_instances_unary_rest_unset_required_fields(): +def test_adopt_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.apply_updates_to_instances._get_unset_required_fields({}) + unset_fields = transport.adopt_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersApplyUpdatesRequestResource", + "regionInstanceGroupManagersAdoptInstancesRequestResource", ) ) ) -def test_apply_updates_to_instances_unary_rest_flattened(): +def test_adopt_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -2060,8 +2054,8 @@ def test_apply_updates_to_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( - all_instances=True + region_instance_group_managers_adopt_instances_request_resource=compute.RegionInstanceGroupManagersAdoptInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] ), ) mock_args.update(sample_request) @@ -2076,20 +2070,20 @@ def test_apply_updates_to_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.apply_updates_to_instances_unary(**mock_args) + client.adopt_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/adoptInstances" % client.transport._host, args[1], ) -def test_apply_updates_to_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_adopt_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -2098,18 +2092,18 @@ def test_apply_updates_to_instances_unary_rest_flattened_error(transport: str = # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.apply_updates_to_instances_unary( - compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(), + client.adopt_instances_unary( + compute.AdoptInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( - all_instances=True + region_instance_group_managers_adopt_instances_request_resource=compute.RegionInstanceGroupManagersAdoptInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] ), ) -def test_create_instances_rest_use_cached_wrapped_rpc(): +def test_apply_updates_to_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -2123,7 +2117,10 @@ def test_create_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.create_instances in client._transport._wrapped_methods + assert ( + client._transport.apply_updates_to_instances + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -2131,11 +2128,11 @@ def test_create_instances_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.create_instances + client._transport.apply_updates_to_instances ] = mock_rpc request = {} - client.create_instances(request) + client.apply_updates_to_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -2144,15 +2141,15 @@ def test_create_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.create_instances(request) + client.apply_updates_to_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_create_instances_rest_required_fields( - request_type=compute.CreateInstancesRegionInstanceGroupManagerRequest, +def test_apply_updates_to_instances_rest_required_fields( + request_type=compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -2170,7 +2167,7 @@ def test_create_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).create_instances._get_unset_required_fields(jsonified_request) + ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -2181,9 +2178,7 @@ def test_create_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).create_instances._get_unset_required_fields(jsonified_request) - # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -2230,33 +2225,33 @@ def test_create_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.create_instances(request) + response = client.apply_updates_to_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_create_instances_rest_unset_required_fields(): +def test_apply_updates_to_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.create_instances._get_unset_required_fields({}) + unset_fields = transport.apply_updates_to_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set(()) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersCreateInstancesRequestResource", + "regionInstanceGroupManagersApplyUpdatesRequestResource", ) ) ) -def test_create_instances_rest_flattened(): +def test_apply_updates_to_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -2279,8 +2274,8 @@ def test_create_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( - instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( + all_instances=True ), ) mock_args.update(sample_request) @@ -2295,20 +2290,20 @@ def test_create_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.create_instances(**mock_args) + client.apply_updates_to_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/createInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances" % client.transport._host, args[1], ) -def test_create_instances_rest_flattened_error(transport: str = "rest"): +def test_apply_updates_to_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -2317,18 +2312,18 @@ def test_create_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.create_instances( - compute.CreateInstancesRegionInstanceGroupManagerRequest(), + client.apply_updates_to_instances( + compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( - instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( + all_instances=True ), ) -def test_create_instances_unary_rest_use_cached_wrapped_rpc(): +def test_apply_updates_to_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -2342,7 +2337,10 @@ def test_create_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.create_instances in client._transport._wrapped_methods + assert ( + client._transport.apply_updates_to_instances + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -2350,11 +2348,11 @@ def test_create_instances_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.create_instances + client._transport.apply_updates_to_instances ] = mock_rpc request = {} - client.create_instances_unary(request) + client.apply_updates_to_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -2363,15 +2361,15 @@ def test_create_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.create_instances_unary(request) + client.apply_updates_to_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_create_instances_unary_rest_required_fields( - request_type=compute.CreateInstancesRegionInstanceGroupManagerRequest, +def test_apply_updates_to_instances_unary_rest_required_fields( + request_type=compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -2389,7 +2387,7 @@ def test_create_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).create_instances._get_unset_required_fields(jsonified_request) + ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -2400,9 +2398,7 @@ def test_create_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).create_instances._get_unset_required_fields(jsonified_request) - # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + ).apply_updates_to_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -2449,33 +2445,33 @@ def test_create_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.create_instances_unary(request) + response = client.apply_updates_to_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_create_instances_unary_rest_unset_required_fields(): +def test_apply_updates_to_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.create_instances._get_unset_required_fields({}) + unset_fields = transport.apply_updates_to_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set(()) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersCreateInstancesRequestResource", + "regionInstanceGroupManagersApplyUpdatesRequestResource", ) ) ) -def test_create_instances_unary_rest_flattened(): +def test_apply_updates_to_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -2498,8 +2494,8 @@ def test_create_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( - instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( + all_instances=True ), ) mock_args.update(sample_request) @@ -2514,20 +2510,20 @@ def test_create_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.create_instances_unary(**mock_args) + client.apply_updates_to_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/createInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/applyUpdatesToInstances" % client.transport._host, args[1], ) -def test_create_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_apply_updates_to_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -2536,18 +2532,18 @@ def test_create_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.create_instances_unary( - compute.CreateInstancesRegionInstanceGroupManagerRequest(), + client.apply_updates_to_instances_unary( + compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( - instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + region_instance_group_managers_apply_updates_request_resource=compute.RegionInstanceGroupManagersApplyUpdatesRequest( + all_instances=True ), ) -def test_delete_rest_use_cached_wrapped_rpc(): +def test_create_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -2561,17 +2557,19 @@ def test_delete_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.delete in client._transport._wrapped_methods + assert client._transport.create_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.delete] = mock_rpc + client._transport._wrapped_methods[ + client._transport.create_instances + ] = mock_rpc request = {} - client.delete(request) + client.create_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -2580,15 +2578,15 @@ def test_delete_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete(request) + client.create_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_rest_required_fields( - request_type=compute.DeleteRegionInstanceGroupManagerRequest, +def test_create_instances_rest_required_fields( + request_type=compute.CreateInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -2606,7 +2604,7 @@ def test_delete_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete._get_unset_required_fields(jsonified_request) + ).create_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -2617,7 +2615,7 @@ def test_delete_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete._get_unset_required_fields(jsonified_request) + ).create_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -2649,9 +2647,10 @@ def test_delete_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "delete", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -2665,19 +2664,19 @@ def test_delete_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete(request) + response = client.create_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_rest_unset_required_fields(): +def test_create_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete._get_unset_required_fields({}) + unset_fields = transport.create_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -2685,12 +2684,13 @@ def test_delete_rest_unset_required_fields(): "instanceGroupManager", "project", "region", + "regionInstanceGroupManagersCreateInstancesRequestResource", ) ) ) -def test_delete_rest_flattened(): +def test_create_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -2713,6 +2713,9 @@ def test_delete_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", + region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + ), ) mock_args.update(sample_request) @@ -2726,20 +2729,20 @@ def test_delete_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete(**mock_args) + client.create_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/createInstances" % client.transport._host, args[1], ) -def test_delete_rest_flattened_error(transport: str = "rest"): +def test_create_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -2748,15 +2751,18 @@ def test_delete_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete( - compute.DeleteRegionInstanceGroupManagerRequest(), + client.create_instances( + compute.CreateInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", + region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + ), ) -def test_delete_unary_rest_use_cached_wrapped_rpc(): +def test_create_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -2770,17 +2776,19 @@ def test_delete_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.delete in client._transport._wrapped_methods + assert client._transport.create_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.delete] = mock_rpc + client._transport._wrapped_methods[ + client._transport.create_instances + ] = mock_rpc request = {} - client.delete_unary(request) + client.create_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -2789,15 +2797,15 @@ def test_delete_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete_unary(request) + client.create_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_unary_rest_required_fields( - request_type=compute.DeleteRegionInstanceGroupManagerRequest, +def test_create_instances_unary_rest_required_fields( + request_type=compute.CreateInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -2815,7 +2823,7 @@ def test_delete_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete._get_unset_required_fields(jsonified_request) + ).create_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -2826,7 +2834,7 @@ def test_delete_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete._get_unset_required_fields(jsonified_request) + ).create_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -2858,9 +2866,10 @@ def test_delete_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "delete", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -2874,19 +2883,19 @@ def test_delete_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_unary(request) + response = client.create_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_unary_rest_unset_required_fields(): +def test_create_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete._get_unset_required_fields({}) + unset_fields = transport.create_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -2894,12 +2903,13 @@ def test_delete_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", + "regionInstanceGroupManagersCreateInstancesRequestResource", ) ) ) -def test_delete_unary_rest_flattened(): +def test_create_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -2922,8 +2932,11 @@ def test_delete_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - ) - mock_args.update(sample_request) + region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + ), + ) + mock_args.update(sample_request) # Wrap the value into a proper Response obj response_value = Response() @@ -2935,20 +2948,20 @@ def test_delete_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_unary(**mock_args) + client.create_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/createInstances" % client.transport._host, args[1], ) -def test_delete_unary_rest_flattened_error(transport: str = "rest"): +def test_create_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -2957,15 +2970,18 @@ def test_delete_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete_unary( - compute.DeleteRegionInstanceGroupManagerRequest(), + client.create_instances_unary( + compute.CreateInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", + region_instance_group_managers_create_instances_request_resource=compute.RegionInstanceGroupManagersCreateInstancesRequest( + instances=[compute.PerInstanceConfig(fingerprint="fingerprint_value")] + ), ) -def test_delete_instances_rest_use_cached_wrapped_rpc(): +def test_delete_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -2979,19 +2995,17 @@ def test_delete_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.delete_instances in client._transport._wrapped_methods + assert client._transport.delete in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.delete_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.delete] = mock_rpc request = {} - client.delete_instances(request) + client.delete(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -3000,15 +3014,15 @@ def test_delete_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete_instances(request) + client.delete(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_instances_rest_required_fields( - request_type=compute.DeleteInstancesRegionInstanceGroupManagerRequest, +def test_delete_rest_required_fields( + request_type=compute.DeleteRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -3026,7 +3040,7 @@ def test_delete_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_instances._get_unset_required_fields(jsonified_request) + ).delete._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -3037,7 +3051,7 @@ def test_delete_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_instances._get_unset_required_fields(jsonified_request) + ).delete._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -3069,10 +3083,9 @@ def test_delete_instances_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "delete", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -3086,19 +3099,19 @@ def test_delete_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_instances(request) + response = client.delete(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_instances_rest_unset_required_fields(): +def test_delete_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete_instances._get_unset_required_fields({}) + unset_fields = transport.delete._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -3106,13 +3119,12 @@ def test_delete_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersDeleteInstancesRequestResource", ) ) ) -def test_delete_instances_rest_flattened(): +def test_delete_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -3135,9 +3147,6 @@ def test_delete_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( - instances=["instances_value"] - ), ) mock_args.update(sample_request) @@ -3151,20 +3160,20 @@ def test_delete_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_instances(**mock_args) + client.delete(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deleteInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_delete_instances_rest_flattened_error(transport: str = "rest"): +def test_delete_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3173,18 +3182,15 @@ def test_delete_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete_instances( - compute.DeleteInstancesRegionInstanceGroupManagerRequest(), + client.delete( + compute.DeleteRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( - instances=["instances_value"] - ), ) -def test_delete_instances_unary_rest_use_cached_wrapped_rpc(): +def test_delete_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -3198,19 +3204,17 @@ def test_delete_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.delete_instances in client._transport._wrapped_methods + assert client._transport.delete in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.delete_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.delete] = mock_rpc request = {} - client.delete_instances_unary(request) + client.delete_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -3219,15 +3223,15 @@ def test_delete_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete_instances_unary(request) + client.delete_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_instances_unary_rest_required_fields( - request_type=compute.DeleteInstancesRegionInstanceGroupManagerRequest, +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -3245,7 +3249,7 @@ def test_delete_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_instances._get_unset_required_fields(jsonified_request) + ).delete._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -3256,7 +3260,7 @@ def test_delete_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_instances._get_unset_required_fields(jsonified_request) + ).delete._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -3288,10 +3292,9 @@ def test_delete_instances_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "delete", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -3305,19 +3308,19 @@ def test_delete_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_instances_unary(request) + response = client.delete_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_instances_unary_rest_unset_required_fields(): +def test_delete_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete_instances._get_unset_required_fields({}) + unset_fields = transport.delete._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -3325,13 +3328,12 @@ def test_delete_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersDeleteInstancesRequestResource", ) ) ) -def test_delete_instances_unary_rest_flattened(): +def test_delete_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -3354,9 +3356,6 @@ def test_delete_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( - instances=["instances_value"] - ), ) mock_args.update(sample_request) @@ -3370,20 +3369,20 @@ def test_delete_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_instances_unary(**mock_args) + client.delete_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deleteInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_delete_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_delete_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3392,18 +3391,15 @@ def test_delete_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete_instances_unary( - compute.DeleteInstancesRegionInstanceGroupManagerRequest(), + client.delete_unary( + compute.DeleteRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( - instances=["instances_value"] - ), ) -def test_delete_per_instance_configs_rest_use_cached_wrapped_rpc(): +def test_delete_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -3417,10 +3413,7 @@ def test_delete_per_instance_configs_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.delete_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.delete_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -3428,11 +3421,11 @@ def test_delete_per_instance_configs_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.delete_per_instance_configs + client._transport.delete_instances ] = mock_rpc request = {} - client.delete_per_instance_configs(request) + client.delete_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -3441,15 +3434,15 @@ def test_delete_per_instance_configs_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete_per_instance_configs(request) + client.delete_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_per_instance_configs_rest_required_fields( - request_type=compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_delete_instances_rest_required_fields( + request_type=compute.DeleteInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -3467,7 +3460,7 @@ def test_delete_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) + ).delete_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -3478,7 +3471,9 @@ def test_delete_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) + ).delete_instances._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -3525,33 +3520,33 @@ def test_delete_per_instance_configs_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_per_instance_configs(request) + response = client.delete_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_per_instance_configs_rest_unset_required_fields(): +def test_delete_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.delete_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagerDeleteInstanceConfigReqResource", + "regionInstanceGroupManagersDeleteInstancesRequestResource", ) ) ) -def test_delete_per_instance_configs_rest_flattened(): +def test_delete_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -3574,8 +3569,8 @@ def test_delete_per_instance_configs_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( - names=["names_value"] + region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -3590,20 +3585,20 @@ def test_delete_per_instance_configs_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_per_instance_configs(**mock_args) + client.delete_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deleteInstances" % client.transport._host, args[1], ) -def test_delete_per_instance_configs_rest_flattened_error(transport: str = "rest"): +def test_delete_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3612,18 +3607,18 @@ def test_delete_per_instance_configs_rest_flattened_error(transport: str = "rest # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete_per_instance_configs( - compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(), + client.delete_instances( + compute.DeleteInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( - names=["names_value"] + region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( + instances=["instances_value"] ), ) -def test_delete_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): +def test_delete_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -3637,10 +3632,7 @@ def test_delete_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.delete_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.delete_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -3648,11 +3640,11 @@ def test_delete_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.delete_per_instance_configs + client._transport.delete_instances ] = mock_rpc request = {} - client.delete_per_instance_configs_unary(request) + client.delete_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -3661,15 +3653,15 @@ def test_delete_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.delete_per_instance_configs_unary(request) + client.delete_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_delete_per_instance_configs_unary_rest_required_fields( - request_type=compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_delete_instances_unary_rest_required_fields( + request_type=compute.DeleteInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -3687,7 +3679,7 @@ def test_delete_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) + ).delete_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -3698,7 +3690,9 @@ def test_delete_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) + ).delete_instances._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -3745,33 +3739,33 @@ def test_delete_per_instance_configs_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_per_instance_configs_unary(request) + response = client.delete_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_delete_per_instance_configs_unary_rest_unset_required_fields(): +def test_delete_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.delete_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.delete_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagerDeleteInstanceConfigReqResource", + "regionInstanceGroupManagersDeleteInstancesRequestResource", ) ) ) -def test_delete_per_instance_configs_unary_rest_flattened(): +def test_delete_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -3794,8 +3788,8 @@ def test_delete_per_instance_configs_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( - names=["names_value"] + region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -3810,22 +3804,20 @@ def test_delete_per_instance_configs_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_per_instance_configs_unary(**mock_args) + client.delete_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deleteInstances" % client.transport._host, args[1], ) -def test_delete_per_instance_configs_unary_rest_flattened_error( - transport: str = "rest", -): +def test_delete_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -3834,18 +3826,18 @@ def test_delete_per_instance_configs_unary_rest_flattened_error( # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.delete_per_instance_configs_unary( - compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(), + client.delete_instances_unary( + compute.DeleteInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( - names=["names_value"] + region_instance_group_managers_delete_instances_request_resource=compute.RegionInstanceGroupManagersDeleteInstancesRequest( + instances=["instances_value"] ), ) -def test_get_rest_use_cached_wrapped_rpc(): +def test_delete_per_instance_configs_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -3859,30 +3851,39 @@ def test_get_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.get in client._transport._wrapped_methods + assert ( + client._transport.delete_per_instance_configs + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.get] = mock_rpc + client._transport._wrapped_methods[ + client._transport.delete_per_instance_configs + ] = mock_rpc request = {} - client.get(request) + client.delete_per_instance_configs(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.get(request) + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_per_instance_configs(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_get_rest_required_fields( - request_type=compute.GetRegionInstanceGroupManagerRequest, +def test_delete_per_instance_configs_rest_required_fields( + request_type=compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -3900,7 +3901,7 @@ def test_get_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).get._get_unset_required_fields(jsonified_request) + ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -3911,7 +3912,7 @@ def test_get_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).get._get_unset_required_fields(jsonified_request) + ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -3929,7 +3930,7 @@ def test_get_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.InstanceGroupManager() + return_value = compute.Operation() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -3941,35 +3942,36 @@ def test_get_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "get", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.InstanceGroupManager.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.get(request) + response = client.delete_per_instance_configs(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_get_rest_unset_required_fields(): +def test_delete_per_instance_configs_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.get._get_unset_required_fields({}) + unset_fields = transport.delete_per_instance_configs._get_unset_required_fields({}) assert set(unset_fields) == ( set(()) & set( @@ -3977,12 +3979,13 @@ def test_get_rest_unset_required_fields(): "instanceGroupManager", "project", "region", + "regionInstanceGroupManagerDeleteInstanceConfigReqResource", ) ) ) -def test_get_rest_flattened(): +def test_delete_per_instance_configs_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -3991,7 +3994,7 @@ def test_get_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.InstanceGroupManager() + return_value = compute.Operation() # get arguments that satisfy an http rule for this method sample_request = { @@ -4005,6 +4008,9 @@ def test_get_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", + region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( + names=["names_value"] + ), ) mock_args.update(sample_request) @@ -4012,26 +4018,26 @@ def test_get_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.InstanceGroupManager.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.get(**mock_args) + client.delete_per_instance_configs(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs" % client.transport._host, args[1], ) -def test_get_rest_flattened_error(transport: str = "rest"): +def test_delete_per_instance_configs_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -4040,15 +4046,18 @@ def test_get_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.get( - compute.GetRegionInstanceGroupManagerRequest(), + client.delete_per_instance_configs( + compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", + region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( + names=["names_value"] + ), ) -def test_insert_rest_use_cached_wrapped_rpc(): +def test_delete_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -4062,17 +4071,22 @@ def test_insert_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.insert in client._transport._wrapped_methods + assert ( + client._transport.delete_per_instance_configs + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.insert] = mock_rpc + client._transport._wrapped_methods[ + client._transport.delete_per_instance_configs + ] = mock_rpc request = {} - client.insert(request) + client.delete_per_instance_configs_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -4081,19 +4095,20 @@ def test_insert_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.insert(request) + client.delete_per_instance_configs_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_insert_rest_required_fields( - request_type=compute.InsertRegionInstanceGroupManagerRequest, +def test_delete_per_instance_configs_unary_rest_required_fields( + request_type=compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} + request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" request = request_type(**request_init) @@ -4106,22 +4121,23 @@ def test_insert_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).insert._get_unset_required_fields(jsonified_request) + ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).insert._get_unset_required_fields(jsonified_request) - # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + ).delete_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request @@ -4163,32 +4179,33 @@ def test_insert_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.insert(request) + response = client.delete_per_instance_configs_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_insert_rest_unset_required_fields(): +def test_delete_per_instance_configs_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.insert._get_unset_required_fields({}) + unset_fields = transport.delete_per_instance_configs._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set(()) & set( ( - "instanceGroupManagerResource", + "instanceGroupManager", "project", "region", + "regionInstanceGroupManagerDeleteInstanceConfigReqResource", ) ) ) -def test_insert_rest_flattened(): +def test_delete_per_instance_configs_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -4200,18 +4217,19 @@ def test_insert_rest_flattened(): return_value = compute.Operation() # get arguments that satisfy an http rule for this method - sample_request = {"project": "sample1", "region": "sample2"} + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( + names=["names_value"] ), ) mock_args.update(sample_request) @@ -4226,20 +4244,22 @@ def test_insert_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.insert(**mock_args) + client.delete_per_instance_configs_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/deletePerInstanceConfigs" % client.transport._host, args[1], ) -def test_insert_rest_flattened_error(transport: str = "rest"): +def test_delete_per_instance_configs_unary_rest_flattened_error( + transport: str = "rest", +): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -4248,21 +4268,18 @@ def test_insert_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.insert( - compute.InsertRegionInstanceGroupManagerRequest(), + client.delete_per_instance_configs_unary( + compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_delete_instance_config_req_resource=compute.RegionInstanceGroupManagerDeleteInstanceConfigReq( + names=["names_value"] ), ) -def test_insert_unary_rest_use_cached_wrapped_rpc(): +def test_get_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -4276,38 +4293,35 @@ def test_insert_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.insert in client._transport._wrapped_methods + assert client._transport.get in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.insert] = mock_rpc + client._transport._wrapped_methods[client._transport.get] = mock_rpc request = {} - client.insert_unary(request) + client.get(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - # Operation methods build a cached wrapper on first rpc call - # subsequent calls should use the cached wrapper - wrapper_fn.reset_mock() - - client.insert_unary(request) + client.get(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_insert_unary_rest_required_fields( - request_type=compute.InsertRegionInstanceGroupManagerRequest, +def test_get_rest_required_fields( + request_type=compute.GetRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} + request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" request = request_type(**request_init) @@ -4320,22 +4334,23 @@ def test_insert_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).insert._get_unset_required_fields(jsonified_request) + ).get._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).insert._get_unset_required_fields(jsonified_request) - # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + ).get._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request @@ -4348,7 +4363,7 @@ def test_insert_unary_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.InstanceGroupManager() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -4360,41 +4375,40 @@ def test_insert_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "get", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.InstanceGroupManager.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.insert_unary(request) + response = client.get(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_insert_unary_rest_unset_required_fields(): +def test_get_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.insert._get_unset_required_fields({}) + unset_fields = transport.get._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set(()) & set( ( - "instanceGroupManagerResource", + "instanceGroupManager", "project", "region", ) @@ -4402,7 +4416,7 @@ def test_insert_unary_rest_unset_required_fields(): ) -def test_insert_unary_rest_flattened(): +def test_get_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -4411,22 +4425,20 @@ def test_insert_unary_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.InstanceGroupManager() # get arguments that satisfy an http rule for this method - sample_request = {"project": "sample1", "region": "sample2"} + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) - ), + instance_group_manager="instance_group_manager_value", ) mock_args.update(sample_request) @@ -4434,26 +4446,26 @@ def test_insert_unary_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.InstanceGroupManager.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.insert_unary(**mock_args) + client.get(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_insert_unary_rest_flattened_error(transport: str = "rest"): +def test_get_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -4462,21 +4474,15 @@ def test_insert_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.insert_unary( - compute.InsertRegionInstanceGroupManagerRequest(), + client.get( + compute.GetRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) - ), + instance_group_manager="instance_group_manager_value", ) -def test_list_rest_use_cached_wrapped_rpc(): +def test_insert_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -4490,30 +4496,34 @@ def test_list_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.list in client._transport._wrapped_methods + assert client._transport.insert in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.list] = mock_rpc + client._transport._wrapped_methods[client._transport.insert] = mock_rpc request = {} - client.list(request) + client.insert(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.list(request) + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_list_rest_required_fields( - request_type=compute.ListRegionInstanceGroupManagersRequest, +def test_insert_rest_required_fields( + request_type=compute.InsertRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -4530,7 +4540,7 @@ def test_list_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list._get_unset_required_fields(jsonified_request) + ).insert._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -4540,17 +4550,9 @@ def test_list_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list._get_unset_required_fields(jsonified_request) + ).insert._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "filter", - "max_results", - "order_by", - "page_token", - "return_partial_success", - ) - ) + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -4566,7 +4568,7 @@ def test_list_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagerList() + return_value = compute.Operation() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -4578,47 +4580,41 @@ def test_list_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "get", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagerList.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list(request) + response = client.insert(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_rest_unset_required_fields(): +def test_insert_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list._get_unset_required_fields({}) + unset_fields = transport.insert._get_unset_required_fields({}) assert set(unset_fields) == ( - set( - ( - "filter", - "maxResults", - "orderBy", - "pageToken", - "returnPartialSuccess", - ) - ) + set(("requestId",)) & set( ( + "instanceGroupManagerResource", "project", "region", ) @@ -4626,7 +4622,7 @@ def test_list_rest_unset_required_fields(): ) -def test_list_rest_flattened(): +def test_insert_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -4635,7 +4631,7 @@ def test_list_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagerList() + return_value = compute.Operation() # get arguments that satisfy an http rule for this method sample_request = {"project": "sample1", "region": "sample2"} @@ -4644,20 +4640,27 @@ def test_list_rest_flattened(): mock_args = dict( project="project_value", region="region_value", - ) - mock_args.update(sample_request) - - # Wrap the value into a proper Response obj - response_value = Response() - response_value.status_code = 200 + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagerList.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list(**mock_args) + client.insert(**mock_args) # Establish that the underlying call was made with the expected # request object values. @@ -4670,7 +4673,7 @@ def test_list_rest_flattened(): ) -def test_list_rest_flattened_error(transport: str = "rest"): +def test_insert_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -4679,77 +4682,21 @@ def test_list_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list( - compute.ListRegionInstanceGroupManagersRequest(), + client.insert( + compute.InsertRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - ) - - -def test_list_rest_pager(transport: str = "rest"): - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) - - # Mock the http request call within the method and fake a response. - with mock.patch.object(Session, "request") as req: - # TODO(kbandes): remove this mock unless there's a good reason for it. - # with mock.patch.object(path_template, 'transcode') as transcode: - # Set the response as a series of pages - response = ( - compute.RegionInstanceGroupManagerList( - items=[ - compute.InstanceGroupManager(), - compute.InstanceGroupManager(), - compute.InstanceGroupManager(), - ], - next_page_token="abc", - ), - compute.RegionInstanceGroupManagerList( - items=[], - next_page_token="def", - ), - compute.RegionInstanceGroupManagerList( - items=[ - compute.InstanceGroupManager(), - ], - next_page_token="ghi", - ), - compute.RegionInstanceGroupManagerList( - items=[ - compute.InstanceGroupManager(), - compute.InstanceGroupManager(), - ], + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) - # Two responses for two calls - response = response + response - - # Wrap the values into proper Response objs - response = tuple( - compute.RegionInstanceGroupManagerList.to_json(x) for x in response - ) - return_values = tuple(Response() for i in response) - for return_val, response_val in zip(return_values, response): - return_val._content = response_val.encode("UTF-8") - return_val.status_code = 200 - req.side_effect = return_values - - sample_request = {"project": "sample1", "region": "sample2"} - - pager = client.list(request=sample_request) - - results = list(pager) - assert len(results) == 6 - assert all(isinstance(i, compute.InstanceGroupManager) for i in results) - - pages = list(client.list(request=sample_request).pages) - for page_, token in zip(pages, ["abc", "def", "ghi", ""]): - assert page_.raw_page.next_page_token == token -def test_list_errors_rest_use_cached_wrapped_rpc(): +def test_insert_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -4763,35 +4710,38 @@ def test_list_errors_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.list_errors in client._transport._wrapped_methods + assert client._transport.insert in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.list_errors] = mock_rpc + client._transport._wrapped_methods[client._transport.insert] = mock_rpc request = {} - client.list_errors(request) + client.insert_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.list_errors(request) + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_list_errors_rest_required_fields( - request_type=compute.ListErrorsRegionInstanceGroupManagersRequest, +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} - request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" request = request_type(**request_init) @@ -4804,33 +4754,22 @@ def test_list_errors_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_errors._get_unset_required_fields(jsonified_request) + ).insert._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present - jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_errors._get_unset_required_fields(jsonified_request) + ).insert._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "filter", - "max_results", - "order_by", - "page_token", - "return_partial_success", - ) - ) + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone - assert "instanceGroupManager" in jsonified_request - assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request @@ -4843,7 +4782,7 @@ def test_list_errors_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListErrorsResponse() + return_value = compute.Operation() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -4855,50 +4794,41 @@ def test_list_errors_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "get", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagersListErrorsResponse.pb( - return_value - ) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_errors(request) + response = client.insert_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_errors_rest_unset_required_fields(): +def test_insert_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list_errors._get_unset_required_fields({}) + unset_fields = transport.insert._get_unset_required_fields({}) assert set(unset_fields) == ( - set( - ( - "filter", - "maxResults", - "orderBy", - "pageToken", - "returnPartialSuccess", - ) - ) + set(("requestId",)) & set( ( - "instanceGroupManager", + "instanceGroupManagerResource", "project", "region", ) @@ -4906,7 +4836,7 @@ def test_list_errors_rest_unset_required_fields(): ) -def test_list_errors_rest_flattened(): +def test_insert_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -4915,20 +4845,22 @@ def test_list_errors_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListErrorsResponse() + return_value = compute.Operation() # get arguments that satisfy an http rule for this method - sample_request = { - "project": "sample1", - "region": "sample2", - "instance_group_manager": "sample3", - } + sample_request = {"project": "sample1", "region": "sample2"} # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) + ), ) mock_args.update(sample_request) @@ -4936,28 +4868,26 @@ def test_list_errors_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagersListErrorsResponse.pb( - return_value - ) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_errors(**mock_args) + client.insert_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listErrors" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers" % client.transport._host, args[1], ) -def test_list_errors_rest_flattened_error(transport: str = "rest"): +def test_insert_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -4966,130 +4896,62 @@ def test_list_errors_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list_errors( - compute.ListErrorsRegionInstanceGroupManagersRequest(), + client.insert_unary( + compute.InsertRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) + ), ) -def test_list_errors_rest_pager(transport: str = "rest"): - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) - - # Mock the http request call within the method and fake a response. - with mock.patch.object(Session, "request") as req: - # TODO(kbandes): remove this mock unless there's a good reason for it. - # with mock.patch.object(path_template, 'transcode') as transcode: - # Set the response as a series of pages - response = ( - compute.RegionInstanceGroupManagersListErrorsResponse( - items=[ - compute.InstanceManagedByIgmError(), - compute.InstanceManagedByIgmError(), - compute.InstanceManagedByIgmError(), - ], - next_page_token="abc", - ), - compute.RegionInstanceGroupManagersListErrorsResponse( - items=[], - next_page_token="def", - ), - compute.RegionInstanceGroupManagersListErrorsResponse( - items=[ - compute.InstanceManagedByIgmError(), - ], - next_page_token="ghi", - ), - compute.RegionInstanceGroupManagersListErrorsResponse( - items=[ - compute.InstanceManagedByIgmError(), - compute.InstanceManagedByIgmError(), - ], - ), +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", ) - # Two responses for two calls - response = response + response - # Wrap the values into proper Response objs - response = tuple( - compute.RegionInstanceGroupManagersListErrorsResponse.to_json(x) - for x in response - ) - return_values = tuple(Response() for i in response) - for return_val, response_val in zip(return_values, response): - return_val._content = response_val.encode("UTF-8") - return_val.status_code = 200 - req.side_effect = return_values - - sample_request = { - "project": "sample1", - "region": "sample2", - "instance_group_manager": "sample3", - } - - pager = client.list_errors(request=sample_request) - - results = list(pager) - assert len(results) == 6 - assert all(isinstance(i, compute.InstanceManagedByIgmError) for i in results) - - pages = list(client.list_errors(request=sample_request).pages) - for page_, token in zip(pages, ["abc", "def", "ghi", ""]): - assert page_.raw_page.next_page_token == token - - -def test_list_managed_instances_rest_use_cached_wrapped_rpc(): - # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, - # instead of constructing them on each call - with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport="rest", - ) - - # Should wrap all calls on client creation - assert wrapper_fn.call_count > 0 - wrapper_fn.reset_mock() + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.list_managed_instances - in client._transport._wrapped_methods - ) + assert client._transport.list in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.list_managed_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.list] = mock_rpc request = {} - client.list_managed_instances(request) + client.list(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.list_managed_instances(request) + client.list(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_list_managed_instances_rest_required_fields( - request_type=compute.ListManagedInstancesRegionInstanceGroupManagersRequest, +def test_list_rest_required_fields( + request_type=compute.ListRegionInstanceGroupManagersRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} - request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" request = request_type(**request_init) @@ -5102,18 +4964,17 @@ def test_list_managed_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_managed_instances._get_unset_required_fields(jsonified_request) + ).list._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present - jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_managed_instances._get_unset_required_fields(jsonified_request) + ).list._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set( ( @@ -5127,8 +4988,6 @@ def test_list_managed_instances_rest_required_fields( jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone - assert "instanceGroupManager" in jsonified_request - assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request @@ -5141,7 +5000,7 @@ def test_list_managed_instances_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListInstancesResponse() + return_value = compute.RegionInstanceGroupManagerList() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -5153,7 +5012,7 @@ def test_list_managed_instances_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "get", "query_params": pb_request, } transcode.return_value = transcode_result @@ -5162,28 +5021,26 @@ def test_list_managed_instances_rest_required_fields( response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagersListInstancesResponse.pb( - return_value - ) + return_value = compute.RegionInstanceGroupManagerList.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_managed_instances(request) + response = client.list(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_managed_instances_rest_unset_required_fields(): +def test_list_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list_managed_instances._get_unset_required_fields({}) + unset_fields = transport.list._get_unset_required_fields({}) assert set(unset_fields) == ( set( ( @@ -5196,7 +5053,6 @@ def test_list_managed_instances_rest_unset_required_fields(): ) & set( ( - "instanceGroupManager", "project", "region", ) @@ -5204,7 +5060,7 @@ def test_list_managed_instances_rest_unset_required_fields(): ) -def test_list_managed_instances_rest_flattened(): +def test_list_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -5213,20 +5069,15 @@ def test_list_managed_instances_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListInstancesResponse() + return_value = compute.RegionInstanceGroupManagerList() # get arguments that satisfy an http rule for this method - sample_request = { - "project": "sample1", - "region": "sample2", - "instance_group_manager": "sample3", - } + sample_request = {"project": "sample1", "region": "sample2"} # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", ) mock_args.update(sample_request) @@ -5234,28 +5085,26 @@ def test_list_managed_instances_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagersListInstancesResponse.pb( - return_value - ) + return_value = compute.RegionInstanceGroupManagerList.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_managed_instances(**mock_args) + client.list(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listManagedInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers" % client.transport._host, args[1], ) -def test_list_managed_instances_rest_flattened_error(transport: str = "rest"): +def test_list_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -5264,15 +5113,14 @@ def test_list_managed_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list_managed_instances( - compute.ListManagedInstancesRegionInstanceGroupManagersRequest(), + client.list( + compute.ListRegionInstanceGroupManagersRequest(), project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", ) -def test_list_managed_instances_rest_pager(transport: str = "rest"): +def test_list_rest_pager(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -5284,28 +5132,28 @@ def test_list_managed_instances_rest_pager(transport: str = "rest"): # with mock.patch.object(path_template, 'transcode') as transcode: # Set the response as a series of pages response = ( - compute.RegionInstanceGroupManagersListInstancesResponse( - managed_instances=[ - compute.ManagedInstance(), - compute.ManagedInstance(), - compute.ManagedInstance(), + compute.RegionInstanceGroupManagerList( + items=[ + compute.InstanceGroupManager(), + compute.InstanceGroupManager(), + compute.InstanceGroupManager(), ], next_page_token="abc", ), - compute.RegionInstanceGroupManagersListInstancesResponse( - managed_instances=[], + compute.RegionInstanceGroupManagerList( + items=[], next_page_token="def", ), - compute.RegionInstanceGroupManagersListInstancesResponse( - managed_instances=[ - compute.ManagedInstance(), + compute.RegionInstanceGroupManagerList( + items=[ + compute.InstanceGroupManager(), ], next_page_token="ghi", ), - compute.RegionInstanceGroupManagersListInstancesResponse( - managed_instances=[ - compute.ManagedInstance(), - compute.ManagedInstance(), + compute.RegionInstanceGroupManagerList( + items=[ + compute.InstanceGroupManager(), + compute.InstanceGroupManager(), ], ), ) @@ -5314,8 +5162,7 @@ def test_list_managed_instances_rest_pager(transport: str = "rest"): # Wrap the values into proper Response objs response = tuple( - compute.RegionInstanceGroupManagersListInstancesResponse.to_json(x) - for x in response + compute.RegionInstanceGroupManagerList.to_json(x) for x in response ) return_values = tuple(Response() for i in response) for return_val, response_val in zip(return_values, response): @@ -5323,24 +5170,20 @@ def test_list_managed_instances_rest_pager(transport: str = "rest"): return_val.status_code = 200 req.side_effect = return_values - sample_request = { - "project": "sample1", - "region": "sample2", - "instance_group_manager": "sample3", - } + sample_request = {"project": "sample1", "region": "sample2"} - pager = client.list_managed_instances(request=sample_request) + pager = client.list(request=sample_request) results = list(pager) assert len(results) == 6 - assert all(isinstance(i, compute.ManagedInstance) for i in results) + assert all(isinstance(i, compute.InstanceGroupManager) for i in results) - pages = list(client.list_managed_instances(request=sample_request).pages) + pages = list(client.list(request=sample_request).pages) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token -def test_list_per_instance_configs_rest_use_cached_wrapped_rpc(): +def test_list_errors_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -5354,35 +5197,30 @@ def test_list_per_instance_configs_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.list_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.list_errors in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.list_per_instance_configs - ] = mock_rpc + client._transport._wrapped_methods[client._transport.list_errors] = mock_rpc request = {} - client.list_per_instance_configs(request) + client.list_errors(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.list_per_instance_configs(request) + client.list_errors(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_list_per_instance_configs_rest_required_fields( - request_type=compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, +def test_list_errors_rest_required_fields( + request_type=compute.ListErrorsRegionInstanceGroupManagersRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -5400,7 +5238,7 @@ def test_list_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_per_instance_configs._get_unset_required_fields(jsonified_request) + ).list_errors._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -5411,7 +5249,7 @@ def test_list_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_per_instance_configs._get_unset_required_fields(jsonified_request) + ).list_errors._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set( ( @@ -5439,7 +5277,7 @@ def test_list_per_instance_configs_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp() + return_value = compute.RegionInstanceGroupManagersListErrorsResponse() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -5451,7 +5289,7 @@ def test_list_per_instance_configs_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "get", "query_params": pb_request, } transcode.return_value = transcode_result @@ -5460,10 +5298,8 @@ def test_list_per_instance_configs_rest_required_fields( response_value.status_code = 200 # Convert return value to protobuf type - return_value = ( - compute.RegionInstanceGroupManagersListInstanceConfigsResp.pb( - return_value - ) + return_value = compute.RegionInstanceGroupManagersListErrorsResponse.pb( + return_value ) json_return_value = json_format.MessageToJson(return_value) @@ -5471,19 +5307,19 @@ def test_list_per_instance_configs_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_per_instance_configs(request) + response = client.list_errors(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_per_instance_configs_rest_unset_required_fields(): +def test_list_errors_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.list_errors._get_unset_required_fields({}) assert set(unset_fields) == ( set( ( @@ -5504,7 +5340,7 @@ def test_list_per_instance_configs_rest_unset_required_fields(): ) -def test_list_per_instance_configs_rest_flattened(): +def test_list_errors_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -5513,7 +5349,7 @@ def test_list_per_instance_configs_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp() + return_value = compute.RegionInstanceGroupManagersListErrorsResponse() # get arguments that satisfy an http rule for this method sample_request = { @@ -5534,7 +5370,7 @@ def test_list_per_instance_configs_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp.pb( + return_value = compute.RegionInstanceGroupManagersListErrorsResponse.pb( return_value ) json_return_value = json_format.MessageToJson(return_value) @@ -5542,20 +5378,20 @@ def test_list_per_instance_configs_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_per_instance_configs(**mock_args) + client.list_errors(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listPerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listErrors" % client.transport._host, args[1], ) -def test_list_per_instance_configs_rest_flattened_error(transport: str = "rest"): +def test_list_errors_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -5564,15 +5400,15 @@ def test_list_per_instance_configs_rest_flattened_error(transport: str = "rest") # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list_per_instance_configs( - compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest(), + client.list_errors( + compute.ListErrorsRegionInstanceGroupManagersRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", ) -def test_list_per_instance_configs_rest_pager(transport: str = "rest"): +def test_list_errors_rest_pager(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -5584,28 +5420,28 @@ def test_list_per_instance_configs_rest_pager(transport: str = "rest"): # with mock.patch.object(path_template, 'transcode') as transcode: # Set the response as a series of pages response = ( - compute.RegionInstanceGroupManagersListInstanceConfigsResp( + compute.RegionInstanceGroupManagersListErrorsResponse( items=[ - compute.PerInstanceConfig(), - compute.PerInstanceConfig(), - compute.PerInstanceConfig(), + compute.InstanceManagedByIgmError(), + compute.InstanceManagedByIgmError(), + compute.InstanceManagedByIgmError(), ], next_page_token="abc", ), - compute.RegionInstanceGroupManagersListInstanceConfigsResp( + compute.RegionInstanceGroupManagersListErrorsResponse( items=[], next_page_token="def", ), - compute.RegionInstanceGroupManagersListInstanceConfigsResp( + compute.RegionInstanceGroupManagersListErrorsResponse( items=[ - compute.PerInstanceConfig(), + compute.InstanceManagedByIgmError(), ], next_page_token="ghi", ), - compute.RegionInstanceGroupManagersListInstanceConfigsResp( + compute.RegionInstanceGroupManagersListErrorsResponse( items=[ - compute.PerInstanceConfig(), - compute.PerInstanceConfig(), + compute.InstanceManagedByIgmError(), + compute.InstanceManagedByIgmError(), ], ), ) @@ -5614,7 +5450,7 @@ def test_list_per_instance_configs_rest_pager(transport: str = "rest"): # Wrap the values into proper Response objs response = tuple( - compute.RegionInstanceGroupManagersListInstanceConfigsResp.to_json(x) + compute.RegionInstanceGroupManagersListErrorsResponse.to_json(x) for x in response ) return_values = tuple(Response() for i in response) @@ -5629,18 +5465,18 @@ def test_list_per_instance_configs_rest_pager(transport: str = "rest"): "instance_group_manager": "sample3", } - pager = client.list_per_instance_configs(request=sample_request) + pager = client.list_errors(request=sample_request) results = list(pager) assert len(results) == 6 - assert all(isinstance(i, compute.PerInstanceConfig) for i in results) + assert all(isinstance(i, compute.InstanceManagedByIgmError) for i in results) - pages = list(client.list_per_instance_configs(request=sample_request).pages) + pages = list(client.list_errors(request=sample_request).pages) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token -def test_patch_rest_use_cached_wrapped_rpc(): +def test_list_managed_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -5654,34 +5490,35 @@ def test_patch_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.patch in client._transport._wrapped_methods + assert ( + client._transport.list_managed_instances + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.patch] = mock_rpc + client._transport._wrapped_methods[ + client._transport.list_managed_instances + ] = mock_rpc request = {} - client.patch(request) + client.list_managed_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - # Operation methods build a cached wrapper on first rpc call - # subsequent calls should use the cached wrapper - wrapper_fn.reset_mock() - - client.patch(request) + client.list_managed_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_patch_rest_required_fields( - request_type=compute.PatchRegionInstanceGroupManagerRequest, +def test_list_managed_instances_rest_required_fields( + request_type=compute.ListManagedInstancesRegionInstanceGroupManagersRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -5699,7 +5536,7 @@ def test_patch_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch._get_unset_required_fields(jsonified_request) + ).list_managed_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -5710,15 +5547,23 @@ def test_patch_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch._get_unset_required_fields(jsonified_request) + ).list_managed_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) - jsonified_request.update(unset_fields) - - # verify required fields with non-default values are left alone - assert "instanceGroupManager" in jsonified_request - assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" - assert "project" in jsonified_request + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" + assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" @@ -5730,7 +5575,7 @@ def test_patch_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.RegionInstanceGroupManagersListInstancesResponse() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -5742,42 +5587,50 @@ def test_patch_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "patch", + "method": "post", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.RegionInstanceGroupManagersListInstancesResponse.pb( + return_value + ) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.patch(request) + response = client.list_managed_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_patch_rest_unset_required_fields(): +def test_list_managed_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.patch._get_unset_required_fields({}) + unset_fields = transport.list_managed_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) & set( ( "instanceGroupManager", - "instanceGroupManagerResource", "project", "region", ) @@ -5785,7 +5638,7 @@ def test_patch_rest_unset_required_fields(): ) -def test_patch_rest_flattened(): +def test_list_managed_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -5794,7 +5647,7 @@ def test_patch_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.RegionInstanceGroupManagersListInstancesResponse() # get arguments that satisfy an http rule for this method sample_request = { @@ -5808,13 +5661,6 @@ def test_patch_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) - ), ) mock_args.update(sample_request) @@ -5822,26 +5668,28 @@ def test_patch_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.RegionInstanceGroupManagersListInstancesResponse.pb( + return_value + ) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.patch(**mock_args) + client.list_managed_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listManagedInstances" % client.transport._host, args[1], ) -def test_patch_rest_flattened_error(transport: str = "rest"): +def test_list_managed_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -5850,22 +5698,83 @@ def test_patch_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.patch( - compute.PatchRegionInstanceGroupManagerRequest(), + client.list_managed_instances( + compute.ListManagedInstancesRegionInstanceGroupManagersRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + ) + + +def test_list_managed_instances_rest_pager(transport: str = "rest"): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.RegionInstanceGroupManagersListInstancesResponse( + managed_instances=[ + compute.ManagedInstance(), + compute.ManagedInstance(), + compute.ManagedInstance(), + ], + next_page_token="abc", + ), + compute.RegionInstanceGroupManagersListInstancesResponse( + managed_instances=[], + next_page_token="def", + ), + compute.RegionInstanceGroupManagersListInstancesResponse( + managed_instances=[ + compute.ManagedInstance(), + ], + next_page_token="ghi", + ), + compute.RegionInstanceGroupManagersListInstancesResponse( + managed_instances=[ + compute.ManagedInstance(), + compute.ManagedInstance(), + ], ), ) + # Two responses for two calls + response = response + response + # Wrap the values into proper Response objs + response = tuple( + compute.RegionInstanceGroupManagersListInstancesResponse.to_json(x) + for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values -def test_patch_unary_rest_use_cached_wrapped_rpc(): + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + + pager = client.list_managed_instances(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.ManagedInstance) for i in results) + + pages = list(client.list_managed_instances(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_list_per_instance_configs_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -5879,34 +5788,35 @@ def test_patch_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.patch in client._transport._wrapped_methods + assert ( + client._transport.list_per_instance_configs + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.patch] = mock_rpc + client._transport._wrapped_methods[ + client._transport.list_per_instance_configs + ] = mock_rpc request = {} - client.patch_unary(request) + client.list_per_instance_configs(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - # Operation methods build a cached wrapper on first rpc call - # subsequent calls should use the cached wrapper - wrapper_fn.reset_mock() - - client.patch_unary(request) + client.list_per_instance_configs(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_patch_unary_rest_required_fields( - request_type=compute.PatchRegionInstanceGroupManagerRequest, +def test_list_per_instance_configs_rest_required_fields( + request_type=compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -5924,7 +5834,7 @@ def test_patch_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch._get_unset_required_fields(jsonified_request) + ).list_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -5935,9 +5845,17 @@ def test_patch_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch._get_unset_required_fields(jsonified_request) + ).list_per_instance_configs._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -5955,7 +5873,7 @@ def test_patch_unary_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -5967,42 +5885,52 @@ def test_patch_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "patch", + "method": "post", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = ( + compute.RegionInstanceGroupManagersListInstanceConfigsResp.pb( + return_value + ) + ) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.patch_unary(request) + response = client.list_per_instance_configs(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_patch_unary_rest_unset_required_fields(): +def test_list_per_instance_configs_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.patch._get_unset_required_fields({}) + unset_fields = transport.list_per_instance_configs._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) & set( ( "instanceGroupManager", - "instanceGroupManagerResource", "project", "region", ) @@ -6010,7 +5938,7 @@ def test_patch_unary_rest_unset_required_fields(): ) -def test_patch_unary_rest_flattened(): +def test_list_per_instance_configs_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -6019,7 +5947,7 @@ def test_patch_unary_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp() # get arguments that satisfy an http rule for this method sample_request = { @@ -6033,13 +5961,6 @@ def test_patch_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) - ), ) mock_args.update(sample_request) @@ -6047,26 +5968,28 @@ def test_patch_unary_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.RegionInstanceGroupManagersListInstanceConfigsResp.pb( + return_value + ) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.patch_unary(**mock_args) + client.list_per_instance_configs(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/listPerInstanceConfigs" % client.transport._host, args[1], ) -def test_patch_unary_rest_flattened_error(transport: str = "rest"): +def test_list_per_instance_configs_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -6075,51 +5998,107 @@ def test_patch_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.patch_unary( - compute.PatchRegionInstanceGroupManagerRequest(), + client.list_per_instance_configs( + compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) - ), ) -def test_patch_per_instance_configs_rest_use_cached_wrapped_rpc(): - # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, - # instead of constructing them on each call - with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport="rest", - ) - - # Should wrap all calls on client creation - assert wrapper_fn.call_count > 0 - wrapper_fn.reset_mock() +def test_list_per_instance_configs_rest_pager(transport: str = "rest"): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) - # Ensure method has been cached - assert ( - client._transport.patch_per_instance_configs - in client._transport._wrapped_methods + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.RegionInstanceGroupManagersListInstanceConfigsResp( + items=[ + compute.PerInstanceConfig(), + compute.PerInstanceConfig(), + compute.PerInstanceConfig(), + ], + next_page_token="abc", + ), + compute.RegionInstanceGroupManagersListInstanceConfigsResp( + items=[], + next_page_token="def", + ), + compute.RegionInstanceGroupManagersListInstanceConfigsResp( + items=[ + compute.PerInstanceConfig(), + ], + next_page_token="ghi", + ), + compute.RegionInstanceGroupManagersListInstanceConfigsResp( + items=[ + compute.PerInstanceConfig(), + compute.PerInstanceConfig(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple( + compute.RegionInstanceGroupManagersListInstanceConfigsResp.to_json(x) + for x in response + ) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + + pager = client.list_per_instance_configs(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.PerInstanceConfig) for i in results) + + pages = list(client.list_per_instance_configs(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_patch_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", ) + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.patch in client._transport._wrapped_methods + # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.patch_per_instance_configs - ] = mock_rpc + client._transport._wrapped_methods[client._transport.patch] = mock_rpc request = {} - client.patch_per_instance_configs(request) + client.patch(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -6128,15 +6107,15 @@ def test_patch_per_instance_configs_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.patch_per_instance_configs(request) + client.patch(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_patch_per_instance_configs_rest_required_fields( - request_type=compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_patch_rest_required_fields( + request_type=compute.PatchRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -6154,7 +6133,7 @@ def test_patch_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) + ).patch._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -6165,7 +6144,7 @@ def test_patch_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) + ).patch._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -6197,7 +6176,7 @@ def test_patch_per_instance_configs_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "patch", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -6214,33 +6193,33 @@ def test_patch_per_instance_configs_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.patch_per_instance_configs(request) + response = client.patch(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_patch_per_instance_configs_rest_unset_required_fields(): +def test_patch_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.patch_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.patch._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( ( "instanceGroupManager", + "instanceGroupManagerResource", "project", "region", - "regionInstanceGroupManagerPatchInstanceConfigReqResource", ) ) ) -def test_patch_per_instance_configs_rest_flattened(): +def test_patch_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -6263,10 +6242,12 @@ def test_patch_per_instance_configs_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) mock_args.update(sample_request) @@ -6281,20 +6262,20 @@ def test_patch_per_instance_configs_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.patch_per_instance_configs(**mock_args) + client.patch(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_patch_per_instance_configs_rest_flattened_error(transport: str = "rest"): +def test_patch_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -6303,20 +6284,22 @@ def test_patch_per_instance_configs_rest_flattened_error(transport: str = "rest" # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.patch_per_instance_configs( - compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(), + client.patch( + compute.PatchRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) -def test_patch_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): +def test_patch_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -6330,22 +6313,17 @@ def test_patch_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.patch_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.patch in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.patch_per_instance_configs - ] = mock_rpc + client._transport._wrapped_methods[client._transport.patch] = mock_rpc request = {} - client.patch_per_instance_configs_unary(request) + client.patch_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -6354,15 +6332,15 @@ def test_patch_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.patch_per_instance_configs_unary(request) + client.patch_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_patch_per_instance_configs_unary_rest_required_fields( - request_type=compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_patch_unary_rest_required_fields( + request_type=compute.PatchRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -6380,7 +6358,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) + ).patch._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -6391,7 +6369,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) + ).patch._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -6423,7 +6401,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "patch", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -6440,33 +6418,33 @@ def test_patch_per_instance_configs_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.patch_per_instance_configs_unary(request) + response = client.patch_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_patch_per_instance_configs_unary_rest_unset_required_fields(): +def test_patch_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.patch_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.patch._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( ( "instanceGroupManager", + "instanceGroupManagerResource", "project", "region", - "regionInstanceGroupManagerPatchInstanceConfigReqResource", ) ) ) -def test_patch_per_instance_configs_unary_rest_flattened(): +def test_patch_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -6489,10 +6467,12 @@ def test_patch_per_instance_configs_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) mock_args.update(sample_request) @@ -6507,20 +6487,20 @@ def test_patch_per_instance_configs_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.patch_per_instance_configs_unary(**mock_args) + client.patch_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_patch_per_instance_configs_unary_rest_flattened_error(transport: str = "rest"): +def test_patch_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -6529,20 +6509,22 @@ def test_patch_per_instance_configs_unary_rest_flattened_error(transport: str = # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.patch_per_instance_configs_unary( - compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(), + client.patch_unary( + compute.PatchRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) -def test_recreate_instances_rest_use_cached_wrapped_rpc(): +def test_patch_per_instance_configs_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -6557,7 +6539,8 @@ def test_recreate_instances_rest_use_cached_wrapped_rpc(): # Ensure method has been cached assert ( - client._transport.recreate_instances in client._transport._wrapped_methods + client._transport.patch_per_instance_configs + in client._transport._wrapped_methods ) # Replace cached wrapped function with mock @@ -6566,11 +6549,11 @@ def test_recreate_instances_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.recreate_instances + client._transport.patch_per_instance_configs ] = mock_rpc request = {} - client.recreate_instances(request) + client.patch_per_instance_configs(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -6579,15 +6562,15 @@ def test_recreate_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.recreate_instances(request) + client.patch_per_instance_configs(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_recreate_instances_rest_required_fields( - request_type=compute.RecreateInstancesRegionInstanceGroupManagerRequest, +def test_patch_per_instance_configs_rest_required_fields( + request_type=compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -6605,7 +6588,7 @@ def test_recreate_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).recreate_instances._get_unset_required_fields(jsonified_request) + ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -6616,7 +6599,7 @@ def test_recreate_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).recreate_instances._get_unset_required_fields(jsonified_request) + ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -6665,19 +6648,19 @@ def test_recreate_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.recreate_instances(request) + response = client.patch_per_instance_configs(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_recreate_instances_rest_unset_required_fields(): +def test_patch_per_instance_configs_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.recreate_instances._get_unset_required_fields({}) + unset_fields = transport.patch_per_instance_configs._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -6685,13 +6668,13 @@ def test_recreate_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersRecreateRequestResource", + "regionInstanceGroupManagerPatchInstanceConfigReqResource", ) ) ) -def test_recreate_instances_rest_flattened(): +def test_patch_per_instance_configs_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -6714,8 +6697,10 @@ def test_recreate_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( - instances=["instances_value"] + region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] ), ) mock_args.update(sample_request) @@ -6730,20 +6715,20 @@ def test_recreate_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.recreate_instances(**mock_args) + client.patch_per_instance_configs(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/recreateInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs" % client.transport._host, args[1], ) -def test_recreate_instances_rest_flattened_error(transport: str = "rest"): +def test_patch_per_instance_configs_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -6752,18 +6737,20 @@ def test_recreate_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.recreate_instances( - compute.RecreateInstancesRegionInstanceGroupManagerRequest(), + client.patch_per_instance_configs( + compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( - instances=["instances_value"] + region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] ), ) -def test_recreate_instances_unary_rest_use_cached_wrapped_rpc(): +def test_patch_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -6778,7 +6765,8 @@ def test_recreate_instances_unary_rest_use_cached_wrapped_rpc(): # Ensure method has been cached assert ( - client._transport.recreate_instances in client._transport._wrapped_methods + client._transport.patch_per_instance_configs + in client._transport._wrapped_methods ) # Replace cached wrapped function with mock @@ -6787,11 +6775,11 @@ def test_recreate_instances_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.recreate_instances + client._transport.patch_per_instance_configs ] = mock_rpc request = {} - client.recreate_instances_unary(request) + client.patch_per_instance_configs_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -6800,15 +6788,15 @@ def test_recreate_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.recreate_instances_unary(request) + client.patch_per_instance_configs_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_recreate_instances_unary_rest_required_fields( - request_type=compute.RecreateInstancesRegionInstanceGroupManagerRequest, +def test_patch_per_instance_configs_unary_rest_required_fields( + request_type=compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -6826,7 +6814,7 @@ def test_recreate_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).recreate_instances._get_unset_required_fields(jsonified_request) + ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -6837,7 +6825,7 @@ def test_recreate_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).recreate_instances._get_unset_required_fields(jsonified_request) + ).patch_per_instance_configs._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -6886,19 +6874,19 @@ def test_recreate_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.recreate_instances_unary(request) + response = client.patch_per_instance_configs_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_recreate_instances_unary_rest_unset_required_fields(): +def test_patch_per_instance_configs_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.recreate_instances._get_unset_required_fields({}) + unset_fields = transport.patch_per_instance_configs._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -6906,13 +6894,13 @@ def test_recreate_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersRecreateRequestResource", + "regionInstanceGroupManagerPatchInstanceConfigReqResource", ) ) ) -def test_recreate_instances_unary_rest_flattened(): +def test_patch_per_instance_configs_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -6935,8 +6923,10 @@ def test_recreate_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( - instances=["instances_value"] + region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] ), ) mock_args.update(sample_request) @@ -6951,20 +6941,20 @@ def test_recreate_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.recreate_instances_unary(**mock_args) + client.patch_per_instance_configs_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/recreateInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/patchPerInstanceConfigs" % client.transport._host, args[1], ) -def test_recreate_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_patch_per_instance_configs_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -6973,18 +6963,20 @@ def test_recreate_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.recreate_instances_unary( - compute.RecreateInstancesRegionInstanceGroupManagerRequest(), + client.patch_per_instance_configs_unary( + compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( - instances=["instances_value"] + region_instance_group_manager_patch_instance_config_req_resource=compute.RegionInstanceGroupManagerPatchInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] ), ) -def test_resize_rest_use_cached_wrapped_rpc(): +def test_recreate_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -6998,17 +6990,21 @@ def test_resize_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resize in client._transport._wrapped_methods + assert ( + client._transport.recreate_instances in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.resize] = mock_rpc + client._transport._wrapped_methods[ + client._transport.recreate_instances + ] = mock_rpc request = {} - client.resize(request) + client.recreate_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -7017,15 +7013,15 @@ def test_resize_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resize(request) + client.recreate_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resize_rest_required_fields( - request_type=compute.ResizeRegionInstanceGroupManagerRequest, +def test_recreate_instances_rest_required_fields( + request_type=compute.RecreateInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -7033,7 +7029,6 @@ def test_resize_rest_required_fields( request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" - request_init["size"] = 0 request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -7041,32 +7036,23 @@ def test_resize_rest_required_fields( ) # verify fields with default values are dropped - assert "size" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize._get_unset_required_fields(jsonified_request) + ).recreate_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present - assert "size" in jsonified_request - assert jsonified_request["size"] == request_init["size"] jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" - jsonified_request["size"] = 443 unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize._get_unset_required_fields(jsonified_request) + ).recreate_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "request_id", - "size", - ) - ) + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -7076,8 +7062,6 @@ def test_resize_rest_required_fields( assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" - assert "size" in jsonified_request - assert jsonified_request["size"] == 443 client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7101,6 +7085,7 @@ def test_resize_rest_required_fields( "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -7114,43 +7099,33 @@ def test_resize_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resize(request) + response = client.recreate_instances(request) - expected_params = [ - ( - "size", - str(0), - ), - ] + expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resize_rest_unset_required_fields(): +def test_recreate_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resize._get_unset_required_fields({}) + unset_fields = transport.recreate_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set( - ( - "requestId", - "size", - ) - ) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "size", + "regionInstanceGroupManagersRecreateRequestResource", ) ) ) -def test_resize_rest_flattened(): +def test_recreate_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -7173,7 +7148,9 @@ def test_resize_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - size=443, + region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( + instances=["instances_value"] + ), ) mock_args.update(sample_request) @@ -7187,20 +7164,20 @@ def test_resize_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resize(**mock_args) + client.recreate_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resize" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/recreateInstances" % client.transport._host, args[1], ) -def test_resize_rest_flattened_error(transport: str = "rest"): +def test_recreate_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -7209,16 +7186,18 @@ def test_resize_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resize( - compute.ResizeRegionInstanceGroupManagerRequest(), + client.recreate_instances( + compute.RecreateInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - size=443, + region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( + instances=["instances_value"] + ), ) -def test_resize_unary_rest_use_cached_wrapped_rpc(): +def test_recreate_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -7232,17 +7211,21 @@ def test_resize_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resize in client._transport._wrapped_methods + assert ( + client._transport.recreate_instances in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.resize] = mock_rpc + client._transport._wrapped_methods[ + client._transport.recreate_instances + ] = mock_rpc request = {} - client.resize_unary(request) + client.recreate_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -7251,15 +7234,15 @@ def test_resize_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resize_unary(request) + client.recreate_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resize_unary_rest_required_fields( - request_type=compute.ResizeRegionInstanceGroupManagerRequest, +def test_recreate_instances_unary_rest_required_fields( + request_type=compute.RecreateInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -7267,7 +7250,6 @@ def test_resize_unary_rest_required_fields( request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" - request_init["size"] = 0 request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -7275,32 +7257,23 @@ def test_resize_unary_rest_required_fields( ) # verify fields with default values are dropped - assert "size" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize._get_unset_required_fields(jsonified_request) + ).recreate_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present - assert "size" in jsonified_request - assert jsonified_request["size"] == request_init["size"] jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" - jsonified_request["size"] = 443 unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize._get_unset_required_fields(jsonified_request) + ).recreate_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "request_id", - "size", - ) - ) + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -7310,8 +7283,6 @@ def test_resize_unary_rest_required_fields( assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" - assert "size" in jsonified_request - assert jsonified_request["size"] == 443 client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7335,6 +7306,7 @@ def test_resize_unary_rest_required_fields( "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -7348,43 +7320,33 @@ def test_resize_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resize_unary(request) + response = client.recreate_instances_unary(request) - expected_params = [ - ( - "size", - str(0), - ), - ] + expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resize_unary_rest_unset_required_fields(): +def test_recreate_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resize._get_unset_required_fields({}) + unset_fields = transport.recreate_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set( - ( - "requestId", - "size", - ) - ) + set(("requestId",)) & set( ( "instanceGroupManager", "project", "region", - "size", + "regionInstanceGroupManagersRecreateRequestResource", ) ) ) -def test_resize_unary_rest_flattened(): +def test_recreate_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -7407,7 +7369,9 @@ def test_resize_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - size=443, + region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( + instances=["instances_value"] + ), ) mock_args.update(sample_request) @@ -7421,20 +7385,20 @@ def test_resize_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resize_unary(**mock_args) + client.recreate_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resize" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/recreateInstances" % client.transport._host, args[1], ) -def test_resize_unary_rest_flattened_error(transport: str = "rest"): +def test_recreate_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -7443,16 +7407,18 @@ def test_resize_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resize_unary( - compute.ResizeRegionInstanceGroupManagerRequest(), + client.recreate_instances_unary( + compute.RecreateInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - size=443, + region_instance_group_managers_recreate_request_resource=compute.RegionInstanceGroupManagersRecreateRequest( + instances=["instances_value"] + ), ) -def test_resize_advanced_rest_use_cached_wrapped_rpc(): +def test_resize_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -7466,17 +7432,17 @@ def test_resize_advanced_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resize_advanced in client._transport._wrapped_methods + assert client._transport.resize in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.resize_advanced] = mock_rpc + client._transport._wrapped_methods[client._transport.resize] = mock_rpc request = {} - client.resize_advanced(request) + client.resize(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -7485,15 +7451,15 @@ def test_resize_advanced_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resize_advanced(request) + client.resize(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resize_advanced_rest_required_fields( - request_type=compute.ResizeAdvancedRegionInstanceGroupManagerRequest, +def test_resize_rest_required_fields( + request_type=compute.ResizeRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -7501,6 +7467,7 @@ def test_resize_advanced_rest_required_fields( request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" + request_init["size"] = 0 request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -7508,23 +7475,32 @@ def test_resize_advanced_rest_required_fields( ) # verify fields with default values are dropped + assert "size" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize_advanced._get_unset_required_fields(jsonified_request) + ).resize._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + assert "size" in jsonified_request + assert jsonified_request["size"] == request_init["size"] jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" + jsonified_request["size"] = 443 unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize_advanced._get_unset_required_fields(jsonified_request) + ).resize._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + assert not set(unset_fields) - set( + ( + "request_id", + "size", + ) + ) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -7534,6 +7510,8 @@ def test_resize_advanced_rest_required_fields( assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" + assert "size" in jsonified_request + assert jsonified_request["size"] == 443 client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7557,7 +7535,6 @@ def test_resize_advanced_rest_required_fields( "method": "post", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -7571,33 +7548,43 @@ def test_resize_advanced_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resize_advanced(request) + response = client.resize(request) - expected_params = [] + expected_params = [ + ( + "size", + str(0), + ), + ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resize_advanced_rest_unset_required_fields(): +def test_resize_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resize_advanced._get_unset_required_fields({}) + unset_fields = transport.resize._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) - & set( + set( ( - "instanceGroupManager", - "project", - "region", - "regionInstanceGroupManagersResizeAdvancedRequestResource", + "requestId", + "size", + ) + ) + & set( + ( + "instanceGroupManager", + "project", + "region", + "size", ) ) ) -def test_resize_advanced_rest_flattened(): +def test_resize_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -7620,9 +7607,7 @@ def test_resize_advanced_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( - no_creation_retries=True - ), + size=443, ) mock_args.update(sample_request) @@ -7636,20 +7621,20 @@ def test_resize_advanced_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resize_advanced(**mock_args) + client.resize(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resizeAdvanced" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resize" % client.transport._host, args[1], ) -def test_resize_advanced_rest_flattened_error(transport: str = "rest"): +def test_resize_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -7658,18 +7643,16 @@ def test_resize_advanced_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resize_advanced( - compute.ResizeAdvancedRegionInstanceGroupManagerRequest(), + client.resize( + compute.ResizeRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( - no_creation_retries=True - ), + size=443, ) -def test_resize_advanced_unary_rest_use_cached_wrapped_rpc(): +def test_resize_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -7683,17 +7666,17 @@ def test_resize_advanced_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resize_advanced in client._transport._wrapped_methods + assert client._transport.resize in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.resize_advanced] = mock_rpc + client._transport._wrapped_methods[client._transport.resize] = mock_rpc request = {} - client.resize_advanced_unary(request) + client.resize_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -7702,15 +7685,15 @@ def test_resize_advanced_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resize_advanced_unary(request) + client.resize_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resize_advanced_unary_rest_required_fields( - request_type=compute.ResizeAdvancedRegionInstanceGroupManagerRequest, +def test_resize_unary_rest_required_fields( + request_type=compute.ResizeRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -7718,6 +7701,7 @@ def test_resize_advanced_unary_rest_required_fields( request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" + request_init["size"] = 0 request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -7725,23 +7709,32 @@ def test_resize_advanced_unary_rest_required_fields( ) # verify fields with default values are dropped + assert "size" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize_advanced._get_unset_required_fields(jsonified_request) + ).resize._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + assert "size" in jsonified_request + assert jsonified_request["size"] == request_init["size"] jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" + jsonified_request["size"] = 443 unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resize_advanced._get_unset_required_fields(jsonified_request) + ).resize._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + assert not set(unset_fields) - set( + ( + "request_id", + "size", + ) + ) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -7751,6 +7744,8 @@ def test_resize_advanced_unary_rest_required_fields( assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" + assert "size" in jsonified_request + assert jsonified_request["size"] == 443 client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7774,7 +7769,6 @@ def test_resize_advanced_unary_rest_required_fields( "method": "post", "query_params": pb_request, } - transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() @@ -7788,33 +7782,43 @@ def test_resize_advanced_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resize_advanced_unary(request) + response = client.resize_unary(request) - expected_params = [] + expected_params = [ + ( + "size", + str(0), + ), + ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resize_advanced_unary_rest_unset_required_fields(): +def test_resize_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resize_advanced._get_unset_required_fields({}) + unset_fields = transport.resize._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set( + ( + "requestId", + "size", + ) + ) & set( ( "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersResizeAdvancedRequestResource", + "size", ) ) ) -def test_resize_advanced_unary_rest_flattened(): +def test_resize_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -7837,9 +7841,7 @@ def test_resize_advanced_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( - no_creation_retries=True - ), + size=443, ) mock_args.update(sample_request) @@ -7853,20 +7855,20 @@ def test_resize_advanced_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resize_advanced_unary(**mock_args) + client.resize_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resizeAdvanced" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resize" % client.transport._host, args[1], ) -def test_resize_advanced_unary_rest_flattened_error(transport: str = "rest"): +def test_resize_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -7875,18 +7877,16 @@ def test_resize_advanced_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resize_advanced_unary( - compute.ResizeAdvancedRegionInstanceGroupManagerRequest(), + client.resize_unary( + compute.ResizeRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( - no_creation_retries=True - ), + size=443, ) -def test_resume_instances_rest_use_cached_wrapped_rpc(): +def test_resize_advanced_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -7900,19 +7900,17 @@ def test_resume_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resume_instances in client._transport._wrapped_methods + assert client._transport.resize_advanced in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.resume_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.resize_advanced] = mock_rpc request = {} - client.resume_instances(request) + client.resize_advanced(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -7921,15 +7919,15 @@ def test_resume_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resume_instances(request) + client.resize_advanced(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resume_instances_rest_required_fields( - request_type=compute.ResumeInstancesRegionInstanceGroupManagerRequest, +def test_resize_advanced_rest_required_fields( + request_type=compute.ResizeAdvancedRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -7947,7 +7945,7 @@ def test_resume_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resume_instances._get_unset_required_fields(jsonified_request) + ).resize_advanced._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -7958,7 +7956,7 @@ def test_resume_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resume_instances._get_unset_required_fields(jsonified_request) + ).resize_advanced._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -8007,19 +8005,19 @@ def test_resume_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resume_instances(request) + response = client.resize_advanced(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resume_instances_rest_unset_required_fields(): +def test_resize_advanced_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resume_instances._get_unset_required_fields({}) + unset_fields = transport.resize_advanced._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -8027,13 +8025,13 @@ def test_resume_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersResumeInstancesRequestResource", + "regionInstanceGroupManagersResizeAdvancedRequestResource", ) ) ) -def test_resume_instances_rest_flattened(): +def test_resize_advanced_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -8056,8 +8054,8 @@ def test_resume_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( + no_creation_retries=True ), ) mock_args.update(sample_request) @@ -8072,20 +8070,20 @@ def test_resume_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resume_instances(**mock_args) + client.resize_advanced(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resumeInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resizeAdvanced" % client.transport._host, args[1], ) -def test_resume_instances_rest_flattened_error(transport: str = "rest"): +def test_resize_advanced_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -8094,18 +8092,18 @@ def test_resume_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resume_instances( - compute.ResumeInstancesRegionInstanceGroupManagerRequest(), + client.resize_advanced( + compute.ResizeAdvancedRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( + no_creation_retries=True ), ) -def test_resume_instances_unary_rest_use_cached_wrapped_rpc(): +def test_resize_advanced_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -8119,19 +8117,17 @@ def test_resume_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.resume_instances in client._transport._wrapped_methods + assert client._transport.resize_advanced in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.resume_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.resize_advanced] = mock_rpc request = {} - client.resume_instances_unary(request) + client.resize_advanced_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -8140,15 +8136,15 @@ def test_resume_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.resume_instances_unary(request) + client.resize_advanced_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_resume_instances_unary_rest_required_fields( - request_type=compute.ResumeInstancesRegionInstanceGroupManagerRequest, +def test_resize_advanced_unary_rest_required_fields( + request_type=compute.ResizeAdvancedRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -8166,7 +8162,7 @@ def test_resume_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resume_instances._get_unset_required_fields(jsonified_request) + ).resize_advanced._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -8177,7 +8173,7 @@ def test_resume_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).resume_instances._get_unset_required_fields(jsonified_request) + ).resize_advanced._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -8226,19 +8222,19 @@ def test_resume_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.resume_instances_unary(request) + response = client.resize_advanced_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_resume_instances_unary_rest_unset_required_fields(): +def test_resize_advanced_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.resume_instances._get_unset_required_fields({}) + unset_fields = transport.resize_advanced._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -8246,13 +8242,13 @@ def test_resume_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersResumeInstancesRequestResource", + "regionInstanceGroupManagersResizeAdvancedRequestResource", ) ) ) -def test_resume_instances_unary_rest_flattened(): +def test_resize_advanced_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -8275,8 +8271,8 @@ def test_resume_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( + no_creation_retries=True ), ) mock_args.update(sample_request) @@ -8291,20 +8287,20 @@ def test_resume_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.resume_instances_unary(**mock_args) + client.resize_advanced_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resumeInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resizeAdvanced" % client.transport._host, args[1], ) -def test_resume_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_resize_advanced_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -8313,18 +8309,18 @@ def test_resume_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.resume_instances_unary( - compute.ResumeInstancesRegionInstanceGroupManagerRequest(), + client.resize_advanced_unary( + compute.ResizeAdvancedRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_resize_advanced_request_resource=compute.RegionInstanceGroupManagersResizeAdvancedRequest( + no_creation_retries=True ), ) -def test_set_auto_healing_policies_rest_use_cached_wrapped_rpc(): +def test_resume_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -8338,10 +8334,7 @@ def test_set_auto_healing_policies_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.set_auto_healing_policies - in client._transport._wrapped_methods - ) + assert client._transport.resume_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -8349,11 +8342,11 @@ def test_set_auto_healing_policies_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_auto_healing_policies + client._transport.resume_instances ] = mock_rpc request = {} - client.set_auto_healing_policies(request) + client.resume_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -8362,15 +8355,15 @@ def test_set_auto_healing_policies_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_auto_healing_policies(request) + client.resume_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_auto_healing_policies_rest_required_fields( - request_type=compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest, +def test_resume_instances_rest_required_fields( + request_type=compute.ResumeInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -8388,7 +8381,7 @@ def test_set_auto_healing_policies_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) + ).resume_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -8399,7 +8392,7 @@ def test_set_auto_healing_policies_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) + ).resume_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -8448,19 +8441,19 @@ def test_set_auto_healing_policies_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_auto_healing_policies(request) + response = client.resume_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_auto_healing_policies_rest_unset_required_fields(): +def test_resume_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_auto_healing_policies._get_unset_required_fields({}) + unset_fields = transport.resume_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -8468,13 +8461,13 @@ def test_set_auto_healing_policies_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetAutoHealingRequestResource", + "regionInstanceGroupManagersResumeInstancesRequestResource", ) ) ) -def test_set_auto_healing_policies_rest_flattened(): +def test_resume_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -8497,12 +8490,8 @@ def test_set_auto_healing_policies_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( - auto_healing_policies=[ - compute.InstanceGroupManagerAutoHealingPolicy( - health_check="health_check_value" - ) - ] + region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -8517,20 +8506,20 @@ def test_set_auto_healing_policies_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_auto_healing_policies(**mock_args) + client.resume_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setAutoHealingPolicies" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resumeInstances" % client.transport._host, args[1], ) -def test_set_auto_healing_policies_rest_flattened_error(transport: str = "rest"): +def test_resume_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -8539,22 +8528,18 @@ def test_set_auto_healing_policies_rest_flattened_error(transport: str = "rest") # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_auto_healing_policies( - compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(), + client.resume_instances( + compute.ResumeInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( - auto_healing_policies=[ - compute.InstanceGroupManagerAutoHealingPolicy( - health_check="health_check_value" - ) - ] + region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( + instances=["instances_value"] ), ) -def test_set_auto_healing_policies_unary_rest_use_cached_wrapped_rpc(): +def test_resume_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -8568,10 +8553,7 @@ def test_set_auto_healing_policies_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.set_auto_healing_policies - in client._transport._wrapped_methods - ) + assert client._transport.resume_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -8579,11 +8561,11 @@ def test_set_auto_healing_policies_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_auto_healing_policies + client._transport.resume_instances ] = mock_rpc request = {} - client.set_auto_healing_policies_unary(request) + client.resume_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -8592,15 +8574,15 @@ def test_set_auto_healing_policies_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_auto_healing_policies_unary(request) + client.resume_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_auto_healing_policies_unary_rest_required_fields( - request_type=compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest, +def test_resume_instances_unary_rest_required_fields( + request_type=compute.ResumeInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -8618,7 +8600,7 @@ def test_set_auto_healing_policies_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) + ).resume_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -8629,7 +8611,7 @@ def test_set_auto_healing_policies_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) + ).resume_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -8678,19 +8660,19 @@ def test_set_auto_healing_policies_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_auto_healing_policies_unary(request) + response = client.resume_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_auto_healing_policies_unary_rest_unset_required_fields(): +def test_resume_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_auto_healing_policies._get_unset_required_fields({}) + unset_fields = transport.resume_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -8698,13 +8680,13 @@ def test_set_auto_healing_policies_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetAutoHealingRequestResource", + "regionInstanceGroupManagersResumeInstancesRequestResource", ) ) ) -def test_set_auto_healing_policies_unary_rest_flattened(): +def test_resume_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -8727,12 +8709,8 @@ def test_set_auto_healing_policies_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( - auto_healing_policies=[ - compute.InstanceGroupManagerAutoHealingPolicy( - health_check="health_check_value" - ) - ] + region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -8747,20 +8725,20 @@ def test_set_auto_healing_policies_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_auto_healing_policies_unary(**mock_args) + client.resume_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setAutoHealingPolicies" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/resumeInstances" % client.transport._host, args[1], ) -def test_set_auto_healing_policies_unary_rest_flattened_error(transport: str = "rest"): +def test_resume_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -8769,22 +8747,18 @@ def test_set_auto_healing_policies_unary_rest_flattened_error(transport: str = " # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_auto_healing_policies_unary( - compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(), + client.resume_instances_unary( + compute.ResumeInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( - auto_healing_policies=[ - compute.InstanceGroupManagerAutoHealingPolicy( - health_check="health_check_value" - ) - ] + region_instance_group_managers_resume_instances_request_resource=compute.RegionInstanceGroupManagersResumeInstancesRequest( + instances=["instances_value"] ), ) -def test_set_instance_template_rest_use_cached_wrapped_rpc(): +def test_set_auto_healing_policies_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -8799,7 +8773,7 @@ def test_set_instance_template_rest_use_cached_wrapped_rpc(): # Ensure method has been cached assert ( - client._transport.set_instance_template + client._transport.set_auto_healing_policies in client._transport._wrapped_methods ) @@ -8809,11 +8783,11 @@ def test_set_instance_template_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_instance_template + client._transport.set_auto_healing_policies ] = mock_rpc request = {} - client.set_instance_template(request) + client.set_auto_healing_policies(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -8822,15 +8796,15 @@ def test_set_instance_template_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_instance_template(request) + client.set_auto_healing_policies(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_instance_template_rest_required_fields( - request_type=compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, +def test_set_auto_healing_policies_rest_required_fields( + request_type=compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -8848,7 +8822,7 @@ def test_set_instance_template_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_instance_template._get_unset_required_fields(jsonified_request) + ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -8859,7 +8833,7 @@ def test_set_instance_template_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_instance_template._get_unset_required_fields(jsonified_request) + ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -8908,19 +8882,19 @@ def test_set_instance_template_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_instance_template(request) + response = client.set_auto_healing_policies(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_instance_template_rest_unset_required_fields(): +def test_set_auto_healing_policies_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_instance_template._get_unset_required_fields({}) + unset_fields = transport.set_auto_healing_policies._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -8928,13 +8902,13 @@ def test_set_instance_template_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetTemplateRequestResource", + "regionInstanceGroupManagersSetAutoHealingRequestResource", ) ) ) -def test_set_instance_template_rest_flattened(): +def test_set_auto_healing_policies_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -8957,8 +8931,12 @@ def test_set_instance_template_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( - instance_template="instance_template_value" + region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( + auto_healing_policies=[ + compute.InstanceGroupManagerAutoHealingPolicy( + health_check="health_check_value" + ) + ] ), ) mock_args.update(sample_request) @@ -8973,20 +8951,20 @@ def test_set_instance_template_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_instance_template(**mock_args) + client.set_auto_healing_policies(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setAutoHealingPolicies" % client.transport._host, args[1], ) -def test_set_instance_template_rest_flattened_error(transport: str = "rest"): +def test_set_auto_healing_policies_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -8995,18 +8973,22 @@ def test_set_instance_template_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_instance_template( - compute.SetInstanceTemplateRegionInstanceGroupManagerRequest(), + client.set_auto_healing_policies( + compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( - instance_template="instance_template_value" + region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( + auto_healing_policies=[ + compute.InstanceGroupManagerAutoHealingPolicy( + health_check="health_check_value" + ) + ] ), ) -def test_set_instance_template_unary_rest_use_cached_wrapped_rpc(): +def test_set_auto_healing_policies_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -9021,7 +9003,7 @@ def test_set_instance_template_unary_rest_use_cached_wrapped_rpc(): # Ensure method has been cached assert ( - client._transport.set_instance_template + client._transport.set_auto_healing_policies in client._transport._wrapped_methods ) @@ -9031,11 +9013,11 @@ def test_set_instance_template_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_instance_template + client._transport.set_auto_healing_policies ] = mock_rpc request = {} - client.set_instance_template_unary(request) + client.set_auto_healing_policies_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -9044,15 +9026,15 @@ def test_set_instance_template_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_instance_template_unary(request) + client.set_auto_healing_policies_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_instance_template_unary_rest_required_fields( - request_type=compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, +def test_set_auto_healing_policies_unary_rest_required_fields( + request_type=compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -9070,7 +9052,7 @@ def test_set_instance_template_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_instance_template._get_unset_required_fields(jsonified_request) + ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -9081,7 +9063,7 @@ def test_set_instance_template_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_instance_template._get_unset_required_fields(jsonified_request) + ).set_auto_healing_policies._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -9130,19 +9112,19 @@ def test_set_instance_template_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_instance_template_unary(request) + response = client.set_auto_healing_policies_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_instance_template_unary_rest_unset_required_fields(): +def test_set_auto_healing_policies_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_instance_template._get_unset_required_fields({}) + unset_fields = transport.set_auto_healing_policies._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -9150,13 +9132,13 @@ def test_set_instance_template_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetTemplateRequestResource", + "regionInstanceGroupManagersSetAutoHealingRequestResource", ) ) ) -def test_set_instance_template_unary_rest_flattened(): +def test_set_auto_healing_policies_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -9179,8 +9161,12 @@ def test_set_instance_template_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( - instance_template="instance_template_value" + region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( + auto_healing_policies=[ + compute.InstanceGroupManagerAutoHealingPolicy( + health_check="health_check_value" + ) + ] ), ) mock_args.update(sample_request) @@ -9195,20 +9181,20 @@ def test_set_instance_template_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_instance_template_unary(**mock_args) + client.set_auto_healing_policies_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setAutoHealingPolicies" % client.transport._host, args[1], ) -def test_set_instance_template_unary_rest_flattened_error(transport: str = "rest"): +def test_set_auto_healing_policies_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -9217,18 +9203,22 @@ def test_set_instance_template_unary_rest_flattened_error(transport: str = "rest # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_instance_template_unary( - compute.SetInstanceTemplateRegionInstanceGroupManagerRequest(), + client.set_auto_healing_policies_unary( + compute.SetAutoHealingPoliciesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( - instance_template="instance_template_value" + region_instance_group_managers_set_auto_healing_request_resource=compute.RegionInstanceGroupManagersSetAutoHealingRequest( + auto_healing_policies=[ + compute.InstanceGroupManagerAutoHealingPolicy( + health_check="health_check_value" + ) + ] ), ) -def test_set_target_pools_rest_use_cached_wrapped_rpc(): +def test_set_instance_template_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -9242,7 +9232,10 @@ def test_set_target_pools_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.set_target_pools in client._transport._wrapped_methods + assert ( + client._transport.set_instance_template + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -9250,11 +9243,11 @@ def test_set_target_pools_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_target_pools + client._transport.set_instance_template ] = mock_rpc request = {} - client.set_target_pools(request) + client.set_instance_template(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -9263,15 +9256,15 @@ def test_set_target_pools_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_target_pools(request) + client.set_instance_template(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_target_pools_rest_required_fields( - request_type=compute.SetTargetPoolsRegionInstanceGroupManagerRequest, +def test_set_instance_template_rest_required_fields( + request_type=compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -9289,7 +9282,7 @@ def test_set_target_pools_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_target_pools._get_unset_required_fields(jsonified_request) + ).set_instance_template._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -9300,7 +9293,7 @@ def test_set_target_pools_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_target_pools._get_unset_required_fields(jsonified_request) + ).set_instance_template._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -9349,19 +9342,19 @@ def test_set_target_pools_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_target_pools(request) + response = client.set_instance_template(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_target_pools_rest_unset_required_fields(): +def test_set_instance_template_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_target_pools._get_unset_required_fields({}) + unset_fields = transport.set_instance_template._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -9369,13 +9362,13 @@ def test_set_target_pools_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetTargetPoolsRequestResource", + "regionInstanceGroupManagersSetTemplateRequestResource", ) ) ) -def test_set_target_pools_rest_flattened(): +def test_set_instance_template_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -9398,8 +9391,8 @@ def test_set_target_pools_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( - fingerprint="fingerprint_value" + region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( + instance_template="instance_template_value" ), ) mock_args.update(sample_request) @@ -9414,20 +9407,20 @@ def test_set_target_pools_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_target_pools(**mock_args) + client.set_instance_template(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setTargetPools" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate" % client.transport._host, args[1], ) -def test_set_target_pools_rest_flattened_error(transport: str = "rest"): +def test_set_instance_template_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -9436,18 +9429,18 @@ def test_set_target_pools_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_target_pools( - compute.SetTargetPoolsRegionInstanceGroupManagerRequest(), + client.set_instance_template( + compute.SetInstanceTemplateRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( - fingerprint="fingerprint_value" + region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( + instance_template="instance_template_value" ), ) -def test_set_target_pools_unary_rest_use_cached_wrapped_rpc(): +def test_set_instance_template_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -9461,7 +9454,10 @@ def test_set_target_pools_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.set_target_pools in client._transport._wrapped_methods + assert ( + client._transport.set_instance_template + in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -9469,11 +9465,11 @@ def test_set_target_pools_unary_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.set_target_pools + client._transport.set_instance_template ] = mock_rpc request = {} - client.set_target_pools_unary(request) + client.set_instance_template_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -9482,15 +9478,15 @@ def test_set_target_pools_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.set_target_pools_unary(request) + client.set_instance_template_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_set_target_pools_unary_rest_required_fields( - request_type=compute.SetTargetPoolsRegionInstanceGroupManagerRequest, +def test_set_instance_template_unary_rest_required_fields( + request_type=compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -9508,7 +9504,7 @@ def test_set_target_pools_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_target_pools._get_unset_required_fields(jsonified_request) + ).set_instance_template._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -9519,7 +9515,7 @@ def test_set_target_pools_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).set_target_pools._get_unset_required_fields(jsonified_request) + ).set_instance_template._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -9568,19 +9564,19 @@ def test_set_target_pools_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.set_target_pools_unary(request) + response = client.set_instance_template_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_set_target_pools_unary_rest_unset_required_fields(): +def test_set_instance_template_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.set_target_pools._get_unset_required_fields({}) + unset_fields = transport.set_instance_template._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -9588,13 +9584,13 @@ def test_set_target_pools_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSetTargetPoolsRequestResource", + "regionInstanceGroupManagersSetTemplateRequestResource", ) ) ) -def test_set_target_pools_unary_rest_flattened(): +def test_set_instance_template_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -9617,8 +9613,8 @@ def test_set_target_pools_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( - fingerprint="fingerprint_value" + region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( + instance_template="instance_template_value" ), ) mock_args.update(sample_request) @@ -9633,20 +9629,20 @@ def test_set_target_pools_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.set_target_pools_unary(**mock_args) + client.set_instance_template_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setTargetPools" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setInstanceTemplate" % client.transport._host, args[1], ) -def test_set_target_pools_unary_rest_flattened_error(transport: str = "rest"): +def test_set_instance_template_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -9655,18 +9651,18 @@ def test_set_target_pools_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.set_target_pools_unary( - compute.SetTargetPoolsRegionInstanceGroupManagerRequest(), + client.set_instance_template_unary( + compute.SetInstanceTemplateRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( - fingerprint="fingerprint_value" + region_instance_group_managers_set_template_request_resource=compute.RegionInstanceGroupManagersSetTemplateRequest( + instance_template="instance_template_value" ), ) -def test_start_instances_rest_use_cached_wrapped_rpc(): +def test_set_target_pools_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -9680,17 +9676,19 @@ def test_start_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.start_instances in client._transport._wrapped_methods + assert client._transport.set_target_pools in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.start_instances] = mock_rpc + client._transport._wrapped_methods[ + client._transport.set_target_pools + ] = mock_rpc request = {} - client.start_instances(request) + client.set_target_pools(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -9699,15 +9697,15 @@ def test_start_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.start_instances(request) + client.set_target_pools(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_start_instances_rest_required_fields( - request_type=compute.StartInstancesRegionInstanceGroupManagerRequest, +def test_set_target_pools_rest_required_fields( + request_type=compute.SetTargetPoolsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -9725,7 +9723,7 @@ def test_start_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).start_instances._get_unset_required_fields(jsonified_request) + ).set_target_pools._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -9736,7 +9734,7 @@ def test_start_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).start_instances._get_unset_required_fields(jsonified_request) + ).set_target_pools._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -9785,19 +9783,19 @@ def test_start_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.start_instances(request) + response = client.set_target_pools(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_start_instances_rest_unset_required_fields(): +def test_set_target_pools_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.start_instances._get_unset_required_fields({}) + unset_fields = transport.set_target_pools._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -9805,13 +9803,13 @@ def test_start_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersStartInstancesRequestResource", + "regionInstanceGroupManagersSetTargetPoolsRequestResource", ) ) ) -def test_start_instances_rest_flattened(): +def test_set_target_pools_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -9834,8 +9832,8 @@ def test_start_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( + fingerprint="fingerprint_value" ), ) mock_args.update(sample_request) @@ -9850,20 +9848,20 @@ def test_start_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.start_instances(**mock_args) + client.set_target_pools(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/startInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setTargetPools" % client.transport._host, args[1], ) -def test_start_instances_rest_flattened_error(transport: str = "rest"): +def test_set_target_pools_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -9872,18 +9870,18 @@ def test_start_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.start_instances( - compute.StartInstancesRegionInstanceGroupManagerRequest(), + client.set_target_pools( + compute.SetTargetPoolsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( + fingerprint="fingerprint_value" ), ) -def test_start_instances_unary_rest_use_cached_wrapped_rpc(): +def test_set_target_pools_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -9897,17 +9895,19 @@ def test_start_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.start_instances in client._transport._wrapped_methods + assert client._transport.set_target_pools in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.start_instances] = mock_rpc + client._transport._wrapped_methods[ + client._transport.set_target_pools + ] = mock_rpc request = {} - client.start_instances_unary(request) + client.set_target_pools_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -9916,15 +9916,15 @@ def test_start_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.start_instances_unary(request) + client.set_target_pools_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_start_instances_unary_rest_required_fields( - request_type=compute.StartInstancesRegionInstanceGroupManagerRequest, +def test_set_target_pools_unary_rest_required_fields( + request_type=compute.SetTargetPoolsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -9942,7 +9942,7 @@ def test_start_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).start_instances._get_unset_required_fields(jsonified_request) + ).set_target_pools._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -9953,7 +9953,7 @@ def test_start_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).start_instances._get_unset_required_fields(jsonified_request) + ).set_target_pools._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -10002,19 +10002,19 @@ def test_start_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.start_instances_unary(request) + response = client.set_target_pools_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_start_instances_unary_rest_unset_required_fields(): +def test_set_target_pools_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.start_instances._get_unset_required_fields({}) + unset_fields = transport.set_target_pools._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -10022,13 +10022,13 @@ def test_start_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersStartInstancesRequestResource", + "regionInstanceGroupManagersSetTargetPoolsRequestResource", ) ) ) -def test_start_instances_unary_rest_flattened(): +def test_set_target_pools_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -10051,8 +10051,8 @@ def test_start_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( + fingerprint="fingerprint_value" ), ) mock_args.update(sample_request) @@ -10067,20 +10067,20 @@ def test_start_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.start_instances_unary(**mock_args) + client.set_target_pools_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/startInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/setTargetPools" % client.transport._host, args[1], ) -def test_start_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_set_target_pools_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -10089,18 +10089,18 @@ def test_start_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.start_instances_unary( - compute.StartInstancesRegionInstanceGroupManagerRequest(), + client.set_target_pools_unary( + compute.SetTargetPoolsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( - instances=["instances_value"] + region_instance_group_managers_set_target_pools_request_resource=compute.RegionInstanceGroupManagersSetTargetPoolsRequest( + fingerprint="fingerprint_value" ), ) -def test_stop_instances_rest_use_cached_wrapped_rpc(): +def test_start_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -10114,17 +10114,17 @@ def test_stop_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.stop_instances in client._transport._wrapped_methods + assert client._transport.start_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.stop_instances] = mock_rpc + client._transport._wrapped_methods[client._transport.start_instances] = mock_rpc request = {} - client.stop_instances(request) + client.start_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -10133,15 +10133,15 @@ def test_stop_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.stop_instances(request) + client.start_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_stop_instances_rest_required_fields( - request_type=compute.StopInstancesRegionInstanceGroupManagerRequest, +def test_start_instances_rest_required_fields( + request_type=compute.StartInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -10159,7 +10159,7 @@ def test_stop_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).stop_instances._get_unset_required_fields(jsonified_request) + ).start_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -10170,7 +10170,7 @@ def test_stop_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).stop_instances._get_unset_required_fields(jsonified_request) + ).start_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -10219,19 +10219,19 @@ def test_stop_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.stop_instances(request) + response = client.start_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_stop_instances_rest_unset_required_fields(): +def test_start_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.stop_instances._get_unset_required_fields({}) + unset_fields = transport.start_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -10239,13 +10239,13 @@ def test_stop_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersStopInstancesRequestResource", + "regionInstanceGroupManagersStartInstancesRequestResource", ) ) ) -def test_stop_instances_rest_flattened(): +def test_start_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -10268,8 +10268,8 @@ def test_stop_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( - force_stop=True + region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -10284,20 +10284,20 @@ def test_stop_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.stop_instances(**mock_args) + client.start_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/stopInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/startInstances" % client.transport._host, args[1], ) -def test_stop_instances_rest_flattened_error(transport: str = "rest"): +def test_start_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -10306,18 +10306,18 @@ def test_stop_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.stop_instances( - compute.StopInstancesRegionInstanceGroupManagerRequest(), + client.start_instances( + compute.StartInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( - force_stop=True + region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( + instances=["instances_value"] ), ) -def test_stop_instances_unary_rest_use_cached_wrapped_rpc(): +def test_start_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -10331,17 +10331,17 @@ def test_stop_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.stop_instances in client._transport._wrapped_methods + assert client._transport.start_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.stop_instances] = mock_rpc + client._transport._wrapped_methods[client._transport.start_instances] = mock_rpc request = {} - client.stop_instances_unary(request) + client.start_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -10350,15 +10350,15 @@ def test_stop_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.stop_instances_unary(request) + client.start_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_stop_instances_unary_rest_required_fields( - request_type=compute.StopInstancesRegionInstanceGroupManagerRequest, +def test_start_instances_unary_rest_required_fields( + request_type=compute.StartInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -10376,7 +10376,7 @@ def test_stop_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).stop_instances._get_unset_required_fields(jsonified_request) + ).start_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -10387,7 +10387,7 @@ def test_stop_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).stop_instances._get_unset_required_fields(jsonified_request) + ).start_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -10436,19 +10436,19 @@ def test_stop_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.stop_instances_unary(request) + response = client.start_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_stop_instances_unary_rest_unset_required_fields(): +def test_start_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.stop_instances._get_unset_required_fields({}) + unset_fields = transport.start_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -10456,13 +10456,13 @@ def test_stop_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersStopInstancesRequestResource", + "regionInstanceGroupManagersStartInstancesRequestResource", ) ) ) -def test_stop_instances_unary_rest_flattened(): +def test_start_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -10485,8 +10485,8 @@ def test_stop_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( - force_stop=True + region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( + instances=["instances_value"] ), ) mock_args.update(sample_request) @@ -10501,20 +10501,20 @@ def test_stop_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.stop_instances_unary(**mock_args) + client.start_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/stopInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/startInstances" % client.transport._host, args[1], ) -def test_stop_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_start_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -10523,18 +10523,18 @@ def test_stop_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.stop_instances_unary( - compute.StopInstancesRegionInstanceGroupManagerRequest(), + client.start_instances_unary( + compute.StartInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( - force_stop=True + region_instance_group_managers_start_instances_request_resource=compute.RegionInstanceGroupManagersStartInstancesRequest( + instances=["instances_value"] ), ) -def test_suspend_instances_rest_use_cached_wrapped_rpc(): +def test_stop_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -10548,19 +10548,17 @@ def test_suspend_instances_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.suspend_instances in client._transport._wrapped_methods + assert client._transport.stop_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.suspend_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.stop_instances] = mock_rpc request = {} - client.suspend_instances(request) + client.stop_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -10569,15 +10567,15 @@ def test_suspend_instances_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.suspend_instances(request) + client.stop_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_suspend_instances_rest_required_fields( - request_type=compute.SuspendInstancesRegionInstanceGroupManagerRequest, +def test_stop_instances_rest_required_fields( + request_type=compute.StopInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -10595,7 +10593,7 @@ def test_suspend_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).suspend_instances._get_unset_required_fields(jsonified_request) + ).stop_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -10606,7 +10604,7 @@ def test_suspend_instances_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).suspend_instances._get_unset_required_fields(jsonified_request) + ).stop_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -10655,19 +10653,19 @@ def test_suspend_instances_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.suspend_instances(request) + response = client.stop_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_suspend_instances_rest_unset_required_fields(): +def test_stop_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.suspend_instances._get_unset_required_fields({}) + unset_fields = transport.stop_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -10675,13 +10673,13 @@ def test_suspend_instances_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSuspendInstancesRequestResource", + "regionInstanceGroupManagersStopInstancesRequestResource", ) ) ) -def test_suspend_instances_rest_flattened(): +def test_stop_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -10704,8 +10702,8 @@ def test_suspend_instances_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( - force_suspend=True + region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( + force_stop=True ), ) mock_args.update(sample_request) @@ -10720,20 +10718,20 @@ def test_suspend_instances_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.suspend_instances(**mock_args) + client.stop_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/stopInstances" % client.transport._host, args[1], ) -def test_suspend_instances_rest_flattened_error(transport: str = "rest"): +def test_stop_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -10742,18 +10740,18 @@ def test_suspend_instances_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.suspend_instances( - compute.SuspendInstancesRegionInstanceGroupManagerRequest(), + client.stop_instances( + compute.StopInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( - force_suspend=True + region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( + force_stop=True ), ) -def test_suspend_instances_unary_rest_use_cached_wrapped_rpc(): +def test_stop_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -10767,19 +10765,17 @@ def test_suspend_instances_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.suspend_instances in client._transport._wrapped_methods + assert client._transport.stop_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.suspend_instances - ] = mock_rpc + client._transport._wrapped_methods[client._transport.stop_instances] = mock_rpc request = {} - client.suspend_instances_unary(request) + client.stop_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -10788,15 +10784,15 @@ def test_suspend_instances_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.suspend_instances_unary(request) + client.stop_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_suspend_instances_unary_rest_required_fields( - request_type=compute.SuspendInstancesRegionInstanceGroupManagerRequest, +def test_stop_instances_unary_rest_required_fields( + request_type=compute.StopInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -10814,7 +10810,7 @@ def test_suspend_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).suspend_instances._get_unset_required_fields(jsonified_request) + ).stop_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -10825,7 +10821,7 @@ def test_suspend_instances_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).suspend_instances._get_unset_required_fields(jsonified_request) + ).stop_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -10874,19 +10870,19 @@ def test_suspend_instances_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.suspend_instances_unary(request) + response = client.stop_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_suspend_instances_unary_rest_unset_required_fields(): +def test_stop_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.suspend_instances._get_unset_required_fields({}) + unset_fields = transport.stop_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( @@ -10894,13 +10890,13 @@ def test_suspend_instances_unary_rest_unset_required_fields(): "instanceGroupManager", "project", "region", - "regionInstanceGroupManagersSuspendInstancesRequestResource", + "regionInstanceGroupManagersStopInstancesRequestResource", ) ) ) -def test_suspend_instances_unary_rest_flattened(): +def test_stop_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -10923,8 +10919,8 @@ def test_suspend_instances_unary_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( - force_suspend=True + region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( + force_stop=True ), ) mock_args.update(sample_request) @@ -10939,20 +10935,20 @@ def test_suspend_instances_unary_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.suspend_instances_unary(**mock_args) + client.stop_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/stopInstances" % client.transport._host, args[1], ) -def test_suspend_instances_unary_rest_flattened_error(transport: str = "rest"): +def test_stop_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -10961,18 +10957,18 @@ def test_suspend_instances_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.suspend_instances_unary( - compute.SuspendInstancesRegionInstanceGroupManagerRequest(), + client.stop_instances_unary( + compute.StopInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( - force_suspend=True + region_instance_group_managers_stop_instances_request_resource=compute.RegionInstanceGroupManagersStopInstancesRequest( + force_stop=True ), ) -def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): +def test_suspend_instances_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -10986,9 +10982,7 @@ def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.test_iam_permissions in client._transport._wrapped_methods - ) + assert client._transport.suspend_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() @@ -10996,31 +10990,35 @@ def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): "foo" # operation_request.operation in compute client(s) expect a string. ) client._transport._wrapped_methods[ - client._transport.test_iam_permissions + client._transport.suspend_instances ] = mock_rpc request = {} - client.test_iam_permissions(request) + client.suspend_instances(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - client.test_iam_permissions(request) + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.suspend_instances(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_test_iam_permissions_rest_required_fields( - request_type=compute.TestIamPermissionsRegionInstanceGroupManagerRequest, +def test_suspend_instances_rest_required_fields( + request_type=compute.SuspendInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} + request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" - request_init["resource"] = "" request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -11031,27 +11029,29 @@ def test_test_iam_permissions_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).test_iam_permissions._get_unset_required_fields(jsonified_request) + ).suspend_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" - jsonified_request["resource"] = "resource_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).test_iam_permissions._get_unset_required_fields(jsonified_request) + ).suspend_instances._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" - assert "resource" in jsonified_request - assert jsonified_request["resource"] == "resource_value" client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -11060,7 +11060,7 @@ def test_test_iam_permissions_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.TestPermissionsResponse() + return_value = compute.Operation() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -11082,40 +11082,40 @@ def test_test_iam_permissions_rest_required_fields( response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.TestPermissionsResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.test_iam_permissions(request) + response = client.suspend_instances(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_test_iam_permissions_rest_unset_required_fields(): +def test_suspend_instances_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + unset_fields = transport.suspend_instances._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("requestId",)) & set( ( + "instanceGroupManager", "project", "region", - "resource", - "testPermissionsRequestResource", + "regionInstanceGroupManagersSuspendInstancesRequestResource", ) ) ) -def test_test_iam_permissions_rest_flattened(): +def test_suspend_instances_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -11124,22 +11124,22 @@ def test_test_iam_permissions_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.TestPermissionsResponse() + return_value = compute.Operation() # get arguments that satisfy an http rule for this method sample_request = { "project": "sample1", "region": "sample2", - "resource": "sample3", + "instance_group_manager": "sample3", } # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - resource="resource_value", - test_permissions_request_resource=compute.TestPermissionsRequest( - permissions=["permissions_value"] + instance_group_manager="instance_group_manager_value", + region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( + force_suspend=True ), ) mock_args.update(sample_request) @@ -11148,26 +11148,26 @@ def test_test_iam_permissions_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.TestPermissionsResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.test_iam_permissions(**mock_args) + client.suspend_instances(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances" % client.transport._host, args[1], ) -def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): +def test_suspend_instances_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -11176,18 +11176,18 @@ def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.test_iam_permissions( - compute.TestIamPermissionsRegionInstanceGroupManagerRequest(), + client.suspend_instances( + compute.SuspendInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - resource="resource_value", - test_permissions_request_resource=compute.TestPermissionsRequest( - permissions=["permissions_value"] + instance_group_manager="instance_group_manager_value", + region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( + force_suspend=True ), ) -def test_update_rest_use_cached_wrapped_rpc(): +def test_suspend_instances_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -11201,17 +11201,19 @@ def test_update_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.update in client._transport._wrapped_methods + assert client._transport.suspend_instances in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.update] = mock_rpc + client._transport._wrapped_methods[ + client._transport.suspend_instances + ] = mock_rpc request = {} - client.update(request) + client.suspend_instances_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -11220,15 +11222,15 @@ def test_update_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.update(request) + client.suspend_instances_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_update_rest_required_fields( - request_type=compute.UpdateRegionInstanceGroupManagerRequest, +def test_suspend_instances_unary_rest_required_fields( + request_type=compute.SuspendInstancesRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -11246,7 +11248,7 @@ def test_update_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update._get_unset_required_fields(jsonified_request) + ).suspend_instances._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -11257,7 +11259,7 @@ def test_update_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update._get_unset_required_fields(jsonified_request) + ).suspend_instances._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -11289,7 +11291,7 @@ def test_update_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "put", + "method": "post", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -11306,33 +11308,33 @@ def test_update_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.update(request) + response = client.suspend_instances_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_update_rest_unset_required_fields(): +def test_suspend_instances_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.update._get_unset_required_fields({}) + unset_fields = transport.suspend_instances._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( ( "instanceGroupManager", - "instanceGroupManagerResource", "project", "region", + "regionInstanceGroupManagersSuspendInstancesRequestResource", ) ) ) -def test_update_rest_flattened(): +def test_suspend_instances_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -11355,12 +11357,8 @@ def test_update_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( + force_suspend=True ), ) mock_args.update(sample_request) @@ -11375,20 +11373,20 @@ def test_update_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.update(**mock_args) + client.suspend_instances_unary(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/suspendInstances" % client.transport._host, args[1], ) -def test_update_rest_flattened_error(transport: str = "rest"): +def test_suspend_instances_unary_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -11397,22 +11395,18 @@ def test_update_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.update( - compute.UpdateRegionInstanceGroupManagerRequest(), + client.suspend_instances_unary( + compute.SuspendInstancesRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + region_instance_group_managers_suspend_instances_request_resource=compute.RegionInstanceGroupManagersSuspendInstancesRequest( + force_suspend=True ), ) -def test_update_unary_rest_use_cached_wrapped_rpc(): +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -11426,41 +11420,41 @@ def test_update_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert client._transport.update in client._transport._wrapped_methods + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[client._transport.update] = mock_rpc + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc request = {} - client.update_unary(request) + client.test_iam_permissions(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 - # Operation methods build a cached wrapper on first rpc call - # subsequent calls should use the cached wrapper - wrapper_fn.reset_mock() - - client.update_unary(request) + client.test_iam_permissions(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_update_unary_rest_required_fields( - request_type=compute.UpdateRegionInstanceGroupManagerRequest, +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport request_init = {} - request_init["instance_group_manager"] = "" request_init["project"] = "" request_init["region"] = "" + request_init["resource"] = "" request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -11471,29 +11465,27 @@ def test_update_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update._get_unset_required_fields(jsonified_request) + ).test_iam_permissions._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present - jsonified_request["instanceGroupManager"] = "instance_group_manager_value" jsonified_request["project"] = "project_value" jsonified_request["region"] = "region_value" + jsonified_request["resource"] = "resource_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update._get_unset_required_fields(jsonified_request) - # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + ).test_iam_permissions._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone - assert "instanceGroupManager" in jsonified_request - assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" assert "project" in jsonified_request assert jsonified_request["project"] == "project_value" assert "region" in jsonified_request assert jsonified_request["region"] == "region_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), @@ -11502,7 +11494,7 @@ def test_update_unary_rest_required_fields( request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.TestPermissionsResponse() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -11514,7 +11506,7 @@ def test_update_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "put", + "method": "post", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -11524,40 +11516,40 @@ def test_update_unary_rest_required_fields( response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.update_unary(request) + response = client.test_iam_permissions(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_update_unary_rest_unset_required_fields(): +def test_test_iam_permissions_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.update._get_unset_required_fields({}) + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set(()) & set( ( - "instanceGroupManager", - "instanceGroupManagerResource", "project", "region", + "resource", + "testPermissionsRequestResource", ) ) ) -def test_update_unary_rest_flattened(): +def test_test_iam_permissions_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -11566,26 +11558,22 @@ def test_update_unary_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation() + return_value = compute.TestPermissionsResponse() # get arguments that satisfy an http rule for this method sample_request = { "project": "sample1", "region": "sample2", - "instance_group_manager": "sample3", + "resource": "sample3", } # get truthy value for each flattened field mock_args = dict( project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] ), ) mock_args.update(sample_request) @@ -11594,26 +11582,26 @@ def test_update_unary_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.update_unary(**mock_args) + client.test_iam_permissions(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions" % client.transport._host, args[1], ) -def test_update_unary_rest_flattened_error(transport: str = "rest"): +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -11622,22 +11610,18 @@ def test_update_unary_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.update_unary( - compute.UpdateRegionInstanceGroupManagerRequest(), + client.test_iam_permissions( + compute.TestIamPermissionsRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", - instance_group_manager_resource=compute.InstanceGroupManager( - all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( - properties=compute.InstancePropertiesPatch( - labels={"key_value": "value_value"} - ) - ) + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] ), ) -def test_update_per_instance_configs_rest_use_cached_wrapped_rpc(): +def test_update_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -11651,22 +11635,17 @@ def test_update_per_instance_configs_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.update_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.update in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.update_per_instance_configs - ] = mock_rpc + client._transport._wrapped_methods[client._transport.update] = mock_rpc request = {} - client.update_per_instance_configs(request) + client.update(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -11675,15 +11654,15 @@ def test_update_per_instance_configs_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.update_per_instance_configs(request) + client.update(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_update_per_instance_configs_rest_required_fields( - request_type=compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_update_rest_required_fields( + request_type=compute.UpdateRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -11701,7 +11680,7 @@ def test_update_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + ).update._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -11712,7 +11691,7 @@ def test_update_per_instance_configs_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + ).update._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -11744,7 +11723,7 @@ def test_update_per_instance_configs_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "put", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -11761,33 +11740,33 @@ def test_update_per_instance_configs_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.update_per_instance_configs(request) + response = client.update(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_update_per_instance_configs_rest_unset_required_fields(): +def test_update_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.update_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.update._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( ( "instanceGroupManager", + "instanceGroupManagerResource", "project", "region", - "regionInstanceGroupManagerUpdateInstanceConfigReqResource", ) ) ) -def test_update_per_instance_configs_rest_flattened(): +def test_update_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -11810,10 +11789,12 @@ def test_update_per_instance_configs_rest_flattened(): project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) mock_args.update(sample_request) @@ -11828,20 +11809,20 @@ def test_update_per_instance_configs_rest_flattened(): req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.update_per_instance_configs(**mock_args) + client.update(**mock_args) # Establish that the underlying call was made with the expected # request object values. assert len(req.mock_calls) == 1 _, args, _ = req.mock_calls[0] assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs" + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" % client.transport._host, args[1], ) -def test_update_per_instance_configs_rest_flattened_error(transport: str = "rest"): +def test_update_rest_flattened_error(transport: str = "rest"): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -11850,20 +11831,22 @@ def test_update_per_instance_configs_rest_flattened_error(transport: str = "rest # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.update_per_instance_configs( - compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(), + client.update( + compute.UpdateRegionInstanceGroupManagerRequest(), project="project_value", region="region_value", instance_group_manager="instance_group_manager_value", - region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) ), ) -def test_update_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): +def test_update_unary_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: @@ -11877,22 +11860,17 @@ def test_update_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): wrapper_fn.reset_mock() # Ensure method has been cached - assert ( - client._transport.update_per_instance_configs - in client._transport._wrapped_methods - ) + assert client._transport.update in client._transport._wrapped_methods # Replace cached wrapped function with mock mock_rpc = mock.Mock() mock_rpc.return_value.name = ( "foo" # operation_request.operation in compute client(s) expect a string. ) - client._transport._wrapped_methods[ - client._transport.update_per_instance_configs - ] = mock_rpc + client._transport._wrapped_methods[client._transport.update] = mock_rpc request = {} - client.update_per_instance_configs_unary(request) + client.update_unary(request) # Establish that the underlying gRPC stub method was called. assert mock_rpc.call_count == 1 @@ -11901,15 +11879,15 @@ def test_update_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): # subsequent calls should use the cached wrapper wrapper_fn.reset_mock() - client.update_per_instance_configs_unary(request) + client.update_unary(request) # Establish that a new wrapper was not created for this call assert wrapper_fn.call_count == 0 assert mock_rpc.call_count == 2 -def test_update_per_instance_configs_unary_rest_required_fields( - request_type=compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, +def test_update_unary_rest_required_fields( + request_type=compute.UpdateRegionInstanceGroupManagerRequest, ): transport_class = transports.RegionInstanceGroupManagersRestTransport @@ -11927,7 +11905,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + ).update._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present @@ -11938,7 +11916,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + ).update._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. assert not set(unset_fields) - set(("request_id",)) jsonified_request.update(unset_fields) @@ -11970,7 +11948,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "post", + "method": "put", "query_params": pb_request, } transcode_result["body"] = pb_request @@ -11987,33 +11965,33 @@ def test_update_per_instance_configs_unary_rest_required_fields( req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.update_per_instance_configs_unary(request) + response = client.update_unary(request) expected_params = [] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_update_per_instance_configs_unary_rest_unset_required_fields(): +def test_update_unary_rest_unset_required_fields(): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.update_per_instance_configs._get_unset_required_fields({}) + unset_fields = transport.update._get_unset_required_fields({}) assert set(unset_fields) == ( set(("requestId",)) & set( ( "instanceGroupManager", + "instanceGroupManagerResource", "project", "region", - "regionInstanceGroupManagerUpdateInstanceConfigReqResource", ) ) ) -def test_update_per_instance_configs_unary_rest_flattened(): +def test_update_unary_rest_flattened(): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -12035,146 +12013,865 @@ def test_update_per_instance_configs_unary_rest_flattened(): mock_args = dict( project="project_value", region="region_value", - instance_group_manager="instance_group_manager_value", - region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] - ), + instance_group_manager="instance_group_manager_value", + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}" + % client.transport._host, + args[1], + ) + + +def test_update_unary_rest_flattened_error(transport: str = "rest"): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_unary( + compute.UpdateRegionInstanceGroupManagerRequest(), + project="project_value", + region="region_value", + instance_group_manager="instance_group_manager_value", + instance_group_manager_resource=compute.InstanceGroupManager( + all_instances_config=compute.InstanceGroupManagerAllInstancesConfig( + properties=compute.InstancePropertiesPatch( + labels={"key_value": "value_value"} + ) + ) + ), + ) + + +def test_update_per_instance_configs_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.update_per_instance_configs + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.update_per_instance_configs + ] = mock_rpc + + request = {} + client.update_per_instance_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update_per_instance_configs(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_per_instance_configs_rest_required_fields( + request_type=compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, +): + transport_class = transports.RegionInstanceGroupManagersRestTransport + + request_init = {} + request_init["instance_group_manager"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["instanceGroupManager"] = "instance_group_manager_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update_per_instance_configs(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_per_instance_configs_rest_unset_required_fields(): + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update_per_instance_configs._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "instanceGroupManager", + "project", + "region", + "regionInstanceGroupManagerUpdateInstanceConfigReqResource", + ) + ) + ) + + +def test_update_per_instance_configs_rest_flattened(): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_per_instance_configs(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs" + % client.transport._host, + args[1], + ) + + +def test_update_per_instance_configs_rest_flattened_error(transport: str = "rest"): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_per_instance_configs( + compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(), + project="project_value", + region="region_value", + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] + ), + ) + + +def test_update_per_instance_configs_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.update_per_instance_configs + in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.update_per_instance_configs + ] = mock_rpc + + request = {} + client.update_per_instance_configs_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update_per_instance_configs_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_per_instance_configs_unary_rest_required_fields( + request_type=compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, +): + transport_class = transports.RegionInstanceGroupManagersRestTransport + + request_init = {} + request_init["instance_group_manager"] = "" + request_init["project"] = "" + request_init["region"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["instanceGroupManager"] = "instance_group_manager_value" + jsonified_request["project"] = "project_value" + jsonified_request["region"] = "region_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update_per_instance_configs._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "instanceGroupManager" in jsonified_request + assert jsonified_request["instanceGroupManager"] == "instance_group_manager_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "region" in jsonified_request + assert jsonified_request["region"] == "region_value" + + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update_per_instance_configs_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_per_instance_configs_unary_rest_unset_required_fields(): + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update_per_instance_configs._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "instanceGroupManager", + "project", + "region", + "regionInstanceGroupManagerUpdateInstanceConfigReqResource", + ) + ) + ) + + +def test_update_per_instance_configs_unary_rest_flattened(): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + region="region_value", + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_per_instance_configs_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs" + % client.transport._host, + args[1], + ) + + +def test_update_per_instance_configs_unary_rest_flattened_error( + transport: str = "rest", +): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_per_instance_configs_unary( + compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(), + project="project_value", + region="region_value", + instance_group_manager="instance_group_manager_value", + region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( + per_instance_configs=[ + compute.PerInstanceConfig(fingerprint="fingerprint_value") + ] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionInstanceGroupManagersClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionInstanceGroupManagersClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegionInstanceGroupManagersClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RegionInstanceGroupManagersClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RegionInstanceGroupManagersRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RegionInstanceGroupManagersClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RegionInstanceGroupManagersRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RegionInstanceGroupManagersClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_abandon_instances_rest_bad_request( + request_type=compute.AbandonInstancesRegionInstanceGroupManagerRequest, +): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.abandon_instances(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.AbandonInstancesRegionInstanceGroupManagerRequest, + dict, + ], +) +def test_abandon_instances_rest_call_success(request_type): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "region": "sample2", + "instance_group_manager": "sample3", + } + request_init[ + "region_instance_group_managers_abandon_instances_request_resource" + ] = {"instances": ["instances_value1", "instances_value2"]} + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.AbandonInstancesRegionInstanceGroupManagerRequest.meta.fields[ + "region_instance_group_managers_abandon_instances_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "region_instance_group_managers_abandon_instances_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "region_instance_group_managers_abandon_instances_request_resource" + ][field] + ), + ): + del request_init[ + "region_instance_group_managers_abandon_instances_request_resource" + ][field][i][subfield] + else: + del request_init[ + "region_instance_group_managers_abandon_instances_request_resource" + ][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", ) - mock_args.update(sample_request) # Wrap the value into a proper Response obj - response_value = Response() + response_value = mock.Mock() response_value.status_code = 200 + # Convert return value to protobuf type return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) - response_value._content = json_return_value.encode("UTF-8") + response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.abandon_instances(request) - client.update_per_instance_configs_unary(**mock_args) - - # Establish that the underlying call was made with the expected - # request object values. - assert len(req.mock_calls) == 1 - _, args, _ = req.mock_calls[0] - assert path_template.validate( - "%s/compute/beta/projects/{project}/regions/{region}/instanceGroupManagers/{instance_group_manager}/updatePerInstanceConfigs" - % client.transport._host, - args[1], - ) - - -def test_update_per_instance_configs_unary_rest_flattened_error( - transport: str = "rest", -): - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) - - # Attempting to call a method with both a request object and flattened - # fields is an error. - with pytest.raises(ValueError): - client.update_per_instance_configs_unary( - compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(), - project="project_value", - region="region_value", - instance_group_manager="instance_group_manager_value", - region_instance_group_manager_update_instance_config_req_resource=compute.RegionInstanceGroupManagerUpdateInstanceConfigReq( - per_instance_configs=[ - compute.PerInstanceConfig(fingerprint="fingerprint_value") - ] - ), - ) + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" -def test_credentials_transport_error(): - # It is an error to provide credentials and a transport instance. +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_abandon_instances_rest_interceptors(null_interceptor): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RegionInstanceGroupManagersRestInterceptor(), ) - with pytest.raises(ValueError): - client = RegionInstanceGroupManagersClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) + client = RegionInstanceGroupManagersClient(transport=transport) - # It is an error to provide a credentials file and a transport instance. - transport = transports.RegionInstanceGroupManagersRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = RegionInstanceGroupManagersClient( - client_options={"credentials_file": "credentials.json"}, - transport=transport, + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RegionInstanceGroupManagersRestInterceptor, "post_abandon_instances" + ) as post, mock.patch.object( + transports.RegionInstanceGroupManagersRestInterceptor, + "post_abandon_instances_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.RegionInstanceGroupManagersRestInterceptor, "pre_abandon_instances" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.AbandonInstancesRegionInstanceGroupManagerRequest.pb( + compute.AbandonInstancesRegionInstanceGroupManagerRequest() ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } - # It is an error to provide an api_key and a transport instance. - transport = transports.RegionInstanceGroupManagersRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = RegionInstanceGroupManagersClient( - client_options=options, - transport=transport, - ) + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value - # It is an error to provide an api_key and a credential. - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = RegionInstanceGroupManagersClient( - client_options=options, credentials=ga_credentials.AnonymousCredentials() - ) + request = compute.AbandonInstancesRegionInstanceGroupManagerRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - # It is an error to provide scopes and a transport instance. - transport = transports.RegionInstanceGroupManagersRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = RegionInstanceGroupManagersClient( - client_options={"scopes": ["1", "2"]}, - transport=transport, + client.abandon_instances( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], ) - -def test_transport_instance(): - # A client may be instantiated with a custom transport instance. - transport = transports.RegionInstanceGroupManagersRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - client = RegionInstanceGroupManagersClient(transport=transport) - assert client.transport is transport - - -@pytest.mark.parametrize( - "transport_class", - [ - transports.RegionInstanceGroupManagersRestTransport, - ], -) -def test_transport_adc(transport_class): - # Test default credentials are used if not provided. - with mock.patch.object(google.auth, "default") as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class() - adc.assert_called_once() - - -def test_transport_kind_rest(): - transport = RegionInstanceGroupManagersClient.get_transport_class("rest")( - credentials=ga_credentials.AnonymousCredentials() - ) - assert transport.kind == "rest" + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() -def test_abandon_instances_rest_bad_request( - request_type=compute.AbandonInstancesRegionInstanceGroupManagerRequest, +def test_adopt_instances_rest_bad_request( + request_type=compute.AdoptInstancesRegionInstanceGroupManagerRequest, ): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -12199,17 +12896,17 @@ def test_abandon_instances_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.abandon_instances(request) + client.adopt_instances(request) @pytest.mark.parametrize( "request_type", [ - compute.AbandonInstancesRegionInstanceGroupManagerRequest, + compute.AdoptInstancesRegionInstanceGroupManagerRequest, dict, ], ) -def test_abandon_instances_rest_call_success(request_type): +def test_adopt_instances_rest_call_success(request_type): client = RegionInstanceGroupManagersClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -12220,16 +12917,28 @@ def test_abandon_instances_rest_call_success(request_type): "region": "sample2", "instance_group_manager": "sample3", } - request_init[ - "region_instance_group_managers_abandon_instances_request_resource" - ] = {"instances": ["instances_value1", "instances_value2"]} + request_init["region_instance_group_managers_adopt_instances_request_resource"] = { + "instances": [ + { + "fingerprint": "fingerprint_value", + "name": "name_value", + "preserved_state": { + "disks": {}, + "external_i_ps": {}, + "internal_i_ps": {}, + "metadata": {}, + }, + "status": "status_value", + } + ] + } # 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 # See https://github.com/googleapis/gapic-generator-python/issues/1748 # Determine if the message type is proto-plus or protobuf - test_field = compute.AbandonInstancesRegionInstanceGroupManagerRequest.meta.fields[ - "region_instance_group_managers_abandon_instances_request_resource" + test_field = compute.AdoptInstancesRegionInstanceGroupManagerRequest.meta.fields[ + "region_instance_group_managers_adopt_instances_request_resource" ] def get_message_fields(field): @@ -12259,7 +12968,7 @@ def get_message_fields(field): # For each item in the sample request, create a list of sub fields which are not present at runtime # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime for field, value in request_init[ - "region_instance_group_managers_abandon_instances_request_resource" + "region_instance_group_managers_adopt_instances_request_resource" ].items(): # pragma: NO COVER result = None is_repeated = False @@ -12294,16 +13003,16 @@ def get_message_fields(field): 0, len( request_init[ - "region_instance_group_managers_abandon_instances_request_resource" + "region_instance_group_managers_adopt_instances_request_resource" ][field] ), ): del request_init[ - "region_instance_group_managers_abandon_instances_request_resource" + "region_instance_group_managers_adopt_instances_request_resource" ][field][i][subfield] else: del request_init[ - "region_instance_group_managers_abandon_instances_request_resource" + "region_instance_group_managers_adopt_instances_request_resource" ][field][subfield] request = request_type(**request_init) @@ -12345,7 +13054,7 @@ def get_message_fields(field): response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.abandon_instances(request) + response = client.adopt_instances(request) # Establish that the response is the type that we expect. assert isinstance(response, extended_operation.ExtendedOperation) @@ -12374,7 +13083,7 @@ def get_message_fields(field): @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_abandon_instances_rest_interceptors(null_interceptor): +def test_adopt_instances_rest_interceptors(null_interceptor): transport = transports.RegionInstanceGroupManagersRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -12388,18 +13097,18 @@ def test_abandon_instances_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.RegionInstanceGroupManagersRestInterceptor, "post_abandon_instances" + transports.RegionInstanceGroupManagersRestInterceptor, "post_adopt_instances" ) as post, mock.patch.object( transports.RegionInstanceGroupManagersRestInterceptor, - "post_abandon_instances_with_metadata", + "post_adopt_instances_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.RegionInstanceGroupManagersRestInterceptor, "pre_abandon_instances" + transports.RegionInstanceGroupManagersRestInterceptor, "pre_adopt_instances" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.AbandonInstancesRegionInstanceGroupManagerRequest.pb( - compute.AbandonInstancesRegionInstanceGroupManagerRequest() + pb_message = compute.AdoptInstancesRegionInstanceGroupManagerRequest.pb( + compute.AdoptInstancesRegionInstanceGroupManagerRequest() ) transcode.return_value = { "method": "post", @@ -12414,7 +13123,7 @@ def test_abandon_instances_rest_interceptors(null_interceptor): return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.AbandonInstancesRegionInstanceGroupManagerRequest() + request = compute.AdoptInstancesRegionInstanceGroupManagerRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), @@ -12423,7 +13132,7 @@ def test_abandon_instances_rest_interceptors(null_interceptor): post.return_value = compute.Operation() post_with_metadata.return_value = compute.Operation(), metadata - client.abandon_instances( + client.adopt_instances( request, metadata=[ ("key", "val"), @@ -13924,6 +14633,7 @@ def test_insert_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -14895,6 +15605,7 @@ def test_patch_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -18342,6 +19053,7 @@ def test_update_rest_call_success(request_type): "creation_timestamp": "creation_timestamp_value", "current_actions": { "abandoning": 1041, + "adopting": 854, "creating": 845, "creating_without_retries": 2589, "deleting": 844, @@ -18994,6 +19706,26 @@ def test_abandon_instances_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_adopt_instances_unary_empty_call_rest(): + client = RegionInstanceGroupManagersClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.adopt_instances), "__call__") as call: + client.adopt_instances_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.AdoptInstancesRegionInstanceGroupManagerRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_apply_updates_to_instances_unary_empty_call_rest(): @@ -19563,6 +20295,7 @@ def test_region_instance_group_managers_base_transport(): # raise NotImplementedError. methods = ( "abandon_instances", + "adopt_instances", "apply_updates_to_instances", "create_instances", "delete", @@ -19731,6 +20464,9 @@ def test_region_instance_group_managers_client_transport_session_collision( session1 = client1.transport.abandon_instances._session session2 = client2.transport.abandon_instances._session assert session1 != session2 + session1 = client1.transport.adopt_instances._session + session2 = client2.transport.adopt_instances._session + assert session1 != session2 session1 = client1.transport.apply_updates_to_instances._session session2 = client2.transport.apply_updates_to_instances._session assert session1 != session2 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py index 2a3560c4e87d..f736ff3e0881 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py @@ -7817,6 +7817,7 @@ def test_add_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -7839,6 +7840,7 @@ def test_add_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -9255,6 +9257,7 @@ def test_insert_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -9277,6 +9280,7 @@ def test_insert_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -9738,6 +9742,7 @@ def test_patch_rest_call_success(request_type): "dest_ip_ranges_value1", "dest_ip_ranges_value2", ], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -9760,6 +9765,7 @@ def test_patch_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], @@ -10331,6 +10337,7 @@ def test_patch_rule_rest_call_success(request_type): ], "dest_fqdns": ["dest_fqdns_value1", "dest_fqdns_value2"], "dest_ip_ranges": ["dest_ip_ranges_value1", "dest_ip_ranges_value2"], + "dest_network_context": "dest_network_context_value", "dest_network_scope": "dest_network_scope_value", "dest_network_type": "dest_network_type_value", "dest_region_codes": [ @@ -10353,6 +10360,7 @@ def test_patch_rule_rest_call_success(request_type): ], "src_fqdns": ["src_fqdns_value1", "src_fqdns_value2"], "src_ip_ranges": ["src_ip_ranges_value1", "src_ip_ranges_value2"], + "src_network_context": "src_network_context_value", "src_network_scope": "src_network_scope_value", "src_network_type": "src_network_type_value", "src_networks": ["src_networks_value1", "src_networks_value2"], diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py index dfcec6e82182..ba96d37756c1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py @@ -5142,9 +5142,10 @@ def test_add_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -5985,7 +5986,11 @@ def test_insert_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -6074,9 +6079,10 @@ def test_insert_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -6573,7 +6579,11 @@ def test_patch_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -6662,9 +6672,10 @@ def test_patch_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -7032,9 +7043,10 @@ def test_patch_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py index d2adf712e80c..5abf7dcd4726 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py @@ -3027,6 +3027,7 @@ def test_get_rest_call_success(request_type): description="description_value", id=205, kind="kind_value", + load_balancing_scheme="load_balancing_scheme_value", name="name_value", proxy_bind=True, proxy_header="proxy_header_value", @@ -3053,6 +3054,7 @@ def test_get_rest_call_success(request_type): assert response.description == "description_value" assert response.id == 205 assert response.kind == "kind_value" + assert response.load_balancing_scheme == "load_balancing_scheme_value" assert response.name == "name_value" assert response.proxy_bind is True assert response.proxy_header == "proxy_header_value" @@ -3167,6 +3169,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "id": 205, "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "proxy_bind": True, "proxy_header": "proxy_header_value", 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 4b5aa49a09ee..8568c60fd984 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 @@ -1387,6 +1387,219 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + + def test_list_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -2131,89 +2344,947 @@ def test_perform_maintenance_unary_rest_flattened_error(transport: str = "rest") ) -def test_credentials_transport_error(): - # It is an error to provide credentials and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), - transport=transport, + transport="rest", ) - # It is an error to provide a credentials file and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options={"credentials_file": "credentials.json"}, - transport=transport, - ) + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() - # It is an error to provide an api_key and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options=options, - transport=transport, - ) + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods - # It is an error to provide an api_key and a credential. - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options=options, credentials=ga_credentials.AnonymousCredentials() + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc - # It is an error to provide scopes and a transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationBlocksClient( - client_options={"scopes": ["1", "2"]}, - transport=transport, - ) + request = {} + client.set_iam_policy(request) + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 -def test_transport_instance(): - # A client may be instantiated with a custom transport instance. - transport = transports.ReservationBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - client = ReservationBlocksClient(transport=transport) - assert client.transport is transport + client.set_iam_policy(request) + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 -@pytest.mark.parametrize( - "transport_class", - [ - transports.ReservationBlocksRestTransport, - ], -) -def test_transport_adc(transport_class): - # Test default credentials are used if not provided. - with mock.patch.object(google.auth, "default") as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class() - adc.assert_called_once() +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport -def test_transport_kind_rest(): - transport = ReservationBlocksClient.get_transport_class("rest")( + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + "zoneSetNestedPolicyRequestResource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsReservationBlockRequest, +): + transport_class = transports.ReservationBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "testPermissionsRequestResource", + "zone", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/reservations/{parent_resource}/reservationBlocks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsReservationBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationBlocksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ReservationBlocksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ReservationBlocksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = ReservationBlocksClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "reservation": "sample3", + "reservation_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetReservationBlockRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "reservation": "sample3", + "reservation_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationBlocksGetResponse() + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationBlocksGetResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.ReservationBlocksGetResponse) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), + ) + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetReservationBlockRequest.pb( + compute.GetReservationBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationBlocksGetResponse.to_json( + compute.ReservationBlocksGetResponse() + ) + req.return_value.content = return_value + + request = compute.GetReservationBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationBlocksGetResponse() + post_with_metadata.return_value = ( + compute.ReservationBlocksGetResponse(), + metadata, + ) + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyReservationBlockRequest, +): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyReservationBlockRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), + ) + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_get_iam_policy_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyReservationBlockRequest.pb( + compute.GetIamPolicyReservationBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyReservationBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListReservationBlocksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationBlocksListResponse( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationBlocksListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ReservationBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationBlocksRestInterceptor(), ) - assert transport.kind == "rest" + client = ReservationBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationBlocksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListReservationBlocksRequest.pb( + compute.ListReservationBlocksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationBlocksListResponse.to_json( + compute.ReservationBlocksListResponse() + ) + req.return_value.content = return_value -def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): + request = compute.ListReservationBlocksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationBlocksListResponse() + post_with_metadata.return_value = ( + compute.ReservationBlocksListResponse(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_perform_maintenance_rest_bad_request( + request_type=compute.PerformMaintenanceReservationBlockRequest, +): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2238,17 +3309,17 @@ def test_get_rest_bad_request(request_type=compute.GetReservationBlockRequest): response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.get(request) + client.perform_maintenance(request) @pytest.mark.parametrize( "request_type", [ - compute.GetReservationBlockRequest, + compute.PerformMaintenanceReservationBlockRequest, dict, ], ) -def test_get_rest_call_success(request_type): +def test_perform_maintenance_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2260,31 +3331,161 @@ def test_get_rest_call_success(request_type): "reservation": "sample3", "reservation_block": "sample4", } + request_init["reservations_blocks_perform_maintenance_request_resource"] = { + "maintenance_scope": "maintenance_scope_value" + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.PerformMaintenanceReservationBlockRequest.meta.fields[ + "reservations_blocks_perform_maintenance_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field] + ), + ): + del request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field][i][subfield] + else: + del request_init[ + "reservations_blocks_perform_maintenance_request_resource" + ][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationBlocksGetResponse() + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationBlocksGetResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.get(request) + response = client.perform_maintenance(request) # Establish that the response is the type that we expect. - assert isinstance(response, compute.ReservationBlocksGetResponse) + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_get_rest_interceptors(null_interceptor): +def test_perform_maintenance_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2298,17 +3499,18 @@ def test_get_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_get" + transports.ReservationBlocksRestInterceptor, "post_perform_maintenance" ) as post, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_get_with_metadata" + transports.ReservationBlocksRestInterceptor, + "post_perform_maintenance_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_get" + transports.ReservationBlocksRestInterceptor, "pre_perform_maintenance" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.GetReservationBlockRequest.pb( - compute.GetReservationBlockRequest() + pb_message = compute.PerformMaintenanceReservationBlockRequest.pb( + compute.PerformMaintenanceReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2320,24 +3522,19 @@ def test_get_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationBlocksGetResponse.to_json( - compute.ReservationBlocksGetResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.GetReservationBlockRequest() + request = compute.PerformMaintenanceReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationBlocksGetResponse() - post_with_metadata.return_value = ( - compute.ReservationBlocksGetResponse(), - metadata, - ) + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.get( + client.perform_maintenance( request, metadata=[ ("key", "val"), @@ -2350,12 +3547,19 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest): +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyReservationBlockRequest, +): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -2370,33 +3574,156 @@ def test_list_rest_bad_request(request_type=compute.ListReservationBlocksRequest response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list(request) + client.set_iam_policy(request) @pytest.mark.parametrize( "request_type", [ - compute.ListReservationBlocksRequest, + compute.SetIamPolicyReservationBlockRequest, dict, ], ) -def test_list_rest_call_success(request_type): +def test_set_iam_policy_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "reservation": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request_init["zone_set_nested_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyReservationBlockRequest.meta.fields[ + "zone_set_nested_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "zone_set_nested_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len(request_init["zone_set_nested_policy_request_resource"][field]), + ): + del request_init["zone_set_nested_policy_request_resource"][field][ + i + ][subfield] + else: + del request_init["zone_set_nested_policy_request_resource"][field][ + subfield + ] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationBlocksListResponse( - id="id_value", - kind="kind_value", - next_page_token="next_page_token_value", - self_link="self_link_value", + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, ) # Wrap the value into a proper Response obj @@ -2404,23 +3731,22 @@ def test_list_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationBlocksListResponse.pb(return_value) + return_value = compute.Policy.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list(request) + response = client.set_iam_policy(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListPager) - assert response.id == "id_value" - assert response.kind == "kind_value" - assert response.next_page_token == "next_page_token_value" - assert response.self_link == "self_link_value" + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_rest_interceptors(null_interceptor): +def test_set_iam_policy_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2434,17 +3760,17 @@ def test_list_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_list" + transports.ReservationBlocksRestInterceptor, "post_set_iam_policy" ) as post, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_list_with_metadata" + transports.ReservationBlocksRestInterceptor, "post_set_iam_policy_with_metadata" ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_list" + transports.ReservationBlocksRestInterceptor, "pre_set_iam_policy" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ListReservationBlocksRequest.pb( - compute.ListReservationBlocksRequest() + pb_message = compute.SetIamPolicyReservationBlockRequest.pb( + compute.SetIamPolicyReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2456,24 +3782,19 @@ def test_list_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationBlocksListResponse.to_json( - compute.ReservationBlocksListResponse() - ) + return_value = compute.Policy.to_json(compute.Policy()) req.return_value.content = return_value - request = compute.ListReservationBlocksRequest() + request = compute.SetIamPolicyReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationBlocksListResponse() - post_with_metadata.return_value = ( - compute.ReservationBlocksListResponse(), - metadata, - ) + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata - client.list( + client.set_iam_policy( request, metadata=[ ("key", "val"), @@ -2486,8 +3807,8 @@ def test_list_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_perform_maintenance_rest_bad_request( - request_type=compute.PerformMaintenanceReservationBlockRequest, +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsReservationBlockRequest, ): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -2496,8 +3817,8 @@ def test_perform_maintenance_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "reservation": "sample3", - "reservation_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -2513,17 +3834,17 @@ def test_perform_maintenance_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.perform_maintenance(request) + client.test_iam_permissions(request) @pytest.mark.parametrize( "request_type", [ - compute.PerformMaintenanceReservationBlockRequest, + compute.TestIamPermissionsReservationBlockRequest, dict, ], ) -def test_perform_maintenance_rest_call_success(request_type): +def test_test_iam_permissions_rest_call_success(request_type): client = ReservationBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2532,19 +3853,19 @@ def test_perform_maintenance_rest_call_success(request_type): request_init = { "project": "sample1", "zone": "sample2", - "reservation": "sample3", - "reservation_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } - request_init["reservations_blocks_perform_maintenance_request_resource"] = { - "maintenance_scope": "maintenance_scope_value" + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] } # 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 # See https://github.com/googleapis/gapic-generator-python/issues/1748 # Determine if the message type is proto-plus or protobuf - test_field = compute.PerformMaintenanceReservationBlockRequest.meta.fields[ - "reservations_blocks_perform_maintenance_request_resource" + test_field = compute.TestIamPermissionsReservationBlockRequest.meta.fields[ + "test_permissions_request_resource" ] def get_message_fields(field): @@ -2574,7 +3895,7 @@ def get_message_fields(field): # For each item in the sample request, create a list of sub fields which are not present at runtime # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime for field, value in request_init[ - "reservations_blocks_perform_maintenance_request_resource" + "test_permissions_request_resource" ].items(): # pragma: NO COVER result = None is_repeated = False @@ -2606,48 +3927,20 @@ def get_message_fields(field): if subfield: if field_repeated: for i in range( - 0, - len( - request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field] - ), + 0, len(request_init["test_permissions_request_resource"][field]) ): - del request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field][i][subfield] + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] else: - del request_init[ - "reservations_blocks_perform_maintenance_request_resource" - ][field][subfield] + del request_init["test_permissions_request_resource"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], ) # Wrap the value into a proper Response obj @@ -2655,41 +3948,20 @@ def get_message_fields(field): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.perform_maintenance(request) + response = client.test_iam_permissions(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_perform_maintenance_rest_interceptors(null_interceptor): +def test_test_iam_permissions_rest_interceptors(null_interceptor): transport = transports.ReservationBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2703,18 +3975,18 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "post_perform_maintenance" + transports.ReservationBlocksRestInterceptor, "post_test_iam_permissions" ) as post, mock.patch.object( transports.ReservationBlocksRestInterceptor, - "post_perform_maintenance_with_metadata", + "post_test_iam_permissions_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationBlocksRestInterceptor, "pre_perform_maintenance" + transports.ReservationBlocksRestInterceptor, "pre_test_iam_permissions" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.PerformMaintenanceReservationBlockRequest.pb( - compute.PerformMaintenanceReservationBlockRequest() + pb_message = compute.TestIamPermissionsReservationBlockRequest.pb( + compute.TestIamPermissionsReservationBlockRequest() ) transcode.return_value = { "method": "post", @@ -2726,19 +3998,21 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) req.return_value.content = return_value - request = compute.PerformMaintenanceReservationBlockRequest() + request = compute.TestIamPermissionsReservationBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata - client.perform_maintenance( + client.test_iam_permissions( request, metadata=[ ("key", "val"), @@ -2778,6 +4052,26 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyReservationBlockRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_list_empty_call_rest(): @@ -2820,6 +4114,48 @@ def test_perform_maintenance_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyReservationBlockRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = ReservationBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsReservationBlockRequest() + + assert args[0] == request_msg + + def test_reservation_blocks_base_transport_error(): # Passing both a credentials object and credentials_file should raise an error with pytest.raises(core_exceptions.DuplicateCredentialArgs): @@ -2843,8 +4179,11 @@ def test_reservation_blocks_base_transport(): # raise NotImplementedError. methods = ( "get", + "get_iam_policy", "list", "perform_maintenance", + "set_iam_policy", + "test_iam_permissions", ) for method in methods: with pytest.raises(NotImplementedError): @@ -2985,12 +4324,21 @@ def test_reservation_blocks_client_transport_session_collision(transport_name): session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 session1 = client1.transport.list._session session2 = client2.transport.list._session assert session1 != session2 session1 = client1.transport.perform_maintenance._session session2 = client2.transport.perform_maintenance._session assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 def test_common_billing_account_path(): diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py index 1071fd64cdd4..dd38f9d6f88e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py @@ -1257,6 +1257,8 @@ def test_get_rest_required_fields(request_type=compute.GetReservationSubBlockReq 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 @@ -1318,7 +1320,7 @@ def test_get_rest_unset_required_fields(): unset_fields = transport.get._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("view",)) & set( ( "parentName", @@ -1399,6 +1401,219 @@ def test_get_rest_flattened_error(transport: str = "rest"): ) +def test_get_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get_iam_policy in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get_iam_policy] = mock_rpc + + request = {} + client.get_iam_policy(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get_iam_policy(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_iam_policy_rest_required_fields( + request_type=compute.GetIamPolicyReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get_iam_policy._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("options_requested_policy_version",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("optionsRequestedPolicyVersion",)) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + ) + ) + ) + + +def test_get_iam_policy_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/getIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_get_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_iam_policy( + compute.GetIamPolicyReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + ) + + def test_list_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -2579,89 +2794,948 @@ def test_report_faulty_unary_rest_flattened_error(transport: str = "rest"): ) -def test_credentials_transport_error(): - # It is an error to provide credentials and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): +def test_set_iam_policy_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), - transport=transport, + transport="rest", ) - # It is an error to provide a credentials file and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options={"credentials_file": "credentials.json"}, - transport=transport, - ) + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() - # It is an error to provide an api_key and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options=options, - transport=transport, - ) + # Ensure method has been cached + assert client._transport.set_iam_policy in client._transport._wrapped_methods - # It is an error to provide an api_key and a credential. - options = client_options.ClientOptions() - options.api_key = "api_key" - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options=options, credentials=ga_credentials.AnonymousCredentials() + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. ) + client._transport._wrapped_methods[client._transport.set_iam_policy] = mock_rpc - # It is an error to provide scopes and a transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - with pytest.raises(ValueError): - client = ReservationSubBlocksClient( - client_options={"scopes": ["1", "2"]}, - transport=transport, - ) + request = {} + client.set_iam_policy(request) + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 -def test_transport_instance(): - # A client may be instantiated with a custom transport instance. - transport = transports.ReservationSubBlocksRestTransport( - credentials=ga_credentials.AnonymousCredentials(), - ) - client = ReservationSubBlocksClient(transport=transport) - assert client.transport is transport + client.set_iam_policy(request) + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 -@pytest.mark.parametrize( - "transport_class", - [ - transports.ReservationSubBlocksRestTransport, - ], -) -def test_transport_adc(transport_class): - # Test default credentials are used if not provided. - with mock.patch.object(google.auth, "default") as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class() - adc.assert_called_once() + +def test_set_iam_policy_rest_required_fields( + request_type=compute.SetIamPolicyReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).set_iam_policy._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.set_iam_policy(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_set_iam_policy_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.set_iam_policy._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "zone", + "zoneSetNestedPolicyRequestResource", + ) + ) + ) + + +def test_set_iam_policy_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.set_iam_policy(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/setIamPolicy" + % client.transport._host, + args[1], + ) + + +def test_set_iam_policy_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.set_iam_policy( + compute.SetIamPolicyReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + zone_set_nested_policy_request_resource=compute.ZoneSetNestedPolicyRequest( + bindings=[compute.Binding(binding_id="binding_id_value")] + ), + ) + + +def test_test_iam_permissions_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._transport.test_iam_permissions in client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[ + client._transport.test_iam_permissions + ] = mock_rpc + + request = {} + client.test_iam_permissions(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.test_iam_permissions(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_test_iam_permissions_rest_required_fields( + request_type=compute.TestIamPermissionsReservationSubBlockRequest, +): + transport_class = transports.ReservationSubBlocksRestTransport + + request_init = {} + request_init["parent_resource"] = "" + request_init["project"] = "" + request_init["resource"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parentResource"] = "parent_resource_value" + jsonified_request["project"] = "project_value" + jsonified_request["resource"] = "resource_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).test_iam_permissions._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parentResource" in jsonified_request + assert jsonified_request["parentResource"] == "parent_resource_value" + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "resource" in jsonified_request + assert jsonified_request["resource"] == "resource_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.test_iam_permissions(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_test_iam_permissions_rest_unset_required_fields(): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.test_iam_permissions._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "parentResource", + "project", + "resource", + "testPermissionsRequestResource", + "zone", + ) + ) + ) + + +def test_test_iam_permissions_rest_flattened(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.TestPermissionsResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.TestPermissionsResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.test_iam_permissions(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/{parent_resource}/reservationSubBlocks/{resource}/testIamPermissions" + % client.transport._host, + args[1], + ) + + +def test_test_iam_permissions_rest_flattened_error(transport: str = "rest"): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.test_iam_permissions( + compute.TestIamPermissionsReservationSubBlockRequest(), + project="project_value", + zone="zone_value", + parent_resource="parent_resource_value", + resource="resource_value", + test_permissions_request_resource=compute.TestPermissionsRequest( + permissions=["permissions_value"] + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ReservationSubBlocksClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ReservationSubBlocksClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ReservationSubBlocksRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() def test_transport_kind_rest(): transport = ReservationSubBlocksClient.get_transport_class("rest")( credentials=ga_credentials.AnonymousCredentials() ) - assert transport.kind == "rest" + assert transport.kind == "rest" + + +def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetReservationSubBlockRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationSubBlocksGetResponse() + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationSubBlocksGetResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.ReservationSubBlocksGetResponse) + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetReservationSubBlockRequest.pb( + compute.GetReservationSubBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationSubBlocksGetResponse.to_json( + compute.ReservationSubBlocksGetResponse() + ) + req.return_value.content = return_value + + request = compute.GetReservationSubBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationSubBlocksGetResponse() + post_with_metadata.return_value = ( + compute.ReservationSubBlocksGetResponse(), + metadata, + ) + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_iam_policy_rest_bad_request( + request_type=compute.GetIamPolicyReservationSubBlockRequest, +): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetIamPolicyReservationSubBlockRequest, + dict, + ], +) +def test_get_iam_policy_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Policy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get_iam_policy(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_iam_policy_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_get_iam_policy" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, + "post_get_iam_policy_with_metadata", + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_get_iam_policy" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetIamPolicyReservationSubBlockRequest.pb( + compute.GetIamPolicyReservationSubBlockRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Policy.to_json(compute.Policy()) + req.return_value.content = return_value + + request = compute.GetIamPolicyReservationSubBlockRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata + + client.get_iam_policy( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequest): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) -def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest): +@pytest.mark.parametrize( + "request_type", + [ + compute.ListReservationSubBlocksRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.ReservationSubBlocksListResponse( + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.ReservationSubBlocksListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ReservationSubBlocksRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ReservationSubBlocksRestInterceptor(), + ) + client = ReservationSubBlocksClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ReservationSubBlocksRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListReservationSubBlocksRequest.pb( + compute.ListReservationSubBlocksRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.ReservationSubBlocksListResponse.to_json( + compute.ReservationSubBlocksListResponse() + ) + req.return_value.content = return_value + + request = compute.ListReservationSubBlocksRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.ReservationSubBlocksListResponse() + post_with_metadata.return_value = ( + compute.ReservationSubBlocksListResponse(), + metadata, + ) + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_perform_maintenance_rest_bad_request( + request_type=compute.PerformMaintenanceReservationSubBlockRequest, +): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2686,17 +3760,17 @@ def test_get_rest_bad_request(request_type=compute.GetReservationSubBlockRequest response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.get(request) + client.perform_maintenance(request) @pytest.mark.parametrize( "request_type", [ - compute.GetReservationSubBlockRequest, + compute.PerformMaintenanceReservationSubBlockRequest, dict, ], ) -def test_get_rest_call_success(request_type): +def test_perform_maintenance_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -2713,26 +3787,71 @@ def test_get_rest_call_success(request_type): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationSubBlocksGetResponse() + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationSubBlocksGetResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.get(request) + response = client.perform_maintenance(request) # Establish that the response is the type that we expect. - assert isinstance(response, compute.ReservationSubBlocksGetResponse) + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_get_rest_interceptors(null_interceptor): +def test_perform_maintenance_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2746,17 +3865,18 @@ def test_get_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_get" + transports.ReservationSubBlocksRestInterceptor, "post_perform_maintenance" ) as post, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_get_with_metadata" + transports.ReservationSubBlocksRestInterceptor, + "post_perform_maintenance_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_get" + transports.ReservationSubBlocksRestInterceptor, "pre_perform_maintenance" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.GetReservationSubBlockRequest.pb( - compute.GetReservationSubBlockRequest() + pb_message = compute.PerformMaintenanceReservationSubBlockRequest.pb( + compute.PerformMaintenanceReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -2768,24 +3888,19 @@ def test_get_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationSubBlocksGetResponse.to_json( - compute.ReservationSubBlocksGetResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.GetReservationSubBlockRequest() + request = compute.PerformMaintenanceReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationSubBlocksGetResponse() - post_with_metadata.return_value = ( - compute.ReservationSubBlocksGetResponse(), - metadata, - ) + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.get( + client.perform_maintenance( request, metadata=[ ("key", "val"), @@ -2798,12 +3913,19 @@ def test_get_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequest): +def test_report_faulty_rest_bad_request( + request_type=compute.ReportFaultyReservationSubBlockRequest, +): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -2818,33 +3940,145 @@ def test_list_rest_bad_request(request_type=compute.ListReservationSubBlocksRequ response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list(request) + client.report_faulty(request) @pytest.mark.parametrize( "request_type", [ - compute.ListReservationSubBlocksRequest, + compute.ReportFaultyReservationSubBlockRequest, dict, ], ) -def test_list_rest_call_success(request_type): +def test_report_faulty_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = {"project": "sample1", "zone": "sample2", "parent_name": "sample3"} + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_name": "sample3", + "reservation_sub_block": "sample4", + } + request_init["reservation_sub_blocks_report_faulty_request_resource"] = { + "disruption_schedule": "disruption_schedule_value", + "failure_component": "failure_component_value", + "fault_reasons": [ + {"behavior": "behavior_value", "description": "description_value"} + ], + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.ReportFaultyReservationSubBlockRequest.meta.fields[ + "reservation_sub_blocks_report_faulty_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len( + request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field] + ), + ): + del request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field][i][subfield] + else: + del request_init[ + "reservation_sub_blocks_report_faulty_request_resource" + ][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.ReservationSubBlocksListResponse( - id="id_value", + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", kind="kind_value", - next_page_token="next_page_token_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", ) # Wrap the value into a proper Response obj @@ -2852,23 +4086,41 @@ def test_list_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.ReservationSubBlocksListResponse.pb(return_value) + return_value = compute.Operation.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list(request) + response = client.report_faulty(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListPager) - assert response.id == "id_value" + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" assert response.kind == "kind_value" - assert response.next_page_token == "next_page_token_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_rest_interceptors(null_interceptor): +def test_report_faulty_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -2882,17 +4134,18 @@ def test_list_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_list" + transports.ReservationSubBlocksRestInterceptor, "post_report_faulty" ) as post, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_list_with_metadata" + transports.ReservationSubBlocksRestInterceptor, + "post_report_faulty_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_list" + transports.ReservationSubBlocksRestInterceptor, "pre_report_faulty" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ListReservationSubBlocksRequest.pb( - compute.ListReservationSubBlocksRequest() + pb_message = compute.ReportFaultyReservationSubBlockRequest.pb( + compute.ReportFaultyReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -2904,24 +4157,19 @@ def test_list_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.ReservationSubBlocksListResponse.to_json( - compute.ReservationSubBlocksListResponse() - ) + return_value = compute.Operation.to_json(compute.Operation()) req.return_value.content = return_value - request = compute.ListReservationSubBlocksRequest() + request = compute.ReportFaultyReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.ReservationSubBlocksListResponse() - post_with_metadata.return_value = ( - compute.ReservationSubBlocksListResponse(), - metadata, - ) + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata - client.list( + client.report_faulty( request, metadata=[ ("key", "val"), @@ -2934,8 +4182,8 @@ def test_list_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_perform_maintenance_rest_bad_request( - request_type=compute.PerformMaintenanceReservationSubBlockRequest, +def test_set_iam_policy_rest_bad_request( + request_type=compute.SetIamPolicyReservationSubBlockRequest, ): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -2944,8 +4192,8 @@ def test_perform_maintenance_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -2961,56 +4209,156 @@ def test_perform_maintenance_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.perform_maintenance(request) + client.set_iam_policy(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.SetIamPolicyReservationSubBlockRequest, + dict, + ], +) +def test_set_iam_policy_rest_call_success(request_type): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "parent_resource": "sample3", + "resource": "sample4", + } + request_init["zone_set_nested_policy_request_resource"] = { + "bindings": [ + { + "binding_id": "binding_id_value", + "condition": { + "description": "description_value", + "expression": "expression_value", + "location": "location_value", + "title": "title_value", + }, + "members": ["members_value1", "members_value2"], + "role": "role_value", + } + ], + "etag": "etag_value", + "policy": { + "audit_configs": [ + { + "audit_log_configs": [ + { + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "ignore_child_exemptions": True, + "log_type": "log_type_value", + } + ], + "exempted_members": [ + "exempted_members_value1", + "exempted_members_value2", + ], + "service": "service_value", + } + ], + "bindings": {}, + "etag": "etag_value", + "iam_owned": True, + "version": 774, + }, + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.SetIamPolicyReservationSubBlockRequest.meta.fields[ + "zone_set_nested_policy_request_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "zone_set_nested_policy_request_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value -@pytest.mark.parametrize( - "request_type", - [ - compute.PerformMaintenanceReservationSubBlockRequest, - dict, - ], -) -def test_perform_maintenance_rest_call_success(request_type): - client = ReservationSubBlocksClient( - credentials=ga_credentials.AnonymousCredentials(), transport="rest" - ) + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) - # send a request that will satisfy transcoding - request_init = { - "project": "sample1", - "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", - } + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, + len(request_init["zone_set_nested_policy_request_resource"][field]), + ): + del request_init["zone_set_nested_policy_request_resource"][field][ + i + ][subfield] + else: + del request_init["zone_set_nested_policy_request_resource"][field][ + subfield + ] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.Policy( + etag="etag_value", + iam_owned=True, + version=774, ) # Wrap the value into a proper Response obj @@ -3018,41 +4366,22 @@ def test_perform_maintenance_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.Policy.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.perform_maintenance(request) + response = client.set_iam_policy(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.Policy) + assert response.etag == "etag_value" + assert response.iam_owned is True + assert response.version == 774 @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_perform_maintenance_rest_interceptors(null_interceptor): +def test_set_iam_policy_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -3066,18 +4395,18 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_perform_maintenance" + transports.ReservationSubBlocksRestInterceptor, "post_set_iam_policy" ) as post, mock.patch.object( transports.ReservationSubBlocksRestInterceptor, - "post_perform_maintenance_with_metadata", + "post_set_iam_policy_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_perform_maintenance" + transports.ReservationSubBlocksRestInterceptor, "pre_set_iam_policy" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.PerformMaintenanceReservationSubBlockRequest.pb( - compute.PerformMaintenanceReservationSubBlockRequest() + pb_message = compute.SetIamPolicyReservationSubBlockRequest.pb( + compute.SetIamPolicyReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -3089,19 +4418,19 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.Policy.to_json(compute.Policy()) req.return_value.content = return_value - request = compute.PerformMaintenanceReservationSubBlockRequest() + request = compute.SetIamPolicyReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.Policy() + post_with_metadata.return_value = compute.Policy(), metadata - client.perform_maintenance( + client.set_iam_policy( request, metadata=[ ("key", "val"), @@ -3114,8 +4443,8 @@ def test_perform_maintenance_rest_interceptors(null_interceptor): post_with_metadata.assert_called_once() -def test_report_faulty_rest_bad_request( - request_type=compute.ReportFaultyReservationSubBlockRequest, +def test_test_iam_permissions_rest_bad_request( + request_type=compute.TestIamPermissionsReservationSubBlockRequest, ): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" @@ -3124,8 +4453,8 @@ def test_report_faulty_rest_bad_request( request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } request = request_type(**request_init) @@ -3141,17 +4470,17 @@ def test_report_faulty_rest_bad_request( response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.report_faulty(request) + client.test_iam_permissions(request) @pytest.mark.parametrize( "request_type", [ - compute.ReportFaultyReservationSubBlockRequest, + compute.TestIamPermissionsReservationSubBlockRequest, dict, ], ) -def test_report_faulty_rest_call_success(request_type): +def test_test_iam_permissions_rest_call_success(request_type): client = ReservationSubBlocksClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -3160,23 +4489,19 @@ def test_report_faulty_rest_call_success(request_type): request_init = { "project": "sample1", "zone": "sample2", - "parent_name": "sample3", - "reservation_sub_block": "sample4", + "parent_resource": "sample3", + "resource": "sample4", } - request_init["reservation_sub_blocks_report_faulty_request_resource"] = { - "disruption_schedule": "disruption_schedule_value", - "failure_component": "failure_component_value", - "fault_reasons": [ - {"behavior": "behavior_value", "description": "description_value"} - ], + request_init["test_permissions_request_resource"] = { + "permissions": ["permissions_value1", "permissions_value2"] } # 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 # See https://github.com/googleapis/gapic-generator-python/issues/1748 # Determine if the message type is proto-plus or protobuf - test_field = compute.ReportFaultyReservationSubBlockRequest.meta.fields[ - "reservation_sub_blocks_report_faulty_request_resource" + test_field = compute.TestIamPermissionsReservationSubBlockRequest.meta.fields[ + "test_permissions_request_resource" ] def get_message_fields(field): @@ -3206,7 +4531,7 @@ def get_message_fields(field): # For each item in the sample request, create a list of sub fields which are not present at runtime # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime for field, value in request_init[ - "reservation_sub_blocks_report_faulty_request_resource" + "test_permissions_request_resource" ].items(): # pragma: NO COVER result = None is_repeated = False @@ -3238,48 +4563,20 @@ def get_message_fields(field): if subfield: if field_repeated: for i in range( - 0, - len( - request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field] - ), + 0, len(request_init["test_permissions_request_resource"][field]) ): - del request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field][i][subfield] + del request_init["test_permissions_request_resource"][field][i][ + subfield + ] else: - del request_init[ - "reservation_sub_blocks_report_faulty_request_resource" - ][field][subfield] + del request_init["test_permissions_request_resource"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = compute.Operation( - client_operation_id="client_operation_id_value", - creation_timestamp="creation_timestamp_value", - description="description_value", - end_time="end_time_value", - http_error_message="http_error_message_value", - http_error_status_code=2374, - id=205, - insert_time="insert_time_value", - kind="kind_value", - name="name_value", - operation_group_id="operation_group_id_value", - operation_type="operation_type_value", - progress=885, - region="region_value", - self_link="self_link_value", - start_time="start_time_value", - status=compute.Operation.Status.DONE, - status_message="status_message_value", - target_id=947, - target_link="target_link_value", - user="user_value", - zone="zone_value", + return_value = compute.TestPermissionsResponse( + permissions=["permissions_value"], ) # Wrap the value into a proper Response obj @@ -3287,41 +4584,20 @@ def get_message_fields(field): response_value.status_code = 200 # Convert return value to protobuf type - return_value = compute.Operation.pb(return_value) + return_value = compute.TestPermissionsResponse.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.report_faulty(request) + response = client.test_iam_permissions(request) # Establish that the response is the type that we expect. - assert isinstance(response, extended_operation.ExtendedOperation) - assert response.client_operation_id == "client_operation_id_value" - assert response.creation_timestamp == "creation_timestamp_value" - assert response.description == "description_value" - assert response.end_time == "end_time_value" - assert response.http_error_message == "http_error_message_value" - assert response.http_error_status_code == 2374 - assert response.id == 205 - assert response.insert_time == "insert_time_value" - assert response.kind == "kind_value" - assert response.name == "name_value" - assert response.operation_group_id == "operation_group_id_value" - assert response.operation_type == "operation_type_value" - assert response.progress == 885 - assert response.region == "region_value" - assert response.self_link == "self_link_value" - assert response.start_time == "start_time_value" - assert response.status == compute.Operation.Status.DONE - assert response.status_message == "status_message_value" - assert response.target_id == 947 - assert response.target_link == "target_link_value" - assert response.user == "user_value" - assert response.zone == "zone_value" + assert isinstance(response, compute.TestPermissionsResponse) + assert response.permissions == ["permissions_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_report_faulty_rest_interceptors(null_interceptor): +def test_test_iam_permissions_rest_interceptors(null_interceptor): transport = transports.ReservationSubBlocksRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -3335,18 +4611,18 @@ def test_report_faulty_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "post_report_faulty" + transports.ReservationSubBlocksRestInterceptor, "post_test_iam_permissions" ) as post, mock.patch.object( transports.ReservationSubBlocksRestInterceptor, - "post_report_faulty_with_metadata", + "post_test_iam_permissions_with_metadata", ) as post_with_metadata, mock.patch.object( - transports.ReservationSubBlocksRestInterceptor, "pre_report_faulty" + transports.ReservationSubBlocksRestInterceptor, "pre_test_iam_permissions" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = compute.ReportFaultyReservationSubBlockRequest.pb( - compute.ReportFaultyReservationSubBlockRequest() + pb_message = compute.TestIamPermissionsReservationSubBlockRequest.pb( + compute.TestIamPermissionsReservationSubBlockRequest() ) transcode.return_value = { "method": "post", @@ -3358,19 +4634,21 @@ def test_report_faulty_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = compute.Operation.to_json(compute.Operation()) + return_value = compute.TestPermissionsResponse.to_json( + compute.TestPermissionsResponse() + ) req.return_value.content = return_value - request = compute.ReportFaultyReservationSubBlockRequest() + request = compute.TestIamPermissionsReservationSubBlockRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = compute.Operation() - post_with_metadata.return_value = compute.Operation(), metadata + post.return_value = compute.TestPermissionsResponse() + post_with_metadata.return_value = compute.TestPermissionsResponse(), metadata - client.report_faulty( + client.test_iam_permissions( request, metadata=[ ("key", "val"), @@ -3410,6 +4688,26 @@ def test_get_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_iam_policy_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: + client.get_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetIamPolicyReservationSubBlockRequest() + + assert args[0] == request_msg + + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. def test_list_empty_call_rest(): @@ -3472,6 +4770,48 @@ def test_report_faulty_unary_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_set_iam_policy_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: + client.set_iam_policy(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.SetIamPolicyReservationSubBlockRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_test_iam_permissions_empty_call_rest(): + client = ReservationSubBlocksClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object( + type(client.transport.test_iam_permissions), "__call__" + ) as call: + client.test_iam_permissions(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.TestIamPermissionsReservationSubBlockRequest() + + assert args[0] == request_msg + + def test_reservation_sub_blocks_base_transport_error(): # Passing both a credentials object and credentials_file should raise an error with pytest.raises(core_exceptions.DuplicateCredentialArgs): @@ -3495,9 +4835,12 @@ def test_reservation_sub_blocks_base_transport(): # raise NotImplementedError. methods = ( "get", + "get_iam_policy", "list", "perform_maintenance", "report_faulty", + "set_iam_policy", + "test_iam_permissions", ) for method in methods: with pytest.raises(NotImplementedError): @@ -3638,6 +4981,9 @@ def test_reservation_sub_blocks_client_transport_session_collision(transport_nam session1 = client1.transport.get._session session2 = client2.transport.get._session assert session1 != session2 + session1 = client1.transport.get_iam_policy._session + session2 = client2.transport.get_iam_policy._session + assert session1 != session2 session1 = client1.transport.list._session session2 = client2.transport.list._session assert session1 != session2 @@ -3647,6 +4993,12 @@ def test_reservation_sub_blocks_client_transport_session_collision(transport_nam session1 = client1.transport.report_faulty._session session2 = client2.transport.report_faulty._session assert session1 != session2 + session1 = client1.transport.set_iam_policy._session + session2 = client2.transport.set_iam_policy._session + assert session1 != session2 + session1 = client1.transport.test_iam_permissions._session + session2 = client2.transport.test_iam_permissions._session + assert session1 != session2 def test_common_billing_account_path(): diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py index 83896c622b67..89e3d6929491 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py @@ -4544,6 +4544,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "disk_consistency_group_policy": {}, "group_placement_policy": { + "accelerator_topology_mode": "accelerator_topology_mode_value", "availability_domain_count": 2650, "collocation": "collocation_value", "gpu_topology": "gpu_topology_value", @@ -4610,6 +4611,7 @@ def test_insert_rest_call_success(request_type): "status": "status_value", "workload_policy": { "accelerator_topology": "accelerator_topology_value", + "accelerator_topology_mode": "accelerator_topology_mode_value", "max_topology_distance": "max_topology_distance_value", "type_": "type__value", }, @@ -4998,6 +5000,7 @@ def test_patch_rest_call_success(request_type): "description": "description_value", "disk_consistency_group_policy": {}, "group_placement_policy": { + "accelerator_topology_mode": "accelerator_topology_mode_value", "availability_domain_count": 2650, "collocation": "collocation_value", "gpu_topology": "gpu_topology_value", @@ -5064,6 +5067,7 @@ def test_patch_rest_call_success(request_type): "status": "status_value", "workload_policy": { "accelerator_topology": "accelerator_topology_value", + "accelerator_topology_mode": "accelerator_topology_mode_value", "max_topology_distance": "max_topology_distance_value", "type_": "type__value", }, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollout_plans.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollout_plans.py new file mode 100644 index 000000000000..859ba867f704 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollout_plans.py @@ -0,0 +1,3633 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.rollout_plans import ( + RolloutPlansClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RolloutPlansClient._get_default_mtls_endpoint(None) is None + assert ( + RolloutPlansClient._get_default_mtls_endpoint(api_endpoint) == api_mtls_endpoint + ) + assert ( + RolloutPlansClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RolloutPlansClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RolloutPlansClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert RolloutPlansClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi + + +def test__read_environment_variables(): + assert RolloutPlansClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RolloutPlansClient._read_environment_variables() == (True, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RolloutPlansClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + RolloutPlansClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert RolloutPlansClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RolloutPlansClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RolloutPlansClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RolloutPlansClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RolloutPlansClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RolloutPlansClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert RolloutPlansClient._use_client_cert_effective() is True + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RolloutPlansClient._use_client_cert_effective() is True + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert RolloutPlansClient._use_client_cert_effective() is True + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert RolloutPlansClient._use_client_cert_effective() is True + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + RolloutPlansClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert RolloutPlansClient._use_client_cert_effective() is False + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert RolloutPlansClient._use_client_cert_effective() is False + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert RolloutPlansClient._get_client_cert_source(None, False) is None + assert ( + RolloutPlansClient._get_client_cert_source(mock_provided_cert_source, False) + is None + ) + assert ( + RolloutPlansClient._get_client_cert_source(mock_provided_cert_source, True) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RolloutPlansClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RolloutPlansClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RolloutPlansClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutPlansClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RolloutPlansClient._DEFAULT_UNIVERSE + default_endpoint = RolloutPlansClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RolloutPlansClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RolloutPlansClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RolloutPlansClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RolloutPlansClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutPlansClient._get_api_endpoint(None, None, default_universe, "auto") + == default_endpoint + ) + assert ( + RolloutPlansClient._get_api_endpoint(None, None, default_universe, "always") + == RolloutPlansClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutPlansClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RolloutPlansClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutPlansClient._get_api_endpoint(None, None, mock_universe, "never") + == mock_endpoint + ) + assert ( + RolloutPlansClient._get_api_endpoint(None, None, default_universe, "never") + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RolloutPlansClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RolloutPlansClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + RolloutPlansClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + RolloutPlansClient._get_universe_domain(None, None) + == RolloutPlansClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RolloutPlansClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RolloutPlansClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RolloutPlansClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RolloutPlansClient, "rest"), + ], +) +def test_rollout_plans_client_from_service_account_info(client_class, transport_name): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RolloutPlansRestTransport, "rest"), + ], +) +def test_rollout_plans_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RolloutPlansClient, "rest"), + ], +) +def test_rollout_plans_client_from_service_account_file(client_class, transport_name): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_rollout_plans_client_get_transport_class(): + transport = RolloutPlansClient.get_transport_class() + available_transports = [ + transports.RolloutPlansRestTransport, + ] + assert transport in available_transports + + transport = RolloutPlansClient.get_transport_class("rest") + assert transport == transports.RolloutPlansRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + (RolloutPlansClient, transports.RolloutPlansRestTransport, "rest"), + ], +) +@mock.patch.object( + RolloutPlansClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutPlansClient), +) +def test_rollout_plans_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(RolloutPlansClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(RolloutPlansClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + (RolloutPlansClient, transports.RolloutPlansRestTransport, "rest", "true"), + (RolloutPlansClient, transports.RolloutPlansRestTransport, "rest", "false"), + ], +) +@mock.patch.object( + RolloutPlansClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutPlansClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_rollout_plans_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RolloutPlansClient]) +@mock.patch.object( + RolloutPlansClient, "DEFAULT_ENDPOINT", modify_default_endpoint(RolloutPlansClient) +) +def test_rollout_plans_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [RolloutPlansClient]) +@mock.patch.object( + RolloutPlansClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutPlansClient), +) +def test_rollout_plans_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RolloutPlansClient._DEFAULT_UNIVERSE + default_endpoint = RolloutPlansClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RolloutPlansClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + (RolloutPlansClient, transports.RolloutPlansRestTransport, "rest"), + ], +) +def test_rollout_plans_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + (RolloutPlansClient, transports.RolloutPlansRestTransport, "rest", None), + ], +) +def test_rollout_plans_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields(request_type=compute.DeleteRolloutPlanRequest): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout_plan"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rolloutPlan"] = "rollout_plan_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rolloutPlan" in jsonified_request + assert jsonified_request["rolloutPlan"] == "rollout_plan_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rolloutPlan", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout_plan": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout_plan="rollout_plan_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans/{rollout_plan}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRolloutPlanRequest(), + project="project_value", + rollout_plan="rollout_plan_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteRolloutPlanRequest, +): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout_plan"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rolloutPlan"] = "rollout_plan_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rolloutPlan" in jsonified_request + assert jsonified_request["rolloutPlan"] == "rollout_plan_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rolloutPlan", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout_plan": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout_plan="rollout_plan_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans/{rollout_plan}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRolloutPlanRequest(), + project="project_value", + rollout_plan="rollout_plan_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetRolloutPlanRequest): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout_plan"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rolloutPlan"] = "rollout_plan_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rolloutPlan" in jsonified_request + assert jsonified_request["rolloutPlan"] == "rollout_plan_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlan() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutPlan.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "rolloutPlan", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlan() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout_plan": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout_plan="rollout_plan_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.RolloutPlan.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans/{rollout_plan}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRolloutPlanRequest(), + project="project_value", + rollout_plan="rollout_plan_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields(request_type=compute.InsertRolloutPlanRequest): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rolloutPlanResource", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout_plan_resource=compute.RolloutPlan( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertRolloutPlanRequest(), + project="project_value", + rollout_plan_resource=compute.RolloutPlan( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertRolloutPlanRequest, +): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rolloutPlanResource", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout_plan_resource=compute.RolloutPlan( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertRolloutPlanRequest(), + project="project_value", + rollout_plan_resource=compute.RolloutPlan( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields(request_type=compute.ListRolloutPlansRequest): + transport_class = transports.RolloutPlansRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlansListResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutPlansListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set(("project",)) + ) + + +def test_list_rest_flattened(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlansListResponse() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.RolloutPlansListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rolloutPlans" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRolloutPlansRequest(), + project="project_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.RolloutPlansListResponse( + items=[ + compute.RolloutPlan(), + compute.RolloutPlan(), + compute.RolloutPlan(), + ], + next_page_token="abc", + ), + compute.RolloutPlansListResponse( + items=[], + next_page_token="def", + ), + compute.RolloutPlansListResponse( + items=[ + compute.RolloutPlan(), + ], + next_page_token="ghi", + ), + compute.RolloutPlansListResponse( + items=[ + compute.RolloutPlan(), + compute.RolloutPlan(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.RolloutPlansListResponse.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.RolloutPlan) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutPlansClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RolloutPlansClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RolloutPlansClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutPlansClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RolloutPlansClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RolloutPlansRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RolloutPlansClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_delete_rest_bad_request(request_type=compute.DeleteRolloutPlanRequest): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout_plan": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRolloutPlanRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout_plan": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RolloutPlansRestInterceptor(), + ) + client = RolloutPlansClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutPlansRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRolloutPlanRequest.pb( + compute.DeleteRolloutPlanRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRolloutPlanRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetRolloutPlanRequest): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout_plan": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRolloutPlanRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout_plan": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlan( + creation_timestamp="creation_timestamp_value", + description="description_value", + id=205, + kind="kind_value", + location_scope="location_scope_value", + name="name_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutPlan.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.RolloutPlan) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.location_scope == "location_scope_value" + assert response.name == "name_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RolloutPlansRestInterceptor(), + ) + client = RolloutPlansClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutPlansRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRolloutPlanRequest.pb(compute.GetRolloutPlanRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.RolloutPlan.to_json(compute.RolloutPlan()) + req.return_value.content = return_value + + request = compute.GetRolloutPlanRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.RolloutPlan() + post_with_metadata.return_value = compute.RolloutPlan(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request(request_type=compute.InsertRolloutPlanRequest): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertRolloutPlanRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request_init["rollout_plan_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "id": 205, + "kind": "kind_value", + "location_scope": "location_scope_value", + "name": "name_value", + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "waves": [ + { + "display_name": "display_name_value", + "number": 649, + "orchestration_options": { + "delays": [ + { + "delimiter": "delimiter_value", + "duration": "duration_value", + "type_": "type__value", + } + ], + "max_concurrent_locations": 2579, + "max_concurrent_resources_per_location": 3968, + }, + "selectors": [ + { + "location_selector": { + "included_locations": [ + "included_locations_value1", + "included_locations_value2", + ] + }, + "resource_hierarchy_selector": { + "included_folders": [ + "included_folders_value1", + "included_folders_value2", + ], + "included_organizations": [ + "included_organizations_value1", + "included_organizations_value2", + ], + "included_projects": [ + "included_projects_value1", + "included_projects_value2", + ], + }, + } + ], + "validation": { + "time_based_validation_metadata": { + "wait_duration": "wait_duration_value" + }, + "type_": "type__value", + }, + } + ], + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertRolloutPlanRequest.meta.fields["rollout_plan_resource"] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "rollout_plan_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["rollout_plan_resource"][field])): + del request_init["rollout_plan_resource"][field][i][subfield] + else: + del request_init["rollout_plan_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RolloutPlansRestInterceptor(), + ) + client = RolloutPlansClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutPlansRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertRolloutPlanRequest.pb( + compute.InsertRolloutPlanRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertRolloutPlanRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListRolloutPlansRequest): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRolloutPlansRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutPlansListResponse( + etag="etag_value", + id="id_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutPlansListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RolloutPlansRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.RolloutPlansRestInterceptor(), + ) + client = RolloutPlansClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RolloutPlansRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutPlansRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRolloutPlansRequest.pb( + compute.ListRolloutPlansRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.RolloutPlansListResponse.to_json( + compute.RolloutPlansListResponse() + ) + req.return_value.content = return_value + + request = compute.ListRolloutPlansRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.RolloutPlansListResponse() + post_with_metadata.return_value = compute.RolloutPlansListResponse(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRolloutPlanRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRolloutPlanRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertRolloutPlanRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRolloutPlansRequest() + + assert args[0] == request_msg + + +def test_rollout_plans_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RolloutPlansTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_rollout_plans_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.rollout_plans.transports.RolloutPlansTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RolloutPlansTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "delete", + "get", + "insert", + "list", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_rollout_plans_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.rollout_plans.transports.RolloutPlansTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RolloutPlansTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_rollout_plans_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.rollout_plans.transports.RolloutPlansTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RolloutPlansTransport() + adc.assert_called_once() + + +def test_rollout_plans_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RolloutPlansClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_rollout_plans_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RolloutPlansRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollout_plans_host_no_port(transport_name): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollout_plans_host_with_port(transport_name): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollout_plans_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RolloutPlansClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RolloutPlansClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RolloutPlansClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RolloutPlansClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutPlansClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RolloutPlansClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RolloutPlansClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutPlansClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RolloutPlansClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RolloutPlansClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutPlansClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RolloutPlansClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RolloutPlansClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutPlansClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RolloutPlansClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RolloutPlansClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutPlansClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RolloutPlansTransport, "_prep_wrapped_messages" + ) as prep: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RolloutPlansTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RolloutPlansClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RolloutPlansClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RolloutPlansClient, transports.RolloutPlansRestTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollouts.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollouts.py new file mode 100644 index 000000000000..79be769a469e --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_rollouts.py @@ -0,0 +1,3502 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.rollouts import ( + RolloutsClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert RolloutsClient._get_default_mtls_endpoint(None) is None + assert RolloutsClient._get_default_mtls_endpoint(api_endpoint) == api_mtls_endpoint + assert ( + RolloutsClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + RolloutsClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + RolloutsClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert RolloutsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi + + +def test__read_environment_variables(): + assert RolloutsClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RolloutsClient._read_environment_variables() == (True, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert RolloutsClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + RolloutsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert RolloutsClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert RolloutsClient._read_environment_variables() == (False, "never", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert RolloutsClient._read_environment_variables() == (False, "always", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert RolloutsClient._read_environment_variables() == (False, "auto", None) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + RolloutsClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert RolloutsClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert RolloutsClient._use_client_cert_effective() is True + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert RolloutsClient._use_client_cert_effective() is True + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert RolloutsClient._use_client_cert_effective() is True + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert RolloutsClient._use_client_cert_effective() is True + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + RolloutsClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert RolloutsClient._use_client_cert_effective() is False + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert RolloutsClient._use_client_cert_effective() is False + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert RolloutsClient._get_client_cert_source(None, False) is None + assert ( + RolloutsClient._get_client_cert_source(mock_provided_cert_source, False) is None + ) + assert ( + RolloutsClient._get_client_cert_source(mock_provided_cert_source, True) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + RolloutsClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + RolloutsClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + RolloutsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutsClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = RolloutsClient._DEFAULT_UNIVERSE + default_endpoint = RolloutsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RolloutsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + RolloutsClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + RolloutsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == RolloutsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutsClient._get_api_endpoint(None, None, default_universe, "auto") + == default_endpoint + ) + assert ( + RolloutsClient._get_api_endpoint(None, None, default_universe, "always") + == RolloutsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutsClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == RolloutsClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + RolloutsClient._get_api_endpoint(None, None, mock_universe, "never") + == mock_endpoint + ) + assert ( + RolloutsClient._get_api_endpoint(None, None, default_universe, "never") + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + RolloutsClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + RolloutsClient._get_universe_domain(client_universe_domain, universe_domain_env) + == client_universe_domain + ) + assert ( + RolloutsClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + RolloutsClient._get_universe_domain(None, None) + == RolloutsClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + RolloutsClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = RolloutsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = RolloutsClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RolloutsClient, "rest"), + ], +) +def test_rollouts_client_from_service_account_info(client_class, transport_name): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.RolloutsRestTransport, "rest"), + ], +) +def test_rollouts_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (RolloutsClient, "rest"), + ], +) +def test_rollouts_client_from_service_account_file(client_class, transport_name): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_rollouts_client_get_transport_class(): + transport = RolloutsClient.get_transport_class() + available_transports = [ + transports.RolloutsRestTransport, + ] + assert transport in available_transports + + transport = RolloutsClient.get_transport_class("rest") + assert transport == transports.RolloutsRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + (RolloutsClient, transports.RolloutsRestTransport, "rest"), + ], +) +@mock.patch.object( + RolloutsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutsClient), +) +def test_rollouts_client_client_options(client_class, transport_class, transport_name): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(RolloutsClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(RolloutsClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + (RolloutsClient, transports.RolloutsRestTransport, "rest", "true"), + (RolloutsClient, transports.RolloutsRestTransport, "rest", "false"), + ], +) +@mock.patch.object( + RolloutsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutsClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_rollouts_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [RolloutsClient]) +@mock.patch.object( + RolloutsClient, "DEFAULT_ENDPOINT", modify_default_endpoint(RolloutsClient) +) +def test_rollouts_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [RolloutsClient]) +@mock.patch.object( + RolloutsClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(RolloutsClient), +) +def test_rollouts_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = RolloutsClient._DEFAULT_UNIVERSE + default_endpoint = RolloutsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = RolloutsClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + (RolloutsClient, transports.RolloutsRestTransport, "rest"), + ], +) +def test_rollouts_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + (RolloutsClient, transports.RolloutsRestTransport, "rest", None), + ], +) +def test_rollouts_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_cancel_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.cancel in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.cancel] = mock_rpc + + request = {} + client.cancel(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.cancel(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_cancel_rest_required_fields(request_type=compute.CancelRolloutRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rollout"] = "rollout_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "request_id", + "rollback", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rollout" in jsonified_request + assert jsonified_request["rollout"] == "rollout_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.cancel(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_cancel_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.cancel._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "requestId", + "rollback", + ) + ) + & set( + ( + "project", + "rollout", + ) + ) + ) + + +def test_cancel_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout="rollout_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.cancel(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts/{rollout}" + % client.transport._host, + args[1], + ) + + +def test_cancel_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.cancel( + compute.CancelRolloutRequest(), + project="project_value", + rollout="rollout_value", + ) + + +def test_cancel_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.cancel in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.cancel] = mock_rpc + + request = {} + client.cancel_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.cancel_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_cancel_unary_rest_required_fields(request_type=compute.CancelRolloutRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rollout"] = "rollout_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).cancel._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "request_id", + "rollback", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rollout" in jsonified_request + assert jsonified_request["rollout"] == "rollout_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.cancel_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_cancel_unary_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.cancel._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "requestId", + "rollback", + ) + ) + & set( + ( + "project", + "rollout", + ) + ) + ) + + +def test_cancel_unary_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout="rollout_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.cancel_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts/{rollout}" + % client.transport._host, + args[1], + ) + + +def test_cancel_unary_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.cancel_unary( + compute.CancelRolloutRequest(), + project="project_value", + rollout="rollout_value", + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields(request_type=compute.DeleteRolloutRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rollout"] = "rollout_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rollout" in jsonified_request + assert jsonified_request["rollout"] == "rollout_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rollout", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout="rollout_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts/{rollout}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteRolloutRequest(), + project="project_value", + rollout="rollout_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields(request_type=compute.DeleteRolloutRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rollout"] = "rollout_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rollout" in jsonified_request + assert jsonified_request["rollout"] == "rollout_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "rollout", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout="rollout_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts/{rollout}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteRolloutRequest(), + project="project_value", + rollout="rollout_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetRolloutRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request_init["rollout"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["rollout"] = "rollout_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "rollout" in jsonified_request + assert jsonified_request["rollout"] == "rollout_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Rollout() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Rollout.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "rollout", + ) + ) + ) + + +def test_get_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Rollout() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "rollout": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + rollout="rollout_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Rollout.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts/{rollout}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetRolloutRequest(), + project="project_value", + rollout="rollout_value", + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields(request_type=compute.ListRolloutsRequest): + transport_class = transports.RolloutsRestTransport + + request_init = {} + request_init["project"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.RolloutsListResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutsListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set(("project",)) + ) + + +def test_list_rest_flattened(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutsListResponse() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.RolloutsListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/global/rollouts" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListRolloutsRequest(), + project="project_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.RolloutsListResponse( + items=[ + compute.Rollout(), + compute.Rollout(), + compute.Rollout(), + ], + next_page_token="abc", + ), + compute.RolloutsListResponse( + items=[], + next_page_token="def", + ), + compute.RolloutsListResponse( + items=[ + compute.Rollout(), + ], + next_page_token="ghi", + ), + compute.RolloutsListResponse( + items=[ + compute.Rollout(), + compute.Rollout(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.RolloutsListResponse.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.Rollout) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutsClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RolloutsClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RolloutsClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = RolloutsClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = RolloutsClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.RolloutsRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = RolloutsClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_cancel_rest_bad_request(request_type=compute.CancelRolloutRequest): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.cancel(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.CancelRolloutRequest, + dict, + ], +) +def test_cancel_rest_call_success(request_type): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.cancel(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_cancel_rest_interceptors(null_interceptor): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None if null_interceptor else transports.RolloutsRestInterceptor(), + ) + client = RolloutsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutsRestInterceptor, "post_cancel" + ) as post, mock.patch.object( + transports.RolloutsRestInterceptor, "post_cancel_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutsRestInterceptor, "pre_cancel" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.CancelRolloutRequest.pb(compute.CancelRolloutRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.CancelRolloutRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.cancel( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_rest_bad_request(request_type=compute.DeleteRolloutRequest): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteRolloutRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None if null_interceptor else transports.RolloutsRestInterceptor(), + ) + client = RolloutsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutsRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.RolloutsRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutsRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteRolloutRequest.pb(compute.DeleteRolloutRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteRolloutRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetRolloutRequest): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetRolloutRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "rollout": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Rollout( + cancellation_time="cancellation_time_value", + completion_time="completion_time_value", + creation_timestamp="creation_timestamp_value", + current_wave_number=2045, + description="description_value", + etag="etag_value", + id=205, + kind="kind_value", + name="name_value", + rollout_plan="rollout_plan_value", + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + state="state_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Rollout.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.Rollout) + assert response.cancellation_time == "cancellation_time_value" + assert response.completion_time == "completion_time_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.current_wave_number == 2045 + assert response.description == "description_value" + assert response.etag == "etag_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.rollout_plan == "rollout_plan_value" + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + assert response.state == "state_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None if null_interceptor else transports.RolloutsRestInterceptor(), + ) + client = RolloutsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutsRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.RolloutsRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutsRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetRolloutRequest.pb(compute.GetRolloutRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Rollout.to_json(compute.Rollout()) + req.return_value.content = return_value + + request = compute.GetRolloutRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Rollout() + post_with_metadata.return_value = compute.Rollout(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListRolloutsRequest): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListRolloutsRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.RolloutsListResponse( + etag="etag_value", + id="id_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.RolloutsListResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.RolloutsRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None if null_interceptor else transports.RolloutsRestInterceptor(), + ) + client = RolloutsClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.RolloutsRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.RolloutsRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.RolloutsRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListRolloutsRequest.pb(compute.ListRolloutsRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.RolloutsListResponse.to_json( + compute.RolloutsListResponse() + ) + req.return_value.content = return_value + + request = compute.ListRolloutsRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.RolloutsListResponse() + post_with_metadata.return_value = compute.RolloutsListResponse(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_cancel_unary_empty_call_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.cancel), "__call__") as call: + client.cancel_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.CancelRolloutRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteRolloutRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetRolloutRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListRolloutsRequest() + + assert args[0] == request_msg + + +def test_rollouts_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.RolloutsTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_rollouts_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.rollouts.transports.RolloutsTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.RolloutsTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "cancel", + "delete", + "get", + "list", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_rollouts_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.rollouts.transports.RolloutsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RolloutsTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_rollouts_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.rollouts.transports.RolloutsTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.RolloutsTransport() + adc.assert_called_once() + + +def test_rollouts_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + RolloutsClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_rollouts_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.RolloutsRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollouts_host_no_port(transport_name): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollouts_host_with_port(transport_name): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_rollouts_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = RolloutsClient( + credentials=creds1, + transport=transport_name, + ) + client2 = RolloutsClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.cancel._session + session2 = client2.transport.cancel._session + assert session1 != session2 + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = RolloutsClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = RolloutsClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutsClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = RolloutsClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = RolloutsClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutsClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = RolloutsClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = RolloutsClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutsClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = RolloutsClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = RolloutsClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutsClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = RolloutsClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = RolloutsClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = RolloutsClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.RolloutsTransport, "_prep_wrapped_messages" + ) as prep: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.RolloutsTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = RolloutsClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = RolloutsClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RolloutsClient, transports.RolloutsRestTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py index 288d59859974..014b559d0e8f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py @@ -5611,9 +5611,10 @@ def test_add_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -6566,7 +6567,11 @@ def test_insert_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -6655,9 +6660,10 @@ def test_insert_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -7288,7 +7294,11 @@ def test_patch_rest_call_success(request_type): } ], "creation_timestamp": "creation_timestamp_value", - "ddos_protection_config": {"ddos_protection": "ddos_protection_value"}, + "ddos_protection_config": { + "ddos_adaptive_protection": "ddos_adaptive_protection_value", + "ddos_impacted_baseline_threshold": 0.33580000000000004, + "ddos_protection": "ddos_protection_value", + }, "description": "description_value", "display_name": "display_name_value", "fingerprint": "fingerprint_value", @@ -7377,9 +7387,10 @@ def test_patch_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, @@ -7739,9 +7750,10 @@ def test_patch_rule_rest_call_success(request_type): "preconfigured_waf_config": { "exclusions": [ { - "request_cookies_to_exclude": [ + "request_bodies_to_exclude": [ {"op": "op_value", "val": "val_value"} ], + "request_cookies_to_exclude": {}, "request_headers_to_exclude": {}, "request_query_params_to_exclude": {}, "request_uris_to_exclude": {}, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py index 8f72ae9723a0..4c86cd98694a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py @@ -4592,6 +4592,7 @@ def test_insert_rest_call_success(request_type): { "consumer_network": "consumer_network_value", "endpoint": "endpoint_value", + "endpoint_with_id": "endpoint_with_id_value", "nat_ips": ["nat_ips_value1", "nat_ips_value2"], "propagated_connection_count": 2878, "psc_connection_id": 1793, @@ -4602,6 +4603,7 @@ def test_insert_rest_call_success(request_type): "consumer_accept_lists": [ { "connection_limit": 1710, + "endpoint_url": "endpoint_url_value", "network_url": "network_url_value", "project_id_or_num": "project_id_or_num_value", } @@ -5018,6 +5020,7 @@ def test_patch_rest_call_success(request_type): { "consumer_network": "consumer_network_value", "endpoint": "endpoint_value", + "endpoint_with_id": "endpoint_with_id_value", "nat_ips": ["nat_ips_value1", "nat_ips_value2"], "propagated_connection_count": 2878, "psc_connection_id": 1793, @@ -5028,6 +5031,7 @@ def test_patch_rest_call_success(request_type): "consumer_accept_lists": [ { "connection_limit": 1710, + "endpoint_url": "endpoint_url_value", "network_url": "network_url_value", "project_id_or_num": "project_id_or_num_value", } diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py index 2e01ed7059da..54b9975e9bf8 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py @@ -4787,6 +4787,11 @@ def test_insert_rest_call_success(request_type): "capacity_provisioning_type": "capacity_provisioning_type_value", "creation_timestamp": "creation_timestamp_value", "description": "description_value", + "exapool_provisioned_capacity_gb": { + "capacity_optimized": 1922, + "read_optimized": 1488, + "write_optimized": 1631, + }, "id": 205, "kind": "kind_value", "label_fingerprint": "label_fingerprint_value", @@ -4798,6 +4803,10 @@ def test_insert_rest_call_success(request_type): "pool_provisioned_throughput": 2948, "resource_status": { "disk_count": 1075, + "exapool_max_read_iops": 2226, + "exapool_max_read_throughput": 2897, + "exapool_max_write_iops": 2369, + "exapool_max_write_throughput": 3040, "last_resize_timestamp": "last_resize_timestamp_value", "max_total_provisioned_disk_capacity_gb": 4025, "pool_used_capacity_bytes": 2557, @@ -5782,6 +5791,11 @@ def test_update_rest_call_success(request_type): "capacity_provisioning_type": "capacity_provisioning_type_value", "creation_timestamp": "creation_timestamp_value", "description": "description_value", + "exapool_provisioned_capacity_gb": { + "capacity_optimized": 1922, + "read_optimized": 1488, + "write_optimized": 1631, + }, "id": 205, "kind": "kind_value", "label_fingerprint": "label_fingerprint_value", @@ -5793,6 +5807,10 @@ def test_update_rest_call_success(request_type): "pool_provisioned_throughput": 2948, "resource_status": { "disk_count": 1075, + "exapool_max_read_iops": 2226, + "exapool_max_read_throughput": 2897, + "exapool_max_write_iops": 2369, + "exapool_max_write_throughput": 3040, "last_resize_timestamp": "last_resize_timestamp_value", "max_total_provisioned_disk_capacity_gb": 4025, "pool_used_capacity_bytes": 2557, diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py index 8d865966e2b1..2f099c7776db 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py @@ -1200,6 +1200,7 @@ def test_aggregated_list_rest_required_fields( "page_token", "return_partial_success", "service_project_number", + "views", ) ) jsonified_request.update(unset_fields) @@ -1266,6 +1267,7 @@ def test_aggregated_list_rest_unset_required_fields(): "pageToken", "returnPartialSuccess", "serviceProjectNumber", + "views", ) ) & set(("project",)) diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py index 7a40a6f7c846..97a21e357fcc 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py @@ -4160,6 +4160,7 @@ def test_get_rest_call_success(request_type): description="description_value", id=205, kind="kind_value", + load_balancing_scheme="load_balancing_scheme_value", name="name_value", proxy_bind=True, proxy_header="proxy_header_value", @@ -4186,6 +4187,7 @@ def test_get_rest_call_success(request_type): assert response.description == "description_value" assert response.id == 205 assert response.kind == "kind_value" + assert response.load_balancing_scheme == "load_balancing_scheme_value" assert response.name == "name_value" assert response.proxy_bind is True assert response.proxy_header == "proxy_header_value" @@ -4298,6 +4300,7 @@ def test_insert_rest_call_success(request_type): "description": "description_value", "id": 205, "kind": "kind_value", + "load_balancing_scheme": "load_balancing_scheme_value", "name": "name_value", "proxy_bind": True, "proxy_header": "proxy_header_value", diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py new file mode 100644 index 000000000000..7e15997ecea1 --- /dev/null +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_vm_extension_policies.py @@ -0,0 +1,4484 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock # pragma: NO COVER +except ImportError: # pragma: NO COVER + import mock + +from collections.abc import AsyncIterable, Iterable +import json +import math + +from google.api_core import api_core_version +from google.protobuf import json_format +import grpc +from grpc.experimental import aio +from proto.marshal.rules import wrappers +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest +from requests import PreparedRequest, Request, Response +from requests.sessions import Session + +try: + from google.auth.aio import credentials as ga_credentials_async + + HAS_GOOGLE_AUTH_AIO = True +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_AIO = False + +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + path_template, +) +from google.api_core import client_options +from google.api_core import exceptions as core_exceptions +from google.api_core import extended_operation # type: ignore +from google.api_core import retry as retries +import google.auth +from google.auth import credentials as ga_credentials +from google.auth.exceptions import MutualTLSChannelError +from google.oauth2 import service_account + +from google.cloud.compute_v1beta.services.zone_vm_extension_policies import ( + ZoneVmExtensionPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1beta.types import compute + +CRED_INFO_JSON = { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", +} +CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) + + +async def mock_async_gen(data, chunk_size=1): + for i in range(0, len(data)): # pragma: NO COVER + chunk = data[i : i + chunk_size] + yield chunk.encode("utf-8") + + +def client_cert_source_callback(): + return b"cert bytes", b"key bytes" + + +# TODO: use async auth anon credentials by default once the minimum version of google-auth is upgraded. +# See related issue: https://github.com/googleapis/gapic-generator-python/issues/2107. +def async_anonymous_credentials(): + if HAS_GOOGLE_AUTH_AIO: + return ga_credentials_async.AnonymousCredentials() + return ga_credentials.AnonymousCredentials() + + +# If default endpoint is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint(client): + return ( + "foo.googleapis.com" + if ("localhost" in client.DEFAULT_ENDPOINT) + else client.DEFAULT_ENDPOINT + ) + + +# If default endpoint template is localhost, then default mtls endpoint will be the same. +# This method modifies the default endpoint template so the client can produce a different +# mtls endpoint for endpoint testing purposes. +def modify_default_endpoint_template(client): + return ( + "test.{UNIVERSE_DOMAIN}" + if ("localhost" in client._DEFAULT_ENDPOINT_TEMPLATE) + else client._DEFAULT_ENDPOINT_TEMPLATE + ) + + +def test__get_default_mtls_endpoint(): + api_endpoint = "example.googleapis.com" + api_mtls_endpoint = "example.mtls.googleapis.com" + sandbox_endpoint = "example.sandbox.googleapis.com" + sandbox_mtls_endpoint = "example.mtls.sandbox.googleapis.com" + non_googleapi = "api.example.com" + + assert ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(None) is None + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(api_endpoint) + == api_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(api_mtls_endpoint) + == api_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(sandbox_mtls_endpoint) + == sandbox_mtls_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_default_mtls_endpoint(non_googleapi) + == non_googleapi + ) + + +def test__read_environment_variables(): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + True, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with pytest.raises(ValueError) as excinfo: + ZoneVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + else: + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "never", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "always", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + None, + ) + + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + ZoneVmExtensionPoliciesClient._read_environment_variables() + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + with mock.patch.dict(os.environ, {"GOOGLE_CLOUD_UNIVERSE_DOMAIN": "foo.com"}): + assert ZoneVmExtensionPoliciesClient._read_environment_variables() == ( + False, + "auto", + "foo.com", + ) + + +def test_use_client_cert_effective(): + # Test case 1: Test when `should_use_client_cert` returns True. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=True + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 2: Test when `should_use_client_cert` returns False. + # We mock the `should_use_client_cert` function to simulate a scenario where + # the google-auth library supports automatic mTLS and determines that a + # client certificate should NOT be used. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch( + "google.auth.transport.mtls.should_use_client_cert", return_value=False + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 3: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 4: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"} + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 5: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "True". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "True"}): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 6: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "False". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "False"} + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 7: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "TRUE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "TRUE"}): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is True + + # Test case 8: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "FALSE". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "FALSE"} + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 9: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not set. + # In this case, the method should return False, which is the default value. + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, clear=True): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 10: Test when `should_use_client_cert` is unavailable and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should raise a ValueError as the environment variable must be either + # "true" or "false". + if not hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + with pytest.raises(ValueError): + ZoneVmExtensionPoliciesClient._use_client_cert_effective() + + # Test case 11: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to an invalid value. + # The method should return False as the environment variable is set to an invalid value. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "unsupported"} + ): + assert ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + + # Test case 12: Test when `should_use_client_cert` is available and the + # `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is unset. Also, + # the GOOGLE_API_CONFIG environment variable is unset. + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": ""}): + with mock.patch.dict(os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": ""}): + assert ( + ZoneVmExtensionPoliciesClient._use_client_cert_effective() is False + ) + + +def test__get_client_cert_source(): + mock_provided_cert_source = mock.Mock() + mock_default_cert_source = mock.Mock() + + assert ZoneVmExtensionPoliciesClient._get_client_cert_source(None, False) is None + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, False + ) + is None + ) + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, True + ) + == mock_provided_cert_source + ) + + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", return_value=True + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_default_cert_source, + ): + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source(None, True) + is mock_default_cert_source + ) + assert ( + ZoneVmExtensionPoliciesClient._get_client_cert_source( + mock_provided_cert_source, "true" + ) + is mock_provided_cert_source + ) + + +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test__get_api_endpoint(): + api_override = "foo.com" + mock_client_cert_source = mock.Mock() + default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + api_override, mock_client_cert_source, default_universe, "always" + ) + == api_override + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "auto" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "auto" + ) + == default_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "always" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, default_universe, "always" + ) + == ZoneVmExtensionPoliciesClient.DEFAULT_MTLS_ENDPOINT + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, mock_universe, "never" + ) + == mock_endpoint + ) + assert ( + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, None, default_universe, "never" + ) + == default_endpoint + ) + + with pytest.raises(MutualTLSChannelError) as excinfo: + ZoneVmExtensionPoliciesClient._get_api_endpoint( + None, mock_client_cert_source, mock_universe, "auto" + ) + assert ( + str(excinfo.value) + == "mTLS is not supported in any universe other than googleapis.com." + ) + + +def test__get_universe_domain(): + client_universe_domain = "foo.com" + universe_domain_env = "bar.com" + + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain( + client_universe_domain, universe_domain_env + ) + == client_universe_domain + ) + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain(None, universe_domain_env) + == universe_domain_env + ) + assert ( + ZoneVmExtensionPoliciesClient._get_universe_domain(None, None) + == ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + ) + + with pytest.raises(ValueError) as excinfo: + ZoneVmExtensionPoliciesClient._get_universe_domain("", None) + assert str(excinfo.value) == "Universe Domain cannot be an empty string." + + +@pytest.mark.parametrize( + "error_code,cred_info_json,show_cred_info", + [ + (401, CRED_INFO_JSON, True), + (403, CRED_INFO_JSON, True), + (404, CRED_INFO_JSON, True), + (500, CRED_INFO_JSON, False), + (401, None, False), + (403, None, False), + (404, None, False), + (500, None, False), + ], +) +def test__add_cred_info_for_auth_errors(error_code, cred_info_json, show_cred_info): + cred = mock.Mock(["get_cred_info"]) + cred.get_cred_info = mock.Mock(return_value=cred_info_json) + client = ZoneVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=["foo"]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + if show_cred_info: + assert error.details == ["foo", CRED_INFO_STRING] + else: + assert error.details == ["foo"] + + +@pytest.mark.parametrize("error_code", [401, 403, 404, 500]) +def test__add_cred_info_for_auth_errors_no_get_cred_info(error_code): + cred = mock.Mock([]) + assert not hasattr(cred, "get_cred_info") + client = ZoneVmExtensionPoliciesClient(credentials=cred) + client._transport._credentials = cred + + error = core_exceptions.GoogleAPICallError("message", details=[]) + error.code = error_code + + client._add_cred_info_for_auth_errors(error) + assert error.details == [] + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (ZoneVmExtensionPoliciesClient, "rest"), + ], +) +def test_zone_vm_extension_policies_client_from_service_account_info( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = client_class.from_service_account_info(info, transport=transport_name) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_class,transport_name", + [ + (transports.ZoneVmExtensionPoliciesRestTransport, "rest"), + ], +) +def test_zone_vm_extension_policies_client_service_account_always_use_jwt( + transport_class, transport_name +): + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=True) + use_jwt.assert_called_once_with(True) + + with mock.patch.object( + service_account.Credentials, "with_always_use_jwt_access", create=True + ) as use_jwt: + creds = service_account.Credentials(None, None, None) + transport = transport_class(credentials=creds, always_use_jwt_access=False) + use_jwt.assert_not_called() + + +@pytest.mark.parametrize( + "client_class,transport_name", + [ + (ZoneVmExtensionPoliciesClient, "rest"), + ], +) +def test_zone_vm_extension_policies_client_from_service_account_file( + client_class, transport_name +): + creds = ga_credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_file" + ) as factory: + factory.return_value = creds + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) + assert client.transport._credentials == creds + assert isinstance(client, client_class) + + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +def test_zone_vm_extension_policies_client_get_transport_class(): + transport = ZoneVmExtensionPoliciesClient.get_transport_class() + available_transports = [ + transports.ZoneVmExtensionPoliciesRestTransport, + ] + assert transport in available_transports + + transport = ZoneVmExtensionPoliciesClient.get_transport_class("rest") + assert transport == transports.ZoneVmExtensionPoliciesRestTransport + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_client_options( + client_class, transport_class, transport_name +): + # Check that if channel is provided we won't create a new one. + with mock.patch.object(ZoneVmExtensionPoliciesClient, "get_transport_class") as gtc: + transport = transport_class(credentials=ga_credentials.AnonymousCredentials()) + client = client_class(transport=transport) + gtc.assert_not_called() + + # Check that if channel is provided via str we will create a new one. + with mock.patch.object(ZoneVmExtensionPoliciesClient, "get_transport_class") as gtc: + client = client_class(transport=transport_name) + gtc.assert_called() + + # Check the case api_endpoint is provided. + options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name, client_options=options) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host="squid.clam.whelk", + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT is + # "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client.DEFAULT_MTLS_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client = client_class(transport=transport_name) + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Check the case quota_project_id is provided + options = client_options.ClientOptions(quota_project_id="octopus") + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id="octopus", + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + # Check the case api_endpoint is provided + options = client_options.ClientOptions( + api_audience="https://language.googleapis.com" + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience="https://language.googleapis.com", + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,use_client_cert_env", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + "true", + ), + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + "false", + ), + ], +) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +@mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "auto"}) +def test_zone_vm_extension_policies_client_mtls_env_auto( + client_class, transport_class, transport_name, use_client_cert_env +): + # This tests the endpoint autoswitch behavior. Endpoint is autoswitched to the default + # mtls endpoint, if GOOGLE_API_USE_CLIENT_CERTIFICATE is "true" and client cert exists. + + # Check the case client_cert_source is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + options = client_options.ClientOptions( + client_cert_source=client_cert_source_callback + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + + if use_client_cert_env == "false": + expected_client_cert_source = None + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + else: + expected_client_cert_source = client_cert_source_callback + expected_host = client.DEFAULT_MTLS_ENDPOINT + + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case ADC client cert is provided. Whether client cert is used depends on + # GOOGLE_API_USE_CLIENT_CERTIFICATE value. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=client_cert_source_callback, + ): + if use_client_cert_env == "false": + expected_host = client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ) + expected_client_cert_source = None + else: + expected_host = client.DEFAULT_MTLS_ENDPOINT + expected_client_cert_source = client_cert_source_callback + + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=expected_host, + scopes=None, + client_cert_source_for_mtls=expected_client_cert_source, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + # Check the case client_cert_source and ADC client cert are not provided. + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": use_client_cert_env} + ): + with mock.patch.object(transport_class, "__init__") as patched: + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + patched.return_value = None + client = client_class(transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize("client_class", [ZoneVmExtensionPoliciesClient]) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_get_mtls_endpoint_and_cert_source( + client_class, +): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "Unsupported". + with mock.patch.dict( + os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} + ): + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset. + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", None) + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test cases for mTLS enablement when GOOGLE_API_USE_CLIENT_CERTIFICATE is unset(empty). + test_cases = [ + ( + # With workloads present in config, mTLS is enabled. + { + "version": 1, + "cert_configs": { + "workload": { + "cert_path": "path/to/cert/file", + "key_path": "path/to/key/file", + } + }, + }, + mock_client_cert_source, + ), + ( + # With workloads not present in config, mTLS is disabled. + { + "version": 1, + "cert_configs": {}, + }, + None, + ), + ] + if hasattr(google.auth.transport.mtls, "should_use_client_cert"): + for config_data, expected_cert_source in test_cases: + env = os.environ.copy() + env.pop("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") + with mock.patch.dict(os.environ, env, clear=True): + config_filename = "mock_certificate_config.json" + config_file_content = json.dumps(config_data) + m = mock.mock_open(read_data=config_file_content) + with mock.patch("builtins.open", m): + with mock.patch.dict( + os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} + ): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, + api_endpoint=mock_api_endpoint, + ) + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source(options) + assert api_endpoint == mock_api_endpoint + assert cert_source is expected_cert_source + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + # Check the case api_endpoint is not provided and GOOGLE_API_USE_MTLS_ENDPOINT has + # unsupported value. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): + with pytest.raises(MutualTLSChannelError) as excinfo: + client_class.get_mtls_endpoint_and_cert_source() + + assert ( + str(excinfo.value) + == "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + +@pytest.mark.parametrize("client_class", [ZoneVmExtensionPoliciesClient]) +@mock.patch.object( + ZoneVmExtensionPoliciesClient, + "_DEFAULT_ENDPOINT_TEMPLATE", + modify_default_endpoint_template(ZoneVmExtensionPoliciesClient), +) +def test_zone_vm_extension_policies_client_client_api_endpoint(client_class): + mock_client_cert_source = client_cert_source_callback + api_override = "foo.com" + default_universe = ZoneVmExtensionPoliciesClient._DEFAULT_UNIVERSE + default_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=default_universe + ) + mock_universe = "bar.com" + mock_endpoint = ZoneVmExtensionPoliciesClient._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=mock_universe + ) + + # If ClientOptions.api_endpoint is set and GOOGLE_API_USE_CLIENT_CERTIFICATE="true", + # use ClientOptions.api_endpoint as the api endpoint regardless. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ): + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=api_override + ) + client = client_class( + client_options=options, + credentials=ga_credentials.AnonymousCredentials(), + ) + assert client.api_endpoint == api_override + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == default_endpoint + + # If ClientOptions.api_endpoint is not set and GOOGLE_API_USE_MTLS_ENDPOINT="always", + # use the DEFAULT_MTLS_ENDPOINT as the api endpoint. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + client = client_class(credentials=ga_credentials.AnonymousCredentials()) + assert client.api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + + # If ClientOptions.api_endpoint is not set, GOOGLE_API_USE_MTLS_ENDPOINT="auto" (default), + # GOOGLE_API_USE_CLIENT_CERTIFICATE="false" (default), default cert source doesn't exist, + # and ClientOptions.universe_domain="bar.com", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with universe domain as the api endpoint. + options = client_options.ClientOptions() + universe_exists = hasattr(options, "universe_domain") + if universe_exists: + options = client_options.ClientOptions(universe_domain=mock_universe) + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + else: + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == ( + mock_endpoint if universe_exists else default_endpoint + ) + assert client.universe_domain == ( + mock_universe if universe_exists else default_universe + ) + + # If ClientOptions does not have a universe domain attribute and GOOGLE_API_USE_MTLS_ENDPOINT="never", + # use the _DEFAULT_ENDPOINT_TEMPLATE populated with GDU as the api endpoint. + options = client_options.ClientOptions() + if hasattr(options, "universe_domain"): + delattr(options, "universe_domain") + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + client = client_class( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + assert client.api_endpoint == default_endpoint + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + ), + ], +) +def test_zone_vm_extension_policies_client_client_options_scopes( + client_class, transport_class, transport_name +): + # Check the case scopes are provided. + options = client_options.ClientOptions( + scopes=["1", "2"], + ) + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=["1", "2"], + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + "rest", + None, + ), + ], +) +def test_zone_vm_extension_policies_client_client_options_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + ) + + +def test_delete_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_rest_required_fields( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_delete_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete( + compute.DeleteZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_delete_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.delete in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.delete] = mock_rpc + + request = {} + client.delete_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.delete_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_delete_unary_rest_required_fields( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).delete._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "delete", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.delete_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_delete_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.delete._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_delete_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.delete_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_delete_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_unary( + compute.DeleteZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_get_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.get in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.get] = mock_rpc + + request = {} + client.get(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.get(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_get_rest_required_fields(request_type=compute.GetZoneVmExtensionPolicyRequest): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).get._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.get(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_get_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.get._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(()) + & set( + ( + "project", + "vmExtensionPolicy", + "zone", + ) + ) + ) + + +def test_get_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.get(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_get_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get( + compute.GetZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + ) + + +def test_insert_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_rest_required_fields( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_insert_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert( + compute.InsertZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_insert_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.insert in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.insert] = mock_rpc + + request = {} + client.insert_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.insert_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_insert_unary_rest_required_fields( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).insert._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "post", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.insert_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_insert_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.insert._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_insert_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.insert_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_insert_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.insert_unary( + compute.InsertZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_list_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.list in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.list] = mock_rpc + + request = {} + client.list(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.list(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_list_rest_required_fields( + request_type=compute.ListZoneVmExtensionPoliciesRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "max_results", + "order_by", + "page_token", + "return_partial_success", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "maxResults", + "orderBy", + "pageToken", + "returnPartialSuccess", + ) + ) + & set( + ( + "project", + "zone", + ) + ) + ) + + +def test_list_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList() + + # get arguments that satisfy an http rule for this method + sample_request = {"project": "sample1", "zone": "sample2"} + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies" + % client.transport._host, + args[1], + ) + + +def test_list_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list( + compute.ListZoneVmExtensionPoliciesRequest(), + project="project_value", + zone="zone_value", + ) + + +def test_list_rest_pager(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + ], + next_page_token="abc", + ), + compute.VmExtensionPolicyList( + items=[], + next_page_token="def", + ), + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + ], + next_page_token="ghi", + ), + compute.VmExtensionPolicyList( + items=[ + compute.VmExtensionPolicy(), + compute.VmExtensionPolicy(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(compute.VmExtensionPolicyList.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = {"project": "sample1", "zone": "sample2"} + + pager = client.list(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, compute.VmExtensionPolicy) for i in results) + + pages = list(client.list(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_update_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_rest_required_fields( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_update_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update( + compute.UpdateZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_update_unary_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.update in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.update] = mock_rpc + + request = {} + client.update_unary(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + # Operation methods build a cached wrapper on first rpc call + # subsequent calls should use the cached wrapper + wrapper_fn.reset_mock() + + client.update_unary(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_update_unary_rest_required_fields( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + transport_class = transports.ZoneVmExtensionPoliciesRestTransport + + request_init = {} + request_init["project"] = "" + request_init["vm_extension_policy"] = "" + request_init["zone"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["project"] = "project_value" + jsonified_request["vmExtensionPolicy"] = "vm_extension_policy_value" + jsonified_request["zone"] = "zone_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).update._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("request_id",)) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "project" in jsonified_request + assert jsonified_request["project"] == "project_value" + assert "vmExtensionPolicy" in jsonified_request + assert jsonified_request["vmExtensionPolicy"] == "vm_extension_policy_value" + assert "zone" in jsonified_request + assert jsonified_request["zone"] == "zone_value" + + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "patch", + "query_params": pb_request, + } + transcode_result["body"] = pb_request + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.update_unary(request) + + expected_params = [] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_update_unary_rest_unset_required_fields(): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.update._get_unset_required_fields({}) + assert set(unset_fields) == ( + set(("requestId",)) + & set( + ( + "project", + "vmExtensionPolicy", + "vmExtensionPolicyResource", + "zone", + ) + ) + ) + + +def test_update_unary_rest_flattened(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation() + + # get arguments that satisfy an http rule for this method + sample_request = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + + # get truthy value for each flattened field + mock_args = dict( + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.update_unary(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vm_extension_policy}" + % client.transport._host, + args[1], + ) + + +def test_update_unary_rest_flattened_error(transport: str = "rest"): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_unary( + compute.UpdateZoneVmExtensionPolicyRequest(), + project="project_value", + zone="zone_value", + vm_extension_policy="vm_extension_policy_value", + vm_extension_policy_resource=compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value" + ), + ) + + +def test_credentials_transport_error(): + # It is an error to provide credentials and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # It is an error to provide a credentials file and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options={"credentials_file": "credentials.json"}, + transport=transport, + ) + + # It is an error to provide an api_key and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options=options, + transport=transport, + ) + + # It is an error to provide an api_key and a credential. + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + + # It is an error to provide scopes and a transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + with pytest.raises(ValueError): + client = ZoneVmExtensionPoliciesClient( + client_options={"scopes": ["1", "2"]}, + transport=transport, + ) + + +def test_transport_instance(): + # A client may be instantiated with a custom transport instance. + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + assert client.transport is transport + + +@pytest.mark.parametrize( + "transport_class", + [ + transports.ZoneVmExtensionPoliciesRestTransport, + ], +) +def test_transport_adc(transport_class): + # Test default credentials are used if not provided. + with mock.patch.object(google.auth, "default") as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport_class() + adc.assert_called_once() + + +def test_transport_kind_rest(): + transport = ZoneVmExtensionPoliciesClient.get_transport_class("rest")( + credentials=ga_credentials.AnonymousCredentials() + ) + assert transport.kind == "rest" + + +def test_delete_rest_bad_request( + request_type=compute.DeleteZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.DeleteZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_delete_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_delete" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_delete_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_delete" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.DeleteZoneVmExtensionPolicyRequest.pb( + compute.DeleteZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.DeleteZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.delete( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_get_rest_bad_request(request_type=compute.GetZoneVmExtensionPolicyRequest): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.get(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.GetZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_get_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicy( + creation_timestamp="creation_timestamp_value", + description="description_value", + global_resource_link="global_resource_link_value", + id=205, + kind="kind_value", + managed_by_global=True, + name="name_value", + priority=898, + self_link="self_link_value", + self_link_with_id="self_link_with_id_value", + state="state_value", + update_timestamp="update_timestamp_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicy.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.get(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, compute.VmExtensionPolicy) + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.global_resource_link == "global_resource_link_value" + assert response.id == 205 + assert response.kind == "kind_value" + assert response.managed_by_global is True + assert response.name == "name_value" + assert response.priority == 898 + assert response.self_link == "self_link_value" + assert response.self_link_with_id == "self_link_with_id_value" + assert response.state == "state_value" + assert response.update_timestamp == "update_timestamp_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_get_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_get" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_get_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_get" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.GetZoneVmExtensionPolicyRequest.pb( + compute.GetZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicy.to_json(compute.VmExtensionPolicy()) + req.return_value.content = return_value + + request = compute.GetZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicy() + post_with_metadata.return_value = compute.VmExtensionPolicy(), metadata + + client.get( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_insert_rest_bad_request( + request_type=compute.InsertZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.insert(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.InsertZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_insert_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request_init["vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "global_resource_link": "global_resource_link_value", + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "managed_by_global": True, + "name": "name_value", + "priority": 898, + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "state": "state_value", + "update_timestamp": "update_timestamp_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.InsertZoneVmExtensionPolicyRequest.meta.fields[ + "vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["vm_extension_policy_resource"][field]) + ): + del request_init["vm_extension_policy_resource"][field][i][subfield] + else: + del request_init["vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.insert(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_insert_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_insert" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_insert_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_insert" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.InsertZoneVmExtensionPolicyRequest.pb( + compute.InsertZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.InsertZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.insert( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_list_rest_bad_request(request_type=compute.ListZoneVmExtensionPoliciesRequest): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.list(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.ListZoneVmExtensionPoliciesRequest, + dict, + ], +) +def test_list_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = {"project": "sample1", "zone": "sample2"} + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.VmExtensionPolicyList( + etag="etag_value", + id="id_value", + kind="kind_value", + next_page_token="next_page_token_value", + self_link="self_link_value", + unreachables=["unreachables_value"], + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.VmExtensionPolicyList.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.list(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListPager) + assert response.etag == "etag_value" + assert response.id == "id_value" + assert response.kind == "kind_value" + assert response.next_page_token == "next_page_token_value" + assert response.self_link == "self_link_value" + assert response.unreachables == ["unreachables_value"] + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_list_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_list" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_list_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_list" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.ListZoneVmExtensionPoliciesRequest.pb( + compute.ListZoneVmExtensionPoliciesRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.VmExtensionPolicyList.to_json( + compute.VmExtensionPolicyList() + ) + req.return_value.content = return_value + + request = compute.ListZoneVmExtensionPoliciesRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.VmExtensionPolicyList() + post_with_metadata.return_value = compute.VmExtensionPolicyList(), metadata + + client.list( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_update_rest_bad_request( + request_type=compute.UpdateZoneVmExtensionPolicyRequest, +): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.update(request) + + +@pytest.mark.parametrize( + "request_type", + [ + compute.UpdateZoneVmExtensionPolicyRequest, + dict, + ], +) +def test_update_rest_call_success(request_type): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "project": "sample1", + "zone": "sample2", + "vm_extension_policy": "sample3", + } + request_init["vm_extension_policy_resource"] = { + "creation_timestamp": "creation_timestamp_value", + "description": "description_value", + "extension_policies": {}, + "global_resource_link": "global_resource_link_value", + "id": 205, + "instance_selectors": [{"label_selector": {"inclusion_labels": {}}}], + "kind": "kind_value", + "managed_by_global": True, + "name": "name_value", + "priority": 898, + "self_link": "self_link_value", + "self_link_with_id": "self_link_with_id_value", + "state": "state_value", + "update_timestamp": "update_timestamp_value", + } + # 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 + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = compute.UpdateZoneVmExtensionPolicyRequest.meta.fields[ + "vm_extension_policy_resource" + ] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init[ + "vm_extension_policy_resource" + ].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range( + 0, len(request_init["vm_extension_policy_resource"][field]) + ): + del request_init["vm_extension_policy_resource"][field][i][subfield] + else: + del request_init["vm_extension_policy_resource"][field][subfield] + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = compute.Operation( + client_operation_id="client_operation_id_value", + creation_timestamp="creation_timestamp_value", + description="description_value", + end_time="end_time_value", + http_error_message="http_error_message_value", + http_error_status_code=2374, + id=205, + insert_time="insert_time_value", + kind="kind_value", + name="name_value", + operation_group_id="operation_group_id_value", + operation_type="operation_type_value", + progress=885, + region="region_value", + self_link="self_link_value", + start_time="start_time_value", + status=compute.Operation.Status.DONE, + status_message="status_message_value", + target_id=947, + target_link="target_link_value", + user="user_value", + zone="zone_value", + ) + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = compute.Operation.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.update(request) + + # Establish that the response is the type that we expect. + assert isinstance(response, extended_operation.ExtendedOperation) + assert response.client_operation_id == "client_operation_id_value" + assert response.creation_timestamp == "creation_timestamp_value" + assert response.description == "description_value" + assert response.end_time == "end_time_value" + assert response.http_error_message == "http_error_message_value" + assert response.http_error_status_code == 2374 + assert response.id == 205 + assert response.insert_time == "insert_time_value" + assert response.kind == "kind_value" + assert response.name == "name_value" + assert response.operation_group_id == "operation_group_id_value" + assert response.operation_type == "operation_type_value" + assert response.progress == 885 + assert response.region == "region_value" + assert response.self_link == "self_link_value" + assert response.start_time == "start_time_value" + assert response.status == compute.Operation.Status.DONE + assert response.status_message == "status_message_value" + assert response.target_id == 947 + assert response.target_link == "target_link_value" + assert response.user == "user_value" + assert response.zone == "zone_value" + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_update_rest_interceptors(null_interceptor): + transport = transports.ZoneVmExtensionPoliciesRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.ZoneVmExtensionPoliciesRestInterceptor(), + ) + client = ZoneVmExtensionPoliciesClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_update" + ) as post, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "post_update_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.ZoneVmExtensionPoliciesRestInterceptor, "pre_update" + ) as pre: + pre.assert_not_called() + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = compute.UpdateZoneVmExtensionPolicyRequest.pb( + compute.UpdateZoneVmExtensionPolicyRequest() + ) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = compute.Operation.to_json(compute.Operation()) + req.return_value.content = return_value + + request = compute.UpdateZoneVmExtensionPolicyRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = compute.Operation() + post_with_metadata.return_value = compute.Operation(), metadata + + client.update( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_initialize_client_w_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + assert client is not None + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_delete_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.delete), "__call__") as call: + client.delete_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.DeleteZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_get_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.get), "__call__") as call: + client.get(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.GetZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_insert_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.insert), "__call__") as call: + client.insert_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.InsertZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_list_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.list), "__call__") as call: + client.list(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.ListZoneVmExtensionPoliciesRequest() + + assert args[0] == request_msg + + +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_update_unary_empty_call_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.update), "__call__") as call: + client.update_unary(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = compute.UpdateZoneVmExtensionPolicyRequest() + + assert args[0] == request_msg + + +def test_zone_vm_extension_policies_base_transport_error(): + # Passing both a credentials object and credentials_file should raise an error + with pytest.raises(core_exceptions.DuplicateCredentialArgs): + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + credentials_file="credentials.json", + ) + + +def test_zone_vm_extension_policies_base_transport(): + # Instantiate the base transport. + with mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport.__init__" + ) as Transport: + Transport.return_value = None + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Every method on the transport should just blindly + # raise NotImplementedError. + methods = ( + "delete", + "get", + "insert", + "list", + "update", + ) + for method in methods: + with pytest.raises(NotImplementedError): + getattr(transport, method)(request=object()) + + with pytest.raises(NotImplementedError): + transport.close() + + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + + +def test_zone_vm_extension_policies_base_transport_with_credentials_file(): + # Instantiate the base transport with a credentials file + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.ZoneVmExtensionPoliciesTransport( + credentials_file="credentials.json", + quota_project_id="octopus", + ) + load_creds.assert_called_once_with( + "credentials.json", + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id="octopus", + ) + + +def test_zone_vm_extension_policies_base_transport_with_adc(): + # Test the default credentials are used if credentials and credentials_file are None. + with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( + "google.cloud.compute_v1beta.services.zone_vm_extension_policies.transports.ZoneVmExtensionPoliciesTransport._prep_wrapped_messages" + ) as Transport: + Transport.return_value = None + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + transport = transports.ZoneVmExtensionPoliciesTransport() + adc.assert_called_once() + + +def test_zone_vm_extension_policies_auth_adc(): + # If no credentials are provided, we should use ADC credentials. + with mock.patch.object(google.auth, "default", autospec=True) as adc: + adc.return_value = (ga_credentials.AnonymousCredentials(), None) + ZoneVmExtensionPoliciesClient() + adc.assert_called_once_with( + scopes=None, + default_scopes=( + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/cloud-platform", + ), + quota_project_id=None, + ) + + +def test_zone_vm_extension_policies_http_transport_client_cert_source_for_mtls(): + cred = ga_credentials.AnonymousCredentials() + with mock.patch( + "google.auth.transport.requests.AuthorizedSession.configure_mtls_channel" + ) as mock_configure_mtls_channel: + transports.ZoneVmExtensionPoliciesRestTransport( + credentials=cred, client_cert_source_for_mtls=client_cert_source_callback + ) + mock_configure_mtls_channel.assert_called_once_with(client_cert_source_callback) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_host_no_port(transport_name): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:443" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_host_with_port(transport_name): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_options=client_options.ClientOptions( + api_endpoint="compute.googleapis.com:8000" + ), + transport=transport_name, + ) + assert client.transport._host == ( + "compute.googleapis.com:8000" + if transport_name in ["grpc", "grpc_asyncio"] + else "https://compute.googleapis.com:8000" + ) + + +@pytest.mark.parametrize( + "transport_name", + [ + "rest", + ], +) +def test_zone_vm_extension_policies_client_transport_session_collision(transport_name): + creds1 = ga_credentials.AnonymousCredentials() + creds2 = ga_credentials.AnonymousCredentials() + client1 = ZoneVmExtensionPoliciesClient( + credentials=creds1, + transport=transport_name, + ) + client2 = ZoneVmExtensionPoliciesClient( + credentials=creds2, + transport=transport_name, + ) + session1 = client1.transport.delete._session + session2 = client2.transport.delete._session + assert session1 != session2 + session1 = client1.transport.get._session + session2 = client2.transport.get._session + assert session1 != session2 + session1 = client1.transport.insert._session + session2 = client2.transport.insert._session + assert session1 != session2 + session1 = client1.transport.list._session + session2 = client2.transport.list._session + assert session1 != session2 + session1 = client1.transport.update._session + session2 = client2.transport.update._session + assert session1 != session2 + + +def test_common_billing_account_path(): + billing_account = "squid" + expected = "billingAccounts/{billing_account}".format( + billing_account=billing_account, + ) + actual = ZoneVmExtensionPoliciesClient.common_billing_account_path(billing_account) + assert expected == actual + + +def test_parse_common_billing_account_path(): + expected = { + "billing_account": "clam", + } + path = ZoneVmExtensionPoliciesClient.common_billing_account_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_billing_account_path(path) + assert expected == actual + + +def test_common_folder_path(): + folder = "whelk" + expected = "folders/{folder}".format( + folder=folder, + ) + actual = ZoneVmExtensionPoliciesClient.common_folder_path(folder) + assert expected == actual + + +def test_parse_common_folder_path(): + expected = { + "folder": "octopus", + } + path = ZoneVmExtensionPoliciesClient.common_folder_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_folder_path(path) + assert expected == actual + + +def test_common_organization_path(): + organization = "oyster" + expected = "organizations/{organization}".format( + organization=organization, + ) + actual = ZoneVmExtensionPoliciesClient.common_organization_path(organization) + assert expected == actual + + +def test_parse_common_organization_path(): + expected = { + "organization": "nudibranch", + } + path = ZoneVmExtensionPoliciesClient.common_organization_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_organization_path(path) + assert expected == actual + + +def test_common_project_path(): + project = "cuttlefish" + expected = "projects/{project}".format( + project=project, + ) + actual = ZoneVmExtensionPoliciesClient.common_project_path(project) + assert expected == actual + + +def test_parse_common_project_path(): + expected = { + "project": "mussel", + } + path = ZoneVmExtensionPoliciesClient.common_project_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_project_path(path) + assert expected == actual + + +def test_common_location_path(): + project = "winkle" + location = "nautilus" + expected = "projects/{project}/locations/{location}".format( + project=project, + location=location, + ) + actual = ZoneVmExtensionPoliciesClient.common_location_path(project, location) + assert expected == actual + + +def test_parse_common_location_path(): + expected = { + "project": "scallop", + "location": "abalone", + } + path = ZoneVmExtensionPoliciesClient.common_location_path(**expected) + + # Check that the path construction is reversible. + actual = ZoneVmExtensionPoliciesClient.parse_common_location_path(path) + assert expected == actual + + +def test_client_with_default_client_info(): + client_info = gapic_v1.client_info.ClientInfo() + + with mock.patch.object( + transports.ZoneVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + with mock.patch.object( + transports.ZoneVmExtensionPoliciesTransport, "_prep_wrapped_messages" + ) as prep: + transport_class = ZoneVmExtensionPoliciesClient.get_transport_class() + transport = transport_class( + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, + ) + prep.assert_called_once_with(client_info) + + +def test_transport_close_rest(): + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + with mock.patch.object( + type(getattr(client.transport, "_session")), "close" + ) as close: + with client: + close.assert_not_called() + close.assert_called_once() + + +def test_client_ctx(): + transports = [ + "rest", + ] + for transport in transports: + client = ZoneVmExtensionPoliciesClient( + credentials=ga_credentials.AnonymousCredentials(), transport=transport + ) + # Test client calls underlying transport. + with mock.patch.object(type(client.transport), "close") as close: + close.assert_not_called() + with client: + pass + close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + ( + ZoneVmExtensionPoliciesClient, + transports.ZoneVmExtensionPoliciesRestTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client._DEFAULT_ENDPOINT_TEMPLATE.format( + UNIVERSE_DOMAIN=client._DEFAULT_UNIVERSE + ), + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + api_audience=None, + )